From 97a907d1fcc26374abe6f32430263eb626cd699f Mon Sep 17 00:00:00 2001 From: "Mike P. Sinn" Date: Wed, 9 Dec 2015 20:29:49 -0600 Subject: [PATCH 1/3] SDK Update --- .../swagger/Api/AggregatedCorrelationApi.cs | 1230 +++++++--- .../Api/CommonVariableRelationshipApi.cs | 1318 +++++++++++ .../csharp/io/swagger/Api/ConnectionApi.cs | 990 +++++--- .../csharp/io/swagger/Api/ConnectorApi.cs | 986 +++++--- .../csharp/io/swagger/Api/CorrelationApi.cs | 1212 +++++++--- .../csharp/io/swagger/Api/CredentialApi.cs | 944 ++++++-- .../csharp/io/swagger/Api/MeasurementApi.cs | 1394 +++++++++--- .../csharp/io/swagger/Api/OrganizationApi.cs | 2003 +++++++++++++++++ src/main/csharp/io/swagger/Api/SourceApi.cs | 920 ++++++-- src/main/csharp/io/swagger/Api/UnitApi.cs | 1020 ++++++--- .../csharp/io/swagger/Api/UnitCategoryApi.cs | 890 ++++++-- src/main/csharp/io/swagger/Api/UpdateApi.cs | 902 ++++++-- .../csharp/io/swagger/Api/UserVariableApi.cs | 1674 +++++++++----- .../Api/UserVariableRelationshipApi.cs | 1298 +++++++++++ src/main/csharp/io/swagger/Api/VariableApi.cs | 1422 ++++++++---- .../io/swagger/Api/VariableCategoryApi.cs | 1060 ++++++--- .../io/swagger/Api/VariableUserSourceApi.cs | 954 ++++++-- src/main/csharp/io/swagger/Api/VoteApi.cs | 954 ++++++-- .../io/swagger/Model/AggregatedCorrelation.cs | 808 ++++--- .../Model/CommonVariableRelationship.cs | 408 ++++ .../csharp/io/swagger/Model/Connection.cs | 386 ++-- src/main/csharp/io/swagger/Model/Connector.cs | 366 ++- .../csharp/io/swagger/Model/Correlation.cs | 737 +++--- .../csharp/io/swagger/Model/Credential.cs | 241 +- .../io/swagger/Model/InlineResponse200.cs | 141 +- .../io/swagger/Model/InlineResponse2001.cs | 141 +- .../io/swagger/Model/InlineResponse20010.cs | 141 +- .../io/swagger/Model/InlineResponse20011.cs | 141 +- .../io/swagger/Model/InlineResponse20012.cs | 141 +- .../io/swagger/Model/InlineResponse20013.cs | 141 +- .../io/swagger/Model/InlineResponse20014.cs | 141 +- .../io/swagger/Model/InlineResponse20015.cs | 141 +- .../io/swagger/Model/InlineResponse20016.cs | 141 +- .../io/swagger/Model/InlineResponse20017.cs | 141 +- .../io/swagger/Model/InlineResponse20018.cs | 141 +- .../io/swagger/Model/InlineResponse20019.cs | 141 +- .../io/swagger/Model/InlineResponse2002.cs | 141 +- .../io/swagger/Model/InlineResponse20020.cs | 141 +- .../io/swagger/Model/InlineResponse20021.cs | 141 +- .../io/swagger/Model/InlineResponse20022.cs | 141 +- .../io/swagger/Model/InlineResponse20023.cs | 141 +- .../io/swagger/Model/InlineResponse20024.cs | 141 +- .../io/swagger/Model/InlineResponse20025.cs | 141 +- .../io/swagger/Model/InlineResponse20026.cs | 141 +- .../io/swagger/Model/InlineResponse20027.cs | 141 +- .../io/swagger/Model/InlineResponse20028.cs | 141 +- .../io/swagger/Model/InlineResponse20029.cs | 141 +- .../io/swagger/Model/InlineResponse2003.cs | 141 +- .../io/swagger/Model/InlineResponse20030.cs | 141 +- .../io/swagger/Model/InlineResponse20031.cs | 117 + .../io/swagger/Model/InlineResponse20032.cs | 117 + .../io/swagger/Model/InlineResponse20033.cs | 117 + .../io/swagger/Model/InlineResponse20034.cs | 117 + .../io/swagger/Model/InlineResponse2004.cs | 141 +- .../io/swagger/Model/InlineResponse2005.cs | 141 +- .../io/swagger/Model/InlineResponse2006.cs | 141 +- .../io/swagger/Model/InlineResponse2007.cs | 141 +- .../io/swagger/Model/InlineResponse2008.cs | 141 +- .../io/swagger/Model/InlineResponse2009.cs | 141 +- .../csharp/io/swagger/Model/Measurement.cs | 602 +++-- .../io/swagger/Model/MeasurementExport.cs | 251 ++- .../io/swagger/Model/MeasurementPost.cs | 197 +- .../io/swagger/Model/MeasurementValue.cs | 162 +- src/main/csharp/io/swagger/Model/Source.cs | 224 +- src/main/csharp/io/swagger/Model/Unit.cs | 440 ++-- .../csharp/io/swagger/Model/UnitCategory.cs | 197 +- .../csharp/io/swagger/Model/UnitConversion.cs | 251 ++- src/main/csharp/io/swagger/Model/Update.cs | 305 ++- .../csharp/io/swagger/Model/UserVariable.cs | 1524 ++++++++----- .../swagger/Model/UserVariableRelationship.cs | 374 +++ src/main/csharp/io/swagger/Model/Variable.cs | 1075 +++++---- .../io/swagger/Model/VariableCategory.cs | 521 +++-- .../io/swagger/Model/VariableUserSource.cs | 305 ++- src/main/csharp/io/swagger/Model/Vote.cs | 305 ++- .../csharp/io/swagger/client/ApiClient.cs | 192 +- .../csharp/io/swagger/client/ApiException.cs | 91 +- .../csharp/io/swagger/client/ApiResponse.cs | 44 + .../csharp/io/swagger/client/Configuration.cs | 72 +- 78 files changed, 27223 insertions(+), 8865 deletions(-) create mode 100644 src/main/csharp/io/swagger/Api/CommonVariableRelationshipApi.cs create mode 100644 src/main/csharp/io/swagger/Api/OrganizationApi.cs create mode 100644 src/main/csharp/io/swagger/Api/UserVariableRelationshipApi.cs create mode 100644 src/main/csharp/io/swagger/Model/CommonVariableRelationship.cs create mode 100644 src/main/csharp/io/swagger/Model/InlineResponse20031.cs create mode 100644 src/main/csharp/io/swagger/Model/InlineResponse20032.cs create mode 100644 src/main/csharp/io/swagger/Model/InlineResponse20033.cs create mode 100644 src/main/csharp/io/swagger/Model/InlineResponse20034.cs create mode 100644 src/main/csharp/io/swagger/Model/UserVariableRelationship.cs create mode 100644 src/main/csharp/io/swagger/client/ApiResponse.cs diff --git a/src/main/csharp/io/swagger/Api/AggregatedCorrelationApi.cs b/src/main/csharp/io/swagger/Api/AggregatedCorrelationApi.cs index 5085239..1944e73 100644 --- a/src/main/csharp/io/swagger/Api/AggregatedCorrelationApi.cs +++ b/src/main/csharp/io/swagger/Api/AggregatedCorrelationApi.cs @@ -1,6 +1,7 @@ using System; using System.IO; using System.Collections.Generic; +using System.Linq; using RestSharp; using IO.Swagger.Client; using IO.Swagger.Model; @@ -20,36 +21,36 @@ public interface IAggregatedCorrelationApi /// /// Get all AggregatedCorrelations /// - /// correlation - /// cause_id - /// effect_id - /// onset_delay - /// duration_of_action - /// number_of_pairs - /// value_predicting_high_outcome - /// value_predicting_low_outcome - /// optimal_pearson_product - /// vote - /// number_of_users - /// number_of_correlations - /// statistical_significance - /// cause_unit - /// cause_unit_id - /// cause_changes - /// effect_changes - /// aggregate_qm_score - /// created_at - /// updated_at - /// status - /// error_message - /// last_successful_update_time - /// reverse_pearson_correlation_coefficient - /// predictive_pearson_correlation_coefficient - /// limit - /// offset - /// sort + /// User's OAuth2 access token + /// Pearson correlation coefficient between cause and effect measurements + /// Variable ID of the predictor variable for which the user desires correlations + /// Variable ID of the outcome variable for which the user desires correlations + /// User estimated (or default number of seconds) after cause measurement before a perceivable effect is observed + /// Number of seconds over which the predictor variable event is expected to produce a perceivable effect following the onset delay + /// Number of predictor/outcome data points used in the analysis + /// Predictor daily aggregated measurement value that predicts an above average effect measurement value (in default unit for predictor variable) + /// Predictor daily aggregated measurement value that predicts a below average effect measurement value (in default unit for outcome variable) + /// Optimal Pearson Product + /// Number of users whose data was used in this aggregation + /// Number of correlational analyses used in this aggregation + /// A function of the effect size and sample size + /// Abbreviated unit name for the predictor variable + /// Unit ID for the predictor variable + /// Number of times that the predictor time series changes + /// Number of times that the predictor time series changes + /// Aggregated QM Score which is directly proportional with the relevance of each predictor or outcome + /// Date at which the analysis was first performed + /// Date at which the analysis was last updated + /// Indicates whether an analysis is up to date (UPDATED), needs to be updated (WAITING), or had an error (ERROR) + /// Message describing any problems encountered during the analysis + /// Last Successful update time + /// Correlation when cause and effect are reversed. For any causal relationship, the forward correlation should exceed the reverse correlation + /// Predictive Pearson Correlation Coefficient + /// Limit the number of results returned + /// Records from give Offset + /// Sort records by given field /// InlineResponse200 - InlineResponse200 AggregatedCorrelationsGet (double? correlation, int? causeId, int? effectId, int? onsetDelay, int? durationOfAction, int? numberOfPairs, double? valuePredictingHighOutcome, double? valuePredictingLowOutcome, double? optimalPearsonProduct, double? vote, int? numberOfUsers, int? numberOfCorrelations, double? statisticalSignificance, string causeUnit, int? causeUnitId, int? causeChanges, int? effectChanges, double? aggregateQmScore, string createdAt, string updatedAt, string status, string errorMessage, string lastSuccessfulUpdateTime, double? reversePearsonCorrelationCoefficient, double? predictivePearsonCorrelationCoefficient, int? limit, int? offset, string sort); + InlineResponse200 AggregatedCorrelationsGet (string accessToken = null, double? correlation = null, int? causeId = null, int? effectId = null, int? onsetDelay = null, int? durationOfAction = null, int? numberOfPairs = null, double? valuePredictingHighOutcome = null, double? valuePredictingLowOutcome = null, double? optimalPearsonProduct = null, int? numberOfUsers = null, int? numberOfCorrelations = null, double? statisticalSignificance = null, string causeUnit = null, int? causeUnitId = null, int? causeChanges = null, int? effectChanges = null, double? aggregateQmScore = null, string createdAt = null, string updatedAt = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, double? reversePearsonCorrelationCoefficient = null, double? predictivePearsonCorrelationCoefficient = null, int? limit = null, int? offset = null, string sort = null); /// /// Get all AggregatedCorrelations @@ -57,36 +58,110 @@ public interface IAggregatedCorrelationApi /// /// Get all AggregatedCorrelations /// - /// correlation - /// cause_id - /// effect_id - /// onset_delay - /// duration_of_action - /// number_of_pairs - /// value_predicting_high_outcome - /// value_predicting_low_outcome - /// optimal_pearson_product - /// vote - /// number_of_users - /// number_of_correlations - /// statistical_significance - /// cause_unit - /// cause_unit_id - /// cause_changes - /// effect_changes - /// aggregate_qm_score - /// created_at - /// updated_at - /// status - /// error_message - /// last_successful_update_time - /// reverse_pearson_correlation_coefficient - /// predictive_pearson_correlation_coefficient - /// limit - /// offset - /// sort - /// InlineResponse200 - System.Threading.Tasks.Task AggregatedCorrelationsGetAsync (double? correlation, int? causeId, int? effectId, int? onsetDelay, int? durationOfAction, int? numberOfPairs, double? valuePredictingHighOutcome, double? valuePredictingLowOutcome, double? optimalPearsonProduct, double? vote, int? numberOfUsers, int? numberOfCorrelations, double? statisticalSignificance, string causeUnit, int? causeUnitId, int? causeChanges, int? effectChanges, double? aggregateQmScore, string createdAt, string updatedAt, string status, string errorMessage, string lastSuccessfulUpdateTime, double? reversePearsonCorrelationCoefficient, double? predictivePearsonCorrelationCoefficient, int? limit, int? offset, string sort); + /// User's OAuth2 access token + /// Pearson correlation coefficient between cause and effect measurements + /// Variable ID of the predictor variable for which the user desires correlations + /// Variable ID of the outcome variable for which the user desires correlations + /// User estimated (or default number of seconds) after cause measurement before a perceivable effect is observed + /// Number of seconds over which the predictor variable event is expected to produce a perceivable effect following the onset delay + /// Number of predictor/outcome data points used in the analysis + /// Predictor daily aggregated measurement value that predicts an above average effect measurement value (in default unit for predictor variable) + /// Predictor daily aggregated measurement value that predicts a below average effect measurement value (in default unit for outcome variable) + /// Optimal Pearson Product + /// Number of users whose data was used in this aggregation + /// Number of correlational analyses used in this aggregation + /// A function of the effect size and sample size + /// Abbreviated unit name for the predictor variable + /// Unit ID for the predictor variable + /// Number of times that the predictor time series changes + /// Number of times that the predictor time series changes + /// Aggregated QM Score which is directly proportional with the relevance of each predictor or outcome + /// Date at which the analysis was first performed + /// Date at which the analysis was last updated + /// Indicates whether an analysis is up to date (UPDATED), needs to be updated (WAITING), or had an error (ERROR) + /// Message describing any problems encountered during the analysis + /// Last Successful update time + /// Correlation when cause and effect are reversed. For any causal relationship, the forward correlation should exceed the reverse correlation + /// Predictive Pearson Correlation Coefficient + /// Limit the number of results returned + /// Records from give Offset + /// Sort records by given field + /// ApiResponse of InlineResponse200 + ApiResponse AggregatedCorrelationsGetWithHttpInfo (string accessToken = null, double? correlation = null, int? causeId = null, int? effectId = null, int? onsetDelay = null, int? durationOfAction = null, int? numberOfPairs = null, double? valuePredictingHighOutcome = null, double? valuePredictingLowOutcome = null, double? optimalPearsonProduct = null, int? numberOfUsers = null, int? numberOfCorrelations = null, double? statisticalSignificance = null, string causeUnit = null, int? causeUnitId = null, int? causeChanges = null, int? effectChanges = null, double? aggregateQmScore = null, string createdAt = null, string updatedAt = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, double? reversePearsonCorrelationCoefficient = null, double? predictivePearsonCorrelationCoefficient = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Get all AggregatedCorrelations + /// + /// + /// Get all AggregatedCorrelations + /// + /// User's OAuth2 access token + /// Pearson correlation coefficient between cause and effect measurements + /// Variable ID of the predictor variable for which the user desires correlations + /// Variable ID of the outcome variable for which the user desires correlations + /// User estimated (or default number of seconds) after cause measurement before a perceivable effect is observed + /// Number of seconds over which the predictor variable event is expected to produce a perceivable effect following the onset delay + /// Number of predictor/outcome data points used in the analysis + /// Predictor daily aggregated measurement value that predicts an above average effect measurement value (in default unit for predictor variable) + /// Predictor daily aggregated measurement value that predicts a below average effect measurement value (in default unit for outcome variable) + /// Optimal Pearson Product + /// Number of users whose data was used in this aggregation + /// Number of correlational analyses used in this aggregation + /// A function of the effect size and sample size + /// Abbreviated unit name for the predictor variable + /// Unit ID for the predictor variable + /// Number of times that the predictor time series changes + /// Number of times that the predictor time series changes + /// Aggregated QM Score which is directly proportional with the relevance of each predictor or outcome + /// Date at which the analysis was first performed + /// Date at which the analysis was last updated + /// Indicates whether an analysis is up to date (UPDATED), needs to be updated (WAITING), or had an error (ERROR) + /// Message describing any problems encountered during the analysis + /// Last Successful update time + /// Correlation when cause and effect are reversed. For any causal relationship, the forward correlation should exceed the reverse correlation + /// Predictive Pearson Correlation Coefficient + /// Limit the number of results returned + /// Records from give Offset + /// Sort records by given field + /// Task of InlineResponse200 + System.Threading.Tasks.Task AggregatedCorrelationsGetAsync (string accessToken = null, double? correlation = null, int? causeId = null, int? effectId = null, int? onsetDelay = null, int? durationOfAction = null, int? numberOfPairs = null, double? valuePredictingHighOutcome = null, double? valuePredictingLowOutcome = null, double? optimalPearsonProduct = null, int? numberOfUsers = null, int? numberOfCorrelations = null, double? statisticalSignificance = null, string causeUnit = null, int? causeUnitId = null, int? causeChanges = null, int? effectChanges = null, double? aggregateQmScore = null, string createdAt = null, string updatedAt = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, double? reversePearsonCorrelationCoefficient = null, double? predictivePearsonCorrelationCoefficient = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Get all AggregatedCorrelations + /// + /// + /// Get all AggregatedCorrelations + /// + /// User's OAuth2 access token + /// Pearson correlation coefficient between cause and effect measurements + /// Variable ID of the predictor variable for which the user desires correlations + /// Variable ID of the outcome variable for which the user desires correlations + /// User estimated (or default number of seconds) after cause measurement before a perceivable effect is observed + /// Number of seconds over which the predictor variable event is expected to produce a perceivable effect following the onset delay + /// Number of predictor/outcome data points used in the analysis + /// Predictor daily aggregated measurement value that predicts an above average effect measurement value (in default unit for predictor variable) + /// Predictor daily aggregated measurement value that predicts a below average effect measurement value (in default unit for outcome variable) + /// Optimal Pearson Product + /// Number of users whose data was used in this aggregation + /// Number of correlational analyses used in this aggregation + /// A function of the effect size and sample size + /// Abbreviated unit name for the predictor variable + /// Unit ID for the predictor variable + /// Number of times that the predictor time series changes + /// Number of times that the predictor time series changes + /// Aggregated QM Score which is directly proportional with the relevance of each predictor or outcome + /// Date at which the analysis was first performed + /// Date at which the analysis was last updated + /// Indicates whether an analysis is up to date (UPDATED), needs to be updated (WAITING), or had an error (ERROR) + /// Message describing any problems encountered during the analysis + /// Last Successful update time + /// Correlation when cause and effect are reversed. For any causal relationship, the forward correlation should exceed the reverse correlation + /// Predictive Pearson Correlation Coefficient + /// Limit the number of results returned + /// Records from give Offset + /// Sort records by given field + /// Task of ApiResponse (InlineResponse200) + System.Threading.Tasks.Task> AggregatedCorrelationsGetAsyncWithHttpInfo (string accessToken = null, double? correlation = null, int? causeId = null, int? effectId = null, int? onsetDelay = null, int? durationOfAction = null, int? numberOfPairs = null, double? valuePredictingHighOutcome = null, double? valuePredictingLowOutcome = null, double? optimalPearsonProduct = null, int? numberOfUsers = null, int? numberOfCorrelations = null, double? statisticalSignificance = null, string causeUnit = null, int? causeUnitId = null, int? causeChanges = null, int? effectChanges = null, double? aggregateQmScore = null, string createdAt = null, string updatedAt = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, double? reversePearsonCorrelationCoefficient = null, double? predictivePearsonCorrelationCoefficient = null, int? limit = null, int? offset = null, string sort = null); /// /// Store AggregatedCorrelation @@ -94,9 +169,10 @@ public interface IAggregatedCorrelationApi /// /// Store AggregatedCorrelation /// + /// User's OAuth2 access token /// AggregatedCorrelation that should be stored /// InlineResponse2001 - InlineResponse2001 AggregatedCorrelationsPost (AggregatedCorrelation body); + InlineResponse2001 AggregatedCorrelationsPost (string accessToken = null, AggregatedCorrelation body = null); /// /// Store AggregatedCorrelation @@ -104,9 +180,32 @@ public interface IAggregatedCorrelationApi /// /// Store AggregatedCorrelation /// + /// User's OAuth2 access token /// AggregatedCorrelation that should be stored - /// InlineResponse2001 - System.Threading.Tasks.Task AggregatedCorrelationsPostAsync (AggregatedCorrelation body); + /// ApiResponse of InlineResponse2001 + ApiResponse AggregatedCorrelationsPostWithHttpInfo (string accessToken = null, AggregatedCorrelation body = null); + + /// + /// Store AggregatedCorrelation + /// + /// + /// Store AggregatedCorrelation + /// + /// User's OAuth2 access token + /// AggregatedCorrelation that should be stored + /// Task of InlineResponse2001 + System.Threading.Tasks.Task AggregatedCorrelationsPostAsync (string accessToken = null, AggregatedCorrelation body = null); + + /// + /// Store AggregatedCorrelation + /// + /// + /// Store AggregatedCorrelation + /// + /// User's OAuth2 access token + /// AggregatedCorrelation that should be stored + /// Task of ApiResponse (InlineResponse2001) + System.Threading.Tasks.Task> AggregatedCorrelationsPostAsyncWithHttpInfo (string accessToken = null, AggregatedCorrelation body = null); /// /// Get AggregatedCorrelation @@ -115,8 +214,9 @@ public interface IAggregatedCorrelationApi /// Get AggregatedCorrelation /// /// id of AggregatedCorrelation + /// User's OAuth2 access token /// InlineResponse2001 - InlineResponse2001 AggregatedCorrelationsIdGet (int? id); + InlineResponse2001 AggregatedCorrelationsIdGet (int? id, string accessToken = null); /// /// Get AggregatedCorrelation @@ -125,8 +225,31 @@ public interface IAggregatedCorrelationApi /// Get AggregatedCorrelation /// /// id of AggregatedCorrelation - /// InlineResponse2001 - System.Threading.Tasks.Task AggregatedCorrelationsIdGetAsync (int? id); + /// User's OAuth2 access token + /// ApiResponse of InlineResponse2001 + ApiResponse AggregatedCorrelationsIdGetWithHttpInfo (int? id, string accessToken = null); + + /// + /// Get AggregatedCorrelation + /// + /// + /// Get AggregatedCorrelation + /// + /// id of AggregatedCorrelation + /// User's OAuth2 access token + /// Task of InlineResponse2001 + System.Threading.Tasks.Task AggregatedCorrelationsIdGetAsync (int? id, string accessToken = null); + + /// + /// Get AggregatedCorrelation + /// + /// + /// Get AggregatedCorrelation + /// + /// id of AggregatedCorrelation + /// User's OAuth2 access token + /// Task of ApiResponse (InlineResponse2001) + System.Threading.Tasks.Task> AggregatedCorrelationsIdGetAsyncWithHttpInfo (int? id, string accessToken = null); /// /// Update AggregatedCorrelation @@ -135,9 +258,10 @@ public interface IAggregatedCorrelationApi /// Update AggregatedCorrelation /// /// id of AggregatedCorrelation + /// User's OAuth2 access token /// AggregatedCorrelation that should be updated /// InlineResponse2002 - InlineResponse2002 AggregatedCorrelationsIdPut (int? id, AggregatedCorrelation body); + InlineResponse2002 AggregatedCorrelationsIdPut (int? id, string accessToken = null, AggregatedCorrelation body = null); /// /// Update AggregatedCorrelation @@ -146,9 +270,34 @@ public interface IAggregatedCorrelationApi /// Update AggregatedCorrelation /// /// id of AggregatedCorrelation + /// User's OAuth2 access token /// AggregatedCorrelation that should be updated - /// InlineResponse2002 - System.Threading.Tasks.Task AggregatedCorrelationsIdPutAsync (int? id, AggregatedCorrelation body); + /// ApiResponse of InlineResponse2002 + ApiResponse AggregatedCorrelationsIdPutWithHttpInfo (int? id, string accessToken = null, AggregatedCorrelation body = null); + + /// + /// Update AggregatedCorrelation + /// + /// + /// Update AggregatedCorrelation + /// + /// id of AggregatedCorrelation + /// User's OAuth2 access token + /// AggregatedCorrelation that should be updated + /// Task of InlineResponse2002 + System.Threading.Tasks.Task AggregatedCorrelationsIdPutAsync (int? id, string accessToken = null, AggregatedCorrelation body = null); + + /// + /// Update AggregatedCorrelation + /// + /// + /// Update AggregatedCorrelation + /// + /// id of AggregatedCorrelation + /// User's OAuth2 access token + /// AggregatedCorrelation that should be updated + /// Task of ApiResponse (InlineResponse2002) + System.Threading.Tasks.Task> AggregatedCorrelationsIdPutAsyncWithHttpInfo (int? id, string accessToken = null, AggregatedCorrelation body = null); /// /// Delete AggregatedCorrelation @@ -157,8 +306,9 @@ public interface IAggregatedCorrelationApi /// Delete AggregatedCorrelation /// /// id of AggregatedCorrelation + /// User's OAuth2 access token /// InlineResponse2002 - InlineResponse2002 AggregatedCorrelationsIdDelete (int? id); + InlineResponse2002 AggregatedCorrelationsIdDelete (int? id, string accessToken = null); /// /// Delete AggregatedCorrelation @@ -167,8 +317,31 @@ public interface IAggregatedCorrelationApi /// Delete AggregatedCorrelation /// /// id of AggregatedCorrelation - /// InlineResponse2002 - System.Threading.Tasks.Task AggregatedCorrelationsIdDeleteAsync (int? id); + /// User's OAuth2 access token + /// ApiResponse of InlineResponse2002 + ApiResponse AggregatedCorrelationsIdDeleteWithHttpInfo (int? id, string accessToken = null); + + /// + /// Delete AggregatedCorrelation + /// + /// + /// Delete AggregatedCorrelation + /// + /// id of AggregatedCorrelation + /// User's OAuth2 access token + /// Task of InlineResponse2002 + System.Threading.Tasks.Task AggregatedCorrelationsIdDeleteAsync (int? id, string accessToken = null); + + /// + /// Delete AggregatedCorrelation + /// + /// + /// Delete AggregatedCorrelation + /// + /// id of AggregatedCorrelation + /// User's OAuth2 access token + /// Task of ApiResponse (InlineResponse2002) + System.Threading.Tasks.Task> AggregatedCorrelationsIdDeleteAsyncWithHttpInfo (int? id, string accessToken = null); } @@ -180,84 +353,145 @@ public class AggregatedCorrelationApi : IAggregatedCorrelationApi /// /// Initializes a new instance of the class. /// - /// an instance of ApiClient (optional) /// - public AggregatedCorrelationApi(ApiClient apiClient = null) + public AggregatedCorrelationApi(String basePath) { - if (apiClient == null) // use the default one in Configuration - this.ApiClient = Configuration.DefaultApiClient; - else - this.ApiClient = apiClient; + this.Configuration = new Configuration(new ApiClient(basePath)); } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class + /// using Configuration object /// + /// An instance of Configuration /// - public AggregatedCorrelationApi(String basePath) + public AggregatedCorrelationApi(Configuration configuration = null) + { + if (configuration == null) // use the default one in Configuration + this.Configuration = Configuration.Default; + else + this.Configuration = configuration; + } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public String GetBasePath() { - this.ApiClient = new ApiClient(basePath); + return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); } - + /// /// Sets the base path of the API client. /// - /// The base path /// The base path + [Obsolete("SetBasePath is deprecated, please do 'Configuraiton.ApiClient = new ApiClient(\"http://new-path\")' instead.")] public void SetBasePath(String basePath) { - this.ApiClient.BasePath = basePath; + // do nothing } /// - /// Gets the base path of the API client. + /// Gets or sets the configuration object /// - /// The base path - public String GetBasePath() + /// An instance of the Configuration + public Configuration Configuration {get; set;} + + /// + /// Gets the default header. + /// + /// Dictionary of HTTP header + [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] + public Dictionary DefaultHeader() { - return this.ApiClient.BasePath; + return this.Configuration.DefaultHeader; } - + /// - /// Gets or sets the API client. + /// Add default header. /// - /// An instance of the ApiClient - public ApiClient ApiClient {get; set;} - + /// Header field name. + /// Header field value. + /// + [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] + public void AddDefaultHeader(string key, string value) + { + this.Configuration.AddDefaultHeader(key, value); + } + /// /// Get all AggregatedCorrelations Get all AggregatedCorrelations /// - /// correlation - /// cause_id - /// effect_id - /// onset_delay - /// duration_of_action - /// number_of_pairs - /// value_predicting_high_outcome - /// value_predicting_low_outcome - /// optimal_pearson_product - /// vote - /// number_of_users - /// number_of_correlations - /// statistical_significance - /// cause_unit - /// cause_unit_id - /// cause_changes - /// effect_changes - /// aggregate_qm_score - /// created_at - /// updated_at - /// status - /// error_message - /// last_successful_update_time - /// reverse_pearson_correlation_coefficient - /// predictive_pearson_correlation_coefficient - /// limit - /// offset - /// sort - /// InlineResponse200 - public InlineResponse200 AggregatedCorrelationsGet (double? correlation, int? causeId, int? effectId, int? onsetDelay, int? durationOfAction, int? numberOfPairs, double? valuePredictingHighOutcome, double? valuePredictingLowOutcome, double? optimalPearsonProduct, double? vote, int? numberOfUsers, int? numberOfCorrelations, double? statisticalSignificance, string causeUnit, int? causeUnitId, int? causeChanges, int? effectChanges, double? aggregateQmScore, string createdAt, string updatedAt, string status, string errorMessage, string lastSuccessfulUpdateTime, double? reversePearsonCorrelationCoefficient, double? predictivePearsonCorrelationCoefficient, int? limit, int? offset, string sort) + /// User's OAuth2 access token + /// Pearson correlation coefficient between cause and effect measurements + /// Variable ID of the predictor variable for which the user desires correlations + /// Variable ID of the outcome variable for which the user desires correlations + /// User estimated (or default number of seconds) after cause measurement before a perceivable effect is observed + /// Number of seconds over which the predictor variable event is expected to produce a perceivable effect following the onset delay + /// Number of predictor/outcome data points used in the analysis + /// Predictor daily aggregated measurement value that predicts an above average effect measurement value (in default unit for predictor variable) + /// Predictor daily aggregated measurement value that predicts a below average effect measurement value (in default unit for outcome variable) + /// Optimal Pearson Product + /// Number of users whose data was used in this aggregation + /// Number of correlational analyses used in this aggregation + /// A function of the effect size and sample size + /// Abbreviated unit name for the predictor variable + /// Unit ID for the predictor variable + /// Number of times that the predictor time series changes + /// Number of times that the predictor time series changes + /// Aggregated QM Score which is directly proportional with the relevance of each predictor or outcome + /// Date at which the analysis was first performed + /// Date at which the analysis was last updated + /// Indicates whether an analysis is up to date (UPDATED), needs to be updated (WAITING), or had an error (ERROR) + /// Message describing any problems encountered during the analysis + /// Last Successful update time + /// Correlation when cause and effect are reversed. For any causal relationship, the forward correlation should exceed the reverse correlation + /// Predictive Pearson Correlation Coefficient + /// Limit the number of results returned + /// Records from give Offset + /// Sort records by given field + /// InlineResponse200 + public InlineResponse200 AggregatedCorrelationsGet (string accessToken = null, double? correlation = null, int? causeId = null, int? effectId = null, int? onsetDelay = null, int? durationOfAction = null, int? numberOfPairs = null, double? valuePredictingHighOutcome = null, double? valuePredictingLowOutcome = null, double? optimalPearsonProduct = null, int? numberOfUsers = null, int? numberOfCorrelations = null, double? statisticalSignificance = null, string causeUnit = null, int? causeUnitId = null, int? causeChanges = null, int? effectChanges = null, double? aggregateQmScore = null, string createdAt = null, string updatedAt = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, double? reversePearsonCorrelationCoefficient = null, double? predictivePearsonCorrelationCoefficient = null, int? limit = null, int? offset = null, string sort = null) + { + ApiResponse response = AggregatedCorrelationsGetWithHttpInfo(accessToken, correlation, causeId, effectId, onsetDelay, durationOfAction, numberOfPairs, valuePredictingHighOutcome, valuePredictingLowOutcome, optimalPearsonProduct, numberOfUsers, numberOfCorrelations, statisticalSignificance, causeUnit, causeUnitId, causeChanges, effectChanges, aggregateQmScore, createdAt, updatedAt, status, errorMessage, lastSuccessfulUpdateTime, reversePearsonCorrelationCoefficient, predictivePearsonCorrelationCoefficient, limit, offset, sort); + return response.Data; + } + + /// + /// Get all AggregatedCorrelations Get all AggregatedCorrelations + /// + /// User's OAuth2 access token + /// Pearson correlation coefficient between cause and effect measurements + /// Variable ID of the predictor variable for which the user desires correlations + /// Variable ID of the outcome variable for which the user desires correlations + /// User estimated (or default number of seconds) after cause measurement before a perceivable effect is observed + /// Number of seconds over which the predictor variable event is expected to produce a perceivable effect following the onset delay + /// Number of predictor/outcome data points used in the analysis + /// Predictor daily aggregated measurement value that predicts an above average effect measurement value (in default unit for predictor variable) + /// Predictor daily aggregated measurement value that predicts a below average effect measurement value (in default unit for outcome variable) + /// Optimal Pearson Product + /// Number of users whose data was used in this aggregation + /// Number of correlational analyses used in this aggregation + /// A function of the effect size and sample size + /// Abbreviated unit name for the predictor variable + /// Unit ID for the predictor variable + /// Number of times that the predictor time series changes + /// Number of times that the predictor time series changes + /// Aggregated QM Score which is directly proportional with the relevance of each predictor or outcome + /// Date at which the analysis was first performed + /// Date at which the analysis was last updated + /// Indicates whether an analysis is up to date (UPDATED), needs to be updated (WAITING), or had an error (ERROR) + /// Message describing any problems encountered during the analysis + /// Last Successful update time + /// Correlation when cause and effect are reversed. For any causal relationship, the forward correlation should exceed the reverse correlation + /// Predictive Pearson Correlation Coefficient + /// Limit the number of results returned + /// Records from give Offset + /// Sort records by given field + /// ApiResponse of InlineResponse200 + public ApiResponse< InlineResponse200 > AggregatedCorrelationsGetWithHttpInfo (string accessToken = null, double? correlation = null, int? causeId = null, int? effectId = null, int? onsetDelay = null, int? durationOfAction = null, int? numberOfPairs = null, double? valuePredictingHighOutcome = null, double? valuePredictingLowOutcome = null, double? optimalPearsonProduct = null, int? numberOfUsers = null, int? numberOfCorrelations = null, double? statisticalSignificance = null, string causeUnit = null, int? causeUnitId = null, int? causeChanges = null, int? effectChanges = null, double? aggregateQmScore = null, string createdAt = null, string updatedAt = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, double? reversePearsonCorrelationCoefficient = null, double? predictivePearsonCorrelationCoefficient = null, int? limit = null, int? offset = null, string sort = null) { @@ -265,7 +499,7 @@ public InlineResponse200 AggregatedCorrelationsGet (double? correlation, int? ca var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -274,94 +508,145 @@ public InlineResponse200 AggregatedCorrelationsGet (double? correlation, int? ca String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (correlation != null) queryParams.Add("correlation", ApiClient.ParameterToString(correlation)); // query parameter - if (causeId != null) queryParams.Add("cause_id", ApiClient.ParameterToString(causeId)); // query parameter - if (effectId != null) queryParams.Add("effect_id", ApiClient.ParameterToString(effectId)); // query parameter - if (onsetDelay != null) queryParams.Add("onset_delay", ApiClient.ParameterToString(onsetDelay)); // query parameter - if (durationOfAction != null) queryParams.Add("duration_of_action", ApiClient.ParameterToString(durationOfAction)); // query parameter - if (numberOfPairs != null) queryParams.Add("number_of_pairs", ApiClient.ParameterToString(numberOfPairs)); // query parameter - if (valuePredictingHighOutcome != null) queryParams.Add("value_predicting_high_outcome", ApiClient.ParameterToString(valuePredictingHighOutcome)); // query parameter - if (valuePredictingLowOutcome != null) queryParams.Add("value_predicting_low_outcome", ApiClient.ParameterToString(valuePredictingLowOutcome)); // query parameter - if (optimalPearsonProduct != null) queryParams.Add("optimal_pearson_product", ApiClient.ParameterToString(optimalPearsonProduct)); // query parameter - if (vote != null) queryParams.Add("vote", ApiClient.ParameterToString(vote)); // query parameter - if (numberOfUsers != null) queryParams.Add("number_of_users", ApiClient.ParameterToString(numberOfUsers)); // query parameter - if (numberOfCorrelations != null) queryParams.Add("number_of_correlations", ApiClient.ParameterToString(numberOfCorrelations)); // query parameter - if (statisticalSignificance != null) queryParams.Add("statistical_significance", ApiClient.ParameterToString(statisticalSignificance)); // query parameter - if (causeUnit != null) queryParams.Add("cause_unit", ApiClient.ParameterToString(causeUnit)); // query parameter - if (causeUnitId != null) queryParams.Add("cause_unit_id", ApiClient.ParameterToString(causeUnitId)); // query parameter - if (causeChanges != null) queryParams.Add("cause_changes", ApiClient.ParameterToString(causeChanges)); // query parameter - if (effectChanges != null) queryParams.Add("effect_changes", ApiClient.ParameterToString(effectChanges)); // query parameter - if (aggregateQmScore != null) queryParams.Add("aggregate_qm_score", ApiClient.ParameterToString(aggregateQmScore)); // query parameter - if (createdAt != null) queryParams.Add("created_at", ApiClient.ParameterToString(createdAt)); // query parameter - if (updatedAt != null) queryParams.Add("updated_at", ApiClient.ParameterToString(updatedAt)); // query parameter - if (status != null) queryParams.Add("status", ApiClient.ParameterToString(status)); // query parameter - if (errorMessage != null) queryParams.Add("error_message", ApiClient.ParameterToString(errorMessage)); // query parameter - if (lastSuccessfulUpdateTime != null) queryParams.Add("last_successful_update_time", ApiClient.ParameterToString(lastSuccessfulUpdateTime)); // query parameter - if (reversePearsonCorrelationCoefficient != null) queryParams.Add("reverse_pearson_correlation_coefficient", ApiClient.ParameterToString(reversePearsonCorrelationCoefficient)); // query parameter - if (predictivePearsonCorrelationCoefficient != null) queryParams.Add("predictive_pearson_correlation_coefficient", ApiClient.ParameterToString(predictivePearsonCorrelationCoefficient)); // query parameter - if (limit != null) queryParams.Add("limit", ApiClient.ParameterToString(limit)); // query parameter - if (offset != null) queryParams.Add("offset", ApiClient.ParameterToString(offset)); // query parameter - if (sort != null) queryParams.Add("sort", ApiClient.ParameterToString(sort)); // query parameter - - - - - - // authentication setting, if any - String[] authSettings = new String[] { }; + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + if (correlation != null) queryParams.Add("correlation", Configuration.ApiClient.ParameterToString(correlation)); // query parameter + if (causeId != null) queryParams.Add("cause_id", Configuration.ApiClient.ParameterToString(causeId)); // query parameter + if (effectId != null) queryParams.Add("effect_id", Configuration.ApiClient.ParameterToString(effectId)); // query parameter + if (onsetDelay != null) queryParams.Add("onset_delay", Configuration.ApiClient.ParameterToString(onsetDelay)); // query parameter + if (durationOfAction != null) queryParams.Add("duration_of_action", Configuration.ApiClient.ParameterToString(durationOfAction)); // query parameter + if (numberOfPairs != null) queryParams.Add("number_of_pairs", Configuration.ApiClient.ParameterToString(numberOfPairs)); // query parameter + if (valuePredictingHighOutcome != null) queryParams.Add("value_predicting_high_outcome", Configuration.ApiClient.ParameterToString(valuePredictingHighOutcome)); // query parameter + if (valuePredictingLowOutcome != null) queryParams.Add("value_predicting_low_outcome", Configuration.ApiClient.ParameterToString(valuePredictingLowOutcome)); // query parameter + if (optimalPearsonProduct != null) queryParams.Add("optimal_pearson_product", Configuration.ApiClient.ParameterToString(optimalPearsonProduct)); // query parameter + if (numberOfUsers != null) queryParams.Add("number_of_users", Configuration.ApiClient.ParameterToString(numberOfUsers)); // query parameter + if (numberOfCorrelations != null) queryParams.Add("number_of_correlations", Configuration.ApiClient.ParameterToString(numberOfCorrelations)); // query parameter + if (statisticalSignificance != null) queryParams.Add("statistical_significance", Configuration.ApiClient.ParameterToString(statisticalSignificance)); // query parameter + if (causeUnit != null) queryParams.Add("cause_unit", Configuration.ApiClient.ParameterToString(causeUnit)); // query parameter + if (causeUnitId != null) queryParams.Add("cause_unit_id", Configuration.ApiClient.ParameterToString(causeUnitId)); // query parameter + if (causeChanges != null) queryParams.Add("cause_changes", Configuration.ApiClient.ParameterToString(causeChanges)); // query parameter + if (effectChanges != null) queryParams.Add("effect_changes", Configuration.ApiClient.ParameterToString(effectChanges)); // query parameter + if (aggregateQmScore != null) queryParams.Add("aggregate_qm_score", Configuration.ApiClient.ParameterToString(aggregateQmScore)); // query parameter + if (createdAt != null) queryParams.Add("created_at", Configuration.ApiClient.ParameterToString(createdAt)); // query parameter + if (updatedAt != null) queryParams.Add("updated_at", Configuration.ApiClient.ParameterToString(updatedAt)); // query parameter + if (status != null) queryParams.Add("status", Configuration.ApiClient.ParameterToString(status)); // query parameter + if (errorMessage != null) queryParams.Add("error_message", Configuration.ApiClient.ParameterToString(errorMessage)); // query parameter + if (lastSuccessfulUpdateTime != null) queryParams.Add("last_successful_update_time", Configuration.ApiClient.ParameterToString(lastSuccessfulUpdateTime)); // query parameter + if (reversePearsonCorrelationCoefficient != null) queryParams.Add("reverse_pearson_correlation_coefficient", Configuration.ApiClient.ParameterToString(reversePearsonCorrelationCoefficient)); // query parameter + if (predictivePearsonCorrelationCoefficient != null) queryParams.Add("predictive_pearson_correlation_coefficient", Configuration.ApiClient.ParameterToString(predictivePearsonCorrelationCoefficient)); // query parameter + if (limit != null) queryParams.Add("limit", Configuration.ApiClient.ParameterToString(limit)); // query parameter + if (offset != null) queryParams.Add("offset", Configuration.ApiClient.ParameterToString(offset)); // query parameter + if (sort != null) queryParams.Add("sort", Configuration.ApiClient.ParameterToString(sort)); // query parameter + + + + + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling AggregatedCorrelationsGet: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling AggregatedCorrelationsGet: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling AggregatedCorrelationsGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling AggregatedCorrelationsGet: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse200) ApiClient.Deserialize(response, typeof(InlineResponse200)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse200) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse200))); + } /// /// Get all AggregatedCorrelations Get all AggregatedCorrelations /// - /// correlation - /// cause_id - /// effect_id - /// onset_delay - /// duration_of_action - /// number_of_pairs - /// value_predicting_high_outcome - /// value_predicting_low_outcome - /// optimal_pearson_product - /// vote - /// number_of_users - /// number_of_correlations - /// statistical_significance - /// cause_unit - /// cause_unit_id - /// cause_changes - /// effect_changes - /// aggregate_qm_score - /// created_at - /// updated_at - /// status - /// error_message - /// last_successful_update_time - /// reverse_pearson_correlation_coefficient - /// predictive_pearson_correlation_coefficient - /// limit - /// offset - /// sort - /// InlineResponse200 - public async System.Threading.Tasks.Task AggregatedCorrelationsGetAsync (double? correlation, int? causeId, int? effectId, int? onsetDelay, int? durationOfAction, int? numberOfPairs, double? valuePredictingHighOutcome, double? valuePredictingLowOutcome, double? optimalPearsonProduct, double? vote, int? numberOfUsers, int? numberOfCorrelations, double? statisticalSignificance, string causeUnit, int? causeUnitId, int? causeChanges, int? effectChanges, double? aggregateQmScore, string createdAt, string updatedAt, string status, string errorMessage, string lastSuccessfulUpdateTime, double? reversePearsonCorrelationCoefficient, double? predictivePearsonCorrelationCoefficient, int? limit, int? offset, string sort) + /// User's OAuth2 access token + /// Pearson correlation coefficient between cause and effect measurements + /// Variable ID of the predictor variable for which the user desires correlations + /// Variable ID of the outcome variable for which the user desires correlations + /// User estimated (or default number of seconds) after cause measurement before a perceivable effect is observed + /// Number of seconds over which the predictor variable event is expected to produce a perceivable effect following the onset delay + /// Number of predictor/outcome data points used in the analysis + /// Predictor daily aggregated measurement value that predicts an above average effect measurement value (in default unit for predictor variable) + /// Predictor daily aggregated measurement value that predicts a below average effect measurement value (in default unit for outcome variable) + /// Optimal Pearson Product + /// Number of users whose data was used in this aggregation + /// Number of correlational analyses used in this aggregation + /// A function of the effect size and sample size + /// Abbreviated unit name for the predictor variable + /// Unit ID for the predictor variable + /// Number of times that the predictor time series changes + /// Number of times that the predictor time series changes + /// Aggregated QM Score which is directly proportional with the relevance of each predictor or outcome + /// Date at which the analysis was first performed + /// Date at which the analysis was last updated + /// Indicates whether an analysis is up to date (UPDATED), needs to be updated (WAITING), or had an error (ERROR) + /// Message describing any problems encountered during the analysis + /// Last Successful update time + /// Correlation when cause and effect are reversed. For any causal relationship, the forward correlation should exceed the reverse correlation + /// Predictive Pearson Correlation Coefficient + /// Limit the number of results returned + /// Records from give Offset + /// Sort records by given field + /// Task of InlineResponse200 + public async System.Threading.Tasks.Task AggregatedCorrelationsGetAsync (string accessToken = null, double? correlation = null, int? causeId = null, int? effectId = null, int? onsetDelay = null, int? durationOfAction = null, int? numberOfPairs = null, double? valuePredictingHighOutcome = null, double? valuePredictingLowOutcome = null, double? optimalPearsonProduct = null, int? numberOfUsers = null, int? numberOfCorrelations = null, double? statisticalSignificance = null, string causeUnit = null, int? causeUnitId = null, int? causeChanges = null, int? effectChanges = null, double? aggregateQmScore = null, string createdAt = null, string updatedAt = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, double? reversePearsonCorrelationCoefficient = null, double? predictivePearsonCorrelationCoefficient = null, int? limit = null, int? offset = null, string sort = null) + { + ApiResponse response = await AggregatedCorrelationsGetAsyncWithHttpInfo(accessToken, correlation, causeId, effectId, onsetDelay, durationOfAction, numberOfPairs, valuePredictingHighOutcome, valuePredictingLowOutcome, optimalPearsonProduct, numberOfUsers, numberOfCorrelations, statisticalSignificance, causeUnit, causeUnitId, causeChanges, effectChanges, aggregateQmScore, createdAt, updatedAt, status, errorMessage, lastSuccessfulUpdateTime, reversePearsonCorrelationCoefficient, predictivePearsonCorrelationCoefficient, limit, offset, sort); + return response.Data; + + } + + /// + /// Get all AggregatedCorrelations Get all AggregatedCorrelations + /// + /// User's OAuth2 access token + /// Pearson correlation coefficient between cause and effect measurements + /// Variable ID of the predictor variable for which the user desires correlations + /// Variable ID of the outcome variable for which the user desires correlations + /// User estimated (or default number of seconds) after cause measurement before a perceivable effect is observed + /// Number of seconds over which the predictor variable event is expected to produce a perceivable effect following the onset delay + /// Number of predictor/outcome data points used in the analysis + /// Predictor daily aggregated measurement value that predicts an above average effect measurement value (in default unit for predictor variable) + /// Predictor daily aggregated measurement value that predicts a below average effect measurement value (in default unit for outcome variable) + /// Optimal Pearson Product + /// Number of users whose data was used in this aggregation + /// Number of correlational analyses used in this aggregation + /// A function of the effect size and sample size + /// Abbreviated unit name for the predictor variable + /// Unit ID for the predictor variable + /// Number of times that the predictor time series changes + /// Number of times that the predictor time series changes + /// Aggregated QM Score which is directly proportional with the relevance of each predictor or outcome + /// Date at which the analysis was first performed + /// Date at which the analysis was last updated + /// Indicates whether an analysis is up to date (UPDATED), needs to be updated (WAITING), or had an error (ERROR) + /// Message describing any problems encountered during the analysis + /// Last Successful update time + /// Correlation when cause and effect are reversed. For any causal relationship, the forward correlation should exceed the reverse correlation + /// Predictive Pearson Correlation Coefficient + /// Limit the number of results returned + /// Records from give Offset + /// Sort records by given field + /// Task of ApiResponse (InlineResponse200) + public async System.Threading.Tasks.Task> AggregatedCorrelationsGetAsyncWithHttpInfo (string accessToken = null, double? correlation = null, int? causeId = null, int? effectId = null, int? onsetDelay = null, int? durationOfAction = null, int? numberOfPairs = null, double? valuePredictingHighOutcome = null, double? valuePredictingLowOutcome = null, double? optimalPearsonProduct = null, int? numberOfUsers = null, int? numberOfCorrelations = null, double? statisticalSignificance = null, string causeUnit = null, int? causeUnitId = null, int? causeChanges = null, int? effectChanges = null, double? aggregateQmScore = null, string createdAt = null, string updatedAt = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, double? reversePearsonCorrelationCoefficient = null, double? predictivePearsonCorrelationCoefficient = null, int? limit = null, int? offset = null, string sort = null) { @@ -378,64 +663,92 @@ public async System.Threading.Tasks.Task AggregatedCorrelatio String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (correlation != null) queryParams.Add("correlation", ApiClient.ParameterToString(correlation)); // query parameter - if (causeId != null) queryParams.Add("cause_id", ApiClient.ParameterToString(causeId)); // query parameter - if (effectId != null) queryParams.Add("effect_id", ApiClient.ParameterToString(effectId)); // query parameter - if (onsetDelay != null) queryParams.Add("onset_delay", ApiClient.ParameterToString(onsetDelay)); // query parameter - if (durationOfAction != null) queryParams.Add("duration_of_action", ApiClient.ParameterToString(durationOfAction)); // query parameter - if (numberOfPairs != null) queryParams.Add("number_of_pairs", ApiClient.ParameterToString(numberOfPairs)); // query parameter - if (valuePredictingHighOutcome != null) queryParams.Add("value_predicting_high_outcome", ApiClient.ParameterToString(valuePredictingHighOutcome)); // query parameter - if (valuePredictingLowOutcome != null) queryParams.Add("value_predicting_low_outcome", ApiClient.ParameterToString(valuePredictingLowOutcome)); // query parameter - if (optimalPearsonProduct != null) queryParams.Add("optimal_pearson_product", ApiClient.ParameterToString(optimalPearsonProduct)); // query parameter - if (vote != null) queryParams.Add("vote", ApiClient.ParameterToString(vote)); // query parameter - if (numberOfUsers != null) queryParams.Add("number_of_users", ApiClient.ParameterToString(numberOfUsers)); // query parameter - if (numberOfCorrelations != null) queryParams.Add("number_of_correlations", ApiClient.ParameterToString(numberOfCorrelations)); // query parameter - if (statisticalSignificance != null) queryParams.Add("statistical_significance", ApiClient.ParameterToString(statisticalSignificance)); // query parameter - if (causeUnit != null) queryParams.Add("cause_unit", ApiClient.ParameterToString(causeUnit)); // query parameter - if (causeUnitId != null) queryParams.Add("cause_unit_id", ApiClient.ParameterToString(causeUnitId)); // query parameter - if (causeChanges != null) queryParams.Add("cause_changes", ApiClient.ParameterToString(causeChanges)); // query parameter - if (effectChanges != null) queryParams.Add("effect_changes", ApiClient.ParameterToString(effectChanges)); // query parameter - if (aggregateQmScore != null) queryParams.Add("aggregate_qm_score", ApiClient.ParameterToString(aggregateQmScore)); // query parameter - if (createdAt != null) queryParams.Add("created_at", ApiClient.ParameterToString(createdAt)); // query parameter - if (updatedAt != null) queryParams.Add("updated_at", ApiClient.ParameterToString(updatedAt)); // query parameter - if (status != null) queryParams.Add("status", ApiClient.ParameterToString(status)); // query parameter - if (errorMessage != null) queryParams.Add("error_message", ApiClient.ParameterToString(errorMessage)); // query parameter - if (lastSuccessfulUpdateTime != null) queryParams.Add("last_successful_update_time", ApiClient.ParameterToString(lastSuccessfulUpdateTime)); // query parameter - if (reversePearsonCorrelationCoefficient != null) queryParams.Add("reverse_pearson_correlation_coefficient", ApiClient.ParameterToString(reversePearsonCorrelationCoefficient)); // query parameter - if (predictivePearsonCorrelationCoefficient != null) queryParams.Add("predictive_pearson_correlation_coefficient", ApiClient.ParameterToString(predictivePearsonCorrelationCoefficient)); // query parameter - if (limit != null) queryParams.Add("limit", ApiClient.ParameterToString(limit)); // query parameter - if (offset != null) queryParams.Add("offset", ApiClient.ParameterToString(offset)); // query parameter - if (sort != null) queryParams.Add("sort", ApiClient.ParameterToString(sort)); // query parameter - - - - - - // authentication setting, if any - String[] authSettings = new String[] { }; - + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + if (correlation != null) queryParams.Add("correlation", Configuration.ApiClient.ParameterToString(correlation)); // query parameter + if (causeId != null) queryParams.Add("cause_id", Configuration.ApiClient.ParameterToString(causeId)); // query parameter + if (effectId != null) queryParams.Add("effect_id", Configuration.ApiClient.ParameterToString(effectId)); // query parameter + if (onsetDelay != null) queryParams.Add("onset_delay", Configuration.ApiClient.ParameterToString(onsetDelay)); // query parameter + if (durationOfAction != null) queryParams.Add("duration_of_action", Configuration.ApiClient.ParameterToString(durationOfAction)); // query parameter + if (numberOfPairs != null) queryParams.Add("number_of_pairs", Configuration.ApiClient.ParameterToString(numberOfPairs)); // query parameter + if (valuePredictingHighOutcome != null) queryParams.Add("value_predicting_high_outcome", Configuration.ApiClient.ParameterToString(valuePredictingHighOutcome)); // query parameter + if (valuePredictingLowOutcome != null) queryParams.Add("value_predicting_low_outcome", Configuration.ApiClient.ParameterToString(valuePredictingLowOutcome)); // query parameter + if (optimalPearsonProduct != null) queryParams.Add("optimal_pearson_product", Configuration.ApiClient.ParameterToString(optimalPearsonProduct)); // query parameter + if (numberOfUsers != null) queryParams.Add("number_of_users", Configuration.ApiClient.ParameterToString(numberOfUsers)); // query parameter + if (numberOfCorrelations != null) queryParams.Add("number_of_correlations", Configuration.ApiClient.ParameterToString(numberOfCorrelations)); // query parameter + if (statisticalSignificance != null) queryParams.Add("statistical_significance", Configuration.ApiClient.ParameterToString(statisticalSignificance)); // query parameter + if (causeUnit != null) queryParams.Add("cause_unit", Configuration.ApiClient.ParameterToString(causeUnit)); // query parameter + if (causeUnitId != null) queryParams.Add("cause_unit_id", Configuration.ApiClient.ParameterToString(causeUnitId)); // query parameter + if (causeChanges != null) queryParams.Add("cause_changes", Configuration.ApiClient.ParameterToString(causeChanges)); // query parameter + if (effectChanges != null) queryParams.Add("effect_changes", Configuration.ApiClient.ParameterToString(effectChanges)); // query parameter + if (aggregateQmScore != null) queryParams.Add("aggregate_qm_score", Configuration.ApiClient.ParameterToString(aggregateQmScore)); // query parameter + if (createdAt != null) queryParams.Add("created_at", Configuration.ApiClient.ParameterToString(createdAt)); // query parameter + if (updatedAt != null) queryParams.Add("updated_at", Configuration.ApiClient.ParameterToString(updatedAt)); // query parameter + if (status != null) queryParams.Add("status", Configuration.ApiClient.ParameterToString(status)); // query parameter + if (errorMessage != null) queryParams.Add("error_message", Configuration.ApiClient.ParameterToString(errorMessage)); // query parameter + if (lastSuccessfulUpdateTime != null) queryParams.Add("last_successful_update_time", Configuration.ApiClient.ParameterToString(lastSuccessfulUpdateTime)); // query parameter + if (reversePearsonCorrelationCoefficient != null) queryParams.Add("reverse_pearson_correlation_coefficient", Configuration.ApiClient.ParameterToString(reversePearsonCorrelationCoefficient)); // query parameter + if (predictivePearsonCorrelationCoefficient != null) queryParams.Add("predictive_pearson_correlation_coefficient", Configuration.ApiClient.ParameterToString(predictivePearsonCorrelationCoefficient)); // query parameter + if (limit != null) queryParams.Add("limit", Configuration.ApiClient.ParameterToString(limit)); // query parameter + if (offset != null) queryParams.Add("offset", Configuration.ApiClient.ParameterToString(offset)); // query parameter + if (sort != null) queryParams.Add("sort", Configuration.ApiClient.ParameterToString(sort)); // query parameter + + + + + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling AggregatedCorrelationsGet: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling AggregatedCorrelationsGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling AggregatedCorrelationsGet: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse200) ApiClient.Deserialize(response, typeof(InlineResponse200)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse200) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse200))); + } /// /// Store AggregatedCorrelation Store AggregatedCorrelation /// + /// User's OAuth2 access token + /// AggregatedCorrelation that should be stored + /// InlineResponse2001 + public InlineResponse2001 AggregatedCorrelationsPost (string accessToken = null, AggregatedCorrelation body = null) + { + ApiResponse response = AggregatedCorrelationsPostWithHttpInfo(accessToken, body); + return response.Data; + } + + /// + /// Store AggregatedCorrelation Store AggregatedCorrelation + /// + /// User's OAuth2 access token /// AggregatedCorrelation that should be stored - /// InlineResponse2001 - public InlineResponse2001 AggregatedCorrelationsPost (AggregatedCorrelation body) + /// ApiResponse of InlineResponse2001 + public ApiResponse< InlineResponse2001 > AggregatedCorrelationsPostWithHttpInfo (string accessToken = null, AggregatedCorrelation body = null) { @@ -443,7 +756,7 @@ public InlineResponse2001 AggregatedCorrelationsPost (AggregatedCorrelation body var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -452,40 +765,67 @@ public InlineResponse2001 AggregatedCorrelationsPost (AggregatedCorrelation body String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - postBody = ApiClient.Serialize(body); // http body (model) parameter + postBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter + + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } - - // authentication setting, if any - String[] authSettings = new String[] { }; // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling AggregatedCorrelationsPost: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling AggregatedCorrelationsPost: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling AggregatedCorrelationsPost: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling AggregatedCorrelationsPost: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse2001) ApiClient.Deserialize(response, typeof(InlineResponse2001)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2001) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2001))); + } /// /// Store AggregatedCorrelation Store AggregatedCorrelation /// + /// User's OAuth2 access token /// AggregatedCorrelation that should be stored - /// InlineResponse2001 - public async System.Threading.Tasks.Task AggregatedCorrelationsPostAsync (AggregatedCorrelation body) + /// Task of InlineResponse2001 + public async System.Threading.Tasks.Task AggregatedCorrelationsPostAsync (string accessToken = null, AggregatedCorrelation body = null) + { + ApiResponse response = await AggregatedCorrelationsPostAsyncWithHttpInfo(accessToken, body); + return response.Data; + + } + + /// + /// Store AggregatedCorrelation Store AggregatedCorrelation + /// + /// User's OAuth2 access token + /// AggregatedCorrelation that should be stored + /// Task of ApiResponse (InlineResponse2001) + public async System.Threading.Tasks.Task> AggregatedCorrelationsPostAsyncWithHttpInfo (string accessToken = null, AggregatedCorrelation body = null) { @@ -502,37 +842,66 @@ public async System.Threading.Tasks.Task AggregatedCorrelati String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - postBody = ApiClient.Serialize(body); // http body (model) parameter + postBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; - + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling AggregatedCorrelationsPost: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling AggregatedCorrelationsPost: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling AggregatedCorrelationsPost: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse2001) ApiClient.Deserialize(response, typeof(InlineResponse2001)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2001) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2001))); + } /// /// Get AggregatedCorrelation Get AggregatedCorrelation /// /// id of AggregatedCorrelation - /// InlineResponse2001 - public InlineResponse2001 AggregatedCorrelationsIdGet (int? id) + /// User's OAuth2 access token + /// InlineResponse2001 + public InlineResponse2001 AggregatedCorrelationsIdGet (int? id, string accessToken = null) + { + ApiResponse response = AggregatedCorrelationsIdGetWithHttpInfo(id, accessToken); + return response.Data; + } + + /// + /// Get AggregatedCorrelation Get AggregatedCorrelation + /// + /// id of AggregatedCorrelation + /// User's OAuth2 access token + /// ApiResponse of InlineResponse2001 + public ApiResponse< InlineResponse2001 > AggregatedCorrelationsIdGetWithHttpInfo (int? id, string accessToken = null) { // verify the required parameter 'id' is set @@ -543,7 +912,7 @@ public InlineResponse2001 AggregatedCorrelationsIdGet (int? id) var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -552,40 +921,67 @@ public InlineResponse2001 AggregatedCorrelationsIdGet (int? id) String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling AggregatedCorrelationsIdGet: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling AggregatedCorrelationsIdGet: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling AggregatedCorrelationsIdGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling AggregatedCorrelationsIdGet: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse2001) ApiClient.Deserialize(response, typeof(InlineResponse2001)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2001) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2001))); + } /// /// Get AggregatedCorrelation Get AggregatedCorrelation /// /// id of AggregatedCorrelation - /// InlineResponse2001 - public async System.Threading.Tasks.Task AggregatedCorrelationsIdGetAsync (int? id) + /// User's OAuth2 access token + /// Task of InlineResponse2001 + public async System.Threading.Tasks.Task AggregatedCorrelationsIdGetAsync (int? id, string accessToken = null) + { + ApiResponse response = await AggregatedCorrelationsIdGetAsyncWithHttpInfo(id, accessToken); + return response.Data; + + } + + /// + /// Get AggregatedCorrelation Get AggregatedCorrelation + /// + /// id of AggregatedCorrelation + /// User's OAuth2 access token + /// Task of ApiResponse (InlineResponse2001) + public async System.Threading.Tasks.Task> AggregatedCorrelationsIdGetAsyncWithHttpInfo (int? id, string accessToken = null) { // verify the required parameter 'id' is set if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling AggregatedCorrelationsIdGet"); @@ -604,38 +1000,68 @@ public async System.Threading.Tasks.Task AggregatedCorrelati String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; - + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling AggregatedCorrelationsIdGet: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); - return (InlineResponse2001) ApiClient.Deserialize(response, typeof(InlineResponse2001)); + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling AggregatedCorrelationsIdGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling AggregatedCorrelationsIdGet: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2001) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2001))); + } /// /// Update AggregatedCorrelation Update AggregatedCorrelation /// /// id of AggregatedCorrelation + /// User's OAuth2 access token + /// AggregatedCorrelation that should be updated + /// InlineResponse2002 + public InlineResponse2002 AggregatedCorrelationsIdPut (int? id, string accessToken = null, AggregatedCorrelation body = null) + { + ApiResponse response = AggregatedCorrelationsIdPutWithHttpInfo(id, accessToken, body); + return response.Data; + } + + /// + /// Update AggregatedCorrelation Update AggregatedCorrelation + /// + /// id of AggregatedCorrelation + /// User's OAuth2 access token /// AggregatedCorrelation that should be updated - /// InlineResponse2002 - public InlineResponse2002 AggregatedCorrelationsIdPut (int? id, AggregatedCorrelation body) + /// ApiResponse of InlineResponse2002 + public ApiResponse< InlineResponse2002 > AggregatedCorrelationsIdPutWithHttpInfo (int? id, string accessToken = null, AggregatedCorrelation body = null) { // verify the required parameter 'id' is set @@ -646,7 +1072,7 @@ public InlineResponse2002 AggregatedCorrelationsIdPut (int? id, AggregatedCorrel var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -655,42 +1081,70 @@ public InlineResponse2002 AggregatedCorrelationsIdPut (int? id, AggregatedCorrel String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - postBody = ApiClient.Serialize(body); // http body (model) parameter + postBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter + + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } - - // authentication setting, if any - String[] authSettings = new String[] { }; // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling AggregatedCorrelationsIdPut: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling AggregatedCorrelationsIdPut: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling AggregatedCorrelationsIdPut: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling AggregatedCorrelationsIdPut: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse2002) ApiClient.Deserialize(response, typeof(InlineResponse2002)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2002) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2002))); + } /// /// Update AggregatedCorrelation Update AggregatedCorrelation /// /// id of AggregatedCorrelation + /// User's OAuth2 access token /// AggregatedCorrelation that should be updated - /// InlineResponse2002 - public async System.Threading.Tasks.Task AggregatedCorrelationsIdPutAsync (int? id, AggregatedCorrelation body) + /// Task of InlineResponse2002 + public async System.Threading.Tasks.Task AggregatedCorrelationsIdPutAsync (int? id, string accessToken = null, AggregatedCorrelation body = null) + { + ApiResponse response = await AggregatedCorrelationsIdPutAsyncWithHttpInfo(id, accessToken, body); + return response.Data; + + } + + /// + /// Update AggregatedCorrelation Update AggregatedCorrelation + /// + /// id of AggregatedCorrelation + /// User's OAuth2 access token + /// AggregatedCorrelation that should be updated + /// Task of ApiResponse (InlineResponse2002) + public async System.Threading.Tasks.Task> AggregatedCorrelationsIdPutAsyncWithHttpInfo (int? id, string accessToken = null, AggregatedCorrelation body = null) { // verify the required parameter 'id' is set if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling AggregatedCorrelationsIdPut"); @@ -709,38 +1163,67 @@ public async System.Threading.Tasks.Task AggregatedCorrelati String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - postBody = ApiClient.Serialize(body); // http body (model) parameter + postBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; - + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling AggregatedCorrelationsIdPut: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams); - return (InlineResponse2002) ApiClient.Deserialize(response, typeof(InlineResponse2002)); + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling AggregatedCorrelationsIdPut: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling AggregatedCorrelationsIdPut: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2002) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2002))); + } /// /// Delete AggregatedCorrelation Delete AggregatedCorrelation /// /// id of AggregatedCorrelation - /// InlineResponse2002 - public InlineResponse2002 AggregatedCorrelationsIdDelete (int? id) + /// User's OAuth2 access token + /// InlineResponse2002 + public InlineResponse2002 AggregatedCorrelationsIdDelete (int? id, string accessToken = null) + { + ApiResponse response = AggregatedCorrelationsIdDeleteWithHttpInfo(id, accessToken); + return response.Data; + } + + /// + /// Delete AggregatedCorrelation Delete AggregatedCorrelation + /// + /// id of AggregatedCorrelation + /// User's OAuth2 access token + /// ApiResponse of InlineResponse2002 + public ApiResponse< InlineResponse2002 > AggregatedCorrelationsIdDeleteWithHttpInfo (int? id, string accessToken = null) { // verify the required parameter 'id' is set @@ -751,7 +1234,7 @@ public InlineResponse2002 AggregatedCorrelationsIdDelete (int? id) var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -760,40 +1243,67 @@ public InlineResponse2002 AggregatedCorrelationsIdDelete (int? id) String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling AggregatedCorrelationsIdDelete: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling AggregatedCorrelationsIdDelete: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling AggregatedCorrelationsIdDelete: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling AggregatedCorrelationsIdDelete: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse2002) ApiClient.Deserialize(response, typeof(InlineResponse2002)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2002) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2002))); + } /// /// Delete AggregatedCorrelation Delete AggregatedCorrelation /// /// id of AggregatedCorrelation - /// InlineResponse2002 - public async System.Threading.Tasks.Task AggregatedCorrelationsIdDeleteAsync (int? id) + /// User's OAuth2 access token + /// Task of InlineResponse2002 + public async System.Threading.Tasks.Task AggregatedCorrelationsIdDeleteAsync (int? id, string accessToken = null) + { + ApiResponse response = await AggregatedCorrelationsIdDeleteAsyncWithHttpInfo(id, accessToken); + return response.Data; + + } + + /// + /// Delete AggregatedCorrelation Delete AggregatedCorrelation + /// + /// id of AggregatedCorrelation + /// User's OAuth2 access token + /// Task of ApiResponse (InlineResponse2002) + public async System.Threading.Tasks.Task> AggregatedCorrelationsIdDeleteAsyncWithHttpInfo (int? id, string accessToken = null) { // verify the required parameter 'id' is set if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling AggregatedCorrelationsIdDelete"); @@ -812,29 +1322,45 @@ public async System.Threading.Tasks.Task AggregatedCorrelati String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; - + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling AggregatedCorrelationsIdDelete: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams); - return (InlineResponse2002) ApiClient.Deserialize(response, typeof(InlineResponse2002)); + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling AggregatedCorrelationsIdDelete: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling AggregatedCorrelationsIdDelete: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2002) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2002))); + } } diff --git a/src/main/csharp/io/swagger/Api/CommonVariableRelationshipApi.cs b/src/main/csharp/io/swagger/Api/CommonVariableRelationshipApi.cs new file mode 100644 index 0000000..2393271 --- /dev/null +++ b/src/main/csharp/io/swagger/Api/CommonVariableRelationshipApi.cs @@ -0,0 +1,1318 @@ +using System; +using System.IO; +using System.Collections.Generic; +using System.Linq; +using RestSharp; +using IO.Swagger.Client; +using IO.Swagger.Model; + +namespace IO.Swagger.Api +{ + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface ICommonVariableRelationshipApi + { + + /// + /// Get all CommonVariableRelationships + /// + /// + /// Get all CommonVariableRelationships + /// + /// User's OAuth2 access token + /// id + /// Our confidence that a consistent predictive relationship exists based on the amount of evidence, reproducibility, and other factors + /// A quantitative representation of our confidence that a consistent predictive relationship exists based on the amount of evidence, reproducibility, and other factors + /// Direction is positive if higher predictor values generally precede higher outcome values. Direction is negative if higher predictor values generally precede lower outcome values. + /// Estimated number of seconds following the onset delay in which a stimulus produces a perceivable effect + /// error_message + /// Estimated number of seconds that pass before a stimulus produces a perceivable effect + /// Variable ID for the outcome variable + /// Variable ID for the predictor variable + /// ID for default unit of the predictor variable + /// A value representative of the relevance of this predictor relative to other predictors of this outcome. Usually used for relevancy sorting. + /// A value represented to the size of the effect which the predictor appears to have on the outcome. + /// Can be weak, medium, or strong based on the size of the effect which the predictor appears to have on the outcome relative to other variable relationship strength scores. + /// Number of users who feel that there is a plausible causal relationship between the predictor and outcome variables. + /// Number of users who do not feel that there is a plausible causal relationship between the predictor and outcome variables. + /// Value for the predictor variable (in it's default unit) which typically precedes an above average outcome value + /// Value for the predictor variable (in it's default unit) which typically precedes a below average outcome value + /// Number of users whose data was aggregated to obtain this relationship + /// data_source + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// InlineResponse2003 + InlineResponse2003 CommonVariableRelationshipsGet (string accessToken = null, int? id = null, string confidenceLevel = null, double? confidenceScore = null, string direction = null, int? durationOfAction = null, string errorMessage = null, int? onsetDelay = null, int? outcomeVariableId = null, int? predictorVariableId = null, int? predictorUnitId = null, double? sinnRank = null, double? strengthScore = null, string strengthLevel = null, int? upVotes = null, int? downVotes = null, double? valuePredictingHighOutcome = null, double? valuePredictingLowOutcome = null, int? numberOfUsers = null, string dataSource = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Get all CommonVariableRelationships + /// + /// + /// Get all CommonVariableRelationships + /// + /// User's OAuth2 access token + /// id + /// Our confidence that a consistent predictive relationship exists based on the amount of evidence, reproducibility, and other factors + /// A quantitative representation of our confidence that a consistent predictive relationship exists based on the amount of evidence, reproducibility, and other factors + /// Direction is positive if higher predictor values generally precede higher outcome values. Direction is negative if higher predictor values generally precede lower outcome values. + /// Estimated number of seconds following the onset delay in which a stimulus produces a perceivable effect + /// error_message + /// Estimated number of seconds that pass before a stimulus produces a perceivable effect + /// Variable ID for the outcome variable + /// Variable ID for the predictor variable + /// ID for default unit of the predictor variable + /// A value representative of the relevance of this predictor relative to other predictors of this outcome. Usually used for relevancy sorting. + /// A value represented to the size of the effect which the predictor appears to have on the outcome. + /// Can be weak, medium, or strong based on the size of the effect which the predictor appears to have on the outcome relative to other variable relationship strength scores. + /// Number of users who feel that there is a plausible causal relationship between the predictor and outcome variables. + /// Number of users who do not feel that there is a plausible causal relationship between the predictor and outcome variables. + /// Value for the predictor variable (in it's default unit) which typically precedes an above average outcome value + /// Value for the predictor variable (in it's default unit) which typically precedes a below average outcome value + /// Number of users whose data was aggregated to obtain this relationship + /// data_source + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// ApiResponse of InlineResponse2003 + ApiResponse CommonVariableRelationshipsGetWithHttpInfo (string accessToken = null, int? id = null, string confidenceLevel = null, double? confidenceScore = null, string direction = null, int? durationOfAction = null, string errorMessage = null, int? onsetDelay = null, int? outcomeVariableId = null, int? predictorVariableId = null, int? predictorUnitId = null, double? sinnRank = null, double? strengthScore = null, string strengthLevel = null, int? upVotes = null, int? downVotes = null, double? valuePredictingHighOutcome = null, double? valuePredictingLowOutcome = null, int? numberOfUsers = null, string dataSource = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Get all CommonVariableRelationships + /// + /// + /// Get all CommonVariableRelationships + /// + /// User's OAuth2 access token + /// id + /// Our confidence that a consistent predictive relationship exists based on the amount of evidence, reproducibility, and other factors + /// A quantitative representation of our confidence that a consistent predictive relationship exists based on the amount of evidence, reproducibility, and other factors + /// Direction is positive if higher predictor values generally precede higher outcome values. Direction is negative if higher predictor values generally precede lower outcome values. + /// Estimated number of seconds following the onset delay in which a stimulus produces a perceivable effect + /// error_message + /// Estimated number of seconds that pass before a stimulus produces a perceivable effect + /// Variable ID for the outcome variable + /// Variable ID for the predictor variable + /// ID for default unit of the predictor variable + /// A value representative of the relevance of this predictor relative to other predictors of this outcome. Usually used for relevancy sorting. + /// A value represented to the size of the effect which the predictor appears to have on the outcome. + /// Can be weak, medium, or strong based on the size of the effect which the predictor appears to have on the outcome relative to other variable relationship strength scores. + /// Number of users who feel that there is a plausible causal relationship between the predictor and outcome variables. + /// Number of users who do not feel that there is a plausible causal relationship between the predictor and outcome variables. + /// Value for the predictor variable (in it's default unit) which typically precedes an above average outcome value + /// Value for the predictor variable (in it's default unit) which typically precedes a below average outcome value + /// Number of users whose data was aggregated to obtain this relationship + /// data_source + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of InlineResponse2003 + System.Threading.Tasks.Task CommonVariableRelationshipsGetAsync (string accessToken = null, int? id = null, string confidenceLevel = null, double? confidenceScore = null, string direction = null, int? durationOfAction = null, string errorMessage = null, int? onsetDelay = null, int? outcomeVariableId = null, int? predictorVariableId = null, int? predictorUnitId = null, double? sinnRank = null, double? strengthScore = null, string strengthLevel = null, int? upVotes = null, int? downVotes = null, double? valuePredictingHighOutcome = null, double? valuePredictingLowOutcome = null, int? numberOfUsers = null, string dataSource = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Get all CommonVariableRelationships + /// + /// + /// Get all CommonVariableRelationships + /// + /// User's OAuth2 access token + /// id + /// Our confidence that a consistent predictive relationship exists based on the amount of evidence, reproducibility, and other factors + /// A quantitative representation of our confidence that a consistent predictive relationship exists based on the amount of evidence, reproducibility, and other factors + /// Direction is positive if higher predictor values generally precede higher outcome values. Direction is negative if higher predictor values generally precede lower outcome values. + /// Estimated number of seconds following the onset delay in which a stimulus produces a perceivable effect + /// error_message + /// Estimated number of seconds that pass before a stimulus produces a perceivable effect + /// Variable ID for the outcome variable + /// Variable ID for the predictor variable + /// ID for default unit of the predictor variable + /// A value representative of the relevance of this predictor relative to other predictors of this outcome. Usually used for relevancy sorting. + /// A value represented to the size of the effect which the predictor appears to have on the outcome. + /// Can be weak, medium, or strong based on the size of the effect which the predictor appears to have on the outcome relative to other variable relationship strength scores. + /// Number of users who feel that there is a plausible causal relationship between the predictor and outcome variables. + /// Number of users who do not feel that there is a plausible causal relationship between the predictor and outcome variables. + /// Value for the predictor variable (in it's default unit) which typically precedes an above average outcome value + /// Value for the predictor variable (in it's default unit) which typically precedes a below average outcome value + /// Number of users whose data was aggregated to obtain this relationship + /// data_source + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of ApiResponse (InlineResponse2003) + System.Threading.Tasks.Task> CommonVariableRelationshipsGetAsyncWithHttpInfo (string accessToken = null, int? id = null, string confidenceLevel = null, double? confidenceScore = null, string direction = null, int? durationOfAction = null, string errorMessage = null, int? onsetDelay = null, int? outcomeVariableId = null, int? predictorVariableId = null, int? predictorUnitId = null, double? sinnRank = null, double? strengthScore = null, string strengthLevel = null, int? upVotes = null, int? downVotes = null, double? valuePredictingHighOutcome = null, double? valuePredictingLowOutcome = null, int? numberOfUsers = null, string dataSource = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Store CommonVariableRelationship + /// + /// + /// Store CommonVariableRelationship + /// + /// User's OAuth2 access token + /// CommonVariableRelationship that should be stored + /// InlineResponse2004 + InlineResponse2004 CommonVariableRelationshipsPost (string accessToken = null, CommonVariableRelationship body = null); + + /// + /// Store CommonVariableRelationship + /// + /// + /// Store CommonVariableRelationship + /// + /// User's OAuth2 access token + /// CommonVariableRelationship that should be stored + /// ApiResponse of InlineResponse2004 + ApiResponse CommonVariableRelationshipsPostWithHttpInfo (string accessToken = null, CommonVariableRelationship body = null); + + /// + /// Store CommonVariableRelationship + /// + /// + /// Store CommonVariableRelationship + /// + /// User's OAuth2 access token + /// CommonVariableRelationship that should be stored + /// Task of InlineResponse2004 + System.Threading.Tasks.Task CommonVariableRelationshipsPostAsync (string accessToken = null, CommonVariableRelationship body = null); + + /// + /// Store CommonVariableRelationship + /// + /// + /// Store CommonVariableRelationship + /// + /// User's OAuth2 access token + /// CommonVariableRelationship that should be stored + /// Task of ApiResponse (InlineResponse2004) + System.Threading.Tasks.Task> CommonVariableRelationshipsPostAsyncWithHttpInfo (string accessToken = null, CommonVariableRelationship body = null); + + /// + /// Get CommonVariableRelationship + /// + /// + /// Get CommonVariableRelationship + /// + /// id of CommonVariableRelationship + /// User's OAuth2 access token + /// InlineResponse2004 + InlineResponse2004 CommonVariableRelationshipsIdGet (int? id, string accessToken = null); + + /// + /// Get CommonVariableRelationship + /// + /// + /// Get CommonVariableRelationship + /// + /// id of CommonVariableRelationship + /// User's OAuth2 access token + /// ApiResponse of InlineResponse2004 + ApiResponse CommonVariableRelationshipsIdGetWithHttpInfo (int? id, string accessToken = null); + + /// + /// Get CommonVariableRelationship + /// + /// + /// Get CommonVariableRelationship + /// + /// id of CommonVariableRelationship + /// User's OAuth2 access token + /// Task of InlineResponse2004 + System.Threading.Tasks.Task CommonVariableRelationshipsIdGetAsync (int? id, string accessToken = null); + + /// + /// Get CommonVariableRelationship + /// + /// + /// Get CommonVariableRelationship + /// + /// id of CommonVariableRelationship + /// User's OAuth2 access token + /// Task of ApiResponse (InlineResponse2004) + System.Threading.Tasks.Task> CommonVariableRelationshipsIdGetAsyncWithHttpInfo (int? id, string accessToken = null); + + /// + /// Update CommonVariableRelationship + /// + /// + /// Update CommonVariableRelationship + /// + /// id of CommonVariableRelationship + /// User's OAuth2 access token + /// CommonVariableRelationship that should be updated + /// InlineResponse2002 + InlineResponse2002 CommonVariableRelationshipsIdPut (int? id, string accessToken = null, CommonVariableRelationship body = null); + + /// + /// Update CommonVariableRelationship + /// + /// + /// Update CommonVariableRelationship + /// + /// id of CommonVariableRelationship + /// User's OAuth2 access token + /// CommonVariableRelationship that should be updated + /// ApiResponse of InlineResponse2002 + ApiResponse CommonVariableRelationshipsIdPutWithHttpInfo (int? id, string accessToken = null, CommonVariableRelationship body = null); + + /// + /// Update CommonVariableRelationship + /// + /// + /// Update CommonVariableRelationship + /// + /// id of CommonVariableRelationship + /// User's OAuth2 access token + /// CommonVariableRelationship that should be updated + /// Task of InlineResponse2002 + System.Threading.Tasks.Task CommonVariableRelationshipsIdPutAsync (int? id, string accessToken = null, CommonVariableRelationship body = null); + + /// + /// Update CommonVariableRelationship + /// + /// + /// Update CommonVariableRelationship + /// + /// id of CommonVariableRelationship + /// User's OAuth2 access token + /// CommonVariableRelationship that should be updated + /// Task of ApiResponse (InlineResponse2002) + System.Threading.Tasks.Task> CommonVariableRelationshipsIdPutAsyncWithHttpInfo (int? id, string accessToken = null, CommonVariableRelationship body = null); + + /// + /// Delete CommonVariableRelationship + /// + /// + /// Delete CommonVariableRelationship + /// + /// id of CommonVariableRelationship + /// User's OAuth2 access token + /// InlineResponse2002 + InlineResponse2002 CommonVariableRelationshipsIdDelete (int? id, string accessToken = null); + + /// + /// Delete CommonVariableRelationship + /// + /// + /// Delete CommonVariableRelationship + /// + /// id of CommonVariableRelationship + /// User's OAuth2 access token + /// ApiResponse of InlineResponse2002 + ApiResponse CommonVariableRelationshipsIdDeleteWithHttpInfo (int? id, string accessToken = null); + + /// + /// Delete CommonVariableRelationship + /// + /// + /// Delete CommonVariableRelationship + /// + /// id of CommonVariableRelationship + /// User's OAuth2 access token + /// Task of InlineResponse2002 + System.Threading.Tasks.Task CommonVariableRelationshipsIdDeleteAsync (int? id, string accessToken = null); + + /// + /// Delete CommonVariableRelationship + /// + /// + /// Delete CommonVariableRelationship + /// + /// id of CommonVariableRelationship + /// User's OAuth2 access token + /// Task of ApiResponse (InlineResponse2002) + System.Threading.Tasks.Task> CommonVariableRelationshipsIdDeleteAsyncWithHttpInfo (int? id, string accessToken = null); + + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public class CommonVariableRelationshipApi : ICommonVariableRelationshipApi + { + /// + /// Initializes a new instance of the class. + /// + /// + public CommonVariableRelationshipApi(String basePath) + { + this.Configuration = new Configuration(new ApiClient(basePath)); + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public CommonVariableRelationshipApi(Configuration configuration = null) + { + if (configuration == null) // use the default one in Configuration + this.Configuration = Configuration.Default; + else + this.Configuration = configuration; + } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public String GetBasePath() + { + return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); + } + + /// + /// Sets the base path of the API client. + /// + /// The base path + [Obsolete("SetBasePath is deprecated, please do 'Configuraiton.ApiClient = new ApiClient(\"http://new-path\")' instead.")] + public void SetBasePath(String basePath) + { + // do nothing + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public Configuration Configuration {get; set;} + + /// + /// Gets the default header. + /// + /// Dictionary of HTTP header + [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] + public Dictionary DefaultHeader() + { + return this.Configuration.DefaultHeader; + } + + /// + /// Add default header. + /// + /// Header field name. + /// Header field value. + /// + [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] + public void AddDefaultHeader(string key, string value) + { + this.Configuration.AddDefaultHeader(key, value); + } + + + /// + /// Get all CommonVariableRelationships Get all CommonVariableRelationships + /// + /// User's OAuth2 access token + /// id + /// Our confidence that a consistent predictive relationship exists based on the amount of evidence, reproducibility, and other factors + /// A quantitative representation of our confidence that a consistent predictive relationship exists based on the amount of evidence, reproducibility, and other factors + /// Direction is positive if higher predictor values generally precede higher outcome values. Direction is negative if higher predictor values generally precede lower outcome values. + /// Estimated number of seconds following the onset delay in which a stimulus produces a perceivable effect + /// error_message + /// Estimated number of seconds that pass before a stimulus produces a perceivable effect + /// Variable ID for the outcome variable + /// Variable ID for the predictor variable + /// ID for default unit of the predictor variable + /// A value representative of the relevance of this predictor relative to other predictors of this outcome. Usually used for relevancy sorting. + /// A value represented to the size of the effect which the predictor appears to have on the outcome. + /// Can be weak, medium, or strong based on the size of the effect which the predictor appears to have on the outcome relative to other variable relationship strength scores. + /// Number of users who feel that there is a plausible causal relationship between the predictor and outcome variables. + /// Number of users who do not feel that there is a plausible causal relationship between the predictor and outcome variables. + /// Value for the predictor variable (in it's default unit) which typically precedes an above average outcome value + /// Value for the predictor variable (in it's default unit) which typically precedes a below average outcome value + /// Number of users whose data was aggregated to obtain this relationship + /// data_source + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// InlineResponse2003 + public InlineResponse2003 CommonVariableRelationshipsGet (string accessToken = null, int? id = null, string confidenceLevel = null, double? confidenceScore = null, string direction = null, int? durationOfAction = null, string errorMessage = null, int? onsetDelay = null, int? outcomeVariableId = null, int? predictorVariableId = null, int? predictorUnitId = null, double? sinnRank = null, double? strengthScore = null, string strengthLevel = null, int? upVotes = null, int? downVotes = null, double? valuePredictingHighOutcome = null, double? valuePredictingLowOutcome = null, int? numberOfUsers = null, string dataSource = null, int? limit = null, int? offset = null, string sort = null) + { + ApiResponse response = CommonVariableRelationshipsGetWithHttpInfo(accessToken, id, confidenceLevel, confidenceScore, direction, durationOfAction, errorMessage, onsetDelay, outcomeVariableId, predictorVariableId, predictorUnitId, sinnRank, strengthScore, strengthLevel, upVotes, downVotes, valuePredictingHighOutcome, valuePredictingLowOutcome, numberOfUsers, dataSource, limit, offset, sort); + return response.Data; + } + + /// + /// Get all CommonVariableRelationships Get all CommonVariableRelationships + /// + /// User's OAuth2 access token + /// id + /// Our confidence that a consistent predictive relationship exists based on the amount of evidence, reproducibility, and other factors + /// A quantitative representation of our confidence that a consistent predictive relationship exists based on the amount of evidence, reproducibility, and other factors + /// Direction is positive if higher predictor values generally precede higher outcome values. Direction is negative if higher predictor values generally precede lower outcome values. + /// Estimated number of seconds following the onset delay in which a stimulus produces a perceivable effect + /// error_message + /// Estimated number of seconds that pass before a stimulus produces a perceivable effect + /// Variable ID for the outcome variable + /// Variable ID for the predictor variable + /// ID for default unit of the predictor variable + /// A value representative of the relevance of this predictor relative to other predictors of this outcome. Usually used for relevancy sorting. + /// A value represented to the size of the effect which the predictor appears to have on the outcome. + /// Can be weak, medium, or strong based on the size of the effect which the predictor appears to have on the outcome relative to other variable relationship strength scores. + /// Number of users who feel that there is a plausible causal relationship between the predictor and outcome variables. + /// Number of users who do not feel that there is a plausible causal relationship between the predictor and outcome variables. + /// Value for the predictor variable (in it's default unit) which typically precedes an above average outcome value + /// Value for the predictor variable (in it's default unit) which typically precedes a below average outcome value + /// Number of users whose data was aggregated to obtain this relationship + /// data_source + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// ApiResponse of InlineResponse2003 + public ApiResponse< InlineResponse2003 > CommonVariableRelationshipsGetWithHttpInfo (string accessToken = null, int? id = null, string confidenceLevel = null, double? confidenceScore = null, string direction = null, int? durationOfAction = null, string errorMessage = null, int? onsetDelay = null, int? outcomeVariableId = null, int? predictorVariableId = null, int? predictorUnitId = null, double? sinnRank = null, double? strengthScore = null, string strengthLevel = null, int? upVotes = null, int? downVotes = null, double? valuePredictingHighOutcome = null, double? valuePredictingLowOutcome = null, int? numberOfUsers = null, string dataSource = null, int? limit = null, int? offset = null, string sort = null) + { + + + var path_ = "/commonVariableRelationships"; + + var pathParams = new Dictionary(); + var queryParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); + var formParams = new Dictionary(); + var fileParams = new Dictionary(); + String postBody = null; + + // to determine the Accept header + String[] http_header_accepts = new String[] { + "application/json" + }; + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); + if (http_header_accept != null) + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + pathParams.Add("format", "json"); + + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + if (id != null) queryParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // query parameter + if (confidenceLevel != null) queryParams.Add("confidence_level", Configuration.ApiClient.ParameterToString(confidenceLevel)); // query parameter + if (confidenceScore != null) queryParams.Add("confidence_score", Configuration.ApiClient.ParameterToString(confidenceScore)); // query parameter + if (direction != null) queryParams.Add("direction", Configuration.ApiClient.ParameterToString(direction)); // query parameter + if (durationOfAction != null) queryParams.Add("duration_of_action", Configuration.ApiClient.ParameterToString(durationOfAction)); // query parameter + if (errorMessage != null) queryParams.Add("error_message", Configuration.ApiClient.ParameterToString(errorMessage)); // query parameter + if (onsetDelay != null) queryParams.Add("onset_delay", Configuration.ApiClient.ParameterToString(onsetDelay)); // query parameter + if (outcomeVariableId != null) queryParams.Add("outcome_variable_id", Configuration.ApiClient.ParameterToString(outcomeVariableId)); // query parameter + if (predictorVariableId != null) queryParams.Add("predictor_variable_id", Configuration.ApiClient.ParameterToString(predictorVariableId)); // query parameter + if (predictorUnitId != null) queryParams.Add("predictor_unit_id", Configuration.ApiClient.ParameterToString(predictorUnitId)); // query parameter + if (sinnRank != null) queryParams.Add("sinn_rank", Configuration.ApiClient.ParameterToString(sinnRank)); // query parameter + if (strengthScore != null) queryParams.Add("strength_score", Configuration.ApiClient.ParameterToString(strengthScore)); // query parameter + if (strengthLevel != null) queryParams.Add("strength_level", Configuration.ApiClient.ParameterToString(strengthLevel)); // query parameter + if (upVotes != null) queryParams.Add("up_votes", Configuration.ApiClient.ParameterToString(upVotes)); // query parameter + if (downVotes != null) queryParams.Add("down_votes", Configuration.ApiClient.ParameterToString(downVotes)); // query parameter + if (valuePredictingHighOutcome != null) queryParams.Add("value_predicting_high_outcome", Configuration.ApiClient.ParameterToString(valuePredictingHighOutcome)); // query parameter + if (valuePredictingLowOutcome != null) queryParams.Add("value_predicting_low_outcome", Configuration.ApiClient.ParameterToString(valuePredictingLowOutcome)); // query parameter + if (numberOfUsers != null) queryParams.Add("number_of_users", Configuration.ApiClient.ParameterToString(numberOfUsers)); // query parameter + if (dataSource != null) queryParams.Add("data_source", Configuration.ApiClient.ParameterToString(dataSource)); // query parameter + if (limit != null) queryParams.Add("limit", Configuration.ApiClient.ParameterToString(limit)); // query parameter + if (offset != null) queryParams.Add("offset", Configuration.ApiClient.ParameterToString(offset)); // query parameter + if (sort != null) queryParams.Add("sort", Configuration.ApiClient.ParameterToString(sort)); // query parameter + + + + + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + + // make the HTTP request + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling CommonVariableRelationshipsGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling CommonVariableRelationshipsGet: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2003) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2003))); + + } + + /// + /// Get all CommonVariableRelationships Get all CommonVariableRelationships + /// + /// User's OAuth2 access token + /// id + /// Our confidence that a consistent predictive relationship exists based on the amount of evidence, reproducibility, and other factors + /// A quantitative representation of our confidence that a consistent predictive relationship exists based on the amount of evidence, reproducibility, and other factors + /// Direction is positive if higher predictor values generally precede higher outcome values. Direction is negative if higher predictor values generally precede lower outcome values. + /// Estimated number of seconds following the onset delay in which a stimulus produces a perceivable effect + /// error_message + /// Estimated number of seconds that pass before a stimulus produces a perceivable effect + /// Variable ID for the outcome variable + /// Variable ID for the predictor variable + /// ID for default unit of the predictor variable + /// A value representative of the relevance of this predictor relative to other predictors of this outcome. Usually used for relevancy sorting. + /// A value represented to the size of the effect which the predictor appears to have on the outcome. + /// Can be weak, medium, or strong based on the size of the effect which the predictor appears to have on the outcome relative to other variable relationship strength scores. + /// Number of users who feel that there is a plausible causal relationship between the predictor and outcome variables. + /// Number of users who do not feel that there is a plausible causal relationship between the predictor and outcome variables. + /// Value for the predictor variable (in it's default unit) which typically precedes an above average outcome value + /// Value for the predictor variable (in it's default unit) which typically precedes a below average outcome value + /// Number of users whose data was aggregated to obtain this relationship + /// data_source + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of InlineResponse2003 + public async System.Threading.Tasks.Task CommonVariableRelationshipsGetAsync (string accessToken = null, int? id = null, string confidenceLevel = null, double? confidenceScore = null, string direction = null, int? durationOfAction = null, string errorMessage = null, int? onsetDelay = null, int? outcomeVariableId = null, int? predictorVariableId = null, int? predictorUnitId = null, double? sinnRank = null, double? strengthScore = null, string strengthLevel = null, int? upVotes = null, int? downVotes = null, double? valuePredictingHighOutcome = null, double? valuePredictingLowOutcome = null, int? numberOfUsers = null, string dataSource = null, int? limit = null, int? offset = null, string sort = null) + { + ApiResponse response = await CommonVariableRelationshipsGetAsyncWithHttpInfo(accessToken, id, confidenceLevel, confidenceScore, direction, durationOfAction, errorMessage, onsetDelay, outcomeVariableId, predictorVariableId, predictorUnitId, sinnRank, strengthScore, strengthLevel, upVotes, downVotes, valuePredictingHighOutcome, valuePredictingLowOutcome, numberOfUsers, dataSource, limit, offset, sort); + return response.Data; + + } + + /// + /// Get all CommonVariableRelationships Get all CommonVariableRelationships + /// + /// User's OAuth2 access token + /// id + /// Our confidence that a consistent predictive relationship exists based on the amount of evidence, reproducibility, and other factors + /// A quantitative representation of our confidence that a consistent predictive relationship exists based on the amount of evidence, reproducibility, and other factors + /// Direction is positive if higher predictor values generally precede higher outcome values. Direction is negative if higher predictor values generally precede lower outcome values. + /// Estimated number of seconds following the onset delay in which a stimulus produces a perceivable effect + /// error_message + /// Estimated number of seconds that pass before a stimulus produces a perceivable effect + /// Variable ID for the outcome variable + /// Variable ID for the predictor variable + /// ID for default unit of the predictor variable + /// A value representative of the relevance of this predictor relative to other predictors of this outcome. Usually used for relevancy sorting. + /// A value represented to the size of the effect which the predictor appears to have on the outcome. + /// Can be weak, medium, or strong based on the size of the effect which the predictor appears to have on the outcome relative to other variable relationship strength scores. + /// Number of users who feel that there is a plausible causal relationship between the predictor and outcome variables. + /// Number of users who do not feel that there is a plausible causal relationship between the predictor and outcome variables. + /// Value for the predictor variable (in it's default unit) which typically precedes an above average outcome value + /// Value for the predictor variable (in it's default unit) which typically precedes a below average outcome value + /// Number of users whose data was aggregated to obtain this relationship + /// data_source + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of ApiResponse (InlineResponse2003) + public async System.Threading.Tasks.Task> CommonVariableRelationshipsGetAsyncWithHttpInfo (string accessToken = null, int? id = null, string confidenceLevel = null, double? confidenceScore = null, string direction = null, int? durationOfAction = null, string errorMessage = null, int? onsetDelay = null, int? outcomeVariableId = null, int? predictorVariableId = null, int? predictorUnitId = null, double? sinnRank = null, double? strengthScore = null, string strengthLevel = null, int? upVotes = null, int? downVotes = null, double? valuePredictingHighOutcome = null, double? valuePredictingLowOutcome = null, int? numberOfUsers = null, string dataSource = null, int? limit = null, int? offset = null, string sort = null) + { + + + var path_ = "/commonVariableRelationships"; + + var pathParams = new Dictionary(); + var queryParams = new Dictionary(); + var headerParams = new Dictionary(); + var formParams = new Dictionary(); + var fileParams = new Dictionary(); + String postBody = null; + + // to determine the Accept header + String[] http_header_accepts = new String[] { + "application/json" + }; + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); + if (http_header_accept != null) + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + pathParams.Add("format", "json"); + + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + if (id != null) queryParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // query parameter + if (confidenceLevel != null) queryParams.Add("confidence_level", Configuration.ApiClient.ParameterToString(confidenceLevel)); // query parameter + if (confidenceScore != null) queryParams.Add("confidence_score", Configuration.ApiClient.ParameterToString(confidenceScore)); // query parameter + if (direction != null) queryParams.Add("direction", Configuration.ApiClient.ParameterToString(direction)); // query parameter + if (durationOfAction != null) queryParams.Add("duration_of_action", Configuration.ApiClient.ParameterToString(durationOfAction)); // query parameter + if (errorMessage != null) queryParams.Add("error_message", Configuration.ApiClient.ParameterToString(errorMessage)); // query parameter + if (onsetDelay != null) queryParams.Add("onset_delay", Configuration.ApiClient.ParameterToString(onsetDelay)); // query parameter + if (outcomeVariableId != null) queryParams.Add("outcome_variable_id", Configuration.ApiClient.ParameterToString(outcomeVariableId)); // query parameter + if (predictorVariableId != null) queryParams.Add("predictor_variable_id", Configuration.ApiClient.ParameterToString(predictorVariableId)); // query parameter + if (predictorUnitId != null) queryParams.Add("predictor_unit_id", Configuration.ApiClient.ParameterToString(predictorUnitId)); // query parameter + if (sinnRank != null) queryParams.Add("sinn_rank", Configuration.ApiClient.ParameterToString(sinnRank)); // query parameter + if (strengthScore != null) queryParams.Add("strength_score", Configuration.ApiClient.ParameterToString(strengthScore)); // query parameter + if (strengthLevel != null) queryParams.Add("strength_level", Configuration.ApiClient.ParameterToString(strengthLevel)); // query parameter + if (upVotes != null) queryParams.Add("up_votes", Configuration.ApiClient.ParameterToString(upVotes)); // query parameter + if (downVotes != null) queryParams.Add("down_votes", Configuration.ApiClient.ParameterToString(downVotes)); // query parameter + if (valuePredictingHighOutcome != null) queryParams.Add("value_predicting_high_outcome", Configuration.ApiClient.ParameterToString(valuePredictingHighOutcome)); // query parameter + if (valuePredictingLowOutcome != null) queryParams.Add("value_predicting_low_outcome", Configuration.ApiClient.ParameterToString(valuePredictingLowOutcome)); // query parameter + if (numberOfUsers != null) queryParams.Add("number_of_users", Configuration.ApiClient.ParameterToString(numberOfUsers)); // query parameter + if (dataSource != null) queryParams.Add("data_source", Configuration.ApiClient.ParameterToString(dataSource)); // query parameter + if (limit != null) queryParams.Add("limit", Configuration.ApiClient.ParameterToString(limit)); // query parameter + if (offset != null) queryParams.Add("offset", Configuration.ApiClient.ParameterToString(offset)); // query parameter + if (sort != null) queryParams.Add("sort", Configuration.ApiClient.ParameterToString(sort)); // query parameter + + + + + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + + // make the HTTP request + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling CommonVariableRelationshipsGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling CommonVariableRelationshipsGet: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2003) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2003))); + + } + + /// + /// Store CommonVariableRelationship Store CommonVariableRelationship + /// + /// User's OAuth2 access token + /// CommonVariableRelationship that should be stored + /// InlineResponse2004 + public InlineResponse2004 CommonVariableRelationshipsPost (string accessToken = null, CommonVariableRelationship body = null) + { + ApiResponse response = CommonVariableRelationshipsPostWithHttpInfo(accessToken, body); + return response.Data; + } + + /// + /// Store CommonVariableRelationship Store CommonVariableRelationship + /// + /// User's OAuth2 access token + /// CommonVariableRelationship that should be stored + /// ApiResponse of InlineResponse2004 + public ApiResponse< InlineResponse2004 > CommonVariableRelationshipsPostWithHttpInfo (string accessToken = null, CommonVariableRelationship body = null) + { + + + var path_ = "/commonVariableRelationships"; + + var pathParams = new Dictionary(); + var queryParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); + var formParams = new Dictionary(); + var fileParams = new Dictionary(); + String postBody = null; + + // to determine the Accept header + String[] http_header_accepts = new String[] { + "application/json" + }; + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); + if (http_header_accept != null) + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + pathParams.Add("format", "json"); + + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + + + + postBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter + + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + + // make the HTTP request + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling CommonVariableRelationshipsPost: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling CommonVariableRelationshipsPost: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2004) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2004))); + + } + + /// + /// Store CommonVariableRelationship Store CommonVariableRelationship + /// + /// User's OAuth2 access token + /// CommonVariableRelationship that should be stored + /// Task of InlineResponse2004 + public async System.Threading.Tasks.Task CommonVariableRelationshipsPostAsync (string accessToken = null, CommonVariableRelationship body = null) + { + ApiResponse response = await CommonVariableRelationshipsPostAsyncWithHttpInfo(accessToken, body); + return response.Data; + + } + + /// + /// Store CommonVariableRelationship Store CommonVariableRelationship + /// + /// User's OAuth2 access token + /// CommonVariableRelationship that should be stored + /// Task of ApiResponse (InlineResponse2004) + public async System.Threading.Tasks.Task> CommonVariableRelationshipsPostAsyncWithHttpInfo (string accessToken = null, CommonVariableRelationship body = null) + { + + + var path_ = "/commonVariableRelationships"; + + var pathParams = new Dictionary(); + var queryParams = new Dictionary(); + var headerParams = new Dictionary(); + var formParams = new Dictionary(); + var fileParams = new Dictionary(); + String postBody = null; + + // to determine the Accept header + String[] http_header_accepts = new String[] { + "application/json" + }; + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); + if (http_header_accept != null) + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + pathParams.Add("format", "json"); + + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + + + + postBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter + + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + + // make the HTTP request + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling CommonVariableRelationshipsPost: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling CommonVariableRelationshipsPost: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2004) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2004))); + + } + + /// + /// Get CommonVariableRelationship Get CommonVariableRelationship + /// + /// id of CommonVariableRelationship + /// User's OAuth2 access token + /// InlineResponse2004 + public InlineResponse2004 CommonVariableRelationshipsIdGet (int? id, string accessToken = null) + { + ApiResponse response = CommonVariableRelationshipsIdGetWithHttpInfo(id, accessToken); + return response.Data; + } + + /// + /// Get CommonVariableRelationship Get CommonVariableRelationship + /// + /// id of CommonVariableRelationship + /// User's OAuth2 access token + /// ApiResponse of InlineResponse2004 + public ApiResponse< InlineResponse2004 > CommonVariableRelationshipsIdGetWithHttpInfo (int? id, string accessToken = null) + { + + // verify the required parameter 'id' is set + if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling CommonVariableRelationshipsIdGet"); + + + var path_ = "/commonVariableRelationships/{id}"; + + var pathParams = new Dictionary(); + var queryParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); + var formParams = new Dictionary(); + var fileParams = new Dictionary(); + String postBody = null; + + // to determine the Accept header + String[] http_header_accepts = new String[] { + "application/json" + }; + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); + if (http_header_accept != null) + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + pathParams.Add("format", "json"); + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + + + + + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + + // make the HTTP request + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling CommonVariableRelationshipsIdGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling CommonVariableRelationshipsIdGet: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2004) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2004))); + + } + + /// + /// Get CommonVariableRelationship Get CommonVariableRelationship + /// + /// id of CommonVariableRelationship + /// User's OAuth2 access token + /// Task of InlineResponse2004 + public async System.Threading.Tasks.Task CommonVariableRelationshipsIdGetAsync (int? id, string accessToken = null) + { + ApiResponse response = await CommonVariableRelationshipsIdGetAsyncWithHttpInfo(id, accessToken); + return response.Data; + + } + + /// + /// Get CommonVariableRelationship Get CommonVariableRelationship + /// + /// id of CommonVariableRelationship + /// User's OAuth2 access token + /// Task of ApiResponse (InlineResponse2004) + public async System.Threading.Tasks.Task> CommonVariableRelationshipsIdGetAsyncWithHttpInfo (int? id, string accessToken = null) + { + // verify the required parameter 'id' is set + if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling CommonVariableRelationshipsIdGet"); + + + var path_ = "/commonVariableRelationships/{id}"; + + var pathParams = new Dictionary(); + var queryParams = new Dictionary(); + var headerParams = new Dictionary(); + var formParams = new Dictionary(); + var fileParams = new Dictionary(); + String postBody = null; + + // to determine the Accept header + String[] http_header_accepts = new String[] { + "application/json" + }; + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); + if (http_header_accept != null) + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + pathParams.Add("format", "json"); + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + + + + + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + + // make the HTTP request + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling CommonVariableRelationshipsIdGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling CommonVariableRelationshipsIdGet: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2004) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2004))); + + } + + /// + /// Update CommonVariableRelationship Update CommonVariableRelationship + /// + /// id of CommonVariableRelationship + /// User's OAuth2 access token + /// CommonVariableRelationship that should be updated + /// InlineResponse2002 + public InlineResponse2002 CommonVariableRelationshipsIdPut (int? id, string accessToken = null, CommonVariableRelationship body = null) + { + ApiResponse response = CommonVariableRelationshipsIdPutWithHttpInfo(id, accessToken, body); + return response.Data; + } + + /// + /// Update CommonVariableRelationship Update CommonVariableRelationship + /// + /// id of CommonVariableRelationship + /// User's OAuth2 access token + /// CommonVariableRelationship that should be updated + /// ApiResponse of InlineResponse2002 + public ApiResponse< InlineResponse2002 > CommonVariableRelationshipsIdPutWithHttpInfo (int? id, string accessToken = null, CommonVariableRelationship body = null) + { + + // verify the required parameter 'id' is set + if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling CommonVariableRelationshipsIdPut"); + + + var path_ = "/commonVariableRelationships/{id}"; + + var pathParams = new Dictionary(); + var queryParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); + var formParams = new Dictionary(); + var fileParams = new Dictionary(); + String postBody = null; + + // to determine the Accept header + String[] http_header_accepts = new String[] { + "application/json" + }; + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); + if (http_header_accept != null) + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + pathParams.Add("format", "json"); + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + + + + postBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter + + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + + // make the HTTP request + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling CommonVariableRelationshipsIdPut: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling CommonVariableRelationshipsIdPut: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2002) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2002))); + + } + + /// + /// Update CommonVariableRelationship Update CommonVariableRelationship + /// + /// id of CommonVariableRelationship + /// User's OAuth2 access token + /// CommonVariableRelationship that should be updated + /// Task of InlineResponse2002 + public async System.Threading.Tasks.Task CommonVariableRelationshipsIdPutAsync (int? id, string accessToken = null, CommonVariableRelationship body = null) + { + ApiResponse response = await CommonVariableRelationshipsIdPutAsyncWithHttpInfo(id, accessToken, body); + return response.Data; + + } + + /// + /// Update CommonVariableRelationship Update CommonVariableRelationship + /// + /// id of CommonVariableRelationship + /// User's OAuth2 access token + /// CommonVariableRelationship that should be updated + /// Task of ApiResponse (InlineResponse2002) + public async System.Threading.Tasks.Task> CommonVariableRelationshipsIdPutAsyncWithHttpInfo (int? id, string accessToken = null, CommonVariableRelationship body = null) + { + // verify the required parameter 'id' is set + if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling CommonVariableRelationshipsIdPut"); + + + var path_ = "/commonVariableRelationships/{id}"; + + var pathParams = new Dictionary(); + var queryParams = new Dictionary(); + var headerParams = new Dictionary(); + var formParams = new Dictionary(); + var fileParams = new Dictionary(); + String postBody = null; + + // to determine the Accept header + String[] http_header_accepts = new String[] { + "application/json" + }; + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); + if (http_header_accept != null) + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + pathParams.Add("format", "json"); + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + + + + postBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter + + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + + // make the HTTP request + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling CommonVariableRelationshipsIdPut: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling CommonVariableRelationshipsIdPut: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2002) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2002))); + + } + + /// + /// Delete CommonVariableRelationship Delete CommonVariableRelationship + /// + /// id of CommonVariableRelationship + /// User's OAuth2 access token + /// InlineResponse2002 + public InlineResponse2002 CommonVariableRelationshipsIdDelete (int? id, string accessToken = null) + { + ApiResponse response = CommonVariableRelationshipsIdDeleteWithHttpInfo(id, accessToken); + return response.Data; + } + + /// + /// Delete CommonVariableRelationship Delete CommonVariableRelationship + /// + /// id of CommonVariableRelationship + /// User's OAuth2 access token + /// ApiResponse of InlineResponse2002 + public ApiResponse< InlineResponse2002 > CommonVariableRelationshipsIdDeleteWithHttpInfo (int? id, string accessToken = null) + { + + // verify the required parameter 'id' is set + if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling CommonVariableRelationshipsIdDelete"); + + + var path_ = "/commonVariableRelationships/{id}"; + + var pathParams = new Dictionary(); + var queryParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); + var formParams = new Dictionary(); + var fileParams = new Dictionary(); + String postBody = null; + + // to determine the Accept header + String[] http_header_accepts = new String[] { + "application/json" + }; + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); + if (http_header_accept != null) + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + pathParams.Add("format", "json"); + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + + + + + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + + // make the HTTP request + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling CommonVariableRelationshipsIdDelete: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling CommonVariableRelationshipsIdDelete: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2002) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2002))); + + } + + /// + /// Delete CommonVariableRelationship Delete CommonVariableRelationship + /// + /// id of CommonVariableRelationship + /// User's OAuth2 access token + /// Task of InlineResponse2002 + public async System.Threading.Tasks.Task CommonVariableRelationshipsIdDeleteAsync (int? id, string accessToken = null) + { + ApiResponse response = await CommonVariableRelationshipsIdDeleteAsyncWithHttpInfo(id, accessToken); + return response.Data; + + } + + /// + /// Delete CommonVariableRelationship Delete CommonVariableRelationship + /// + /// id of CommonVariableRelationship + /// User's OAuth2 access token + /// Task of ApiResponse (InlineResponse2002) + public async System.Threading.Tasks.Task> CommonVariableRelationshipsIdDeleteAsyncWithHttpInfo (int? id, string accessToken = null) + { + // verify the required parameter 'id' is set + if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling CommonVariableRelationshipsIdDelete"); + + + var path_ = "/commonVariableRelationships/{id}"; + + var pathParams = new Dictionary(); + var queryParams = new Dictionary(); + var headerParams = new Dictionary(); + var formParams = new Dictionary(); + var fileParams = new Dictionary(); + String postBody = null; + + // to determine the Accept header + String[] http_header_accepts = new String[] { + "application/json" + }; + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); + if (http_header_accept != null) + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + pathParams.Add("format", "json"); + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + + + + + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + + // make the HTTP request + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling CommonVariableRelationshipsIdDelete: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling CommonVariableRelationshipsIdDelete: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2002) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2002))); + + } + + } + +} diff --git a/src/main/csharp/io/swagger/Api/ConnectionApi.cs b/src/main/csharp/io/swagger/Api/ConnectionApi.cs index 1d83d63..1e73a3a 100644 --- a/src/main/csharp/io/swagger/Api/ConnectionApi.cs +++ b/src/main/csharp/io/swagger/Api/ConnectionApi.cs @@ -1,6 +1,7 @@ using System; using System.IO; using System.Collections.Generic; +using System.Linq; using RestSharp; using IO.Swagger.Client; using IO.Swagger.Model; @@ -20,21 +21,22 @@ public interface IConnectionApi /// /// Get all Connections /// - /// user_id - /// connector_id - /// connect_status - /// connect_error - /// update_requested_at - /// update_status - /// update_error - /// last_successful_updated_at - /// created_at - /// updated_at - /// limit - /// offset - /// sort - /// InlineResponse2003 - InlineResponse2003 ConnectionsGet (int? userId, int? connectorId, string connectStatus, string connectError, string updateRequestedAt, string updateStatus, string updateError, string lastSuccessfulUpdatedAt, string createdAt, string updatedAt, int? limit, int? offset, string sort); + /// User's OAuth2 access token + /// ID of user that owns this correlation + /// The id for the connector data source for which the connection is connected + /// Indicates whether a connector is currently connected to a service for a user. + /// Error message if there is a problem with authorizing this connection. + /// Time at which an update was requested by a user. + /// Indicates whether a connector is currently updated. + /// Indicates if there was an error during the update. + /// The time at which the connector was last successfully updated. + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// InlineResponse2005 + InlineResponse2005 ConnectionsGet (string accessToken = null, int? userId = null, int? connectorId = null, string connectStatus = null, string connectError = null, string updateRequestedAt = null, string updateStatus = null, string updateError = null, string lastSuccessfulUpdatedAt = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); /// /// Get all Connections @@ -42,21 +44,68 @@ public interface IConnectionApi /// /// Get all Connections /// - /// user_id - /// connector_id - /// connect_status - /// connect_error - /// update_requested_at - /// update_status - /// update_error - /// last_successful_updated_at - /// created_at - /// updated_at - /// limit - /// offset - /// sort - /// InlineResponse2003 - System.Threading.Tasks.Task ConnectionsGetAsync (int? userId, int? connectorId, string connectStatus, string connectError, string updateRequestedAt, string updateStatus, string updateError, string lastSuccessfulUpdatedAt, string createdAt, string updatedAt, int? limit, int? offset, string sort); + /// User's OAuth2 access token + /// ID of user that owns this correlation + /// The id for the connector data source for which the connection is connected + /// Indicates whether a connector is currently connected to a service for a user. + /// Error message if there is a problem with authorizing this connection. + /// Time at which an update was requested by a user. + /// Indicates whether a connector is currently updated. + /// Indicates if there was an error during the update. + /// The time at which the connector was last successfully updated. + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// ApiResponse of InlineResponse2005 + ApiResponse ConnectionsGetWithHttpInfo (string accessToken = null, int? userId = null, int? connectorId = null, string connectStatus = null, string connectError = null, string updateRequestedAt = null, string updateStatus = null, string updateError = null, string lastSuccessfulUpdatedAt = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Get all Connections + /// + /// + /// Get all Connections + /// + /// User's OAuth2 access token + /// ID of user that owns this correlation + /// The id for the connector data source for which the connection is connected + /// Indicates whether a connector is currently connected to a service for a user. + /// Error message if there is a problem with authorizing this connection. + /// Time at which an update was requested by a user. + /// Indicates whether a connector is currently updated. + /// Indicates if there was an error during the update. + /// The time at which the connector was last successfully updated. + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of InlineResponse2005 + System.Threading.Tasks.Task ConnectionsGetAsync (string accessToken = null, int? userId = null, int? connectorId = null, string connectStatus = null, string connectError = null, string updateRequestedAt = null, string updateStatus = null, string updateError = null, string lastSuccessfulUpdatedAt = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Get all Connections + /// + /// + /// Get all Connections + /// + /// User's OAuth2 access token + /// ID of user that owns this correlation + /// The id for the connector data source for which the connection is connected + /// Indicates whether a connector is currently connected to a service for a user. + /// Error message if there is a problem with authorizing this connection. + /// Time at which an update was requested by a user. + /// Indicates whether a connector is currently updated. + /// Indicates if there was an error during the update. + /// The time at which the connector was last successfully updated. + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of ApiResponse (InlineResponse2005) + System.Threading.Tasks.Task> ConnectionsGetAsyncWithHttpInfo (string accessToken = null, int? userId = null, int? connectorId = null, string connectStatus = null, string connectError = null, string updateRequestedAt = null, string updateStatus = null, string updateError = null, string lastSuccessfulUpdatedAt = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); /// /// Store Connection @@ -64,9 +113,10 @@ public interface IConnectionApi /// /// Store Connection /// + /// User's OAuth2 access token /// Connection that should be stored - /// InlineResponse2004 - InlineResponse2004 ConnectionsPost (Connection body); + /// InlineResponse2006 + InlineResponse2006 ConnectionsPost (string accessToken = null, Connection body = null); /// /// Store Connection @@ -74,9 +124,32 @@ public interface IConnectionApi /// /// Store Connection /// + /// User's OAuth2 access token /// Connection that should be stored - /// InlineResponse2004 - System.Threading.Tasks.Task ConnectionsPostAsync (Connection body); + /// ApiResponse of InlineResponse2006 + ApiResponse ConnectionsPostWithHttpInfo (string accessToken = null, Connection body = null); + + /// + /// Store Connection + /// + /// + /// Store Connection + /// + /// User's OAuth2 access token + /// Connection that should be stored + /// Task of InlineResponse2006 + System.Threading.Tasks.Task ConnectionsPostAsync (string accessToken = null, Connection body = null); + + /// + /// Store Connection + /// + /// + /// Store Connection + /// + /// User's OAuth2 access token + /// Connection that should be stored + /// Task of ApiResponse (InlineResponse2006) + System.Threading.Tasks.Task> ConnectionsPostAsyncWithHttpInfo (string accessToken = null, Connection body = null); /// /// Get Connection @@ -85,8 +158,9 @@ public interface IConnectionApi /// Get Connection /// /// id of Connection - /// InlineResponse2004 - InlineResponse2004 ConnectionsIdGet (int? id); + /// User's OAuth2 access token + /// InlineResponse2006 + InlineResponse2006 ConnectionsIdGet (int? id, string accessToken = null); /// /// Get Connection @@ -95,8 +169,31 @@ public interface IConnectionApi /// Get Connection /// /// id of Connection - /// InlineResponse2004 - System.Threading.Tasks.Task ConnectionsIdGetAsync (int? id); + /// User's OAuth2 access token + /// ApiResponse of InlineResponse2006 + ApiResponse ConnectionsIdGetWithHttpInfo (int? id, string accessToken = null); + + /// + /// Get Connection + /// + /// + /// Get Connection + /// + /// id of Connection + /// User's OAuth2 access token + /// Task of InlineResponse2006 + System.Threading.Tasks.Task ConnectionsIdGetAsync (int? id, string accessToken = null); + + /// + /// Get Connection + /// + /// + /// Get Connection + /// + /// id of Connection + /// User's OAuth2 access token + /// Task of ApiResponse (InlineResponse2006) + System.Threading.Tasks.Task> ConnectionsIdGetAsyncWithHttpInfo (int? id, string accessToken = null); /// /// Update Connection @@ -105,9 +202,10 @@ public interface IConnectionApi /// Update Connection /// /// id of Connection + /// User's OAuth2 access token /// Connection that should be updated /// InlineResponse2002 - InlineResponse2002 ConnectionsIdPut (int? id, Connection body); + InlineResponse2002 ConnectionsIdPut (int? id, string accessToken = null, Connection body = null); /// /// Update Connection @@ -116,9 +214,34 @@ public interface IConnectionApi /// Update Connection /// /// id of Connection + /// User's OAuth2 access token /// Connection that should be updated - /// InlineResponse2002 - System.Threading.Tasks.Task ConnectionsIdPutAsync (int? id, Connection body); + /// ApiResponse of InlineResponse2002 + ApiResponse ConnectionsIdPutWithHttpInfo (int? id, string accessToken = null, Connection body = null); + + /// + /// Update Connection + /// + /// + /// Update Connection + /// + /// id of Connection + /// User's OAuth2 access token + /// Connection that should be updated + /// Task of InlineResponse2002 + System.Threading.Tasks.Task ConnectionsIdPutAsync (int? id, string accessToken = null, Connection body = null); + + /// + /// Update Connection + /// + /// + /// Update Connection + /// + /// id of Connection + /// User's OAuth2 access token + /// Connection that should be updated + /// Task of ApiResponse (InlineResponse2002) + System.Threading.Tasks.Task> ConnectionsIdPutAsyncWithHttpInfo (int? id, string accessToken = null, Connection body = null); /// /// Delete Connection @@ -127,8 +250,9 @@ public interface IConnectionApi /// Delete Connection /// /// id of Connection + /// User's OAuth2 access token /// InlineResponse2002 - InlineResponse2002 ConnectionsIdDelete (int? id); + InlineResponse2002 ConnectionsIdDelete (int? id, string accessToken = null); /// /// Delete Connection @@ -137,8 +261,31 @@ public interface IConnectionApi /// Delete Connection /// /// id of Connection - /// InlineResponse2002 - System.Threading.Tasks.Task ConnectionsIdDeleteAsync (int? id); + /// User's OAuth2 access token + /// ApiResponse of InlineResponse2002 + ApiResponse ConnectionsIdDeleteWithHttpInfo (int? id, string accessToken = null); + + /// + /// Delete Connection + /// + /// + /// Delete Connection + /// + /// id of Connection + /// User's OAuth2 access token + /// Task of InlineResponse2002 + System.Threading.Tasks.Task ConnectionsIdDeleteAsync (int? id, string accessToken = null); + + /// + /// Delete Connection + /// + /// + /// Delete Connection + /// + /// id of Connection + /// User's OAuth2 access token + /// Task of ApiResponse (InlineResponse2002) + System.Threading.Tasks.Task> ConnectionsIdDeleteAsyncWithHttpInfo (int? id, string accessToken = null); } @@ -150,69 +297,117 @@ public class ConnectionApi : IConnectionApi /// /// Initializes a new instance of the class. /// - /// an instance of ApiClient (optional) /// - public ConnectionApi(ApiClient apiClient = null) + public ConnectionApi(String basePath) { - if (apiClient == null) // use the default one in Configuration - this.ApiClient = Configuration.DefaultApiClient; - else - this.ApiClient = apiClient; + this.Configuration = new Configuration(new ApiClient(basePath)); } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class + /// using Configuration object /// + /// An instance of Configuration /// - public ConnectionApi(String basePath) + public ConnectionApi(Configuration configuration = null) { - this.ApiClient = new ApiClient(basePath); + if (configuration == null) // use the default one in Configuration + this.Configuration = Configuration.Default; + else + this.Configuration = configuration; } - + + /// + /// Gets the base path of the API client. + /// + /// The base path + public String GetBasePath() + { + return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); + } + /// /// Sets the base path of the API client. /// - /// The base path /// The base path + [Obsolete("SetBasePath is deprecated, please do 'Configuraiton.ApiClient = new ApiClient(\"http://new-path\")' instead.")] public void SetBasePath(String basePath) { - this.ApiClient.BasePath = basePath; + // do nothing } /// - /// Gets the base path of the API client. + /// Gets or sets the configuration object /// - /// The base path - public String GetBasePath() + /// An instance of the Configuration + public Configuration Configuration {get; set;} + + /// + /// Gets the default header. + /// + /// Dictionary of HTTP header + [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] + public Dictionary DefaultHeader() { - return this.ApiClient.BasePath; + return this.Configuration.DefaultHeader; } - + /// - /// Gets or sets the API client. + /// Add default header. /// - /// An instance of the ApiClient - public ApiClient ApiClient {get; set;} - + /// Header field name. + /// Header field value. + /// + [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] + public void AddDefaultHeader(string key, string value) + { + this.Configuration.AddDefaultHeader(key, value); + } + /// /// Get all Connections Get all Connections /// - /// user_id - /// connector_id - /// connect_status - /// connect_error - /// update_requested_at - /// update_status - /// update_error - /// last_successful_updated_at - /// created_at - /// updated_at - /// limit - /// offset - /// sort - /// InlineResponse2003 - public InlineResponse2003 ConnectionsGet (int? userId, int? connectorId, string connectStatus, string connectError, string updateRequestedAt, string updateStatus, string updateError, string lastSuccessfulUpdatedAt, string createdAt, string updatedAt, int? limit, int? offset, string sort) + /// User's OAuth2 access token + /// ID of user that owns this correlation + /// The id for the connector data source for which the connection is connected + /// Indicates whether a connector is currently connected to a service for a user. + /// Error message if there is a problem with authorizing this connection. + /// Time at which an update was requested by a user. + /// Indicates whether a connector is currently updated. + /// Indicates if there was an error during the update. + /// The time at which the connector was last successfully updated. + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// InlineResponse2005 + public InlineResponse2005 ConnectionsGet (string accessToken = null, int? userId = null, int? connectorId = null, string connectStatus = null, string connectError = null, string updateRequestedAt = null, string updateStatus = null, string updateError = null, string lastSuccessfulUpdatedAt = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) + { + ApiResponse response = ConnectionsGetWithHttpInfo(accessToken, userId, connectorId, connectStatus, connectError, updateRequestedAt, updateStatus, updateError, lastSuccessfulUpdatedAt, createdAt, updatedAt, limit, offset, sort); + return response.Data; + } + + /// + /// Get all Connections Get all Connections + /// + /// User's OAuth2 access token + /// ID of user that owns this correlation + /// The id for the connector data source for which the connection is connected + /// Indicates whether a connector is currently connected to a service for a user. + /// Error message if there is a problem with authorizing this connection. + /// Time at which an update was requested by a user. + /// Indicates whether a connector is currently updated. + /// Indicates if there was an error during the update. + /// The time at which the connector was last successfully updated. + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// ApiResponse of InlineResponse2005 + public ApiResponse< InlineResponse2005 > ConnectionsGetWithHttpInfo (string accessToken = null, int? userId = null, int? connectorId = null, string connectStatus = null, string connectError = null, string updateRequestedAt = null, string updateStatus = null, string updateError = null, string lastSuccessfulUpdatedAt = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) { @@ -220,7 +415,7 @@ public InlineResponse2003 ConnectionsGet (int? userId, int? connectorId, string var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -229,64 +424,103 @@ public InlineResponse2003 ConnectionsGet (int? userId, int? connectorId, string String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (userId != null) queryParams.Add("user_id", ApiClient.ParameterToString(userId)); // query parameter - if (connectorId != null) queryParams.Add("connector_id", ApiClient.ParameterToString(connectorId)); // query parameter - if (connectStatus != null) queryParams.Add("connect_status", ApiClient.ParameterToString(connectStatus)); // query parameter - if (connectError != null) queryParams.Add("connect_error", ApiClient.ParameterToString(connectError)); // query parameter - if (updateRequestedAt != null) queryParams.Add("update_requested_at", ApiClient.ParameterToString(updateRequestedAt)); // query parameter - if (updateStatus != null) queryParams.Add("update_status", ApiClient.ParameterToString(updateStatus)); // query parameter - if (updateError != null) queryParams.Add("update_error", ApiClient.ParameterToString(updateError)); // query parameter - if (lastSuccessfulUpdatedAt != null) queryParams.Add("last_successful_updated_at", ApiClient.ParameterToString(lastSuccessfulUpdatedAt)); // query parameter - if (createdAt != null) queryParams.Add("created_at", ApiClient.ParameterToString(createdAt)); // query parameter - if (updatedAt != null) queryParams.Add("updated_at", ApiClient.ParameterToString(updatedAt)); // query parameter - if (limit != null) queryParams.Add("limit", ApiClient.ParameterToString(limit)); // query parameter - if (offset != null) queryParams.Add("offset", ApiClient.ParameterToString(offset)); // query parameter - if (sort != null) queryParams.Add("sort", ApiClient.ParameterToString(sort)); // query parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + if (userId != null) queryParams.Add("user_id", Configuration.ApiClient.ParameterToString(userId)); // query parameter + if (connectorId != null) queryParams.Add("connector_id", Configuration.ApiClient.ParameterToString(connectorId)); // query parameter + if (connectStatus != null) queryParams.Add("connect_status", Configuration.ApiClient.ParameterToString(connectStatus)); // query parameter + if (connectError != null) queryParams.Add("connect_error", Configuration.ApiClient.ParameterToString(connectError)); // query parameter + if (updateRequestedAt != null) queryParams.Add("update_requested_at", Configuration.ApiClient.ParameterToString(updateRequestedAt)); // query parameter + if (updateStatus != null) queryParams.Add("update_status", Configuration.ApiClient.ParameterToString(updateStatus)); // query parameter + if (updateError != null) queryParams.Add("update_error", Configuration.ApiClient.ParameterToString(updateError)); // query parameter + if (lastSuccessfulUpdatedAt != null) queryParams.Add("last_successful_updated_at", Configuration.ApiClient.ParameterToString(lastSuccessfulUpdatedAt)); // query parameter + if (createdAt != null) queryParams.Add("created_at", Configuration.ApiClient.ParameterToString(createdAt)); // query parameter + if (updatedAt != null) queryParams.Add("updated_at", Configuration.ApiClient.ParameterToString(updatedAt)); // query parameter + if (limit != null) queryParams.Add("limit", Configuration.ApiClient.ParameterToString(limit)); // query parameter + if (offset != null) queryParams.Add("offset", Configuration.ApiClient.ParameterToString(offset)); // query parameter + if (sort != null) queryParams.Add("sort", Configuration.ApiClient.ParameterToString(sort)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { "quantimodo_oauth2" }; + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling ConnectionsGet: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling ConnectionsGet: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling ConnectionsGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling ConnectionsGet: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse2003) ApiClient.Deserialize(response, typeof(InlineResponse2003)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2005) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2005))); + } /// /// Get all Connections Get all Connections /// - /// user_id - /// connector_id - /// connect_status - /// connect_error - /// update_requested_at - /// update_status - /// update_error - /// last_successful_updated_at - /// created_at - /// updated_at - /// limit - /// offset - /// sort - /// InlineResponse2003 - public async System.Threading.Tasks.Task ConnectionsGetAsync (int? userId, int? connectorId, string connectStatus, string connectError, string updateRequestedAt, string updateStatus, string updateError, string lastSuccessfulUpdatedAt, string createdAt, string updatedAt, int? limit, int? offset, string sort) + /// User's OAuth2 access token + /// ID of user that owns this correlation + /// The id for the connector data source for which the connection is connected + /// Indicates whether a connector is currently connected to a service for a user. + /// Error message if there is a problem with authorizing this connection. + /// Time at which an update was requested by a user. + /// Indicates whether a connector is currently updated. + /// Indicates if there was an error during the update. + /// The time at which the connector was last successfully updated. + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of InlineResponse2005 + public async System.Threading.Tasks.Task ConnectionsGetAsync (string accessToken = null, int? userId = null, int? connectorId = null, string connectStatus = null, string connectError = null, string updateRequestedAt = null, string updateStatus = null, string updateError = null, string lastSuccessfulUpdatedAt = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) + { + ApiResponse response = await ConnectionsGetAsyncWithHttpInfo(accessToken, userId, connectorId, connectStatus, connectError, updateRequestedAt, updateStatus, updateError, lastSuccessfulUpdatedAt, createdAt, updatedAt, limit, offset, sort); + return response.Data; + + } + + /// + /// Get all Connections Get all Connections + /// + /// User's OAuth2 access token + /// ID of user that owns this correlation + /// The id for the connector data source for which the connection is connected + /// Indicates whether a connector is currently connected to a service for a user. + /// Error message if there is a problem with authorizing this connection. + /// Time at which an update was requested by a user. + /// Indicates whether a connector is currently updated. + /// Indicates if there was an error during the update. + /// The time at which the connector was last successfully updated. + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of ApiResponse (InlineResponse2005) + public async System.Threading.Tasks.Task> ConnectionsGetAsyncWithHttpInfo (string accessToken = null, int? userId = null, int? connectorId = null, string connectStatus = null, string connectError = null, string updateRequestedAt = null, string updateStatus = null, string updateError = null, string lastSuccessfulUpdatedAt = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) { @@ -303,49 +537,78 @@ public async System.Threading.Tasks.Task ConnectionsGetAsync String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (userId != null) queryParams.Add("user_id", ApiClient.ParameterToString(userId)); // query parameter - if (connectorId != null) queryParams.Add("connector_id", ApiClient.ParameterToString(connectorId)); // query parameter - if (connectStatus != null) queryParams.Add("connect_status", ApiClient.ParameterToString(connectStatus)); // query parameter - if (connectError != null) queryParams.Add("connect_error", ApiClient.ParameterToString(connectError)); // query parameter - if (updateRequestedAt != null) queryParams.Add("update_requested_at", ApiClient.ParameterToString(updateRequestedAt)); // query parameter - if (updateStatus != null) queryParams.Add("update_status", ApiClient.ParameterToString(updateStatus)); // query parameter - if (updateError != null) queryParams.Add("update_error", ApiClient.ParameterToString(updateError)); // query parameter - if (lastSuccessfulUpdatedAt != null) queryParams.Add("last_successful_updated_at", ApiClient.ParameterToString(lastSuccessfulUpdatedAt)); // query parameter - if (createdAt != null) queryParams.Add("created_at", ApiClient.ParameterToString(createdAt)); // query parameter - if (updatedAt != null) queryParams.Add("updated_at", ApiClient.ParameterToString(updatedAt)); // query parameter - if (limit != null) queryParams.Add("limit", ApiClient.ParameterToString(limit)); // query parameter - if (offset != null) queryParams.Add("offset", ApiClient.ParameterToString(offset)); // query parameter - if (sort != null) queryParams.Add("sort", ApiClient.ParameterToString(sort)); // query parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + if (userId != null) queryParams.Add("user_id", Configuration.ApiClient.ParameterToString(userId)); // query parameter + if (connectorId != null) queryParams.Add("connector_id", Configuration.ApiClient.ParameterToString(connectorId)); // query parameter + if (connectStatus != null) queryParams.Add("connect_status", Configuration.ApiClient.ParameterToString(connectStatus)); // query parameter + if (connectError != null) queryParams.Add("connect_error", Configuration.ApiClient.ParameterToString(connectError)); // query parameter + if (updateRequestedAt != null) queryParams.Add("update_requested_at", Configuration.ApiClient.ParameterToString(updateRequestedAt)); // query parameter + if (updateStatus != null) queryParams.Add("update_status", Configuration.ApiClient.ParameterToString(updateStatus)); // query parameter + if (updateError != null) queryParams.Add("update_error", Configuration.ApiClient.ParameterToString(updateError)); // query parameter + if (lastSuccessfulUpdatedAt != null) queryParams.Add("last_successful_updated_at", Configuration.ApiClient.ParameterToString(lastSuccessfulUpdatedAt)); // query parameter + if (createdAt != null) queryParams.Add("created_at", Configuration.ApiClient.ParameterToString(createdAt)); // query parameter + if (updatedAt != null) queryParams.Add("updated_at", Configuration.ApiClient.ParameterToString(updatedAt)); // query parameter + if (limit != null) queryParams.Add("limit", Configuration.ApiClient.ParameterToString(limit)); // query parameter + if (offset != null) queryParams.Add("offset", Configuration.ApiClient.ParameterToString(offset)); // query parameter + if (sort != null) queryParams.Add("sort", Configuration.ApiClient.ParameterToString(sort)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { "quantimodo_oauth2" }; - + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling ConnectionsGet: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); - return (InlineResponse2003) ApiClient.Deserialize(response, typeof(InlineResponse2003)); + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling ConnectionsGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling ConnectionsGet: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2005) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2005))); + } /// /// Store Connection Store Connection /// + /// User's OAuth2 access token + /// Connection that should be stored + /// InlineResponse2006 + public InlineResponse2006 ConnectionsPost (string accessToken = null, Connection body = null) + { + ApiResponse response = ConnectionsPostWithHttpInfo(accessToken, body); + return response.Data; + } + + /// + /// Store Connection Store Connection + /// + /// User's OAuth2 access token /// Connection that should be stored - /// InlineResponse2004 - public InlineResponse2004 ConnectionsPost (Connection body) + /// ApiResponse of InlineResponse2006 + public ApiResponse< InlineResponse2006 > ConnectionsPostWithHttpInfo (string accessToken = null, Connection body = null) { @@ -353,7 +616,7 @@ public InlineResponse2004 ConnectionsPost (Connection body) var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -362,40 +625,67 @@ public InlineResponse2004 ConnectionsPost (Connection body) String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - postBody = ApiClient.Serialize(body); // http body (model) parameter + postBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter + + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } - - // authentication setting, if any - String[] authSettings = new String[] { "quantimodo_oauth2" }; // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling ConnectionsPost: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling ConnectionsPost: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling ConnectionsPost: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling ConnectionsPost: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse2004) ApiClient.Deserialize(response, typeof(InlineResponse2004)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2006) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2006))); + } /// /// Store Connection Store Connection /// + /// User's OAuth2 access token /// Connection that should be stored - /// InlineResponse2004 - public async System.Threading.Tasks.Task ConnectionsPostAsync (Connection body) + /// Task of InlineResponse2006 + public async System.Threading.Tasks.Task ConnectionsPostAsync (string accessToken = null, Connection body = null) + { + ApiResponse response = await ConnectionsPostAsyncWithHttpInfo(accessToken, body); + return response.Data; + + } + + /// + /// Store Connection Store Connection + /// + /// User's OAuth2 access token + /// Connection that should be stored + /// Task of ApiResponse (InlineResponse2006) + public async System.Threading.Tasks.Task> ConnectionsPostAsyncWithHttpInfo (string accessToken = null, Connection body = null) { @@ -412,37 +702,66 @@ public async System.Threading.Tasks.Task ConnectionsPostAsyn String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - postBody = ApiClient.Serialize(body); // http body (model) parameter + postBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter - - // authentication setting, if any - String[] authSettings = new String[] { "quantimodo_oauth2" }; - + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling ConnectionsPost: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams); - return (InlineResponse2004) ApiClient.Deserialize(response, typeof(InlineResponse2004)); + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling ConnectionsPost: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling ConnectionsPost: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2006) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2006))); + } /// /// Get Connection Get Connection /// /// id of Connection - /// InlineResponse2004 - public InlineResponse2004 ConnectionsIdGet (int? id) + /// User's OAuth2 access token + /// InlineResponse2006 + public InlineResponse2006 ConnectionsIdGet (int? id, string accessToken = null) + { + ApiResponse response = ConnectionsIdGetWithHttpInfo(id, accessToken); + return response.Data; + } + + /// + /// Get Connection Get Connection + /// + /// id of Connection + /// User's OAuth2 access token + /// ApiResponse of InlineResponse2006 + public ApiResponse< InlineResponse2006 > ConnectionsIdGetWithHttpInfo (int? id, string accessToken = null) { // verify the required parameter 'id' is set @@ -453,7 +772,7 @@ public InlineResponse2004 ConnectionsIdGet (int? id) var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -462,40 +781,67 @@ public InlineResponse2004 ConnectionsIdGet (int? id) String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { "quantimodo_oauth2" }; + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling ConnectionsIdGet: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling ConnectionsIdGet: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling ConnectionsIdGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling ConnectionsIdGet: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse2004) ApiClient.Deserialize(response, typeof(InlineResponse2004)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2006) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2006))); + } /// /// Get Connection Get Connection /// /// id of Connection - /// InlineResponse2004 - public async System.Threading.Tasks.Task ConnectionsIdGetAsync (int? id) + /// User's OAuth2 access token + /// Task of InlineResponse2006 + public async System.Threading.Tasks.Task ConnectionsIdGetAsync (int? id, string accessToken = null) + { + ApiResponse response = await ConnectionsIdGetAsyncWithHttpInfo(id, accessToken); + return response.Data; + + } + + /// + /// Get Connection Get Connection + /// + /// id of Connection + /// User's OAuth2 access token + /// Task of ApiResponse (InlineResponse2006) + public async System.Threading.Tasks.Task> ConnectionsIdGetAsyncWithHttpInfo (int? id, string accessToken = null) { // verify the required parameter 'id' is set if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling ConnectionsIdGet"); @@ -514,38 +860,68 @@ public async System.Threading.Tasks.Task ConnectionsIdGetAsy String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { "quantimodo_oauth2" }; - + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling ConnectionsIdGet: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); - return (InlineResponse2004) ApiClient.Deserialize(response, typeof(InlineResponse2004)); + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling ConnectionsIdGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling ConnectionsIdGet: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2006) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2006))); + } /// /// Update Connection Update Connection /// /// id of Connection + /// User's OAuth2 access token + /// Connection that should be updated + /// InlineResponse2002 + public InlineResponse2002 ConnectionsIdPut (int? id, string accessToken = null, Connection body = null) + { + ApiResponse response = ConnectionsIdPutWithHttpInfo(id, accessToken, body); + return response.Data; + } + + /// + /// Update Connection Update Connection + /// + /// id of Connection + /// User's OAuth2 access token /// Connection that should be updated - /// InlineResponse2002 - public InlineResponse2002 ConnectionsIdPut (int? id, Connection body) + /// ApiResponse of InlineResponse2002 + public ApiResponse< InlineResponse2002 > ConnectionsIdPutWithHttpInfo (int? id, string accessToken = null, Connection body = null) { // verify the required parameter 'id' is set @@ -556,7 +932,7 @@ public InlineResponse2002 ConnectionsIdPut (int? id, Connection body) var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -565,42 +941,70 @@ public InlineResponse2002 ConnectionsIdPut (int? id, Connection body) String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - postBody = ApiClient.Serialize(body); // http body (model) parameter + postBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter + + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } - - // authentication setting, if any - String[] authSettings = new String[] { "quantimodo_oauth2" }; // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling ConnectionsIdPut: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling ConnectionsIdPut: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling ConnectionsIdPut: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling ConnectionsIdPut: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse2002) ApiClient.Deserialize(response, typeof(InlineResponse2002)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2002) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2002))); + } /// /// Update Connection Update Connection /// /// id of Connection + /// User's OAuth2 access token /// Connection that should be updated - /// InlineResponse2002 - public async System.Threading.Tasks.Task ConnectionsIdPutAsync (int? id, Connection body) + /// Task of InlineResponse2002 + public async System.Threading.Tasks.Task ConnectionsIdPutAsync (int? id, string accessToken = null, Connection body = null) + { + ApiResponse response = await ConnectionsIdPutAsyncWithHttpInfo(id, accessToken, body); + return response.Data; + + } + + /// + /// Update Connection Update Connection + /// + /// id of Connection + /// User's OAuth2 access token + /// Connection that should be updated + /// Task of ApiResponse (InlineResponse2002) + public async System.Threading.Tasks.Task> ConnectionsIdPutAsyncWithHttpInfo (int? id, string accessToken = null, Connection body = null) { // verify the required parameter 'id' is set if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling ConnectionsIdPut"); @@ -619,38 +1023,67 @@ public async System.Threading.Tasks.Task ConnectionsIdPutAsy String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - postBody = ApiClient.Serialize(body); // http body (model) parameter + postBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter - - // authentication setting, if any - String[] authSettings = new String[] { "quantimodo_oauth2" }; - + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling ConnectionsIdPut: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams); - return (InlineResponse2002) ApiClient.Deserialize(response, typeof(InlineResponse2002)); + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling ConnectionsIdPut: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling ConnectionsIdPut: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2002) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2002))); + } /// /// Delete Connection Delete Connection /// /// id of Connection - /// InlineResponse2002 - public InlineResponse2002 ConnectionsIdDelete (int? id) + /// User's OAuth2 access token + /// InlineResponse2002 + public InlineResponse2002 ConnectionsIdDelete (int? id, string accessToken = null) + { + ApiResponse response = ConnectionsIdDeleteWithHttpInfo(id, accessToken); + return response.Data; + } + + /// + /// Delete Connection Delete Connection + /// + /// id of Connection + /// User's OAuth2 access token + /// ApiResponse of InlineResponse2002 + public ApiResponse< InlineResponse2002 > ConnectionsIdDeleteWithHttpInfo (int? id, string accessToken = null) { // verify the required parameter 'id' is set @@ -661,7 +1094,7 @@ public InlineResponse2002 ConnectionsIdDelete (int? id) var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -670,40 +1103,67 @@ public InlineResponse2002 ConnectionsIdDelete (int? id) String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { "quantimodo_oauth2" }; + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling ConnectionsIdDelete: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling ConnectionsIdDelete: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling ConnectionsIdDelete: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling ConnectionsIdDelete: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse2002) ApiClient.Deserialize(response, typeof(InlineResponse2002)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2002) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2002))); + } /// /// Delete Connection Delete Connection /// /// id of Connection - /// InlineResponse2002 - public async System.Threading.Tasks.Task ConnectionsIdDeleteAsync (int? id) + /// User's OAuth2 access token + /// Task of InlineResponse2002 + public async System.Threading.Tasks.Task ConnectionsIdDeleteAsync (int? id, string accessToken = null) + { + ApiResponse response = await ConnectionsIdDeleteAsyncWithHttpInfo(id, accessToken); + return response.Data; + + } + + /// + /// Delete Connection Delete Connection + /// + /// id of Connection + /// User's OAuth2 access token + /// Task of ApiResponse (InlineResponse2002) + public async System.Threading.Tasks.Task> ConnectionsIdDeleteAsyncWithHttpInfo (int? id, string accessToken = null) { // verify the required parameter 'id' is set if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling ConnectionsIdDelete"); @@ -722,29 +1182,45 @@ public async System.Threading.Tasks.Task ConnectionsIdDelete String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { "quantimodo_oauth2" }; - + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling ConnectionsIdDelete: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams); - return (InlineResponse2002) ApiClient.Deserialize(response, typeof(InlineResponse2002)); + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling ConnectionsIdDelete: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling ConnectionsIdDelete: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2002) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2002))); + } } diff --git a/src/main/csharp/io/swagger/Api/ConnectorApi.cs b/src/main/csharp/io/swagger/Api/ConnectorApi.cs index 0e2ce2b..c309d13 100644 --- a/src/main/csharp/io/swagger/Api/ConnectorApi.cs +++ b/src/main/csharp/io/swagger/Api/ConnectorApi.cs @@ -1,6 +1,7 @@ using System; using System.IO; using System.Collections.Generic; +using System.Linq; using RestSharp; using IO.Swagger.Client; using IO.Swagger.Model; @@ -15,44 +16,88 @@ public interface IConnectorApi { /// - /// Get all Connectors + /// Get list of Connectors /// /// - /// Get all Connectors + /// A connector pulls data from other data providers using their API or a screenscraper. Returns a list of all available connectors and information about them such as their id, name, whether the user has provided access, logo url, connection instructions, and the update history. /// - /// name - /// display_name - /// image - /// get_it_url - /// short_description - /// long_description - /// enabled - /// oauth - /// limit - /// offset - /// sort - /// InlineResponse2005 - InlineResponse2005 ConnectorsGet (string name, string displayName, string image, string getItUrl, string shortDescription, string longDescription, bool? enabled, bool? oauth, int? limit, int? offset, string sort); + /// User's OAuth2 access token + /// Lowercase system name for the data source + /// Pretty display name for the data source + /// URL to the image of the connector logo + /// URL to a site where one can get this device or application + /// Short description of the service (such as the categories it tracks) + /// Longer paragraph description of the data provider + /// Set to 1 if the connector should be returned when listing connectors + /// Set to 1 if the connector uses OAuth authentication as opposed to username/password + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// InlineResponse2007 + InlineResponse2007 ConnectorsGet (string accessToken = null, string name = null, string displayName = null, string image = null, string getItUrl = null, string shortDescription = null, string longDescription = null, bool? enabled = null, bool? oauth = null, int? limit = null, int? offset = null, string sort = null); /// - /// Get all Connectors + /// Get list of Connectors /// /// - /// Get all Connectors + /// A connector pulls data from other data providers using their API or a screenscraper. Returns a list of all available connectors and information about them such as their id, name, whether the user has provided access, logo url, connection instructions, and the update history. /// - /// name - /// display_name - /// image - /// get_it_url - /// short_description - /// long_description - /// enabled - /// oauth - /// limit - /// offset - /// sort - /// InlineResponse2005 - System.Threading.Tasks.Task ConnectorsGetAsync (string name, string displayName, string image, string getItUrl, string shortDescription, string longDescription, bool? enabled, bool? oauth, int? limit, int? offset, string sort); + /// User's OAuth2 access token + /// Lowercase system name for the data source + /// Pretty display name for the data source + /// URL to the image of the connector logo + /// URL to a site where one can get this device or application + /// Short description of the service (such as the categories it tracks) + /// Longer paragraph description of the data provider + /// Set to 1 if the connector should be returned when listing connectors + /// Set to 1 if the connector uses OAuth authentication as opposed to username/password + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// ApiResponse of InlineResponse2007 + ApiResponse ConnectorsGetWithHttpInfo (string accessToken = null, string name = null, string displayName = null, string image = null, string getItUrl = null, string shortDescription = null, string longDescription = null, bool? enabled = null, bool? oauth = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Get list of Connectors + /// + /// + /// A connector pulls data from other data providers using their API or a screenscraper. Returns a list of all available connectors and information about them such as their id, name, whether the user has provided access, logo url, connection instructions, and the update history. + /// + /// User's OAuth2 access token + /// Lowercase system name for the data source + /// Pretty display name for the data source + /// URL to the image of the connector logo + /// URL to a site where one can get this device or application + /// Short description of the service (such as the categories it tracks) + /// Longer paragraph description of the data provider + /// Set to 1 if the connector should be returned when listing connectors + /// Set to 1 if the connector uses OAuth authentication as opposed to username/password + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of InlineResponse2007 + System.Threading.Tasks.Task ConnectorsGetAsync (string accessToken = null, string name = null, string displayName = null, string image = null, string getItUrl = null, string shortDescription = null, string longDescription = null, bool? enabled = null, bool? oauth = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Get list of Connectors + /// + /// + /// A connector pulls data from other data providers using their API or a screenscraper. Returns a list of all available connectors and information about them such as their id, name, whether the user has provided access, logo url, connection instructions, and the update history. + /// + /// User's OAuth2 access token + /// Lowercase system name for the data source + /// Pretty display name for the data source + /// URL to the image of the connector logo + /// URL to a site where one can get this device or application + /// Short description of the service (such as the categories it tracks) + /// Longer paragraph description of the data provider + /// Set to 1 if the connector should be returned when listing connectors + /// Set to 1 if the connector uses OAuth authentication as opposed to username/password + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of ApiResponse (InlineResponse2007) + System.Threading.Tasks.Task> ConnectorsGetAsyncWithHttpInfo (string accessToken = null, string name = null, string displayName = null, string image = null, string getItUrl = null, string shortDescription = null, string longDescription = null, bool? enabled = null, bool? oauth = null, int? limit = null, int? offset = null, string sort = null); /// /// Store Connector @@ -60,9 +105,10 @@ public interface IConnectorApi /// /// Store Connector /// + /// User's OAuth2 access token /// Connector that should be stored - /// InlineResponse2006 - InlineResponse2006 ConnectorsPost (Connector body); + /// InlineResponse2008 + InlineResponse2008 ConnectorsPost (string accessToken = null, Connector body = null); /// /// Store Connector @@ -70,29 +116,76 @@ public interface IConnectorApi /// /// Store Connector /// + /// User's OAuth2 access token /// Connector that should be stored - /// InlineResponse2006 - System.Threading.Tasks.Task ConnectorsPostAsync (Connector body); + /// ApiResponse of InlineResponse2008 + ApiResponse ConnectorsPostWithHttpInfo (string accessToken = null, Connector body = null); + + /// + /// Store Connector + /// + /// + /// Store Connector + /// + /// User's OAuth2 access token + /// Connector that should be stored + /// Task of InlineResponse2008 + System.Threading.Tasks.Task ConnectorsPostAsync (string accessToken = null, Connector body = null); + + /// + /// Store Connector + /// + /// + /// Store Connector + /// + /// User's OAuth2 access token + /// Connector that should be stored + /// Task of ApiResponse (InlineResponse2008) + System.Threading.Tasks.Task> ConnectorsPostAsyncWithHttpInfo (string accessToken = null, Connector body = null); /// - /// Get Connector + /// Get connector info for user /// /// - /// Get Connector + /// Returns information about the connector such as the connector id, whether or not is connected for this user (i.e. we have a token or credentials), and its update history for the user. /// /// id of Connector - /// InlineResponse2006 - InlineResponse2006 ConnectorsIdGet (int? id); + /// User's OAuth2 access token + /// InlineResponse2008 + InlineResponse2008 ConnectorsIdGet (int? id, string accessToken = null); /// - /// Get Connector + /// Get connector info for user + /// + /// + /// Returns information about the connector such as the connector id, whether or not is connected for this user (i.e. we have a token or credentials), and its update history for the user. + /// + /// id of Connector + /// User's OAuth2 access token + /// ApiResponse of InlineResponse2008 + ApiResponse ConnectorsIdGetWithHttpInfo (int? id, string accessToken = null); + + /// + /// Get connector info for user + /// + /// + /// Returns information about the connector such as the connector id, whether or not is connected for this user (i.e. we have a token or credentials), and its update history for the user. + /// + /// id of Connector + /// User's OAuth2 access token + /// Task of InlineResponse2008 + System.Threading.Tasks.Task ConnectorsIdGetAsync (int? id, string accessToken = null); + + /// + /// Get connector info for user /// /// - /// Get Connector + /// Returns information about the connector such as the connector id, whether or not is connected for this user (i.e. we have a token or credentials), and its update history for the user. /// /// id of Connector - /// InlineResponse2006 - System.Threading.Tasks.Task ConnectorsIdGetAsync (int? id); + /// User's OAuth2 access token + /// Task of ApiResponse (InlineResponse2008) + System.Threading.Tasks.Task> ConnectorsIdGetAsyncWithHttpInfo (int? id, string accessToken = null); /// /// Update Connector @@ -101,9 +194,10 @@ public interface IConnectorApi /// Update Connector /// /// id of Connector + /// User's OAuth2 access token /// Connector that should be updated /// InlineResponse2002 - InlineResponse2002 ConnectorsIdPut (int? id, Connector body); + InlineResponse2002 ConnectorsIdPut (int? id, string accessToken = null, Connector body = null); /// /// Update Connector @@ -112,9 +206,34 @@ public interface IConnectorApi /// Update Connector /// /// id of Connector + /// User's OAuth2 access token /// Connector that should be updated - /// InlineResponse2002 - System.Threading.Tasks.Task ConnectorsIdPutAsync (int? id, Connector body); + /// ApiResponse of InlineResponse2002 + ApiResponse ConnectorsIdPutWithHttpInfo (int? id, string accessToken = null, Connector body = null); + + /// + /// Update Connector + /// + /// + /// Update Connector + /// + /// id of Connector + /// User's OAuth2 access token + /// Connector that should be updated + /// Task of InlineResponse2002 + System.Threading.Tasks.Task ConnectorsIdPutAsync (int? id, string accessToken = null, Connector body = null); + + /// + /// Update Connector + /// + /// + /// Update Connector + /// + /// id of Connector + /// User's OAuth2 access token + /// Connector that should be updated + /// Task of ApiResponse (InlineResponse2002) + System.Threading.Tasks.Task> ConnectorsIdPutAsyncWithHttpInfo (int? id, string accessToken = null, Connector body = null); /// /// Delete Connector @@ -123,8 +242,9 @@ public interface IConnectorApi /// Delete Connector /// /// id of Connector + /// User's OAuth2 access token /// InlineResponse2002 - InlineResponse2002 ConnectorsIdDelete (int? id); + InlineResponse2002 ConnectorsIdDelete (int? id, string accessToken = null); /// /// Delete Connector @@ -133,8 +253,31 @@ public interface IConnectorApi /// Delete Connector /// /// id of Connector - /// InlineResponse2002 - System.Threading.Tasks.Task ConnectorsIdDeleteAsync (int? id); + /// User's OAuth2 access token + /// ApiResponse of InlineResponse2002 + ApiResponse ConnectorsIdDeleteWithHttpInfo (int? id, string accessToken = null); + + /// + /// Delete Connector + /// + /// + /// Delete Connector + /// + /// id of Connector + /// User's OAuth2 access token + /// Task of InlineResponse2002 + System.Threading.Tasks.Task ConnectorsIdDeleteAsync (int? id, string accessToken = null); + + /// + /// Delete Connector + /// + /// + /// Delete Connector + /// + /// id of Connector + /// User's OAuth2 access token + /// Task of ApiResponse (InlineResponse2002) + System.Threading.Tasks.Task> ConnectorsIdDeleteAsyncWithHttpInfo (int? id, string accessToken = null); } @@ -146,67 +289,113 @@ public class ConnectorApi : IConnectorApi /// /// Initializes a new instance of the class. /// - /// an instance of ApiClient (optional) /// - public ConnectorApi(ApiClient apiClient = null) + public ConnectorApi(String basePath) { - if (apiClient == null) // use the default one in Configuration - this.ApiClient = Configuration.DefaultApiClient; - else - this.ApiClient = apiClient; + this.Configuration = new Configuration(new ApiClient(basePath)); } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class + /// using Configuration object /// + /// An instance of Configuration /// - public ConnectorApi(String basePath) + public ConnectorApi(Configuration configuration = null) { - this.ApiClient = new ApiClient(basePath); + if (configuration == null) // use the default one in Configuration + this.Configuration = Configuration.Default; + else + this.Configuration = configuration; } - + + /// + /// Gets the base path of the API client. + /// + /// The base path + public String GetBasePath() + { + return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); + } + /// /// Sets the base path of the API client. /// - /// The base path /// The base path + [Obsolete("SetBasePath is deprecated, please do 'Configuraiton.ApiClient = new ApiClient(\"http://new-path\")' instead.")] public void SetBasePath(String basePath) { - this.ApiClient.BasePath = basePath; + // do nothing } /// - /// Gets the base path of the API client. + /// Gets or sets the configuration object /// - /// The base path - public String GetBasePath() + /// An instance of the Configuration + public Configuration Configuration {get; set;} + + /// + /// Gets the default header. + /// + /// Dictionary of HTTP header + [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] + public Dictionary DefaultHeader() { - return this.ApiClient.BasePath; + return this.Configuration.DefaultHeader; } - + /// - /// Gets or sets the API client. + /// Add default header. /// - /// An instance of the ApiClient - public ApiClient ApiClient {get; set;} - + /// Header field name. + /// Header field value. + /// + [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] + public void AddDefaultHeader(string key, string value) + { + this.Configuration.AddDefaultHeader(key, value); + } + /// - /// Get all Connectors Get all Connectors - /// - /// name - /// display_name - /// image - /// get_it_url - /// short_description - /// long_description - /// enabled - /// oauth - /// limit - /// offset - /// sort - /// InlineResponse2005 - public InlineResponse2005 ConnectorsGet (string name, string displayName, string image, string getItUrl, string shortDescription, string longDescription, bool? enabled, bool? oauth, int? limit, int? offset, string sort) + /// Get list of Connectors A connector pulls data from other data providers using their API or a screenscraper. Returns a list of all available connectors and information about them such as their id, name, whether the user has provided access, logo url, connection instructions, and the update history. + /// + /// User's OAuth2 access token + /// Lowercase system name for the data source + /// Pretty display name for the data source + /// URL to the image of the connector logo + /// URL to a site where one can get this device or application + /// Short description of the service (such as the categories it tracks) + /// Longer paragraph description of the data provider + /// Set to 1 if the connector should be returned when listing connectors + /// Set to 1 if the connector uses OAuth authentication as opposed to username/password + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// InlineResponse2007 + public InlineResponse2007 ConnectorsGet (string accessToken = null, string name = null, string displayName = null, string image = null, string getItUrl = null, string shortDescription = null, string longDescription = null, bool? enabled = null, bool? oauth = null, int? limit = null, int? offset = null, string sort = null) + { + ApiResponse response = ConnectorsGetWithHttpInfo(accessToken, name, displayName, image, getItUrl, shortDescription, longDescription, enabled, oauth, limit, offset, sort); + return response.Data; + } + + /// + /// Get list of Connectors A connector pulls data from other data providers using their API or a screenscraper. Returns a list of all available connectors and information about them such as their id, name, whether the user has provided access, logo url, connection instructions, and the update history. + /// + /// User's OAuth2 access token + /// Lowercase system name for the data source + /// Pretty display name for the data source + /// URL to the image of the connector logo + /// URL to a site where one can get this device or application + /// Short description of the service (such as the categories it tracks) + /// Longer paragraph description of the data provider + /// Set to 1 if the connector should be returned when listing connectors + /// Set to 1 if the connector uses OAuth authentication as opposed to username/password + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// ApiResponse of InlineResponse2007 + public ApiResponse< InlineResponse2007 > ConnectorsGetWithHttpInfo (string accessToken = null, string name = null, string displayName = null, string image = null, string getItUrl = null, string shortDescription = null, string longDescription = null, bool? enabled = null, bool? oauth = null, int? limit = null, int? offset = null, string sort = null) { @@ -214,7 +403,7 @@ public InlineResponse2005 ConnectorsGet (string name, string displayName, string var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -223,60 +412,97 @@ public InlineResponse2005 ConnectorsGet (string name, string displayName, string String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (name != null) queryParams.Add("name", ApiClient.ParameterToString(name)); // query parameter - if (displayName != null) queryParams.Add("display_name", ApiClient.ParameterToString(displayName)); // query parameter - if (image != null) queryParams.Add("image", ApiClient.ParameterToString(image)); // query parameter - if (getItUrl != null) queryParams.Add("get_it_url", ApiClient.ParameterToString(getItUrl)); // query parameter - if (shortDescription != null) queryParams.Add("short_description", ApiClient.ParameterToString(shortDescription)); // query parameter - if (longDescription != null) queryParams.Add("long_description", ApiClient.ParameterToString(longDescription)); // query parameter - if (enabled != null) queryParams.Add("enabled", ApiClient.ParameterToString(enabled)); // query parameter - if (oauth != null) queryParams.Add("oauth", ApiClient.ParameterToString(oauth)); // query parameter - if (limit != null) queryParams.Add("limit", ApiClient.ParameterToString(limit)); // query parameter - if (offset != null) queryParams.Add("offset", ApiClient.ParameterToString(offset)); // query parameter - if (sort != null) queryParams.Add("sort", ApiClient.ParameterToString(sort)); // query parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + if (name != null) queryParams.Add("name", Configuration.ApiClient.ParameterToString(name)); // query parameter + if (displayName != null) queryParams.Add("display_name", Configuration.ApiClient.ParameterToString(displayName)); // query parameter + if (image != null) queryParams.Add("image", Configuration.ApiClient.ParameterToString(image)); // query parameter + if (getItUrl != null) queryParams.Add("get_it_url", Configuration.ApiClient.ParameterToString(getItUrl)); // query parameter + if (shortDescription != null) queryParams.Add("short_description", Configuration.ApiClient.ParameterToString(shortDescription)); // query parameter + if (longDescription != null) queryParams.Add("long_description", Configuration.ApiClient.ParameterToString(longDescription)); // query parameter + if (enabled != null) queryParams.Add("enabled", Configuration.ApiClient.ParameterToString(enabled)); // query parameter + if (oauth != null) queryParams.Add("oauth", Configuration.ApiClient.ParameterToString(oauth)); // query parameter + if (limit != null) queryParams.Add("limit", Configuration.ApiClient.ParameterToString(limit)); // query parameter + if (offset != null) queryParams.Add("offset", Configuration.ApiClient.ParameterToString(offset)); // query parameter + if (sort != null) queryParams.Add("sort", Configuration.ApiClient.ParameterToString(sort)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling ConnectorsGet: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling ConnectorsGet: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling ConnectorsGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling ConnectorsGet: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse2005) ApiClient.Deserialize(response, typeof(InlineResponse2005)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2007) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2007))); + } /// - /// Get all Connectors Get all Connectors - /// - /// name - /// display_name - /// image - /// get_it_url - /// short_description - /// long_description - /// enabled - /// oauth - /// limit - /// offset - /// sort - /// InlineResponse2005 - public async System.Threading.Tasks.Task ConnectorsGetAsync (string name, string displayName, string image, string getItUrl, string shortDescription, string longDescription, bool? enabled, bool? oauth, int? limit, int? offset, string sort) + /// Get list of Connectors A connector pulls data from other data providers using their API or a screenscraper. Returns a list of all available connectors and information about them such as their id, name, whether the user has provided access, logo url, connection instructions, and the update history. + /// + /// User's OAuth2 access token + /// Lowercase system name for the data source + /// Pretty display name for the data source + /// URL to the image of the connector logo + /// URL to a site where one can get this device or application + /// Short description of the service (such as the categories it tracks) + /// Longer paragraph description of the data provider + /// Set to 1 if the connector should be returned when listing connectors + /// Set to 1 if the connector uses OAuth authentication as opposed to username/password + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of InlineResponse2007 + public async System.Threading.Tasks.Task ConnectorsGetAsync (string accessToken = null, string name = null, string displayName = null, string image = null, string getItUrl = null, string shortDescription = null, string longDescription = null, bool? enabled = null, bool? oauth = null, int? limit = null, int? offset = null, string sort = null) + { + ApiResponse response = await ConnectorsGetAsyncWithHttpInfo(accessToken, name, displayName, image, getItUrl, shortDescription, longDescription, enabled, oauth, limit, offset, sort); + return response.Data; + + } + + /// + /// Get list of Connectors A connector pulls data from other data providers using their API or a screenscraper. Returns a list of all available connectors and information about them such as their id, name, whether the user has provided access, logo url, connection instructions, and the update history. + /// + /// User's OAuth2 access token + /// Lowercase system name for the data source + /// Pretty display name for the data source + /// URL to the image of the connector logo + /// URL to a site where one can get this device or application + /// Short description of the service (such as the categories it tracks) + /// Longer paragraph description of the data provider + /// Set to 1 if the connector should be returned when listing connectors + /// Set to 1 if the connector uses OAuth authentication as opposed to username/password + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of ApiResponse (InlineResponse2007) + public async System.Threading.Tasks.Task> ConnectorsGetAsyncWithHttpInfo (string accessToken = null, string name = null, string displayName = null, string image = null, string getItUrl = null, string shortDescription = null, string longDescription = null, bool? enabled = null, bool? oauth = null, int? limit = null, int? offset = null, string sort = null) { @@ -293,47 +519,76 @@ public async System.Threading.Tasks.Task ConnectorsGetAsync String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (name != null) queryParams.Add("name", ApiClient.ParameterToString(name)); // query parameter - if (displayName != null) queryParams.Add("display_name", ApiClient.ParameterToString(displayName)); // query parameter - if (image != null) queryParams.Add("image", ApiClient.ParameterToString(image)); // query parameter - if (getItUrl != null) queryParams.Add("get_it_url", ApiClient.ParameterToString(getItUrl)); // query parameter - if (shortDescription != null) queryParams.Add("short_description", ApiClient.ParameterToString(shortDescription)); // query parameter - if (longDescription != null) queryParams.Add("long_description", ApiClient.ParameterToString(longDescription)); // query parameter - if (enabled != null) queryParams.Add("enabled", ApiClient.ParameterToString(enabled)); // query parameter - if (oauth != null) queryParams.Add("oauth", ApiClient.ParameterToString(oauth)); // query parameter - if (limit != null) queryParams.Add("limit", ApiClient.ParameterToString(limit)); // query parameter - if (offset != null) queryParams.Add("offset", ApiClient.ParameterToString(offset)); // query parameter - if (sort != null) queryParams.Add("sort", ApiClient.ParameterToString(sort)); // query parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + if (name != null) queryParams.Add("name", Configuration.ApiClient.ParameterToString(name)); // query parameter + if (displayName != null) queryParams.Add("display_name", Configuration.ApiClient.ParameterToString(displayName)); // query parameter + if (image != null) queryParams.Add("image", Configuration.ApiClient.ParameterToString(image)); // query parameter + if (getItUrl != null) queryParams.Add("get_it_url", Configuration.ApiClient.ParameterToString(getItUrl)); // query parameter + if (shortDescription != null) queryParams.Add("short_description", Configuration.ApiClient.ParameterToString(shortDescription)); // query parameter + if (longDescription != null) queryParams.Add("long_description", Configuration.ApiClient.ParameterToString(longDescription)); // query parameter + if (enabled != null) queryParams.Add("enabled", Configuration.ApiClient.ParameterToString(enabled)); // query parameter + if (oauth != null) queryParams.Add("oauth", Configuration.ApiClient.ParameterToString(oauth)); // query parameter + if (limit != null) queryParams.Add("limit", Configuration.ApiClient.ParameterToString(limit)); // query parameter + if (offset != null) queryParams.Add("offset", Configuration.ApiClient.ParameterToString(offset)); // query parameter + if (sort != null) queryParams.Add("sort", Configuration.ApiClient.ParameterToString(sort)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; - + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling ConnectorsGet: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling ConnectorsGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling ConnectorsGet: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse2005) ApiClient.Deserialize(response, typeof(InlineResponse2005)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2007) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2007))); + } /// /// Store Connector Store Connector /// + /// User's OAuth2 access token /// Connector that should be stored - /// InlineResponse2006 - public InlineResponse2006 ConnectorsPost (Connector body) + /// InlineResponse2008 + public InlineResponse2008 ConnectorsPost (string accessToken = null, Connector body = null) + { + ApiResponse response = ConnectorsPostWithHttpInfo(accessToken, body); + return response.Data; + } + + /// + /// Store Connector Store Connector + /// + /// User's OAuth2 access token + /// Connector that should be stored + /// ApiResponse of InlineResponse2008 + public ApiResponse< InlineResponse2008 > ConnectorsPostWithHttpInfo (string accessToken = null, Connector body = null) { @@ -341,7 +596,7 @@ public InlineResponse2006 ConnectorsPost (Connector body) var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -350,40 +605,67 @@ public InlineResponse2006 ConnectorsPost (Connector body) String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - postBody = ApiClient.Serialize(body); // http body (model) parameter + postBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter + + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } - - // authentication setting, if any - String[] authSettings = new String[] { }; // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling ConnectorsPost: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling ConnectorsPost: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling ConnectorsPost: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling ConnectorsPost: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse2006) ApiClient.Deserialize(response, typeof(InlineResponse2006)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2008) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2008))); + } /// /// Store Connector Store Connector /// + /// User's OAuth2 access token /// Connector that should be stored - /// InlineResponse2006 - public async System.Threading.Tasks.Task ConnectorsPostAsync (Connector body) + /// Task of InlineResponse2008 + public async System.Threading.Tasks.Task ConnectorsPostAsync (string accessToken = null, Connector body = null) + { + ApiResponse response = await ConnectorsPostAsyncWithHttpInfo(accessToken, body); + return response.Data; + + } + + /// + /// Store Connector Store Connector + /// + /// User's OAuth2 access token + /// Connector that should be stored + /// Task of ApiResponse (InlineResponse2008) + public async System.Threading.Tasks.Task> ConnectorsPostAsyncWithHttpInfo (string accessToken = null, Connector body = null) { @@ -400,37 +682,66 @@ public async System.Threading.Tasks.Task ConnectorsPostAsync String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - postBody = ApiClient.Serialize(body); // http body (model) parameter + postBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; - + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling ConnectorsPost: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams); - return (InlineResponse2006) ApiClient.Deserialize(response, typeof(InlineResponse2006)); + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling ConnectorsPost: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling ConnectorsPost: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2008) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2008))); + } /// - /// Get Connector Get Connector + /// Get connector info for user Returns information about the connector such as the connector id, whether or not is connected for this user (i.e. we have a token or credentials), and its update history for the user. + /// + /// id of Connector + /// User's OAuth2 access token + /// InlineResponse2008 + public InlineResponse2008 ConnectorsIdGet (int? id, string accessToken = null) + { + ApiResponse response = ConnectorsIdGetWithHttpInfo(id, accessToken); + return response.Data; + } + + /// + /// Get connector info for user Returns information about the connector such as the connector id, whether or not is connected for this user (i.e. we have a token or credentials), and its update history for the user. /// /// id of Connector - /// InlineResponse2006 - public InlineResponse2006 ConnectorsIdGet (int? id) + /// User's OAuth2 access token + /// ApiResponse of InlineResponse2008 + public ApiResponse< InlineResponse2008 > ConnectorsIdGetWithHttpInfo (int? id, string accessToken = null) { // verify the required parameter 'id' is set @@ -441,7 +752,7 @@ public InlineResponse2006 ConnectorsIdGet (int? id) var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -450,40 +761,67 @@ public InlineResponse2006 ConnectorsIdGet (int? id) String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling ConnectorsIdGet: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling ConnectorsIdGet: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling ConnectorsIdGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling ConnectorsIdGet: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse2006) ApiClient.Deserialize(response, typeof(InlineResponse2006)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2008) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2008))); + } /// - /// Get Connector Get Connector + /// Get connector info for user Returns information about the connector such as the connector id, whether or not is connected for this user (i.e. we have a token or credentials), and its update history for the user. /// /// id of Connector - /// InlineResponse2006 - public async System.Threading.Tasks.Task ConnectorsIdGetAsync (int? id) + /// User's OAuth2 access token + /// Task of InlineResponse2008 + public async System.Threading.Tasks.Task ConnectorsIdGetAsync (int? id, string accessToken = null) + { + ApiResponse response = await ConnectorsIdGetAsyncWithHttpInfo(id, accessToken); + return response.Data; + + } + + /// + /// Get connector info for user Returns information about the connector such as the connector id, whether or not is connected for this user (i.e. we have a token or credentials), and its update history for the user. + /// + /// id of Connector + /// User's OAuth2 access token + /// Task of ApiResponse (InlineResponse2008) + public async System.Threading.Tasks.Task> ConnectorsIdGetAsyncWithHttpInfo (int? id, string accessToken = null) { // verify the required parameter 'id' is set if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling ConnectorsIdGet"); @@ -502,38 +840,68 @@ public async System.Threading.Tasks.Task ConnectorsIdGetAsyn String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; - + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling ConnectorsIdGet: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling ConnectorsIdGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling ConnectorsIdGet: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse2006) ApiClient.Deserialize(response, typeof(InlineResponse2006)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2008) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2008))); + } /// /// Update Connector Update Connector /// /// id of Connector + /// User's OAuth2 access token /// Connector that should be updated - /// InlineResponse2002 - public InlineResponse2002 ConnectorsIdPut (int? id, Connector body) + /// InlineResponse2002 + public InlineResponse2002 ConnectorsIdPut (int? id, string accessToken = null, Connector body = null) + { + ApiResponse response = ConnectorsIdPutWithHttpInfo(id, accessToken, body); + return response.Data; + } + + /// + /// Update Connector Update Connector + /// + /// id of Connector + /// User's OAuth2 access token + /// Connector that should be updated + /// ApiResponse of InlineResponse2002 + public ApiResponse< InlineResponse2002 > ConnectorsIdPutWithHttpInfo (int? id, string accessToken = null, Connector body = null) { // verify the required parameter 'id' is set @@ -544,7 +912,7 @@ public InlineResponse2002 ConnectorsIdPut (int? id, Connector body) var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -553,42 +921,70 @@ public InlineResponse2002 ConnectorsIdPut (int? id, Connector body) String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - postBody = ApiClient.Serialize(body); // http body (model) parameter + postBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter + + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } - - // authentication setting, if any - String[] authSettings = new String[] { }; // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling ConnectorsIdPut: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling ConnectorsIdPut: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling ConnectorsIdPut: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling ConnectorsIdPut: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse2002) ApiClient.Deserialize(response, typeof(InlineResponse2002)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2002) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2002))); + } /// /// Update Connector Update Connector /// /// id of Connector + /// User's OAuth2 access token /// Connector that should be updated - /// InlineResponse2002 - public async System.Threading.Tasks.Task ConnectorsIdPutAsync (int? id, Connector body) + /// Task of InlineResponse2002 + public async System.Threading.Tasks.Task ConnectorsIdPutAsync (int? id, string accessToken = null, Connector body = null) + { + ApiResponse response = await ConnectorsIdPutAsyncWithHttpInfo(id, accessToken, body); + return response.Data; + + } + + /// + /// Update Connector Update Connector + /// + /// id of Connector + /// User's OAuth2 access token + /// Connector that should be updated + /// Task of ApiResponse (InlineResponse2002) + public async System.Threading.Tasks.Task> ConnectorsIdPutAsyncWithHttpInfo (int? id, string accessToken = null, Connector body = null) { // verify the required parameter 'id' is set if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling ConnectorsIdPut"); @@ -607,38 +1003,67 @@ public async System.Threading.Tasks.Task ConnectorsIdPutAsyn String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - postBody = ApiClient.Serialize(body); // http body (model) parameter + postBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; - + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling ConnectorsIdPut: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams); - return (InlineResponse2002) ApiClient.Deserialize(response, typeof(InlineResponse2002)); + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling ConnectorsIdPut: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling ConnectorsIdPut: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2002) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2002))); + } /// /// Delete Connector Delete Connector /// /// id of Connector - /// InlineResponse2002 - public InlineResponse2002 ConnectorsIdDelete (int? id) + /// User's OAuth2 access token + /// InlineResponse2002 + public InlineResponse2002 ConnectorsIdDelete (int? id, string accessToken = null) + { + ApiResponse response = ConnectorsIdDeleteWithHttpInfo(id, accessToken); + return response.Data; + } + + /// + /// Delete Connector Delete Connector + /// + /// id of Connector + /// User's OAuth2 access token + /// ApiResponse of InlineResponse2002 + public ApiResponse< InlineResponse2002 > ConnectorsIdDeleteWithHttpInfo (int? id, string accessToken = null) { // verify the required parameter 'id' is set @@ -649,7 +1074,7 @@ public InlineResponse2002 ConnectorsIdDelete (int? id) var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -658,40 +1083,67 @@ public InlineResponse2002 ConnectorsIdDelete (int? id) String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling ConnectorsIdDelete: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling ConnectorsIdDelete: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling ConnectorsIdDelete: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling ConnectorsIdDelete: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse2002) ApiClient.Deserialize(response, typeof(InlineResponse2002)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2002) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2002))); + } /// /// Delete Connector Delete Connector /// /// id of Connector - /// InlineResponse2002 - public async System.Threading.Tasks.Task ConnectorsIdDeleteAsync (int? id) + /// User's OAuth2 access token + /// Task of InlineResponse2002 + public async System.Threading.Tasks.Task ConnectorsIdDeleteAsync (int? id, string accessToken = null) + { + ApiResponse response = await ConnectorsIdDeleteAsyncWithHttpInfo(id, accessToken); + return response.Data; + + } + + /// + /// Delete Connector Delete Connector + /// + /// id of Connector + /// User's OAuth2 access token + /// Task of ApiResponse (InlineResponse2002) + public async System.Threading.Tasks.Task> ConnectorsIdDeleteAsyncWithHttpInfo (int? id, string accessToken = null) { // verify the required parameter 'id' is set if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling ConnectorsIdDelete"); @@ -710,29 +1162,45 @@ public async System.Threading.Tasks.Task ConnectorsIdDeleteA String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; - + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling ConnectorsIdDelete: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams); - return (InlineResponse2002) ApiClient.Deserialize(response, typeof(InlineResponse2002)); + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling ConnectorsIdDelete: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling ConnectorsIdDelete: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2002) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2002))); + } } diff --git a/src/main/csharp/io/swagger/Api/CorrelationApi.cs b/src/main/csharp/io/swagger/Api/CorrelationApi.cs index 344fe5e..a742305 100644 --- a/src/main/csharp/io/swagger/Api/CorrelationApi.cs +++ b/src/main/csharp/io/swagger/Api/CorrelationApi.cs @@ -1,6 +1,7 @@ using System; using System.IO; using System.Collections.Generic; +using System.Linq; using RestSharp; using IO.Swagger.Client; using IO.Swagger.Model; @@ -20,34 +21,35 @@ public interface ICorrelationApi /// /// Get all Correlations /// - /// timestamp - /// user_id - /// correlation - /// cause_id - /// effect_id - /// onset_delay - /// duration_of_action - /// number_of_pairs - /// value_predicting_high_outcome - /// value_predicting_low_outcome - /// optimal_pearson_product - /// vote - /// statistical_significance - /// cause_unit - /// cause_unit_id - /// cause_changes - /// effect_changes - /// qm_score + /// User's OAuth2 access token + /// Time at which correlation was calculated + /// ID of user that owns this correlation + /// Pearson correlation coefficient between cause and effect measurements + /// variable ID of the predictor variable for which the user desires correlations + /// variable ID of the outcome variable for which the user desires correlations + /// User estimated or default time after cause measurement before a perceivable effect is observed + /// Time over which the cause is expected to produce a perceivable effect following the onset delay + /// Number of points that went into the correlation calculation + /// cause value that predicts an above average effect value (in default unit for predictor variable) + /// cause value that predicts a below average effect value (in default unit for predictor variable) + /// Optimal Pearson Product + /// Vote + /// A function of the effect size and sample size + /// Unit of the predictor variable + /// Unit ID of the predictor variable + /// Cause changes + /// Effect changes + /// QM Score /// error - /// created_at - /// updated_at - /// reverse_pearson_correlation_coefficient - /// predictive_pearson_correlation_coefficient - /// limit - /// offset - /// sort - /// InlineResponse2007 - InlineResponse2007 CorrelationsGet (int? timestamp, int? userId, double? correlation, int? causeId, int? effectId, int? onsetDelay, int? durationOfAction, int? numberOfPairs, double? valuePredictingHighOutcome, double? valuePredictingLowOutcome, double? optimalPearsonProduct, double? vote, double? statisticalSignificance, string causeUnit, int? causeUnitId, int? causeChanges, int? effectChanges, double? qmScore, string error, string createdAt, string updatedAt, double? reversePearsonCorrelationCoefficient, double? predictivePearsonCorrelationCoefficient, int? limit, int? offset, string sort); + /// When the record was first created. Use ISO 8601 datetime format + /// When the record in the database was last updated. Use ISO 8601 datetime format + /// Correlation when cause and effect are reversed. For any causal relationship, the forward correlation should exceed the reverse correlation + /// Predictive Pearson Correlation Coefficient + /// Limit the number of results returned + /// Records from give Offset + /// Sort records by given field + /// InlineResponse2009 + InlineResponse2009 CorrelationsGet (string accessToken = null, int? timestamp = null, int? userId = null, double? correlation = null, int? causeId = null, int? effectId = null, int? onsetDelay = null, int? durationOfAction = null, int? numberOfPairs = null, double? valuePredictingHighOutcome = null, double? valuePredictingLowOutcome = null, double? optimalPearsonProduct = null, double? vote = null, double? statisticalSignificance = null, string causeUnit = null, int? causeUnitId = null, int? causeChanges = null, int? effectChanges = null, double? qmScore = null, string error = null, string createdAt = null, string updatedAt = null, double? reversePearsonCorrelationCoefficient = null, double? predictivePearsonCorrelationCoefficient = null, int? limit = null, int? offset = null, string sort = null); /// /// Get all Correlations @@ -55,34 +57,107 @@ public interface ICorrelationApi /// /// Get all Correlations /// - /// timestamp - /// user_id - /// correlation - /// cause_id - /// effect_id - /// onset_delay - /// duration_of_action - /// number_of_pairs - /// value_predicting_high_outcome - /// value_predicting_low_outcome - /// optimal_pearson_product - /// vote - /// statistical_significance - /// cause_unit - /// cause_unit_id - /// cause_changes - /// effect_changes - /// qm_score + /// User's OAuth2 access token + /// Time at which correlation was calculated + /// ID of user that owns this correlation + /// Pearson correlation coefficient between cause and effect measurements + /// variable ID of the predictor variable for which the user desires correlations + /// variable ID of the outcome variable for which the user desires correlations + /// User estimated or default time after cause measurement before a perceivable effect is observed + /// Time over which the cause is expected to produce a perceivable effect following the onset delay + /// Number of points that went into the correlation calculation + /// cause value that predicts an above average effect value (in default unit for predictor variable) + /// cause value that predicts a below average effect value (in default unit for predictor variable) + /// Optimal Pearson Product + /// Vote + /// A function of the effect size and sample size + /// Unit of the predictor variable + /// Unit ID of the predictor variable + /// Cause changes + /// Effect changes + /// QM Score /// error - /// created_at - /// updated_at - /// reverse_pearson_correlation_coefficient - /// predictive_pearson_correlation_coefficient - /// limit - /// offset - /// sort - /// InlineResponse2007 - System.Threading.Tasks.Task CorrelationsGetAsync (int? timestamp, int? userId, double? correlation, int? causeId, int? effectId, int? onsetDelay, int? durationOfAction, int? numberOfPairs, double? valuePredictingHighOutcome, double? valuePredictingLowOutcome, double? optimalPearsonProduct, double? vote, double? statisticalSignificance, string causeUnit, int? causeUnitId, int? causeChanges, int? effectChanges, double? qmScore, string error, string createdAt, string updatedAt, double? reversePearsonCorrelationCoefficient, double? predictivePearsonCorrelationCoefficient, int? limit, int? offset, string sort); + /// When the record was first created. Use ISO 8601 datetime format + /// When the record in the database was last updated. Use ISO 8601 datetime format + /// Correlation when cause and effect are reversed. For any causal relationship, the forward correlation should exceed the reverse correlation + /// Predictive Pearson Correlation Coefficient + /// Limit the number of results returned + /// Records from give Offset + /// Sort records by given field + /// ApiResponse of InlineResponse2009 + ApiResponse CorrelationsGetWithHttpInfo (string accessToken = null, int? timestamp = null, int? userId = null, double? correlation = null, int? causeId = null, int? effectId = null, int? onsetDelay = null, int? durationOfAction = null, int? numberOfPairs = null, double? valuePredictingHighOutcome = null, double? valuePredictingLowOutcome = null, double? optimalPearsonProduct = null, double? vote = null, double? statisticalSignificance = null, string causeUnit = null, int? causeUnitId = null, int? causeChanges = null, int? effectChanges = null, double? qmScore = null, string error = null, string createdAt = null, string updatedAt = null, double? reversePearsonCorrelationCoefficient = null, double? predictivePearsonCorrelationCoefficient = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Get all Correlations + /// + /// + /// Get all Correlations + /// + /// User's OAuth2 access token + /// Time at which correlation was calculated + /// ID of user that owns this correlation + /// Pearson correlation coefficient between cause and effect measurements + /// variable ID of the predictor variable for which the user desires correlations + /// variable ID of the outcome variable for which the user desires correlations + /// User estimated or default time after cause measurement before a perceivable effect is observed + /// Time over which the cause is expected to produce a perceivable effect following the onset delay + /// Number of points that went into the correlation calculation + /// cause value that predicts an above average effect value (in default unit for predictor variable) + /// cause value that predicts a below average effect value (in default unit for predictor variable) + /// Optimal Pearson Product + /// Vote + /// A function of the effect size and sample size + /// Unit of the predictor variable + /// Unit ID of the predictor variable + /// Cause changes + /// Effect changes + /// QM Score + /// error + /// When the record was first created. Use ISO 8601 datetime format + /// When the record in the database was last updated. Use ISO 8601 datetime format + /// Correlation when cause and effect are reversed. For any causal relationship, the forward correlation should exceed the reverse correlation + /// Predictive Pearson Correlation Coefficient + /// Limit the number of results returned + /// Records from give Offset + /// Sort records by given field + /// Task of InlineResponse2009 + System.Threading.Tasks.Task CorrelationsGetAsync (string accessToken = null, int? timestamp = null, int? userId = null, double? correlation = null, int? causeId = null, int? effectId = null, int? onsetDelay = null, int? durationOfAction = null, int? numberOfPairs = null, double? valuePredictingHighOutcome = null, double? valuePredictingLowOutcome = null, double? optimalPearsonProduct = null, double? vote = null, double? statisticalSignificance = null, string causeUnit = null, int? causeUnitId = null, int? causeChanges = null, int? effectChanges = null, double? qmScore = null, string error = null, string createdAt = null, string updatedAt = null, double? reversePearsonCorrelationCoefficient = null, double? predictivePearsonCorrelationCoefficient = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Get all Correlations + /// + /// + /// Get all Correlations + /// + /// User's OAuth2 access token + /// Time at which correlation was calculated + /// ID of user that owns this correlation + /// Pearson correlation coefficient between cause and effect measurements + /// variable ID of the predictor variable for which the user desires correlations + /// variable ID of the outcome variable for which the user desires correlations + /// User estimated or default time after cause measurement before a perceivable effect is observed + /// Time over which the cause is expected to produce a perceivable effect following the onset delay + /// Number of points that went into the correlation calculation + /// cause value that predicts an above average effect value (in default unit for predictor variable) + /// cause value that predicts a below average effect value (in default unit for predictor variable) + /// Optimal Pearson Product + /// Vote + /// A function of the effect size and sample size + /// Unit of the predictor variable + /// Unit ID of the predictor variable + /// Cause changes + /// Effect changes + /// QM Score + /// error + /// When the record was first created. Use ISO 8601 datetime format + /// When the record in the database was last updated. Use ISO 8601 datetime format + /// Correlation when cause and effect are reversed. For any causal relationship, the forward correlation should exceed the reverse correlation + /// Predictive Pearson Correlation Coefficient + /// Limit the number of results returned + /// Records from give Offset + /// Sort records by given field + /// Task of ApiResponse (InlineResponse2009) + System.Threading.Tasks.Task> CorrelationsGetAsyncWithHttpInfo (string accessToken = null, int? timestamp = null, int? userId = null, double? correlation = null, int? causeId = null, int? effectId = null, int? onsetDelay = null, int? durationOfAction = null, int? numberOfPairs = null, double? valuePredictingHighOutcome = null, double? valuePredictingLowOutcome = null, double? optimalPearsonProduct = null, double? vote = null, double? statisticalSignificance = null, string causeUnit = null, int? causeUnitId = null, int? causeChanges = null, int? effectChanges = null, double? qmScore = null, string error = null, string createdAt = null, string updatedAt = null, double? reversePearsonCorrelationCoefficient = null, double? predictivePearsonCorrelationCoefficient = null, int? limit = null, int? offset = null, string sort = null); /// /// Store Correlation @@ -90,9 +165,10 @@ public interface ICorrelationApi /// /// Store Correlation /// + /// User's OAuth2 access token /// Correlation that should be stored - /// InlineResponse2008 - InlineResponse2008 CorrelationsPost (Correlation body); + /// InlineResponse20010 + InlineResponse20010 CorrelationsPost (string accessToken = null, Correlation body = null); /// /// Store Correlation @@ -100,29 +176,76 @@ public interface ICorrelationApi /// /// Store Correlation /// + /// User's OAuth2 access token /// Correlation that should be stored - /// InlineResponse2008 - System.Threading.Tasks.Task CorrelationsPostAsync (Correlation body); + /// ApiResponse of InlineResponse20010 + ApiResponse CorrelationsPostWithHttpInfo (string accessToken = null, Correlation body = null); + + /// + /// Store Correlation + /// + /// + /// Store Correlation + /// + /// User's OAuth2 access token + /// Correlation that should be stored + /// Task of InlineResponse20010 + System.Threading.Tasks.Task CorrelationsPostAsync (string accessToken = null, Correlation body = null); + + /// + /// Store Correlation + /// + /// + /// Store Correlation + /// + /// User's OAuth2 access token + /// Correlation that should be stored + /// Task of ApiResponse (InlineResponse20010) + System.Threading.Tasks.Task> CorrelationsPostAsyncWithHttpInfo (string accessToken = null, Correlation body = null); /// - /// Get Correlation + /// Get Correlation Details /// /// /// Get Correlation /// /// id of Correlation - /// InlineResponse2008 - InlineResponse2008 CorrelationsIdGet (int? id); + /// User's OAuth2 access token + /// InlineResponse20010 + InlineResponse20010 CorrelationsIdGet (int? id, string accessToken = null); /// + /// Get Correlation Details + /// + /// + /// Get Correlation + /// + /// id of Correlation + /// User's OAuth2 access token + /// ApiResponse of InlineResponse20010 + ApiResponse CorrelationsIdGetWithHttpInfo (int? id, string accessToken = null); + + /// + /// Get Correlation Details + /// + /// /// Get Correlation + /// + /// id of Correlation + /// User's OAuth2 access token + /// Task of InlineResponse20010 + System.Threading.Tasks.Task CorrelationsIdGetAsync (int? id, string accessToken = null); + + /// + /// Get Correlation Details /// /// /// Get Correlation /// /// id of Correlation - /// InlineResponse2008 - System.Threading.Tasks.Task CorrelationsIdGetAsync (int? id); + /// User's OAuth2 access token + /// Task of ApiResponse (InlineResponse20010) + System.Threading.Tasks.Task> CorrelationsIdGetAsyncWithHttpInfo (int? id, string accessToken = null); /// /// Update Correlation @@ -131,9 +254,10 @@ public interface ICorrelationApi /// Update Correlation /// /// id of Correlation + /// User's OAuth2 access token /// Correlation that should be updated /// InlineResponse2002 - InlineResponse2002 CorrelationsIdPut (int? id, Correlation body); + InlineResponse2002 CorrelationsIdPut (int? id, string accessToken = null, Correlation body = null); /// /// Update Correlation @@ -142,9 +266,34 @@ public interface ICorrelationApi /// Update Correlation /// /// id of Correlation + /// User's OAuth2 access token /// Correlation that should be updated - /// InlineResponse2002 - System.Threading.Tasks.Task CorrelationsIdPutAsync (int? id, Correlation body); + /// ApiResponse of InlineResponse2002 + ApiResponse CorrelationsIdPutWithHttpInfo (int? id, string accessToken = null, Correlation body = null); + + /// + /// Update Correlation + /// + /// + /// Update Correlation + /// + /// id of Correlation + /// User's OAuth2 access token + /// Correlation that should be updated + /// Task of InlineResponse2002 + System.Threading.Tasks.Task CorrelationsIdPutAsync (int? id, string accessToken = null, Correlation body = null); + + /// + /// Update Correlation + /// + /// + /// Update Correlation + /// + /// id of Correlation + /// User's OAuth2 access token + /// Correlation that should be updated + /// Task of ApiResponse (InlineResponse2002) + System.Threading.Tasks.Task> CorrelationsIdPutAsyncWithHttpInfo (int? id, string accessToken = null, Correlation body = null); /// /// Delete Correlation @@ -153,8 +302,9 @@ public interface ICorrelationApi /// Delete Correlation /// /// id of Correlation + /// User's OAuth2 access token /// InlineResponse2002 - InlineResponse2002 CorrelationsIdDelete (int? id); + InlineResponse2002 CorrelationsIdDelete (int? id, string accessToken = null); /// /// Delete Correlation @@ -163,8 +313,31 @@ public interface ICorrelationApi /// Delete Correlation /// /// id of Correlation - /// InlineResponse2002 - System.Threading.Tasks.Task CorrelationsIdDeleteAsync (int? id); + /// User's OAuth2 access token + /// ApiResponse of InlineResponse2002 + ApiResponse CorrelationsIdDeleteWithHttpInfo (int? id, string accessToken = null); + + /// + /// Delete Correlation + /// + /// + /// Delete Correlation + /// + /// id of Correlation + /// User's OAuth2 access token + /// Task of InlineResponse2002 + System.Threading.Tasks.Task CorrelationsIdDeleteAsync (int? id, string accessToken = null); + + /// + /// Delete Correlation + /// + /// + /// Delete Correlation + /// + /// id of Correlation + /// User's OAuth2 access token + /// Task of ApiResponse (InlineResponse2002) + System.Threading.Tasks.Task> CorrelationsIdDeleteAsyncWithHttpInfo (int? id, string accessToken = null); } @@ -176,82 +349,143 @@ public class CorrelationApi : ICorrelationApi /// /// Initializes a new instance of the class. /// - /// an instance of ApiClient (optional) /// - public CorrelationApi(ApiClient apiClient = null) + public CorrelationApi(String basePath) { - if (apiClient == null) // use the default one in Configuration - this.ApiClient = Configuration.DefaultApiClient; - else - this.ApiClient = apiClient; + this.Configuration = new Configuration(new ApiClient(basePath)); } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class + /// using Configuration object /// + /// An instance of Configuration /// - public CorrelationApi(String basePath) + public CorrelationApi(Configuration configuration = null) { - this.ApiClient = new ApiClient(basePath); + if (configuration == null) // use the default one in Configuration + this.Configuration = Configuration.Default; + else + this.Configuration = configuration; } - + + /// + /// Gets the base path of the API client. + /// + /// The base path + public String GetBasePath() + { + return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); + } + /// /// Sets the base path of the API client. /// - /// The base path /// The base path + [Obsolete("SetBasePath is deprecated, please do 'Configuraiton.ApiClient = new ApiClient(\"http://new-path\")' instead.")] public void SetBasePath(String basePath) { - this.ApiClient.BasePath = basePath; + // do nothing } /// - /// Gets the base path of the API client. + /// Gets or sets the configuration object /// - /// The base path - public String GetBasePath() + /// An instance of the Configuration + public Configuration Configuration {get; set;} + + /// + /// Gets the default header. + /// + /// Dictionary of HTTP header + [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] + public Dictionary DefaultHeader() { - return this.ApiClient.BasePath; + return this.Configuration.DefaultHeader; } - + /// - /// Gets or sets the API client. + /// Add default header. /// - /// An instance of the ApiClient - public ApiClient ApiClient {get; set;} - + /// Header field name. + /// Header field value. + /// + [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] + public void AddDefaultHeader(string key, string value) + { + this.Configuration.AddDefaultHeader(key, value); + } + /// /// Get all Correlations Get all Correlations /// - /// timestamp - /// user_id - /// correlation - /// cause_id - /// effect_id - /// onset_delay - /// duration_of_action - /// number_of_pairs - /// value_predicting_high_outcome - /// value_predicting_low_outcome - /// optimal_pearson_product - /// vote - /// statistical_significance - /// cause_unit - /// cause_unit_id - /// cause_changes - /// effect_changes - /// qm_score + /// User's OAuth2 access token + /// Time at which correlation was calculated + /// ID of user that owns this correlation + /// Pearson correlation coefficient between cause and effect measurements + /// variable ID of the predictor variable for which the user desires correlations + /// variable ID of the outcome variable for which the user desires correlations + /// User estimated or default time after cause measurement before a perceivable effect is observed + /// Time over which the cause is expected to produce a perceivable effect following the onset delay + /// Number of points that went into the correlation calculation + /// cause value that predicts an above average effect value (in default unit for predictor variable) + /// cause value that predicts a below average effect value (in default unit for predictor variable) + /// Optimal Pearson Product + /// Vote + /// A function of the effect size and sample size + /// Unit of the predictor variable + /// Unit ID of the predictor variable + /// Cause changes + /// Effect changes + /// QM Score + /// error + /// When the record was first created. Use ISO 8601 datetime format + /// When the record in the database was last updated. Use ISO 8601 datetime format + /// Correlation when cause and effect are reversed. For any causal relationship, the forward correlation should exceed the reverse correlation + /// Predictive Pearson Correlation Coefficient + /// Limit the number of results returned + /// Records from give Offset + /// Sort records by given field + /// InlineResponse2009 + public InlineResponse2009 CorrelationsGet (string accessToken = null, int? timestamp = null, int? userId = null, double? correlation = null, int? causeId = null, int? effectId = null, int? onsetDelay = null, int? durationOfAction = null, int? numberOfPairs = null, double? valuePredictingHighOutcome = null, double? valuePredictingLowOutcome = null, double? optimalPearsonProduct = null, double? vote = null, double? statisticalSignificance = null, string causeUnit = null, int? causeUnitId = null, int? causeChanges = null, int? effectChanges = null, double? qmScore = null, string error = null, string createdAt = null, string updatedAt = null, double? reversePearsonCorrelationCoefficient = null, double? predictivePearsonCorrelationCoefficient = null, int? limit = null, int? offset = null, string sort = null) + { + ApiResponse response = CorrelationsGetWithHttpInfo(accessToken, timestamp, userId, correlation, causeId, effectId, onsetDelay, durationOfAction, numberOfPairs, valuePredictingHighOutcome, valuePredictingLowOutcome, optimalPearsonProduct, vote, statisticalSignificance, causeUnit, causeUnitId, causeChanges, effectChanges, qmScore, error, createdAt, updatedAt, reversePearsonCorrelationCoefficient, predictivePearsonCorrelationCoefficient, limit, offset, sort); + return response.Data; + } + + /// + /// Get all Correlations Get all Correlations + /// + /// User's OAuth2 access token + /// Time at which correlation was calculated + /// ID of user that owns this correlation + /// Pearson correlation coefficient between cause and effect measurements + /// variable ID of the predictor variable for which the user desires correlations + /// variable ID of the outcome variable for which the user desires correlations + /// User estimated or default time after cause measurement before a perceivable effect is observed + /// Time over which the cause is expected to produce a perceivable effect following the onset delay + /// Number of points that went into the correlation calculation + /// cause value that predicts an above average effect value (in default unit for predictor variable) + /// cause value that predicts a below average effect value (in default unit for predictor variable) + /// Optimal Pearson Product + /// Vote + /// A function of the effect size and sample size + /// Unit of the predictor variable + /// Unit ID of the predictor variable + /// Cause changes + /// Effect changes + /// QM Score /// error - /// created_at - /// updated_at - /// reverse_pearson_correlation_coefficient - /// predictive_pearson_correlation_coefficient - /// limit - /// offset - /// sort - /// InlineResponse2007 - public InlineResponse2007 CorrelationsGet (int? timestamp, int? userId, double? correlation, int? causeId, int? effectId, int? onsetDelay, int? durationOfAction, int? numberOfPairs, double? valuePredictingHighOutcome, double? valuePredictingLowOutcome, double? optimalPearsonProduct, double? vote, double? statisticalSignificance, string causeUnit, int? causeUnitId, int? causeChanges, int? effectChanges, double? qmScore, string error, string createdAt, string updatedAt, double? reversePearsonCorrelationCoefficient, double? predictivePearsonCorrelationCoefficient, int? limit, int? offset, string sort) + /// When the record was first created. Use ISO 8601 datetime format + /// When the record in the database was last updated. Use ISO 8601 datetime format + /// Correlation when cause and effect are reversed. For any causal relationship, the forward correlation should exceed the reverse correlation + /// Predictive Pearson Correlation Coefficient + /// Limit the number of results returned + /// Records from give Offset + /// Sort records by given field + /// ApiResponse of InlineResponse2009 + public ApiResponse< InlineResponse2009 > CorrelationsGetWithHttpInfo (string accessToken = null, int? timestamp = null, int? userId = null, double? correlation = null, int? causeId = null, int? effectId = null, int? onsetDelay = null, int? durationOfAction = null, int? numberOfPairs = null, double? valuePredictingHighOutcome = null, double? valuePredictingLowOutcome = null, double? optimalPearsonProduct = null, double? vote = null, double? statisticalSignificance = null, string causeUnit = null, int? causeUnitId = null, int? causeChanges = null, int? effectChanges = null, double? qmScore = null, string error = null, string createdAt = null, string updatedAt = null, double? reversePearsonCorrelationCoefficient = null, double? predictivePearsonCorrelationCoefficient = null, int? limit = null, int? offset = null, string sort = null) { @@ -259,7 +493,7 @@ public InlineResponse2007 CorrelationsGet (int? timestamp, int? userId, double? var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -268,90 +502,142 @@ public InlineResponse2007 CorrelationsGet (int? timestamp, int? userId, double? String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (timestamp != null) queryParams.Add("timestamp", ApiClient.ParameterToString(timestamp)); // query parameter - if (userId != null) queryParams.Add("user_id", ApiClient.ParameterToString(userId)); // query parameter - if (correlation != null) queryParams.Add("correlation", ApiClient.ParameterToString(correlation)); // query parameter - if (causeId != null) queryParams.Add("cause_id", ApiClient.ParameterToString(causeId)); // query parameter - if (effectId != null) queryParams.Add("effect_id", ApiClient.ParameterToString(effectId)); // query parameter - if (onsetDelay != null) queryParams.Add("onset_delay", ApiClient.ParameterToString(onsetDelay)); // query parameter - if (durationOfAction != null) queryParams.Add("duration_of_action", ApiClient.ParameterToString(durationOfAction)); // query parameter - if (numberOfPairs != null) queryParams.Add("number_of_pairs", ApiClient.ParameterToString(numberOfPairs)); // query parameter - if (valuePredictingHighOutcome != null) queryParams.Add("value_predicting_high_outcome", ApiClient.ParameterToString(valuePredictingHighOutcome)); // query parameter - if (valuePredictingLowOutcome != null) queryParams.Add("value_predicting_low_outcome", ApiClient.ParameterToString(valuePredictingLowOutcome)); // query parameter - if (optimalPearsonProduct != null) queryParams.Add("optimal_pearson_product", ApiClient.ParameterToString(optimalPearsonProduct)); // query parameter - if (vote != null) queryParams.Add("vote", ApiClient.ParameterToString(vote)); // query parameter - if (statisticalSignificance != null) queryParams.Add("statistical_significance", ApiClient.ParameterToString(statisticalSignificance)); // query parameter - if (causeUnit != null) queryParams.Add("cause_unit", ApiClient.ParameterToString(causeUnit)); // query parameter - if (causeUnitId != null) queryParams.Add("cause_unit_id", ApiClient.ParameterToString(causeUnitId)); // query parameter - if (causeChanges != null) queryParams.Add("cause_changes", ApiClient.ParameterToString(causeChanges)); // query parameter - if (effectChanges != null) queryParams.Add("effect_changes", ApiClient.ParameterToString(effectChanges)); // query parameter - if (qmScore != null) queryParams.Add("qm_score", ApiClient.ParameterToString(qmScore)); // query parameter - if (error != null) queryParams.Add("error", ApiClient.ParameterToString(error)); // query parameter - if (createdAt != null) queryParams.Add("created_at", ApiClient.ParameterToString(createdAt)); // query parameter - if (updatedAt != null) queryParams.Add("updated_at", ApiClient.ParameterToString(updatedAt)); // query parameter - if (reversePearsonCorrelationCoefficient != null) queryParams.Add("reverse_pearson_correlation_coefficient", ApiClient.ParameterToString(reversePearsonCorrelationCoefficient)); // query parameter - if (predictivePearsonCorrelationCoefficient != null) queryParams.Add("predictive_pearson_correlation_coefficient", ApiClient.ParameterToString(predictivePearsonCorrelationCoefficient)); // query parameter - if (limit != null) queryParams.Add("limit", ApiClient.ParameterToString(limit)); // query parameter - if (offset != null) queryParams.Add("offset", ApiClient.ParameterToString(offset)); // query parameter - if (sort != null) queryParams.Add("sort", ApiClient.ParameterToString(sort)); // query parameter - - - - - - // authentication setting, if any - String[] authSettings = new String[] { }; + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + if (timestamp != null) queryParams.Add("timestamp", Configuration.ApiClient.ParameterToString(timestamp)); // query parameter + if (userId != null) queryParams.Add("user_id", Configuration.ApiClient.ParameterToString(userId)); // query parameter + if (correlation != null) queryParams.Add("correlation", Configuration.ApiClient.ParameterToString(correlation)); // query parameter + if (causeId != null) queryParams.Add("cause_id", Configuration.ApiClient.ParameterToString(causeId)); // query parameter + if (effectId != null) queryParams.Add("effect_id", Configuration.ApiClient.ParameterToString(effectId)); // query parameter + if (onsetDelay != null) queryParams.Add("onset_delay", Configuration.ApiClient.ParameterToString(onsetDelay)); // query parameter + if (durationOfAction != null) queryParams.Add("duration_of_action", Configuration.ApiClient.ParameterToString(durationOfAction)); // query parameter + if (numberOfPairs != null) queryParams.Add("number_of_pairs", Configuration.ApiClient.ParameterToString(numberOfPairs)); // query parameter + if (valuePredictingHighOutcome != null) queryParams.Add("value_predicting_high_outcome", Configuration.ApiClient.ParameterToString(valuePredictingHighOutcome)); // query parameter + if (valuePredictingLowOutcome != null) queryParams.Add("value_predicting_low_outcome", Configuration.ApiClient.ParameterToString(valuePredictingLowOutcome)); // query parameter + if (optimalPearsonProduct != null) queryParams.Add("optimal_pearson_product", Configuration.ApiClient.ParameterToString(optimalPearsonProduct)); // query parameter + if (vote != null) queryParams.Add("vote", Configuration.ApiClient.ParameterToString(vote)); // query parameter + if (statisticalSignificance != null) queryParams.Add("statistical_significance", Configuration.ApiClient.ParameterToString(statisticalSignificance)); // query parameter + if (causeUnit != null) queryParams.Add("cause_unit", Configuration.ApiClient.ParameterToString(causeUnit)); // query parameter + if (causeUnitId != null) queryParams.Add("cause_unit_id", Configuration.ApiClient.ParameterToString(causeUnitId)); // query parameter + if (causeChanges != null) queryParams.Add("cause_changes", Configuration.ApiClient.ParameterToString(causeChanges)); // query parameter + if (effectChanges != null) queryParams.Add("effect_changes", Configuration.ApiClient.ParameterToString(effectChanges)); // query parameter + if (qmScore != null) queryParams.Add("qm_score", Configuration.ApiClient.ParameterToString(qmScore)); // query parameter + if (error != null) queryParams.Add("error", Configuration.ApiClient.ParameterToString(error)); // query parameter + if (createdAt != null) queryParams.Add("created_at", Configuration.ApiClient.ParameterToString(createdAt)); // query parameter + if (updatedAt != null) queryParams.Add("updated_at", Configuration.ApiClient.ParameterToString(updatedAt)); // query parameter + if (reversePearsonCorrelationCoefficient != null) queryParams.Add("reverse_pearson_correlation_coefficient", Configuration.ApiClient.ParameterToString(reversePearsonCorrelationCoefficient)); // query parameter + if (predictivePearsonCorrelationCoefficient != null) queryParams.Add("predictive_pearson_correlation_coefficient", Configuration.ApiClient.ParameterToString(predictivePearsonCorrelationCoefficient)); // query parameter + if (limit != null) queryParams.Add("limit", Configuration.ApiClient.ParameterToString(limit)); // query parameter + if (offset != null) queryParams.Add("offset", Configuration.ApiClient.ParameterToString(offset)); // query parameter + if (sort != null) queryParams.Add("sort", Configuration.ApiClient.ParameterToString(sort)); // query parameter + + + + + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling CorrelationsGet: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling CorrelationsGet: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling CorrelationsGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling CorrelationsGet: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse2007) ApiClient.Deserialize(response, typeof(InlineResponse2007)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2009) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2009))); + } /// /// Get all Correlations Get all Correlations /// - /// timestamp - /// user_id - /// correlation - /// cause_id - /// effect_id - /// onset_delay - /// duration_of_action - /// number_of_pairs - /// value_predicting_high_outcome - /// value_predicting_low_outcome - /// optimal_pearson_product - /// vote - /// statistical_significance - /// cause_unit - /// cause_unit_id - /// cause_changes - /// effect_changes - /// qm_score + /// User's OAuth2 access token + /// Time at which correlation was calculated + /// ID of user that owns this correlation + /// Pearson correlation coefficient between cause and effect measurements + /// variable ID of the predictor variable for which the user desires correlations + /// variable ID of the outcome variable for which the user desires correlations + /// User estimated or default time after cause measurement before a perceivable effect is observed + /// Time over which the cause is expected to produce a perceivable effect following the onset delay + /// Number of points that went into the correlation calculation + /// cause value that predicts an above average effect value (in default unit for predictor variable) + /// cause value that predicts a below average effect value (in default unit for predictor variable) + /// Optimal Pearson Product + /// Vote + /// A function of the effect size and sample size + /// Unit of the predictor variable + /// Unit ID of the predictor variable + /// Cause changes + /// Effect changes + /// QM Score /// error - /// created_at - /// updated_at - /// reverse_pearson_correlation_coefficient - /// predictive_pearson_correlation_coefficient - /// limit - /// offset - /// sort - /// InlineResponse2007 - public async System.Threading.Tasks.Task CorrelationsGetAsync (int? timestamp, int? userId, double? correlation, int? causeId, int? effectId, int? onsetDelay, int? durationOfAction, int? numberOfPairs, double? valuePredictingHighOutcome, double? valuePredictingLowOutcome, double? optimalPearsonProduct, double? vote, double? statisticalSignificance, string causeUnit, int? causeUnitId, int? causeChanges, int? effectChanges, double? qmScore, string error, string createdAt, string updatedAt, double? reversePearsonCorrelationCoefficient, double? predictivePearsonCorrelationCoefficient, int? limit, int? offset, string sort) + /// When the record was first created. Use ISO 8601 datetime format + /// When the record in the database was last updated. Use ISO 8601 datetime format + /// Correlation when cause and effect are reversed. For any causal relationship, the forward correlation should exceed the reverse correlation + /// Predictive Pearson Correlation Coefficient + /// Limit the number of results returned + /// Records from give Offset + /// Sort records by given field + /// Task of InlineResponse2009 + public async System.Threading.Tasks.Task CorrelationsGetAsync (string accessToken = null, int? timestamp = null, int? userId = null, double? correlation = null, int? causeId = null, int? effectId = null, int? onsetDelay = null, int? durationOfAction = null, int? numberOfPairs = null, double? valuePredictingHighOutcome = null, double? valuePredictingLowOutcome = null, double? optimalPearsonProduct = null, double? vote = null, double? statisticalSignificance = null, string causeUnit = null, int? causeUnitId = null, int? causeChanges = null, int? effectChanges = null, double? qmScore = null, string error = null, string createdAt = null, string updatedAt = null, double? reversePearsonCorrelationCoefficient = null, double? predictivePearsonCorrelationCoefficient = null, int? limit = null, int? offset = null, string sort = null) + { + ApiResponse response = await CorrelationsGetAsyncWithHttpInfo(accessToken, timestamp, userId, correlation, causeId, effectId, onsetDelay, durationOfAction, numberOfPairs, valuePredictingHighOutcome, valuePredictingLowOutcome, optimalPearsonProduct, vote, statisticalSignificance, causeUnit, causeUnitId, causeChanges, effectChanges, qmScore, error, createdAt, updatedAt, reversePearsonCorrelationCoefficient, predictivePearsonCorrelationCoefficient, limit, offset, sort); + return response.Data; + + } + + /// + /// Get all Correlations Get all Correlations + /// + /// User's OAuth2 access token + /// Time at which correlation was calculated + /// ID of user that owns this correlation + /// Pearson correlation coefficient between cause and effect measurements + /// variable ID of the predictor variable for which the user desires correlations + /// variable ID of the outcome variable for which the user desires correlations + /// User estimated or default time after cause measurement before a perceivable effect is observed + /// Time over which the cause is expected to produce a perceivable effect following the onset delay + /// Number of points that went into the correlation calculation + /// cause value that predicts an above average effect value (in default unit for predictor variable) + /// cause value that predicts a below average effect value (in default unit for predictor variable) + /// Optimal Pearson Product + /// Vote + /// A function of the effect size and sample size + /// Unit of the predictor variable + /// Unit ID of the predictor variable + /// Cause changes + /// Effect changes + /// QM Score + /// error + /// When the record was first created. Use ISO 8601 datetime format + /// When the record in the database was last updated. Use ISO 8601 datetime format + /// Correlation when cause and effect are reversed. For any causal relationship, the forward correlation should exceed the reverse correlation + /// Predictive Pearson Correlation Coefficient + /// Limit the number of results returned + /// Records from give Offset + /// Sort records by given field + /// Task of ApiResponse (InlineResponse2009) + public async System.Threading.Tasks.Task> CorrelationsGetAsyncWithHttpInfo (string accessToken = null, int? timestamp = null, int? userId = null, double? correlation = null, int? causeId = null, int? effectId = null, int? onsetDelay = null, int? durationOfAction = null, int? numberOfPairs = null, double? valuePredictingHighOutcome = null, double? valuePredictingLowOutcome = null, double? optimalPearsonProduct = null, double? vote = null, double? statisticalSignificance = null, string causeUnit = null, int? causeUnitId = null, int? causeChanges = null, int? effectChanges = null, double? qmScore = null, string error = null, string createdAt = null, string updatedAt = null, double? reversePearsonCorrelationCoefficient = null, double? predictivePearsonCorrelationCoefficient = null, int? limit = null, int? offset = null, string sort = null) { @@ -368,62 +654,91 @@ public async System.Threading.Tasks.Task CorrelationsGetAsyn String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (timestamp != null) queryParams.Add("timestamp", ApiClient.ParameterToString(timestamp)); // query parameter - if (userId != null) queryParams.Add("user_id", ApiClient.ParameterToString(userId)); // query parameter - if (correlation != null) queryParams.Add("correlation", ApiClient.ParameterToString(correlation)); // query parameter - if (causeId != null) queryParams.Add("cause_id", ApiClient.ParameterToString(causeId)); // query parameter - if (effectId != null) queryParams.Add("effect_id", ApiClient.ParameterToString(effectId)); // query parameter - if (onsetDelay != null) queryParams.Add("onset_delay", ApiClient.ParameterToString(onsetDelay)); // query parameter - if (durationOfAction != null) queryParams.Add("duration_of_action", ApiClient.ParameterToString(durationOfAction)); // query parameter - if (numberOfPairs != null) queryParams.Add("number_of_pairs", ApiClient.ParameterToString(numberOfPairs)); // query parameter - if (valuePredictingHighOutcome != null) queryParams.Add("value_predicting_high_outcome", ApiClient.ParameterToString(valuePredictingHighOutcome)); // query parameter - if (valuePredictingLowOutcome != null) queryParams.Add("value_predicting_low_outcome", ApiClient.ParameterToString(valuePredictingLowOutcome)); // query parameter - if (optimalPearsonProduct != null) queryParams.Add("optimal_pearson_product", ApiClient.ParameterToString(optimalPearsonProduct)); // query parameter - if (vote != null) queryParams.Add("vote", ApiClient.ParameterToString(vote)); // query parameter - if (statisticalSignificance != null) queryParams.Add("statistical_significance", ApiClient.ParameterToString(statisticalSignificance)); // query parameter - if (causeUnit != null) queryParams.Add("cause_unit", ApiClient.ParameterToString(causeUnit)); // query parameter - if (causeUnitId != null) queryParams.Add("cause_unit_id", ApiClient.ParameterToString(causeUnitId)); // query parameter - if (causeChanges != null) queryParams.Add("cause_changes", ApiClient.ParameterToString(causeChanges)); // query parameter - if (effectChanges != null) queryParams.Add("effect_changes", ApiClient.ParameterToString(effectChanges)); // query parameter - if (qmScore != null) queryParams.Add("qm_score", ApiClient.ParameterToString(qmScore)); // query parameter - if (error != null) queryParams.Add("error", ApiClient.ParameterToString(error)); // query parameter - if (createdAt != null) queryParams.Add("created_at", ApiClient.ParameterToString(createdAt)); // query parameter - if (updatedAt != null) queryParams.Add("updated_at", ApiClient.ParameterToString(updatedAt)); // query parameter - if (reversePearsonCorrelationCoefficient != null) queryParams.Add("reverse_pearson_correlation_coefficient", ApiClient.ParameterToString(reversePearsonCorrelationCoefficient)); // query parameter - if (predictivePearsonCorrelationCoefficient != null) queryParams.Add("predictive_pearson_correlation_coefficient", ApiClient.ParameterToString(predictivePearsonCorrelationCoefficient)); // query parameter - if (limit != null) queryParams.Add("limit", ApiClient.ParameterToString(limit)); // query parameter - if (offset != null) queryParams.Add("offset", ApiClient.ParameterToString(offset)); // query parameter - if (sort != null) queryParams.Add("sort", ApiClient.ParameterToString(sort)); // query parameter - - - - - - // authentication setting, if any - String[] authSettings = new String[] { }; - + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + if (timestamp != null) queryParams.Add("timestamp", Configuration.ApiClient.ParameterToString(timestamp)); // query parameter + if (userId != null) queryParams.Add("user_id", Configuration.ApiClient.ParameterToString(userId)); // query parameter + if (correlation != null) queryParams.Add("correlation", Configuration.ApiClient.ParameterToString(correlation)); // query parameter + if (causeId != null) queryParams.Add("cause_id", Configuration.ApiClient.ParameterToString(causeId)); // query parameter + if (effectId != null) queryParams.Add("effect_id", Configuration.ApiClient.ParameterToString(effectId)); // query parameter + if (onsetDelay != null) queryParams.Add("onset_delay", Configuration.ApiClient.ParameterToString(onsetDelay)); // query parameter + if (durationOfAction != null) queryParams.Add("duration_of_action", Configuration.ApiClient.ParameterToString(durationOfAction)); // query parameter + if (numberOfPairs != null) queryParams.Add("number_of_pairs", Configuration.ApiClient.ParameterToString(numberOfPairs)); // query parameter + if (valuePredictingHighOutcome != null) queryParams.Add("value_predicting_high_outcome", Configuration.ApiClient.ParameterToString(valuePredictingHighOutcome)); // query parameter + if (valuePredictingLowOutcome != null) queryParams.Add("value_predicting_low_outcome", Configuration.ApiClient.ParameterToString(valuePredictingLowOutcome)); // query parameter + if (optimalPearsonProduct != null) queryParams.Add("optimal_pearson_product", Configuration.ApiClient.ParameterToString(optimalPearsonProduct)); // query parameter + if (vote != null) queryParams.Add("vote", Configuration.ApiClient.ParameterToString(vote)); // query parameter + if (statisticalSignificance != null) queryParams.Add("statistical_significance", Configuration.ApiClient.ParameterToString(statisticalSignificance)); // query parameter + if (causeUnit != null) queryParams.Add("cause_unit", Configuration.ApiClient.ParameterToString(causeUnit)); // query parameter + if (causeUnitId != null) queryParams.Add("cause_unit_id", Configuration.ApiClient.ParameterToString(causeUnitId)); // query parameter + if (causeChanges != null) queryParams.Add("cause_changes", Configuration.ApiClient.ParameterToString(causeChanges)); // query parameter + if (effectChanges != null) queryParams.Add("effect_changes", Configuration.ApiClient.ParameterToString(effectChanges)); // query parameter + if (qmScore != null) queryParams.Add("qm_score", Configuration.ApiClient.ParameterToString(qmScore)); // query parameter + if (error != null) queryParams.Add("error", Configuration.ApiClient.ParameterToString(error)); // query parameter + if (createdAt != null) queryParams.Add("created_at", Configuration.ApiClient.ParameterToString(createdAt)); // query parameter + if (updatedAt != null) queryParams.Add("updated_at", Configuration.ApiClient.ParameterToString(updatedAt)); // query parameter + if (reversePearsonCorrelationCoefficient != null) queryParams.Add("reverse_pearson_correlation_coefficient", Configuration.ApiClient.ParameterToString(reversePearsonCorrelationCoefficient)); // query parameter + if (predictivePearsonCorrelationCoefficient != null) queryParams.Add("predictive_pearson_correlation_coefficient", Configuration.ApiClient.ParameterToString(predictivePearsonCorrelationCoefficient)); // query parameter + if (limit != null) queryParams.Add("limit", Configuration.ApiClient.ParameterToString(limit)); // query parameter + if (offset != null) queryParams.Add("offset", Configuration.ApiClient.ParameterToString(offset)); // query parameter + if (sort != null) queryParams.Add("sort", Configuration.ApiClient.ParameterToString(sort)); // query parameter + + + + + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling CorrelationsGet: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); - return (InlineResponse2007) ApiClient.Deserialize(response, typeof(InlineResponse2007)); + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling CorrelationsGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling CorrelationsGet: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2009) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2009))); + } /// /// Store Correlation Store Correlation /// + /// User's OAuth2 access token + /// Correlation that should be stored + /// InlineResponse20010 + public InlineResponse20010 CorrelationsPost (string accessToken = null, Correlation body = null) + { + ApiResponse response = CorrelationsPostWithHttpInfo(accessToken, body); + return response.Data; + } + + /// + /// Store Correlation Store Correlation + /// + /// User's OAuth2 access token /// Correlation that should be stored - /// InlineResponse2008 - public InlineResponse2008 CorrelationsPost (Correlation body) + /// ApiResponse of InlineResponse20010 + public ApiResponse< InlineResponse20010 > CorrelationsPostWithHttpInfo (string accessToken = null, Correlation body = null) { @@ -431,7 +746,7 @@ public InlineResponse2008 CorrelationsPost (Correlation body) var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -440,40 +755,67 @@ public InlineResponse2008 CorrelationsPost (Correlation body) String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - postBody = ApiClient.Serialize(body); // http body (model) parameter + postBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter + + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } - - // authentication setting, if any - String[] authSettings = new String[] { }; // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling CorrelationsPost: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling CorrelationsPost: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling CorrelationsPost: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling CorrelationsPost: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse2008) ApiClient.Deserialize(response, typeof(InlineResponse2008)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20010) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20010))); + } /// /// Store Correlation Store Correlation /// + /// User's OAuth2 access token /// Correlation that should be stored - /// InlineResponse2008 - public async System.Threading.Tasks.Task CorrelationsPostAsync (Correlation body) + /// Task of InlineResponse20010 + public async System.Threading.Tasks.Task CorrelationsPostAsync (string accessToken = null, Correlation body = null) + { + ApiResponse response = await CorrelationsPostAsyncWithHttpInfo(accessToken, body); + return response.Data; + + } + + /// + /// Store Correlation Store Correlation + /// + /// User's OAuth2 access token + /// Correlation that should be stored + /// Task of ApiResponse (InlineResponse20010) + public async System.Threading.Tasks.Task> CorrelationsPostAsyncWithHttpInfo (string accessToken = null, Correlation body = null) { @@ -490,37 +832,66 @@ public async System.Threading.Tasks.Task CorrelationsPostAsy String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - postBody = ApiClient.Serialize(body); // http body (model) parameter + postBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; - + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling CorrelationsPost: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling CorrelationsPost: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling CorrelationsPost: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse2008) ApiClient.Deserialize(response, typeof(InlineResponse2008)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20010) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20010))); + } /// - /// Get Correlation Get Correlation + /// Get Correlation Details Get Correlation + /// + /// id of Correlation + /// User's OAuth2 access token + /// InlineResponse20010 + public InlineResponse20010 CorrelationsIdGet (int? id, string accessToken = null) + { + ApiResponse response = CorrelationsIdGetWithHttpInfo(id, accessToken); + return response.Data; + } + + /// + /// Get Correlation Details Get Correlation /// /// id of Correlation - /// InlineResponse2008 - public InlineResponse2008 CorrelationsIdGet (int? id) + /// User's OAuth2 access token + /// ApiResponse of InlineResponse20010 + public ApiResponse< InlineResponse20010 > CorrelationsIdGetWithHttpInfo (int? id, string accessToken = null) { // verify the required parameter 'id' is set @@ -531,7 +902,7 @@ public InlineResponse2008 CorrelationsIdGet (int? id) var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -540,40 +911,67 @@ public InlineResponse2008 CorrelationsIdGet (int? id) String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling CorrelationsIdGet: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling CorrelationsIdGet: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling CorrelationsIdGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling CorrelationsIdGet: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse2008) ApiClient.Deserialize(response, typeof(InlineResponse2008)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20010) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20010))); + } /// - /// Get Correlation Get Correlation + /// Get Correlation Details Get Correlation /// /// id of Correlation - /// InlineResponse2008 - public async System.Threading.Tasks.Task CorrelationsIdGetAsync (int? id) + /// User's OAuth2 access token + /// Task of InlineResponse20010 + public async System.Threading.Tasks.Task CorrelationsIdGetAsync (int? id, string accessToken = null) + { + ApiResponse response = await CorrelationsIdGetAsyncWithHttpInfo(id, accessToken); + return response.Data; + + } + + /// + /// Get Correlation Details Get Correlation + /// + /// id of Correlation + /// User's OAuth2 access token + /// Task of ApiResponse (InlineResponse20010) + public async System.Threading.Tasks.Task> CorrelationsIdGetAsyncWithHttpInfo (int? id, string accessToken = null) { // verify the required parameter 'id' is set if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling CorrelationsIdGet"); @@ -592,38 +990,68 @@ public async System.Threading.Tasks.Task CorrelationsIdGetAs String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; - + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling CorrelationsIdGet: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling CorrelationsIdGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling CorrelationsIdGet: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse2008) ApiClient.Deserialize(response, typeof(InlineResponse2008)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20010) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20010))); + } /// /// Update Correlation Update Correlation /// /// id of Correlation + /// User's OAuth2 access token /// Correlation that should be updated - /// InlineResponse2002 - public InlineResponse2002 CorrelationsIdPut (int? id, Correlation body) + /// InlineResponse2002 + public InlineResponse2002 CorrelationsIdPut (int? id, string accessToken = null, Correlation body = null) + { + ApiResponse response = CorrelationsIdPutWithHttpInfo(id, accessToken, body); + return response.Data; + } + + /// + /// Update Correlation Update Correlation + /// + /// id of Correlation + /// User's OAuth2 access token + /// Correlation that should be updated + /// ApiResponse of InlineResponse2002 + public ApiResponse< InlineResponse2002 > CorrelationsIdPutWithHttpInfo (int? id, string accessToken = null, Correlation body = null) { // verify the required parameter 'id' is set @@ -634,7 +1062,7 @@ public InlineResponse2002 CorrelationsIdPut (int? id, Correlation body) var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -643,42 +1071,70 @@ public InlineResponse2002 CorrelationsIdPut (int? id, Correlation body) String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - postBody = ApiClient.Serialize(body); // http body (model) parameter + postBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter + + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } - - // authentication setting, if any - String[] authSettings = new String[] { }; // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling CorrelationsIdPut: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling CorrelationsIdPut: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling CorrelationsIdPut: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling CorrelationsIdPut: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse2002) ApiClient.Deserialize(response, typeof(InlineResponse2002)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2002) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2002))); + } /// /// Update Correlation Update Correlation /// /// id of Correlation + /// User's OAuth2 access token /// Correlation that should be updated - /// InlineResponse2002 - public async System.Threading.Tasks.Task CorrelationsIdPutAsync (int? id, Correlation body) + /// Task of InlineResponse2002 + public async System.Threading.Tasks.Task CorrelationsIdPutAsync (int? id, string accessToken = null, Correlation body = null) + { + ApiResponse response = await CorrelationsIdPutAsyncWithHttpInfo(id, accessToken, body); + return response.Data; + + } + + /// + /// Update Correlation Update Correlation + /// + /// id of Correlation + /// User's OAuth2 access token + /// Correlation that should be updated + /// Task of ApiResponse (InlineResponse2002) + public async System.Threading.Tasks.Task> CorrelationsIdPutAsyncWithHttpInfo (int? id, string accessToken = null, Correlation body = null) { // verify the required parameter 'id' is set if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling CorrelationsIdPut"); @@ -697,38 +1153,67 @@ public async System.Threading.Tasks.Task CorrelationsIdPutAs String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - postBody = ApiClient.Serialize(body); // http body (model) parameter + postBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; - + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling CorrelationsIdPut: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams); - return (InlineResponse2002) ApiClient.Deserialize(response, typeof(InlineResponse2002)); + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling CorrelationsIdPut: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling CorrelationsIdPut: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2002) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2002))); + } /// /// Delete Correlation Delete Correlation /// /// id of Correlation - /// InlineResponse2002 - public InlineResponse2002 CorrelationsIdDelete (int? id) + /// User's OAuth2 access token + /// InlineResponse2002 + public InlineResponse2002 CorrelationsIdDelete (int? id, string accessToken = null) + { + ApiResponse response = CorrelationsIdDeleteWithHttpInfo(id, accessToken); + return response.Data; + } + + /// + /// Delete Correlation Delete Correlation + /// + /// id of Correlation + /// User's OAuth2 access token + /// ApiResponse of InlineResponse2002 + public ApiResponse< InlineResponse2002 > CorrelationsIdDeleteWithHttpInfo (int? id, string accessToken = null) { // verify the required parameter 'id' is set @@ -739,7 +1224,7 @@ public InlineResponse2002 CorrelationsIdDelete (int? id) var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -748,40 +1233,67 @@ public InlineResponse2002 CorrelationsIdDelete (int? id) String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling CorrelationsIdDelete: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling CorrelationsIdDelete: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling CorrelationsIdDelete: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling CorrelationsIdDelete: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse2002) ApiClient.Deserialize(response, typeof(InlineResponse2002)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2002) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2002))); + } /// /// Delete Correlation Delete Correlation /// /// id of Correlation - /// InlineResponse2002 - public async System.Threading.Tasks.Task CorrelationsIdDeleteAsync (int? id) + /// User's OAuth2 access token + /// Task of InlineResponse2002 + public async System.Threading.Tasks.Task CorrelationsIdDeleteAsync (int? id, string accessToken = null) + { + ApiResponse response = await CorrelationsIdDeleteAsyncWithHttpInfo(id, accessToken); + return response.Data; + + } + + /// + /// Delete Correlation Delete Correlation + /// + /// id of Correlation + /// User's OAuth2 access token + /// Task of ApiResponse (InlineResponse2002) + public async System.Threading.Tasks.Task> CorrelationsIdDeleteAsyncWithHttpInfo (int? id, string accessToken = null) { // verify the required parameter 'id' is set if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling CorrelationsIdDelete"); @@ -800,29 +1312,45 @@ public async System.Threading.Tasks.Task CorrelationsIdDelet String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; - + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling CorrelationsIdDelete: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams); - return (InlineResponse2002) ApiClient.Deserialize(response, typeof(InlineResponse2002)); + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling CorrelationsIdDelete: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling CorrelationsIdDelete: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2002) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2002))); + } } diff --git a/src/main/csharp/io/swagger/Api/CredentialApi.cs b/src/main/csharp/io/swagger/Api/CredentialApi.cs index e9f7d23..4df3e14 100644 --- a/src/main/csharp/io/swagger/Api/CredentialApi.cs +++ b/src/main/csharp/io/swagger/Api/CredentialApi.cs @@ -1,6 +1,7 @@ using System; using System.IO; using System.Collections.Generic; +using System.Linq; using RestSharp; using IO.Swagger.Client; using IO.Swagger.Model; @@ -20,16 +21,18 @@ public interface ICredentialApi /// /// Get all Credentials /// - /// connector_id - /// attr_key - /// attr_value - /// created_at - /// updated_at - /// limit - /// offset - /// sort - /// InlineResponse2009 - InlineResponse2009 CredentialsGet (bool? connectorId, string attrKey, string attrValue, string createdAt, string updatedAt, int? limit, int? offset, string sort); + /// User's OAuth2 access token + /// ID of user that owns this credential + /// The id for the connector data source from which the credential was obtained + /// Attribute name such as token, userid, username, or password + /// Encrypted value for the attribute specified + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// InlineResponse20011 + InlineResponse20011 CredentialsGet (string accessToken = null, int? userId = null, int? connectorId = null, string attrKey = null, string attrValue = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); /// /// Get all Credentials @@ -37,16 +40,56 @@ public interface ICredentialApi /// /// Get all Credentials /// - /// connector_id - /// attr_key - /// attr_value - /// created_at - /// updated_at - /// limit - /// offset - /// sort - /// InlineResponse2009 - System.Threading.Tasks.Task CredentialsGetAsync (bool? connectorId, string attrKey, string attrValue, string createdAt, string updatedAt, int? limit, int? offset, string sort); + /// User's OAuth2 access token + /// ID of user that owns this credential + /// The id for the connector data source from which the credential was obtained + /// Attribute name such as token, userid, username, or password + /// Encrypted value for the attribute specified + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// ApiResponse of InlineResponse20011 + ApiResponse CredentialsGetWithHttpInfo (string accessToken = null, int? userId = null, int? connectorId = null, string attrKey = null, string attrValue = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Get all Credentials + /// + /// + /// Get all Credentials + /// + /// User's OAuth2 access token + /// ID of user that owns this credential + /// The id for the connector data source from which the credential was obtained + /// Attribute name such as token, userid, username, or password + /// Encrypted value for the attribute specified + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of InlineResponse20011 + System.Threading.Tasks.Task CredentialsGetAsync (string accessToken = null, int? userId = null, int? connectorId = null, string attrKey = null, string attrValue = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Get all Credentials + /// + /// + /// Get all Credentials + /// + /// User's OAuth2 access token + /// ID of user that owns this credential + /// The id for the connector data source from which the credential was obtained + /// Attribute name such as token, userid, username, or password + /// Encrypted value for the attribute specified + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of ApiResponse (InlineResponse20011) + System.Threading.Tasks.Task> CredentialsGetAsyncWithHttpInfo (string accessToken = null, int? userId = null, int? connectorId = null, string attrKey = null, string attrValue = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); /// /// Store Credential @@ -54,9 +97,10 @@ public interface ICredentialApi /// /// Store Credential /// + /// User's OAuth2 access token /// Credential that should be stored - /// InlineResponse20010 - InlineResponse20010 CredentialsPost (Credential body); + /// InlineResponse20012 + InlineResponse20012 CredentialsPost (string accessToken = null, Credential body = null); /// /// Store Credential @@ -64,9 +108,32 @@ public interface ICredentialApi /// /// Store Credential /// + /// User's OAuth2 access token + /// Credential that should be stored + /// ApiResponse of InlineResponse20012 + ApiResponse CredentialsPostWithHttpInfo (string accessToken = null, Credential body = null); + + /// + /// Store Credential + /// + /// + /// Store Credential + /// + /// User's OAuth2 access token + /// Credential that should be stored + /// Task of InlineResponse20012 + System.Threading.Tasks.Task CredentialsPostAsync (string accessToken = null, Credential body = null); + + /// + /// Store Credential + /// + /// + /// Store Credential + /// + /// User's OAuth2 access token /// Credential that should be stored - /// InlineResponse20010 - System.Threading.Tasks.Task CredentialsPostAsync (Credential body); + /// Task of ApiResponse (InlineResponse20012) + System.Threading.Tasks.Task> CredentialsPostAsyncWithHttpInfo (string accessToken = null, Credential body = null); /// /// Get Credential @@ -76,8 +143,9 @@ public interface ICredentialApi /// /// connector id /// attrKey - /// InlineResponse20010 - InlineResponse20010 CredentialsIdGet (int? id, string attrKey); + /// User's OAuth2 access token + /// InlineResponse20012 + InlineResponse20012 CredentialsIdGet (int? id, string attrKey, string accessToken = null); /// /// Get Credential @@ -87,8 +155,33 @@ public interface ICredentialApi /// /// connector id /// attrKey - /// InlineResponse20010 - System.Threading.Tasks.Task CredentialsIdGetAsync (int? id, string attrKey); + /// User's OAuth2 access token + /// ApiResponse of InlineResponse20012 + ApiResponse CredentialsIdGetWithHttpInfo (int? id, string attrKey, string accessToken = null); + + /// + /// Get Credential + /// + /// + /// Get Credential + /// + /// connector id + /// attrKey + /// User's OAuth2 access token + /// Task of InlineResponse20012 + System.Threading.Tasks.Task CredentialsIdGetAsync (int? id, string attrKey, string accessToken = null); + + /// + /// Get Credential + /// + /// + /// Get Credential + /// + /// connector id + /// attrKey + /// User's OAuth2 access token + /// Task of ApiResponse (InlineResponse20012) + System.Threading.Tasks.Task> CredentialsIdGetAsyncWithHttpInfo (int? id, string attrKey, string accessToken = null); /// /// Update Credential @@ -98,9 +191,10 @@ public interface ICredentialApi /// /// connector id /// attrKey + /// User's OAuth2 access token /// Credential that should be updated /// InlineResponse2002 - InlineResponse2002 CredentialsIdPut (int? id, string attrKey, Credential body); + InlineResponse2002 CredentialsIdPut (int? id, string attrKey, string accessToken = null, Credential body = null); /// /// Update Credential @@ -110,9 +204,36 @@ public interface ICredentialApi /// /// connector id /// attrKey + /// User's OAuth2 access token /// Credential that should be updated - /// InlineResponse2002 - System.Threading.Tasks.Task CredentialsIdPutAsync (int? id, string attrKey, Credential body); + /// ApiResponse of InlineResponse2002 + ApiResponse CredentialsIdPutWithHttpInfo (int? id, string attrKey, string accessToken = null, Credential body = null); + + /// + /// Update Credential + /// + /// + /// Update Credential + /// + /// connector id + /// attrKey + /// User's OAuth2 access token + /// Credential that should be updated + /// Task of InlineResponse2002 + System.Threading.Tasks.Task CredentialsIdPutAsync (int? id, string attrKey, string accessToken = null, Credential body = null); + + /// + /// Update Credential + /// + /// + /// Update Credential + /// + /// connector id + /// attrKey + /// User's OAuth2 access token + /// Credential that should be updated + /// Task of ApiResponse (InlineResponse2002) + System.Threading.Tasks.Task> CredentialsIdPutAsyncWithHttpInfo (int? id, string attrKey, string accessToken = null, Credential body = null); /// /// Delete Credential @@ -122,8 +243,9 @@ public interface ICredentialApi /// /// connector id /// attrKey + /// User's OAuth2 access token /// InlineResponse2002 - InlineResponse2002 CredentialsIdDelete (int? id, string attrKey); + InlineResponse2002 CredentialsIdDelete (int? id, string attrKey, string accessToken = null); /// /// Delete Credential @@ -133,8 +255,33 @@ public interface ICredentialApi /// /// connector id /// attrKey - /// InlineResponse2002 - System.Threading.Tasks.Task CredentialsIdDeleteAsync (int? id, string attrKey); + /// User's OAuth2 access token + /// ApiResponse of InlineResponse2002 + ApiResponse CredentialsIdDeleteWithHttpInfo (int? id, string attrKey, string accessToken = null); + + /// + /// Delete Credential + /// + /// + /// Delete Credential + /// + /// connector id + /// attrKey + /// User's OAuth2 access token + /// Task of InlineResponse2002 + System.Threading.Tasks.Task CredentialsIdDeleteAsync (int? id, string attrKey, string accessToken = null); + + /// + /// Delete Credential + /// + /// + /// Delete Credential + /// + /// connector id + /// attrKey + /// User's OAuth2 access token + /// Task of ApiResponse (InlineResponse2002) + System.Threading.Tasks.Task> CredentialsIdDeleteAsyncWithHttpInfo (int? id, string attrKey, string accessToken = null); } @@ -146,64 +293,109 @@ public class CredentialApi : ICredentialApi /// /// Initializes a new instance of the class. /// - /// an instance of ApiClient (optional) /// - public CredentialApi(ApiClient apiClient = null) + public CredentialApi(String basePath) { - if (apiClient == null) // use the default one in Configuration - this.ApiClient = Configuration.DefaultApiClient; - else - this.ApiClient = apiClient; + this.Configuration = new Configuration(new ApiClient(basePath)); } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class + /// using Configuration object /// + /// An instance of Configuration /// - public CredentialApi(String basePath) + public CredentialApi(Configuration configuration = null) { - this.ApiClient = new ApiClient(basePath); + if (configuration == null) // use the default one in Configuration + this.Configuration = Configuration.Default; + else + this.Configuration = configuration; } - + + /// + /// Gets the base path of the API client. + /// + /// The base path + public String GetBasePath() + { + return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); + } + /// /// Sets the base path of the API client. /// - /// The base path /// The base path + [Obsolete("SetBasePath is deprecated, please do 'Configuraiton.ApiClient = new ApiClient(\"http://new-path\")' instead.")] public void SetBasePath(String basePath) { - this.ApiClient.BasePath = basePath; + // do nothing } /// - /// Gets the base path of the API client. + /// Gets or sets the configuration object /// - /// The base path - public String GetBasePath() + /// An instance of the Configuration + public Configuration Configuration {get; set;} + + /// + /// Gets the default header. + /// + /// Dictionary of HTTP header + [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] + public Dictionary DefaultHeader() { - return this.ApiClient.BasePath; + return this.Configuration.DefaultHeader; } - + /// - /// Gets or sets the API client. + /// Add default header. /// - /// An instance of the ApiClient - public ApiClient ApiClient {get; set;} - + /// Header field name. + /// Header field value. + /// + [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] + public void AddDefaultHeader(string key, string value) + { + this.Configuration.AddDefaultHeader(key, value); + } + /// /// Get all Credentials Get all Credentials /// - /// connector_id - /// attr_key - /// attr_value - /// created_at - /// updated_at - /// limit - /// offset - /// sort - /// InlineResponse2009 - public InlineResponse2009 CredentialsGet (bool? connectorId, string attrKey, string attrValue, string createdAt, string updatedAt, int? limit, int? offset, string sort) + /// User's OAuth2 access token + /// ID of user that owns this credential + /// The id for the connector data source from which the credential was obtained + /// Attribute name such as token, userid, username, or password + /// Encrypted value for the attribute specified + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// InlineResponse20011 + public InlineResponse20011 CredentialsGet (string accessToken = null, int? userId = null, int? connectorId = null, string attrKey = null, string attrValue = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) + { + ApiResponse response = CredentialsGetWithHttpInfo(accessToken, userId, connectorId, attrKey, attrValue, createdAt, updatedAt, limit, offset, sort); + return response.Data; + } + + /// + /// Get all Credentials Get all Credentials + /// + /// User's OAuth2 access token + /// ID of user that owns this credential + /// The id for the connector data source from which the credential was obtained + /// Attribute name such as token, userid, username, or password + /// Encrypted value for the attribute specified + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// ApiResponse of InlineResponse20011 + public ApiResponse< InlineResponse20011 > CredentialsGetWithHttpInfo (string accessToken = null, int? userId = null, int? connectorId = null, string attrKey = null, string attrValue = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) { @@ -211,7 +403,7 @@ public InlineResponse2009 CredentialsGet (bool? connectorId, string attrKey, str var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -220,54 +412,91 @@ public InlineResponse2009 CredentialsGet (bool? connectorId, string attrKey, str String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (connectorId != null) queryParams.Add("connector_id", ApiClient.ParameterToString(connectorId)); // query parameter - if (attrKey != null) queryParams.Add("attr_key", ApiClient.ParameterToString(attrKey)); // query parameter - if (attrValue != null) queryParams.Add("attr_value", ApiClient.ParameterToString(attrValue)); // query parameter - if (createdAt != null) queryParams.Add("created_at", ApiClient.ParameterToString(createdAt)); // query parameter - if (updatedAt != null) queryParams.Add("updated_at", ApiClient.ParameterToString(updatedAt)); // query parameter - if (limit != null) queryParams.Add("limit", ApiClient.ParameterToString(limit)); // query parameter - if (offset != null) queryParams.Add("offset", ApiClient.ParameterToString(offset)); // query parameter - if (sort != null) queryParams.Add("sort", ApiClient.ParameterToString(sort)); // query parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + if (userId != null) queryParams.Add("user_id", Configuration.ApiClient.ParameterToString(userId)); // query parameter + if (connectorId != null) queryParams.Add("connector_id", Configuration.ApiClient.ParameterToString(connectorId)); // query parameter + if (attrKey != null) queryParams.Add("attr_key", Configuration.ApiClient.ParameterToString(attrKey)); // query parameter + if (attrValue != null) queryParams.Add("attr_value", Configuration.ApiClient.ParameterToString(attrValue)); // query parameter + if (createdAt != null) queryParams.Add("created_at", Configuration.ApiClient.ParameterToString(createdAt)); // query parameter + if (updatedAt != null) queryParams.Add("updated_at", Configuration.ApiClient.ParameterToString(updatedAt)); // query parameter + if (limit != null) queryParams.Add("limit", Configuration.ApiClient.ParameterToString(limit)); // query parameter + if (offset != null) queryParams.Add("offset", Configuration.ApiClient.ParameterToString(offset)); // query parameter + if (sort != null) queryParams.Add("sort", Configuration.ApiClient.ParameterToString(sort)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling CredentialsGet: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling CredentialsGet: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling CredentialsGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling CredentialsGet: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse2009) ApiClient.Deserialize(response, typeof(InlineResponse2009)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20011) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20011))); + } /// /// Get all Credentials Get all Credentials /// - /// connector_id - /// attr_key - /// attr_value - /// created_at - /// updated_at - /// limit - /// offset - /// sort - /// InlineResponse2009 - public async System.Threading.Tasks.Task CredentialsGetAsync (bool? connectorId, string attrKey, string attrValue, string createdAt, string updatedAt, int? limit, int? offset, string sort) + /// User's OAuth2 access token + /// ID of user that owns this credential + /// The id for the connector data source from which the credential was obtained + /// Attribute name such as token, userid, username, or password + /// Encrypted value for the attribute specified + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of InlineResponse20011 + public async System.Threading.Tasks.Task CredentialsGetAsync (string accessToken = null, int? userId = null, int? connectorId = null, string attrKey = null, string attrValue = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) + { + ApiResponse response = await CredentialsGetAsyncWithHttpInfo(accessToken, userId, connectorId, attrKey, attrValue, createdAt, updatedAt, limit, offset, sort); + return response.Data; + + } + + /// + /// Get all Credentials Get all Credentials + /// + /// User's OAuth2 access token + /// ID of user that owns this credential + /// The id for the connector data source from which the credential was obtained + /// Attribute name such as token, userid, username, or password + /// Encrypted value for the attribute specified + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of ApiResponse (InlineResponse20011) + public async System.Threading.Tasks.Task> CredentialsGetAsyncWithHttpInfo (string accessToken = null, int? userId = null, int? connectorId = null, string attrKey = null, string attrValue = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) { @@ -284,44 +513,74 @@ public async System.Threading.Tasks.Task CredentialsGetAsync String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (connectorId != null) queryParams.Add("connector_id", ApiClient.ParameterToString(connectorId)); // query parameter - if (attrKey != null) queryParams.Add("attr_key", ApiClient.ParameterToString(attrKey)); // query parameter - if (attrValue != null) queryParams.Add("attr_value", ApiClient.ParameterToString(attrValue)); // query parameter - if (createdAt != null) queryParams.Add("created_at", ApiClient.ParameterToString(createdAt)); // query parameter - if (updatedAt != null) queryParams.Add("updated_at", ApiClient.ParameterToString(updatedAt)); // query parameter - if (limit != null) queryParams.Add("limit", ApiClient.ParameterToString(limit)); // query parameter - if (offset != null) queryParams.Add("offset", ApiClient.ParameterToString(offset)); // query parameter - if (sort != null) queryParams.Add("sort", ApiClient.ParameterToString(sort)); // query parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + if (userId != null) queryParams.Add("user_id", Configuration.ApiClient.ParameterToString(userId)); // query parameter + if (connectorId != null) queryParams.Add("connector_id", Configuration.ApiClient.ParameterToString(connectorId)); // query parameter + if (attrKey != null) queryParams.Add("attr_key", Configuration.ApiClient.ParameterToString(attrKey)); // query parameter + if (attrValue != null) queryParams.Add("attr_value", Configuration.ApiClient.ParameterToString(attrValue)); // query parameter + if (createdAt != null) queryParams.Add("created_at", Configuration.ApiClient.ParameterToString(createdAt)); // query parameter + if (updatedAt != null) queryParams.Add("updated_at", Configuration.ApiClient.ParameterToString(updatedAt)); // query parameter + if (limit != null) queryParams.Add("limit", Configuration.ApiClient.ParameterToString(limit)); // query parameter + if (offset != null) queryParams.Add("offset", Configuration.ApiClient.ParameterToString(offset)); // query parameter + if (sort != null) queryParams.Add("sort", Configuration.ApiClient.ParameterToString(sort)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; - + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling CredentialsGet: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); - return (InlineResponse2009) ApiClient.Deserialize(response, typeof(InlineResponse2009)); + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling CredentialsGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling CredentialsGet: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20011) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20011))); + } /// /// Store Credential Store Credential /// + /// User's OAuth2 access token + /// Credential that should be stored + /// InlineResponse20012 + public InlineResponse20012 CredentialsPost (string accessToken = null, Credential body = null) + { + ApiResponse response = CredentialsPostWithHttpInfo(accessToken, body); + return response.Data; + } + + /// + /// Store Credential Store Credential + /// + /// User's OAuth2 access token /// Credential that should be stored - /// InlineResponse20010 - public InlineResponse20010 CredentialsPost (Credential body) + /// ApiResponse of InlineResponse20012 + public ApiResponse< InlineResponse20012 > CredentialsPostWithHttpInfo (string accessToken = null, Credential body = null) { @@ -329,7 +588,7 @@ public InlineResponse20010 CredentialsPost (Credential body) var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -338,40 +597,67 @@ public InlineResponse20010 CredentialsPost (Credential body) String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - postBody = ApiClient.Serialize(body); // http body (model) parameter + postBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter + + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } - - // authentication setting, if any - String[] authSettings = new String[] { }; // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling CredentialsPost: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling CredentialsPost: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling CredentialsPost: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling CredentialsPost: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse20010) ApiClient.Deserialize(response, typeof(InlineResponse20010)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20012) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20012))); + } /// /// Store Credential Store Credential /// + /// User's OAuth2 access token + /// Credential that should be stored + /// Task of InlineResponse20012 + public async System.Threading.Tasks.Task CredentialsPostAsync (string accessToken = null, Credential body = null) + { + ApiResponse response = await CredentialsPostAsyncWithHttpInfo(accessToken, body); + return response.Data; + + } + + /// + /// Store Credential Store Credential + /// + /// User's OAuth2 access token /// Credential that should be stored - /// InlineResponse20010 - public async System.Threading.Tasks.Task CredentialsPostAsync (Credential body) + /// Task of ApiResponse (InlineResponse20012) + public async System.Threading.Tasks.Task> CredentialsPostAsyncWithHttpInfo (string accessToken = null, Credential body = null) { @@ -388,29 +674,45 @@ public async System.Threading.Tasks.Task CredentialsPostAsy String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - postBody = ApiClient.Serialize(body); // http body (model) parameter + postBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; - + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling CredentialsPost: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams); - return (InlineResponse20010) ApiClient.Deserialize(response, typeof(InlineResponse20010)); + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling CredentialsPost: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling CredentialsPost: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20012) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20012))); + } /// @@ -418,8 +720,22 @@ public async System.Threading.Tasks.Task CredentialsPostAsy /// /// connector id /// attrKey - /// InlineResponse20010 - public InlineResponse20010 CredentialsIdGet (int? id, string attrKey) + /// User's OAuth2 access token + /// InlineResponse20012 + public InlineResponse20012 CredentialsIdGet (int? id, string attrKey, string accessToken = null) + { + ApiResponse response = CredentialsIdGetWithHttpInfo(id, attrKey, accessToken); + return response.Data; + } + + /// + /// Get Credential Get Credential + /// + /// connector id + /// attrKey + /// User's OAuth2 access token + /// ApiResponse of InlineResponse20012 + public ApiResponse< InlineResponse20012 > CredentialsIdGetWithHttpInfo (int? id, string attrKey, string accessToken = null) { // verify the required parameter 'id' is set @@ -433,7 +749,7 @@ public InlineResponse20010 CredentialsIdGet (int? id, string attrKey) var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -442,33 +758,46 @@ public InlineResponse20010 CredentialsIdGet (int? id, string attrKey) String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter - if (attrKey != null) queryParams.Add("attrKey", ApiClient.ParameterToString(attrKey)); // query parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + if (attrKey != null) queryParams.Add("attrKey", Configuration.ApiClient.ParameterToString(attrKey)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling CredentialsIdGet: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling CredentialsIdGet: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling CredentialsIdGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling CredentialsIdGet: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse20010) ApiClient.Deserialize(response, typeof(InlineResponse20010)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20012) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20012))); + } /// @@ -476,8 +805,23 @@ public InlineResponse20010 CredentialsIdGet (int? id, string attrKey) /// /// connector id /// attrKey - /// InlineResponse20010 - public async System.Threading.Tasks.Task CredentialsIdGetAsync (int? id, string attrKey) + /// User's OAuth2 access token + /// Task of InlineResponse20012 + public async System.Threading.Tasks.Task CredentialsIdGetAsync (int? id, string attrKey, string accessToken = null) + { + ApiResponse response = await CredentialsIdGetAsyncWithHttpInfo(id, attrKey, accessToken); + return response.Data; + + } + + /// + /// Get Credential Get Credential + /// + /// connector id + /// attrKey + /// User's OAuth2 access token + /// Task of ApiResponse (InlineResponse20012) + public async System.Threading.Tasks.Task> CredentialsIdGetAsyncWithHttpInfo (int? id, string attrKey, string accessToken = null) { // verify the required parameter 'id' is set if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling CredentialsIdGet"); @@ -498,30 +842,46 @@ public async System.Threading.Tasks.Task CredentialsIdGetAs String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter - if (attrKey != null) queryParams.Add("attrKey", ApiClient.ParameterToString(attrKey)); // query parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + if (attrKey != null) queryParams.Add("attrKey", Configuration.ApiClient.ParameterToString(attrKey)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; - + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling CredentialsIdGet: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling CredentialsIdGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling CredentialsIdGet: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse20010) ApiClient.Deserialize(response, typeof(InlineResponse20010)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20012) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20012))); + } /// @@ -529,9 +889,24 @@ public async System.Threading.Tasks.Task CredentialsIdGetAs /// /// connector id /// attrKey + /// User's OAuth2 access token + /// Credential that should be updated + /// InlineResponse2002 + public InlineResponse2002 CredentialsIdPut (int? id, string attrKey, string accessToken = null, Credential body = null) + { + ApiResponse response = CredentialsIdPutWithHttpInfo(id, attrKey, accessToken, body); + return response.Data; + } + + /// + /// Update Credential Update Credential + /// + /// connector id + /// attrKey + /// User's OAuth2 access token /// Credential that should be updated - /// InlineResponse2002 - public InlineResponse2002 CredentialsIdPut (int? id, string attrKey, Credential body) + /// ApiResponse of InlineResponse2002 + public ApiResponse< InlineResponse2002 > CredentialsIdPutWithHttpInfo (int? id, string attrKey, string accessToken = null, Credential body = null) { // verify the required parameter 'id' is set @@ -545,7 +920,7 @@ public InlineResponse2002 CredentialsIdPut (int? id, string attrKey, Credential var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -554,34 +929,47 @@ public InlineResponse2002 CredentialsIdPut (int? id, string attrKey, Credential String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter - if (attrKey != null) queryParams.Add("attrKey", ApiClient.ParameterToString(attrKey)); // query parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + if (attrKey != null) queryParams.Add("attrKey", Configuration.ApiClient.ParameterToString(attrKey)); // query parameter - postBody = ApiClient.Serialize(body); // http body (model) parameter + postBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter + + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } - - // authentication setting, if any - String[] authSettings = new String[] { }; // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling CredentialsIdPut: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling CredentialsIdPut: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling CredentialsIdPut: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling CredentialsIdPut: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse2002) ApiClient.Deserialize(response, typeof(InlineResponse2002)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2002) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2002))); + } /// @@ -589,9 +977,25 @@ public InlineResponse2002 CredentialsIdPut (int? id, string attrKey, Credential /// /// connector id /// attrKey + /// User's OAuth2 access token /// Credential that should be updated - /// InlineResponse2002 - public async System.Threading.Tasks.Task CredentialsIdPutAsync (int? id, string attrKey, Credential body) + /// Task of InlineResponse2002 + public async System.Threading.Tasks.Task CredentialsIdPutAsync (int? id, string attrKey, string accessToken = null, Credential body = null) + { + ApiResponse response = await CredentialsIdPutAsyncWithHttpInfo(id, attrKey, accessToken, body); + return response.Data; + + } + + /// + /// Update Credential Update Credential + /// + /// connector id + /// attrKey + /// User's OAuth2 access token + /// Credential that should be updated + /// Task of ApiResponse (InlineResponse2002) + public async System.Threading.Tasks.Task> CredentialsIdPutAsyncWithHttpInfo (int? id, string attrKey, string accessToken = null, Credential body = null) { // verify the required parameter 'id' is set if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling CredentialsIdPut"); @@ -612,31 +1016,47 @@ public async System.Threading.Tasks.Task CredentialsIdPutAsy String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter - if (attrKey != null) queryParams.Add("attrKey", ApiClient.ParameterToString(attrKey)); // query parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + if (attrKey != null) queryParams.Add("attrKey", Configuration.ApiClient.ParameterToString(attrKey)); // query parameter - postBody = ApiClient.Serialize(body); // http body (model) parameter + postBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; - + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling CredentialsIdPut: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling CredentialsIdPut: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling CredentialsIdPut: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse2002) ApiClient.Deserialize(response, typeof(InlineResponse2002)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2002) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2002))); + } /// @@ -644,8 +1064,22 @@ public async System.Threading.Tasks.Task CredentialsIdPutAsy /// /// connector id /// attrKey - /// InlineResponse2002 - public InlineResponse2002 CredentialsIdDelete (int? id, string attrKey) + /// User's OAuth2 access token + /// InlineResponse2002 + public InlineResponse2002 CredentialsIdDelete (int? id, string attrKey, string accessToken = null) + { + ApiResponse response = CredentialsIdDeleteWithHttpInfo(id, attrKey, accessToken); + return response.Data; + } + + /// + /// Delete Credential Delete Credential + /// + /// connector id + /// attrKey + /// User's OAuth2 access token + /// ApiResponse of InlineResponse2002 + public ApiResponse< InlineResponse2002 > CredentialsIdDeleteWithHttpInfo (int? id, string attrKey, string accessToken = null) { // verify the required parameter 'id' is set @@ -659,7 +1093,7 @@ public InlineResponse2002 CredentialsIdDelete (int? id, string attrKey) var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -668,33 +1102,46 @@ public InlineResponse2002 CredentialsIdDelete (int? id, string attrKey) String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter - if (attrKey != null) queryParams.Add("attrKey", ApiClient.ParameterToString(attrKey)); // query parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + if (attrKey != null) queryParams.Add("attrKey", Configuration.ApiClient.ParameterToString(attrKey)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling CredentialsIdDelete: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling CredentialsIdDelete: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling CredentialsIdDelete: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling CredentialsIdDelete: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse2002) ApiClient.Deserialize(response, typeof(InlineResponse2002)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2002) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2002))); + } /// @@ -702,8 +1149,23 @@ public InlineResponse2002 CredentialsIdDelete (int? id, string attrKey) /// /// connector id /// attrKey - /// InlineResponse2002 - public async System.Threading.Tasks.Task CredentialsIdDeleteAsync (int? id, string attrKey) + /// User's OAuth2 access token + /// Task of InlineResponse2002 + public async System.Threading.Tasks.Task CredentialsIdDeleteAsync (int? id, string attrKey, string accessToken = null) + { + ApiResponse response = await CredentialsIdDeleteAsyncWithHttpInfo(id, attrKey, accessToken); + return response.Data; + + } + + /// + /// Delete Credential Delete Credential + /// + /// connector id + /// attrKey + /// User's OAuth2 access token + /// Task of ApiResponse (InlineResponse2002) + public async System.Threading.Tasks.Task> CredentialsIdDeleteAsyncWithHttpInfo (int? id, string attrKey, string accessToken = null) { // verify the required parameter 'id' is set if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling CredentialsIdDelete"); @@ -724,30 +1186,46 @@ public async System.Threading.Tasks.Task CredentialsIdDelete String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter - if (attrKey != null) queryParams.Add("attrKey", ApiClient.ParameterToString(attrKey)); // query parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + if (attrKey != null) queryParams.Add("attrKey", Configuration.ApiClient.ParameterToString(attrKey)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; - + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling CredentialsIdDelete: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams); - return (InlineResponse2002) ApiClient.Deserialize(response, typeof(InlineResponse2002)); + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling CredentialsIdDelete: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling CredentialsIdDelete: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2002) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2002))); + } } diff --git a/src/main/csharp/io/swagger/Api/MeasurementApi.cs b/src/main/csharp/io/swagger/Api/MeasurementApi.cs index dabf42b..d8ea2dc 100644 --- a/src/main/csharp/io/swagger/Api/MeasurementApi.cs +++ b/src/main/csharp/io/swagger/Api/MeasurementApi.cs @@ -1,6 +1,7 @@ using System; using System.IO; using System.Collections.Generic; +using System.Linq; using RestSharp; using IO.Swagger.Client; using IO.Swagger.Model; @@ -15,78 +16,172 @@ public interface IMeasurementApi { /// - /// Get all Measurements + /// Get measurements for this user /// /// - /// Get all Measurements + /// Measurements are any value that can be recorded like daily steps, a mood rating, or apples eaten. /// - /// user_id - /// client_id - /// connector_id - /// variable_id - /// start_time - /// value - /// original_value - /// duration - /// note - /// latitude - /// longitude - /// location - /// created_at - /// updated_at - /// error - /// limit - /// offset - /// sort - /// InlineResponse20011 - InlineResponse20011 MeasurementsGet (int? userId, string clientId, int? connectorId, int? variableId, int? startTime, double? value, double? originalValue, int? duration, string note, double? latitude, double? longitude, string location, string createdAt, string updatedAt, string error, int? limit, int? offset, string sort); + /// User's OAuth2 access token + /// ID of user that owns this measurement + /// The ID of the client application which originally stored the measurement + /// The id for the connector data source from which the measurement was obtained + /// ID of the variable for which we are creating the measurement records + /// Application or device used to record the measurement values + /// start time for the measurement event. Use ISO 8601 datetime format + /// The value of the measurement after conversion to the default unit for that variable + /// The default unit id for the variable + /// Unconverted value of measurement as originally posted (before conversion to default unit) + /// Unit id of the measurement as originally submitted + /// Duration of the event being measurement in seconds + /// An optional note the user may include with their measurement + /// Latitude at which the measurement was taken + /// Longitude at which the measurement was taken + /// Optional human readable name for the location where the measurement was recorded + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// An error message if there is a problem with the measurement + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// InlineResponse20013 + InlineResponse20013 MeasurementsGet (string accessToken = null, int? userId = null, string clientId = null, int? connectorId = null, int? variableId = null, int? sourceId = null, string startTime = null, double? value = null, int? unitId = null, double? originalValue = null, int? originalUnitId = null, int? duration = null, string note = null, double? latitude = null, double? longitude = null, string location = null, string createdAt = null, string updatedAt = null, string error = null, int? limit = null, int? offset = null, string sort = null); /// - /// Get all Measurements + /// Get measurements for this user /// /// - /// Get all Measurements + /// Measurements are any value that can be recorded like daily steps, a mood rating, or apples eaten. /// - /// user_id - /// client_id - /// connector_id - /// variable_id - /// start_time - /// value - /// original_value - /// duration - /// note - /// latitude - /// longitude - /// location - /// created_at - /// updated_at - /// error - /// limit - /// offset - /// sort - /// InlineResponse20011 - System.Threading.Tasks.Task MeasurementsGetAsync (int? userId, string clientId, int? connectorId, int? variableId, int? startTime, double? value, double? originalValue, int? duration, string note, double? latitude, double? longitude, string location, string createdAt, string updatedAt, string error, int? limit, int? offset, string sort); + /// User's OAuth2 access token + /// ID of user that owns this measurement + /// The ID of the client application which originally stored the measurement + /// The id for the connector data source from which the measurement was obtained + /// ID of the variable for which we are creating the measurement records + /// Application or device used to record the measurement values + /// start time for the measurement event. Use ISO 8601 datetime format + /// The value of the measurement after conversion to the default unit for that variable + /// The default unit id for the variable + /// Unconverted value of measurement as originally posted (before conversion to default unit) + /// Unit id of the measurement as originally submitted + /// Duration of the event being measurement in seconds + /// An optional note the user may include with their measurement + /// Latitude at which the measurement was taken + /// Longitude at which the measurement was taken + /// Optional human readable name for the location where the measurement was recorded + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// An error message if there is a problem with the measurement + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// ApiResponse of InlineResponse20013 + ApiResponse MeasurementsGetWithHttpInfo (string accessToken = null, int? userId = null, string clientId = null, int? connectorId = null, int? variableId = null, int? sourceId = null, string startTime = null, double? value = null, int? unitId = null, double? originalValue = null, int? originalUnitId = null, int? duration = null, string note = null, double? latitude = null, double? longitude = null, string location = null, string createdAt = null, string updatedAt = null, string error = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Get measurements for this user + /// + /// + /// Measurements are any value that can be recorded like daily steps, a mood rating, or apples eaten. + /// + /// User's OAuth2 access token + /// ID of user that owns this measurement + /// The ID of the client application which originally stored the measurement + /// The id for the connector data source from which the measurement was obtained + /// ID of the variable for which we are creating the measurement records + /// Application or device used to record the measurement values + /// start time for the measurement event. Use ISO 8601 datetime format + /// The value of the measurement after conversion to the default unit for that variable + /// The default unit id for the variable + /// Unconverted value of measurement as originally posted (before conversion to default unit) + /// Unit id of the measurement as originally submitted + /// Duration of the event being measurement in seconds + /// An optional note the user may include with their measurement + /// Latitude at which the measurement was taken + /// Longitude at which the measurement was taken + /// Optional human readable name for the location where the measurement was recorded + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// An error message if there is a problem with the measurement + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of InlineResponse20013 + System.Threading.Tasks.Task MeasurementsGetAsync (string accessToken = null, int? userId = null, string clientId = null, int? connectorId = null, int? variableId = null, int? sourceId = null, string startTime = null, double? value = null, int? unitId = null, double? originalValue = null, int? originalUnitId = null, int? duration = null, string note = null, double? latitude = null, double? longitude = null, string location = null, string createdAt = null, string updatedAt = null, string error = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Get measurements for this user + /// + /// + /// Measurements are any value that can be recorded like daily steps, a mood rating, or apples eaten. + /// + /// User's OAuth2 access token + /// ID of user that owns this measurement + /// The ID of the client application which originally stored the measurement + /// The id for the connector data source from which the measurement was obtained + /// ID of the variable for which we are creating the measurement records + /// Application or device used to record the measurement values + /// start time for the measurement event. Use ISO 8601 datetime format + /// The value of the measurement after conversion to the default unit for that variable + /// The default unit id for the variable + /// Unconverted value of measurement as originally posted (before conversion to default unit) + /// Unit id of the measurement as originally submitted + /// Duration of the event being measurement in seconds + /// An optional note the user may include with their measurement + /// Latitude at which the measurement was taken + /// Longitude at which the measurement was taken + /// Optional human readable name for the location where the measurement was recorded + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// An error message if there is a problem with the measurement + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of ApiResponse (InlineResponse20013) + System.Threading.Tasks.Task> MeasurementsGetAsyncWithHttpInfo (string accessToken = null, int? userId = null, string clientId = null, int? connectorId = null, int? variableId = null, int? sourceId = null, string startTime = null, double? value = null, int? unitId = null, double? originalValue = null, int? originalUnitId = null, int? duration = null, string note = null, double? latitude = null, double? longitude = null, string location = null, string createdAt = null, string updatedAt = null, string error = null, int? limit = null, int? offset = null, string sort = null); /// - /// Store Measurement + /// Post a new set or update existing measurements to the database /// /// - /// Store Measurement + /// You can submit or update multiple measurements in a measurements sub-array. If the variable these measurements correspond to does not already exist in the database, it will be automatically added. /// + /// User's OAuth2 access token /// Measurement that should be stored - /// InlineResponse20011 - InlineResponse20011 MeasurementsPost (MeasurementPost body); + /// InlineResponse20013 + InlineResponse20013 MeasurementsPost (string accessToken = null, MeasurementPost body = null); /// - /// Store Measurement + /// Post a new set or update existing measurements to the database /// /// - /// Store Measurement + /// You can submit or update multiple measurements in a measurements sub-array. If the variable these measurements correspond to does not already exist in the database, it will be automatically added. /// + /// User's OAuth2 access token /// Measurement that should be stored - /// InlineResponse20011 - System.Threading.Tasks.Task MeasurementsPostAsync (MeasurementPost body); + /// ApiResponse of InlineResponse20013 + ApiResponse MeasurementsPostWithHttpInfo (string accessToken = null, MeasurementPost body = null); + + /// + /// Post a new set or update existing measurements to the database + /// + /// + /// You can submit or update multiple measurements in a measurements sub-array. If the variable these measurements correspond to does not already exist in the database, it will be automatically added. + /// + /// User's OAuth2 access token + /// Measurement that should be stored + /// Task of InlineResponse20013 + System.Threading.Tasks.Task MeasurementsPostAsync (string accessToken = null, MeasurementPost body = null); + + /// + /// Post a new set or update existing measurements to the database + /// + /// + /// You can submit or update multiple measurements in a measurements sub-array. If the variable these measurements correspond to does not already exist in the database, it will be automatically added. + /// + /// User's OAuth2 access token + /// Measurement that should be stored + /// Task of ApiResponse (InlineResponse20013) + System.Threading.Tasks.Task> MeasurementsPostAsyncWithHttpInfo (string accessToken = null, MeasurementPost body = null); /// /// Get Measurements CSV @@ -94,8 +189,9 @@ public interface IMeasurementApi /// /// Download a CSV containing all user measurements /// + /// User's OAuth2 access token /// Stream - Stream MeasurementsCsvGet (); + Stream MeasurementsCsvGet (string accessToken = null); /// /// Get Measurements CSV @@ -103,8 +199,29 @@ public interface IMeasurementApi /// /// Download a CSV containing all user measurements /// - /// Stream - System.Threading.Tasks.Task MeasurementsCsvGetAsync (); + /// User's OAuth2 access token + /// ApiResponse of Stream + ApiResponse MeasurementsCsvGetWithHttpInfo (string accessToken = null); + + /// + /// Get Measurements CSV + /// + /// + /// Download a CSV containing all user measurements + /// + /// User's OAuth2 access token + /// Task of Stream + System.Threading.Tasks.Task MeasurementsCsvGetAsync (string accessToken = null); + + /// + /// Get Measurements CSV + /// + /// + /// Download a CSV containing all user measurements + /// + /// User's OAuth2 access token + /// Task of ApiResponse (Stream) + System.Threading.Tasks.Task> MeasurementsCsvGetAsyncWithHttpInfo (string accessToken = null); /// /// Post Request for Measurements CSV @@ -112,8 +229,9 @@ public interface IMeasurementApi /// /// Use this endpoint to schedule a CSV export containing all user measurements to be emailed to the user within 24 hours. /// + /// User's OAuth2 access token /// int? - int? MeasurementsRequestCsvPost (); + int? MeasurementsRequestCsvPost (string accessToken = null); /// /// Post Request for Measurements CSV @@ -121,8 +239,29 @@ public interface IMeasurementApi /// /// Use this endpoint to schedule a CSV export containing all user measurements to be emailed to the user within 24 hours. /// - /// int? - System.Threading.Tasks.Task MeasurementsRequestCsvPostAsync (); + /// User's OAuth2 access token + /// ApiResponse of int? + ApiResponse MeasurementsRequestCsvPostWithHttpInfo (string accessToken = null); + + /// + /// Post Request for Measurements CSV + /// + /// + /// Use this endpoint to schedule a CSV export containing all user measurements to be emailed to the user within 24 hours. + /// + /// User's OAuth2 access token + /// Task of int? + System.Threading.Tasks.Task MeasurementsRequestCsvPostAsync (string accessToken = null); + + /// + /// Post Request for Measurements CSV + /// + /// + /// Use this endpoint to schedule a CSV export containing all user measurements to be emailed to the user within 24 hours. + /// + /// User's OAuth2 access token + /// Task of ApiResponse (int?) + System.Threading.Tasks.Task> MeasurementsRequestCsvPostAsyncWithHttpInfo (string accessToken = null); /// /// Get Measurement @@ -131,8 +270,9 @@ public interface IMeasurementApi /// Get Measurement /// /// id of Measurement - /// InlineResponse20012 - InlineResponse20012 MeasurementsIdGet (int? id); + /// User's OAuth2 access token + /// InlineResponse20014 + InlineResponse20014 MeasurementsIdGet (int? id, string accessToken = null); /// /// Get Measurement @@ -141,8 +281,31 @@ public interface IMeasurementApi /// Get Measurement /// /// id of Measurement - /// InlineResponse20012 - System.Threading.Tasks.Task MeasurementsIdGetAsync (int? id); + /// User's OAuth2 access token + /// ApiResponse of InlineResponse20014 + ApiResponse MeasurementsIdGetWithHttpInfo (int? id, string accessToken = null); + + /// + /// Get Measurement + /// + /// + /// Get Measurement + /// + /// id of Measurement + /// User's OAuth2 access token + /// Task of InlineResponse20014 + System.Threading.Tasks.Task MeasurementsIdGetAsync (int? id, string accessToken = null); + + /// + /// Get Measurement + /// + /// + /// Get Measurement + /// + /// id of Measurement + /// User's OAuth2 access token + /// Task of ApiResponse (InlineResponse20014) + System.Threading.Tasks.Task> MeasurementsIdGetAsyncWithHttpInfo (int? id, string accessToken = null); /// /// Update Measurement @@ -151,9 +314,10 @@ public interface IMeasurementApi /// Update Measurement /// /// id of Measurement + /// User's OAuth2 access token /// Measurement that should be updated /// InlineResponse2002 - InlineResponse2002 MeasurementsIdPut (int? id, Measurement body); + InlineResponse2002 MeasurementsIdPut (int? id, string accessToken = null, Measurement body = null); /// /// Update Measurement @@ -162,9 +326,34 @@ public interface IMeasurementApi /// Update Measurement /// /// id of Measurement + /// User's OAuth2 access token /// Measurement that should be updated - /// InlineResponse2002 - System.Threading.Tasks.Task MeasurementsIdPutAsync (int? id, Measurement body); + /// ApiResponse of InlineResponse2002 + ApiResponse MeasurementsIdPutWithHttpInfo (int? id, string accessToken = null, Measurement body = null); + + /// + /// Update Measurement + /// + /// + /// Update Measurement + /// + /// id of Measurement + /// User's OAuth2 access token + /// Measurement that should be updated + /// Task of InlineResponse2002 + System.Threading.Tasks.Task MeasurementsIdPutAsync (int? id, string accessToken = null, Measurement body = null); + + /// + /// Update Measurement + /// + /// + /// Update Measurement + /// + /// id of Measurement + /// User's OAuth2 access token + /// Measurement that should be updated + /// Task of ApiResponse (InlineResponse2002) + System.Threading.Tasks.Task> MeasurementsIdPutAsyncWithHttpInfo (int? id, string accessToken = null, Measurement body = null); /// /// Delete Measurement @@ -173,8 +362,9 @@ public interface IMeasurementApi /// Delete Measurement /// /// id of Measurement + /// User's OAuth2 access token /// InlineResponse2002 - InlineResponse2002 MeasurementsIdDelete (int? id); + InlineResponse2002 MeasurementsIdDelete (int? id, string accessToken = null); /// /// Delete Measurement @@ -183,8 +373,31 @@ public interface IMeasurementApi /// Delete Measurement /// /// id of Measurement - /// InlineResponse2002 - System.Threading.Tasks.Task MeasurementsIdDeleteAsync (int? id); + /// User's OAuth2 access token + /// ApiResponse of InlineResponse2002 + ApiResponse MeasurementsIdDeleteWithHttpInfo (int? id, string accessToken = null); + + /// + /// Delete Measurement + /// + /// + /// Delete Measurement + /// + /// id of Measurement + /// User's OAuth2 access token + /// Task of InlineResponse2002 + System.Threading.Tasks.Task MeasurementsIdDeleteAsync (int? id, string accessToken = null); + + /// + /// Delete Measurement + /// + /// + /// Delete Measurement + /// + /// id of Measurement + /// User's OAuth2 access token + /// Task of ApiResponse (InlineResponse2002) + System.Threading.Tasks.Task> MeasurementsIdDeleteAsyncWithHttpInfo (int? id, string accessToken = null); } @@ -196,74 +409,133 @@ public class MeasurementApi : IMeasurementApi /// /// Initializes a new instance of the class. /// - /// an instance of ApiClient (optional) /// - public MeasurementApi(ApiClient apiClient = null) + public MeasurementApi(String basePath) { - if (apiClient == null) // use the default one in Configuration - this.ApiClient = Configuration.DefaultApiClient; - else - this.ApiClient = apiClient; + this.Configuration = new Configuration(new ApiClient(basePath)); } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class + /// using Configuration object /// + /// An instance of Configuration /// - public MeasurementApi(String basePath) + public MeasurementApi(Configuration configuration = null) { - this.ApiClient = new ApiClient(basePath); + if (configuration == null) // use the default one in Configuration + this.Configuration = Configuration.Default; + else + this.Configuration = configuration; } - + + /// + /// Gets the base path of the API client. + /// + /// The base path + public String GetBasePath() + { + return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); + } + /// /// Sets the base path of the API client. /// - /// The base path /// The base path + [Obsolete("SetBasePath is deprecated, please do 'Configuraiton.ApiClient = new ApiClient(\"http://new-path\")' instead.")] public void SetBasePath(String basePath) { - this.ApiClient.BasePath = basePath; + // do nothing } /// - /// Gets the base path of the API client. + /// Gets or sets the configuration object /// - /// The base path - public String GetBasePath() + /// An instance of the Configuration + public Configuration Configuration {get; set;} + + /// + /// Gets the default header. + /// + /// Dictionary of HTTP header + [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] + public Dictionary DefaultHeader() { - return this.ApiClient.BasePath; + return this.Configuration.DefaultHeader; } - + /// - /// Gets or sets the API client. + /// Add default header. /// - /// An instance of the ApiClient - public ApiClient ApiClient {get; set;} - + /// Header field name. + /// Header field value. + /// + [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] + public void AddDefaultHeader(string key, string value) + { + this.Configuration.AddDefaultHeader(key, value); + } + /// - /// Get all Measurements Get all Measurements - /// - /// user_id - /// client_id - /// connector_id - /// variable_id - /// start_time - /// value - /// original_value - /// duration - /// note - /// latitude - /// longitude - /// location - /// created_at - /// updated_at - /// error - /// limit - /// offset - /// sort - /// InlineResponse20011 - public InlineResponse20011 MeasurementsGet (int? userId, string clientId, int? connectorId, int? variableId, int? startTime, double? value, double? originalValue, int? duration, string note, double? latitude, double? longitude, string location, string createdAt, string updatedAt, string error, int? limit, int? offset, string sort) + /// Get measurements for this user Measurements are any value that can be recorded like daily steps, a mood rating, or apples eaten. + /// + /// User's OAuth2 access token + /// ID of user that owns this measurement + /// The ID of the client application which originally stored the measurement + /// The id for the connector data source from which the measurement was obtained + /// ID of the variable for which we are creating the measurement records + /// Application or device used to record the measurement values + /// start time for the measurement event. Use ISO 8601 datetime format + /// The value of the measurement after conversion to the default unit for that variable + /// The default unit id for the variable + /// Unconverted value of measurement as originally posted (before conversion to default unit) + /// Unit id of the measurement as originally submitted + /// Duration of the event being measurement in seconds + /// An optional note the user may include with their measurement + /// Latitude at which the measurement was taken + /// Longitude at which the measurement was taken + /// Optional human readable name for the location where the measurement was recorded + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// An error message if there is a problem with the measurement + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// InlineResponse20013 + public InlineResponse20013 MeasurementsGet (string accessToken = null, int? userId = null, string clientId = null, int? connectorId = null, int? variableId = null, int? sourceId = null, string startTime = null, double? value = null, int? unitId = null, double? originalValue = null, int? originalUnitId = null, int? duration = null, string note = null, double? latitude = null, double? longitude = null, string location = null, string createdAt = null, string updatedAt = null, string error = null, int? limit = null, int? offset = null, string sort = null) + { + ApiResponse response = MeasurementsGetWithHttpInfo(accessToken, userId, clientId, connectorId, variableId, sourceId, startTime, value, unitId, originalValue, originalUnitId, duration, note, latitude, longitude, location, createdAt, updatedAt, error, limit, offset, sort); + return response.Data; + } + + /// + /// Get measurements for this user Measurements are any value that can be recorded like daily steps, a mood rating, or apples eaten. + /// + /// User's OAuth2 access token + /// ID of user that owns this measurement + /// The ID of the client application which originally stored the measurement + /// The id for the connector data source from which the measurement was obtained + /// ID of the variable for which we are creating the measurement records + /// Application or device used to record the measurement values + /// start time for the measurement event. Use ISO 8601 datetime format + /// The value of the measurement after conversion to the default unit for that variable + /// The default unit id for the variable + /// Unconverted value of measurement as originally posted (before conversion to default unit) + /// Unit id of the measurement as originally submitted + /// Duration of the event being measurement in seconds + /// An optional note the user may include with their measurement + /// Latitude at which the measurement was taken + /// Longitude at which the measurement was taken + /// Optional human readable name for the location where the measurement was recorded + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// An error message if there is a problem with the measurement + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// ApiResponse of InlineResponse20013 + public ApiResponse< InlineResponse20013 > MeasurementsGetWithHttpInfo (string accessToken = null, int? userId = null, string clientId = null, int? connectorId = null, int? variableId = null, int? sourceId = null, string startTime = null, double? value = null, int? unitId = null, double? originalValue = null, int? originalUnitId = null, int? duration = null, string note = null, double? latitude = null, double? longitude = null, string location = null, string createdAt = null, string updatedAt = null, string error = null, int? limit = null, int? offset = null, string sort = null) { @@ -271,7 +543,7 @@ public InlineResponse20011 MeasurementsGet (int? userId, string clientId, int? c var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -280,74 +552,127 @@ public InlineResponse20011 MeasurementsGet (int? userId, string clientId, int? c String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (userId != null) queryParams.Add("user_id", ApiClient.ParameterToString(userId)); // query parameter - if (clientId != null) queryParams.Add("client_id", ApiClient.ParameterToString(clientId)); // query parameter - if (connectorId != null) queryParams.Add("connector_id", ApiClient.ParameterToString(connectorId)); // query parameter - if (variableId != null) queryParams.Add("variable_id", ApiClient.ParameterToString(variableId)); // query parameter - if (startTime != null) queryParams.Add("start_time", ApiClient.ParameterToString(startTime)); // query parameter - if (value != null) queryParams.Add("value", ApiClient.ParameterToString(value)); // query parameter - if (originalValue != null) queryParams.Add("original_value", ApiClient.ParameterToString(originalValue)); // query parameter - if (duration != null) queryParams.Add("duration", ApiClient.ParameterToString(duration)); // query parameter - if (note != null) queryParams.Add("note", ApiClient.ParameterToString(note)); // query parameter - if (latitude != null) queryParams.Add("latitude", ApiClient.ParameterToString(latitude)); // query parameter - if (longitude != null) queryParams.Add("longitude", ApiClient.ParameterToString(longitude)); // query parameter - if (location != null) queryParams.Add("location", ApiClient.ParameterToString(location)); // query parameter - if (createdAt != null) queryParams.Add("created_at", ApiClient.ParameterToString(createdAt)); // query parameter - if (updatedAt != null) queryParams.Add("updated_at", ApiClient.ParameterToString(updatedAt)); // query parameter - if (error != null) queryParams.Add("error", ApiClient.ParameterToString(error)); // query parameter - if (limit != null) queryParams.Add("limit", ApiClient.ParameterToString(limit)); // query parameter - if (offset != null) queryParams.Add("offset", ApiClient.ParameterToString(offset)); // query parameter - if (sort != null) queryParams.Add("sort", ApiClient.ParameterToString(sort)); // query parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + if (userId != null) queryParams.Add("user_id", Configuration.ApiClient.ParameterToString(userId)); // query parameter + if (clientId != null) queryParams.Add("client_id", Configuration.ApiClient.ParameterToString(clientId)); // query parameter + if (connectorId != null) queryParams.Add("connector_id", Configuration.ApiClient.ParameterToString(connectorId)); // query parameter + if (variableId != null) queryParams.Add("variable_id", Configuration.ApiClient.ParameterToString(variableId)); // query parameter + if (sourceId != null) queryParams.Add("source_id", Configuration.ApiClient.ParameterToString(sourceId)); // query parameter + if (startTime != null) queryParams.Add("start_time", Configuration.ApiClient.ParameterToString(startTime)); // query parameter + if (value != null) queryParams.Add("value", Configuration.ApiClient.ParameterToString(value)); // query parameter + if (unitId != null) queryParams.Add("unit_id", Configuration.ApiClient.ParameterToString(unitId)); // query parameter + if (originalValue != null) queryParams.Add("original_value", Configuration.ApiClient.ParameterToString(originalValue)); // query parameter + if (originalUnitId != null) queryParams.Add("original_unit_id", Configuration.ApiClient.ParameterToString(originalUnitId)); // query parameter + if (duration != null) queryParams.Add("duration", Configuration.ApiClient.ParameterToString(duration)); // query parameter + if (note != null) queryParams.Add("note", Configuration.ApiClient.ParameterToString(note)); // query parameter + if (latitude != null) queryParams.Add("latitude", Configuration.ApiClient.ParameterToString(latitude)); // query parameter + if (longitude != null) queryParams.Add("longitude", Configuration.ApiClient.ParameterToString(longitude)); // query parameter + if (location != null) queryParams.Add("location", Configuration.ApiClient.ParameterToString(location)); // query parameter + if (createdAt != null) queryParams.Add("created_at", Configuration.ApiClient.ParameterToString(createdAt)); // query parameter + if (updatedAt != null) queryParams.Add("updated_at", Configuration.ApiClient.ParameterToString(updatedAt)); // query parameter + if (error != null) queryParams.Add("error", Configuration.ApiClient.ParameterToString(error)); // query parameter + if (limit != null) queryParams.Add("limit", Configuration.ApiClient.ParameterToString(limit)); // query parameter + if (offset != null) queryParams.Add("offset", Configuration.ApiClient.ParameterToString(offset)); // query parameter + if (sort != null) queryParams.Add("sort", Configuration.ApiClient.ParameterToString(sort)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling MeasurementsGet: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling MeasurementsGet: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling MeasurementsGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling MeasurementsGet: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse20011) ApiClient.Deserialize(response, typeof(InlineResponse20011)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20013) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20013))); + } /// - /// Get all Measurements Get all Measurements + /// Get measurements for this user Measurements are any value that can be recorded like daily steps, a mood rating, or apples eaten. /// - /// user_id - /// client_id - /// connector_id - /// variable_id - /// start_time - /// value - /// original_value - /// duration - /// note - /// latitude - /// longitude - /// location - /// created_at - /// updated_at - /// error - /// limit - /// offset - /// sort - /// InlineResponse20011 - public async System.Threading.Tasks.Task MeasurementsGetAsync (int? userId, string clientId, int? connectorId, int? variableId, int? startTime, double? value, double? originalValue, int? duration, string note, double? latitude, double? longitude, string location, string createdAt, string updatedAt, string error, int? limit, int? offset, string sort) + /// User's OAuth2 access token + /// ID of user that owns this measurement + /// The ID of the client application which originally stored the measurement + /// The id for the connector data source from which the measurement was obtained + /// ID of the variable for which we are creating the measurement records + /// Application or device used to record the measurement values + /// start time for the measurement event. Use ISO 8601 datetime format + /// The value of the measurement after conversion to the default unit for that variable + /// The default unit id for the variable + /// Unconverted value of measurement as originally posted (before conversion to default unit) + /// Unit id of the measurement as originally submitted + /// Duration of the event being measurement in seconds + /// An optional note the user may include with their measurement + /// Latitude at which the measurement was taken + /// Longitude at which the measurement was taken + /// Optional human readable name for the location where the measurement was recorded + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// An error message if there is a problem with the measurement + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of InlineResponse20013 + public async System.Threading.Tasks.Task MeasurementsGetAsync (string accessToken = null, int? userId = null, string clientId = null, int? connectorId = null, int? variableId = null, int? sourceId = null, string startTime = null, double? value = null, int? unitId = null, double? originalValue = null, int? originalUnitId = null, int? duration = null, string note = null, double? latitude = null, double? longitude = null, string location = null, string createdAt = null, string updatedAt = null, string error = null, int? limit = null, int? offset = null, string sort = null) + { + ApiResponse response = await MeasurementsGetAsyncWithHttpInfo(accessToken, userId, clientId, connectorId, variableId, sourceId, startTime, value, unitId, originalValue, originalUnitId, duration, note, latitude, longitude, location, createdAt, updatedAt, error, limit, offset, sort); + return response.Data; + + } + + /// + /// Get measurements for this user Measurements are any value that can be recorded like daily steps, a mood rating, or apples eaten. + /// + /// User's OAuth2 access token + /// ID of user that owns this measurement + /// The ID of the client application which originally stored the measurement + /// The id for the connector data source from which the measurement was obtained + /// ID of the variable for which we are creating the measurement records + /// Application or device used to record the measurement values + /// start time for the measurement event. Use ISO 8601 datetime format + /// The value of the measurement after conversion to the default unit for that variable + /// The default unit id for the variable + /// Unconverted value of measurement as originally posted (before conversion to default unit) + /// Unit id of the measurement as originally submitted + /// Duration of the event being measurement in seconds + /// An optional note the user may include with their measurement + /// Latitude at which the measurement was taken + /// Longitude at which the measurement was taken + /// Optional human readable name for the location where the measurement was recorded + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// An error message if there is a problem with the measurement + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of ApiResponse (InlineResponse20013) + public async System.Threading.Tasks.Task> MeasurementsGetAsyncWithHttpInfo (string accessToken = null, int? userId = null, string clientId = null, int? connectorId = null, int? variableId = null, int? sourceId = null, string startTime = null, double? value = null, int? unitId = null, double? originalValue = null, int? originalUnitId = null, int? duration = null, string note = null, double? latitude = null, double? longitude = null, string location = null, string createdAt = null, string updatedAt = null, string error = null, int? limit = null, int? offset = null, string sort = null) { @@ -364,54 +689,86 @@ public async System.Threading.Tasks.Task MeasurementsGetAsy String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (userId != null) queryParams.Add("user_id", ApiClient.ParameterToString(userId)); // query parameter - if (clientId != null) queryParams.Add("client_id", ApiClient.ParameterToString(clientId)); // query parameter - if (connectorId != null) queryParams.Add("connector_id", ApiClient.ParameterToString(connectorId)); // query parameter - if (variableId != null) queryParams.Add("variable_id", ApiClient.ParameterToString(variableId)); // query parameter - if (startTime != null) queryParams.Add("start_time", ApiClient.ParameterToString(startTime)); // query parameter - if (value != null) queryParams.Add("value", ApiClient.ParameterToString(value)); // query parameter - if (originalValue != null) queryParams.Add("original_value", ApiClient.ParameterToString(originalValue)); // query parameter - if (duration != null) queryParams.Add("duration", ApiClient.ParameterToString(duration)); // query parameter - if (note != null) queryParams.Add("note", ApiClient.ParameterToString(note)); // query parameter - if (latitude != null) queryParams.Add("latitude", ApiClient.ParameterToString(latitude)); // query parameter - if (longitude != null) queryParams.Add("longitude", ApiClient.ParameterToString(longitude)); // query parameter - if (location != null) queryParams.Add("location", ApiClient.ParameterToString(location)); // query parameter - if (createdAt != null) queryParams.Add("created_at", ApiClient.ParameterToString(createdAt)); // query parameter - if (updatedAt != null) queryParams.Add("updated_at", ApiClient.ParameterToString(updatedAt)); // query parameter - if (error != null) queryParams.Add("error", ApiClient.ParameterToString(error)); // query parameter - if (limit != null) queryParams.Add("limit", ApiClient.ParameterToString(limit)); // query parameter - if (offset != null) queryParams.Add("offset", ApiClient.ParameterToString(offset)); // query parameter - if (sort != null) queryParams.Add("sort", ApiClient.ParameterToString(sort)); // query parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + if (userId != null) queryParams.Add("user_id", Configuration.ApiClient.ParameterToString(userId)); // query parameter + if (clientId != null) queryParams.Add("client_id", Configuration.ApiClient.ParameterToString(clientId)); // query parameter + if (connectorId != null) queryParams.Add("connector_id", Configuration.ApiClient.ParameterToString(connectorId)); // query parameter + if (variableId != null) queryParams.Add("variable_id", Configuration.ApiClient.ParameterToString(variableId)); // query parameter + if (sourceId != null) queryParams.Add("source_id", Configuration.ApiClient.ParameterToString(sourceId)); // query parameter + if (startTime != null) queryParams.Add("start_time", Configuration.ApiClient.ParameterToString(startTime)); // query parameter + if (value != null) queryParams.Add("value", Configuration.ApiClient.ParameterToString(value)); // query parameter + if (unitId != null) queryParams.Add("unit_id", Configuration.ApiClient.ParameterToString(unitId)); // query parameter + if (originalValue != null) queryParams.Add("original_value", Configuration.ApiClient.ParameterToString(originalValue)); // query parameter + if (originalUnitId != null) queryParams.Add("original_unit_id", Configuration.ApiClient.ParameterToString(originalUnitId)); // query parameter + if (duration != null) queryParams.Add("duration", Configuration.ApiClient.ParameterToString(duration)); // query parameter + if (note != null) queryParams.Add("note", Configuration.ApiClient.ParameterToString(note)); // query parameter + if (latitude != null) queryParams.Add("latitude", Configuration.ApiClient.ParameterToString(latitude)); // query parameter + if (longitude != null) queryParams.Add("longitude", Configuration.ApiClient.ParameterToString(longitude)); // query parameter + if (location != null) queryParams.Add("location", Configuration.ApiClient.ParameterToString(location)); // query parameter + if (createdAt != null) queryParams.Add("created_at", Configuration.ApiClient.ParameterToString(createdAt)); // query parameter + if (updatedAt != null) queryParams.Add("updated_at", Configuration.ApiClient.ParameterToString(updatedAt)); // query parameter + if (error != null) queryParams.Add("error", Configuration.ApiClient.ParameterToString(error)); // query parameter + if (limit != null) queryParams.Add("limit", Configuration.ApiClient.ParameterToString(limit)); // query parameter + if (offset != null) queryParams.Add("offset", Configuration.ApiClient.ParameterToString(offset)); // query parameter + if (sort != null) queryParams.Add("sort", Configuration.ApiClient.ParameterToString(sort)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; - + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling MeasurementsGet: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling MeasurementsGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling MeasurementsGet: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse20011) ApiClient.Deserialize(response, typeof(InlineResponse20011)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20013) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20013))); + } /// - /// Store Measurement Store Measurement + /// Post a new set or update existing measurements to the database You can submit or update multiple measurements in a measurements sub-array. If the variable these measurements correspond to does not already exist in the database, it will be automatically added. /// + /// User's OAuth2 access token /// Measurement that should be stored - /// InlineResponse20011 - public InlineResponse20011 MeasurementsPost (MeasurementPost body) + /// InlineResponse20013 + public InlineResponse20013 MeasurementsPost (string accessToken = null, MeasurementPost body = null) + { + ApiResponse response = MeasurementsPostWithHttpInfo(accessToken, body); + return response.Data; + } + + /// + /// Post a new set or update existing measurements to the database You can submit or update multiple measurements in a measurements sub-array. If the variable these measurements correspond to does not already exist in the database, it will be automatically added. + /// + /// User's OAuth2 access token + /// Measurement that should be stored + /// ApiResponse of InlineResponse20013 + public ApiResponse< InlineResponse20013 > MeasurementsPostWithHttpInfo (string accessToken = null, MeasurementPost body = null) { @@ -419,7 +776,7 @@ public InlineResponse20011 MeasurementsPost (MeasurementPost body) var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -428,40 +785,67 @@ public InlineResponse20011 MeasurementsPost (MeasurementPost body) String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - postBody = ApiClient.Serialize(body); // http body (model) parameter + postBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter + + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } - - // authentication setting, if any - String[] authSettings = new String[] { }; // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling MeasurementsPost: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling MeasurementsPost: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling MeasurementsPost: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling MeasurementsPost: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse20011) ApiClient.Deserialize(response, typeof(InlineResponse20011)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20013) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20013))); + } /// - /// Store Measurement Store Measurement + /// Post a new set or update existing measurements to the database You can submit or update multiple measurements in a measurements sub-array. If the variable these measurements correspond to does not already exist in the database, it will be automatically added. + /// + /// User's OAuth2 access token + /// Measurement that should be stored + /// Task of InlineResponse20013 + public async System.Threading.Tasks.Task MeasurementsPostAsync (string accessToken = null, MeasurementPost body = null) + { + ApiResponse response = await MeasurementsPostAsyncWithHttpInfo(accessToken, body); + return response.Data; + + } + + /// + /// Post a new set or update existing measurements to the database You can submit or update multiple measurements in a measurements sub-array. If the variable these measurements correspond to does not already exist in the database, it will be automatically added. /// + /// User's OAuth2 access token /// Measurement that should be stored - /// InlineResponse20011 - public async System.Threading.Tasks.Task MeasurementsPostAsync (MeasurementPost body) + /// Task of ApiResponse (InlineResponse20013) + public async System.Threading.Tasks.Task> MeasurementsPostAsyncWithHttpInfo (string accessToken = null, MeasurementPost body = null) { @@ -478,36 +862,64 @@ public async System.Threading.Tasks.Task MeasurementsPostAs String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - postBody = ApiClient.Serialize(body); // http body (model) parameter + postBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; - + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling MeasurementsPost: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling MeasurementsPost: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling MeasurementsPost: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse20011) ApiClient.Deserialize(response, typeof(InlineResponse20011)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20013) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20013))); + } /// /// Get Measurements CSV Download a CSV containing all user measurements /// - /// Stream - public Stream MeasurementsCsvGet () + /// User's OAuth2 access token + /// Stream + public Stream MeasurementsCsvGet (string accessToken = null) + { + ApiResponse response = MeasurementsCsvGetWithHttpInfo(accessToken); + return response.Data; + } + + /// + /// Get Measurements CSV Download a CSV containing all user measurements + /// + /// User's OAuth2 access token + /// ApiResponse of Stream + public ApiResponse< Stream > MeasurementsCsvGetWithHttpInfo (string accessToken = null) { @@ -515,7 +927,7 @@ public Stream MeasurementsCsvGet () var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -524,38 +936,64 @@ public Stream MeasurementsCsvGet () String[] http_header_accepts = new String[] { "text/csv" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling MeasurementsCsvGet: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling MeasurementsCsvGet: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling MeasurementsCsvGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling MeasurementsCsvGet: " + response.ErrorMessage, response.ErrorMessage); - return (Stream) ApiClient.Deserialize(response, typeof(Stream)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (Stream) Configuration.ApiClient.Deserialize(response, typeof(Stream))); + } /// /// Get Measurements CSV Download a CSV containing all user measurements /// - /// Stream - public async System.Threading.Tasks.Task MeasurementsCsvGetAsync () + /// User's OAuth2 access token + /// Task of Stream + public async System.Threading.Tasks.Task MeasurementsCsvGetAsync (string accessToken = null) + { + ApiResponse response = await MeasurementsCsvGetAsyncWithHttpInfo(accessToken); + return response.Data; + + } + + /// + /// Get Measurements CSV Download a CSV containing all user measurements + /// + /// User's OAuth2 access token + /// Task of ApiResponse (Stream) + public async System.Threading.Tasks.Task> MeasurementsCsvGetAsyncWithHttpInfo (string accessToken = null) { @@ -572,35 +1010,63 @@ public async System.Threading.Tasks.Task MeasurementsCsvGetAsync () String[] http_header_accepts = new String[] { "text/csv" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; - + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling MeasurementsCsvGet: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling MeasurementsCsvGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling MeasurementsCsvGet: " + response.ErrorMessage, response.ErrorMessage); - return (Stream) ApiClient.Deserialize(response, typeof(Stream)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (Stream) Configuration.ApiClient.Deserialize(response, typeof(Stream))); + } /// /// Post Request for Measurements CSV Use this endpoint to schedule a CSV export containing all user measurements to be emailed to the user within 24 hours. /// - /// int? - public int? MeasurementsRequestCsvPost () + /// User's OAuth2 access token + /// int? + public int? MeasurementsRequestCsvPost (string accessToken = null) + { + ApiResponse response = MeasurementsRequestCsvPostWithHttpInfo(accessToken); + return response.Data; + } + + /// + /// Post Request for Measurements CSV Use this endpoint to schedule a CSV export containing all user measurements to be emailed to the user within 24 hours. + /// + /// User's OAuth2 access token + /// ApiResponse of int? + public ApiResponse< int? > MeasurementsRequestCsvPostWithHttpInfo (string accessToken = null) { @@ -608,7 +1074,7 @@ public async System.Threading.Tasks.Task MeasurementsCsvGetAsync () var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -617,38 +1083,64 @@ public async System.Threading.Tasks.Task MeasurementsCsvGetAsync () String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling MeasurementsRequestCsvPost: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling MeasurementsRequestCsvPost: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling MeasurementsRequestCsvPost: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling MeasurementsRequestCsvPost: " + response.ErrorMessage, response.ErrorMessage); - return (int?) ApiClient.Deserialize(response, typeof(int?)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (int?) Configuration.ApiClient.Deserialize(response, typeof(int?))); + } /// /// Post Request for Measurements CSV Use this endpoint to schedule a CSV export containing all user measurements to be emailed to the user within 24 hours. /// - /// int? - public async System.Threading.Tasks.Task MeasurementsRequestCsvPostAsync () + /// User's OAuth2 access token + /// Task of int? + public async System.Threading.Tasks.Task MeasurementsRequestCsvPostAsync (string accessToken = null) + { + ApiResponse response = await MeasurementsRequestCsvPostAsyncWithHttpInfo(accessToken); + return response.Data; + + } + + /// + /// Post Request for Measurements CSV Use this endpoint to schedule a CSV export containing all user measurements to be emailed to the user within 24 hours. + /// + /// User's OAuth2 access token + /// Task of ApiResponse (int?) + public async System.Threading.Tasks.Task> MeasurementsRequestCsvPostAsyncWithHttpInfo (string accessToken = null) { @@ -665,36 +1157,65 @@ public async System.Threading.Tasks.Task MeasurementsCsvGetAsync () String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; - + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling MeasurementsRequestCsvPost: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling MeasurementsRequestCsvPost: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling MeasurementsRequestCsvPost: " + response.ErrorMessage, response.ErrorMessage); - return (int?) ApiClient.Deserialize(response, typeof(int?)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (int?) Configuration.ApiClient.Deserialize(response, typeof(int?))); + } /// /// Get Measurement Get Measurement /// /// id of Measurement - /// InlineResponse20012 - public InlineResponse20012 MeasurementsIdGet (int? id) + /// User's OAuth2 access token + /// InlineResponse20014 + public InlineResponse20014 MeasurementsIdGet (int? id, string accessToken = null) + { + ApiResponse response = MeasurementsIdGetWithHttpInfo(id, accessToken); + return response.Data; + } + + /// + /// Get Measurement Get Measurement + /// + /// id of Measurement + /// User's OAuth2 access token + /// ApiResponse of InlineResponse20014 + public ApiResponse< InlineResponse20014 > MeasurementsIdGetWithHttpInfo (int? id, string accessToken = null) { // verify the required parameter 'id' is set @@ -705,7 +1226,7 @@ public InlineResponse20012 MeasurementsIdGet (int? id) var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -714,40 +1235,67 @@ public InlineResponse20012 MeasurementsIdGet (int? id) String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling MeasurementsIdGet: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling MeasurementsIdGet: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling MeasurementsIdGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling MeasurementsIdGet: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse20012) ApiClient.Deserialize(response, typeof(InlineResponse20012)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20014) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20014))); + } /// /// Get Measurement Get Measurement /// /// id of Measurement - /// InlineResponse20012 - public async System.Threading.Tasks.Task MeasurementsIdGetAsync (int? id) + /// User's OAuth2 access token + /// Task of InlineResponse20014 + public async System.Threading.Tasks.Task MeasurementsIdGetAsync (int? id, string accessToken = null) + { + ApiResponse response = await MeasurementsIdGetAsyncWithHttpInfo(id, accessToken); + return response.Data; + + } + + /// + /// Get Measurement Get Measurement + /// + /// id of Measurement + /// User's OAuth2 access token + /// Task of ApiResponse (InlineResponse20014) + public async System.Threading.Tasks.Task> MeasurementsIdGetAsyncWithHttpInfo (int? id, string accessToken = null) { // verify the required parameter 'id' is set if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling MeasurementsIdGet"); @@ -766,38 +1314,68 @@ public async System.Threading.Tasks.Task MeasurementsIdGetA String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; - + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling MeasurementsIdGet: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling MeasurementsIdGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling MeasurementsIdGet: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse20012) ApiClient.Deserialize(response, typeof(InlineResponse20012)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20014) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20014))); + } /// /// Update Measurement Update Measurement /// /// id of Measurement + /// User's OAuth2 access token /// Measurement that should be updated - /// InlineResponse2002 - public InlineResponse2002 MeasurementsIdPut (int? id, Measurement body) + /// InlineResponse2002 + public InlineResponse2002 MeasurementsIdPut (int? id, string accessToken = null, Measurement body = null) + { + ApiResponse response = MeasurementsIdPutWithHttpInfo(id, accessToken, body); + return response.Data; + } + + /// + /// Update Measurement Update Measurement + /// + /// id of Measurement + /// User's OAuth2 access token + /// Measurement that should be updated + /// ApiResponse of InlineResponse2002 + public ApiResponse< InlineResponse2002 > MeasurementsIdPutWithHttpInfo (int? id, string accessToken = null, Measurement body = null) { // verify the required parameter 'id' is set @@ -808,7 +1386,7 @@ public InlineResponse2002 MeasurementsIdPut (int? id, Measurement body) var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -817,42 +1395,70 @@ public InlineResponse2002 MeasurementsIdPut (int? id, Measurement body) String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - postBody = ApiClient.Serialize(body); // http body (model) parameter + postBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter + + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } - - // authentication setting, if any - String[] authSettings = new String[] { }; // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling MeasurementsIdPut: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling MeasurementsIdPut: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling MeasurementsIdPut: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling MeasurementsIdPut: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse2002) ApiClient.Deserialize(response, typeof(InlineResponse2002)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2002) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2002))); + } /// /// Update Measurement Update Measurement /// /// id of Measurement + /// User's OAuth2 access token /// Measurement that should be updated - /// InlineResponse2002 - public async System.Threading.Tasks.Task MeasurementsIdPutAsync (int? id, Measurement body) + /// Task of InlineResponse2002 + public async System.Threading.Tasks.Task MeasurementsIdPutAsync (int? id, string accessToken = null, Measurement body = null) + { + ApiResponse response = await MeasurementsIdPutAsyncWithHttpInfo(id, accessToken, body); + return response.Data; + + } + + /// + /// Update Measurement Update Measurement + /// + /// id of Measurement + /// User's OAuth2 access token + /// Measurement that should be updated + /// Task of ApiResponse (InlineResponse2002) + public async System.Threading.Tasks.Task> MeasurementsIdPutAsyncWithHttpInfo (int? id, string accessToken = null, Measurement body = null) { // verify the required parameter 'id' is set if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling MeasurementsIdPut"); @@ -871,38 +1477,67 @@ public async System.Threading.Tasks.Task MeasurementsIdPutAs String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - postBody = ApiClient.Serialize(body); // http body (model) parameter + postBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; - + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling MeasurementsIdPut: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling MeasurementsIdPut: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling MeasurementsIdPut: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse2002) ApiClient.Deserialize(response, typeof(InlineResponse2002)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2002) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2002))); + } /// /// Delete Measurement Delete Measurement /// /// id of Measurement - /// InlineResponse2002 - public InlineResponse2002 MeasurementsIdDelete (int? id) + /// User's OAuth2 access token + /// InlineResponse2002 + public InlineResponse2002 MeasurementsIdDelete (int? id, string accessToken = null) + { + ApiResponse response = MeasurementsIdDeleteWithHttpInfo(id, accessToken); + return response.Data; + } + + /// + /// Delete Measurement Delete Measurement + /// + /// id of Measurement + /// User's OAuth2 access token + /// ApiResponse of InlineResponse2002 + public ApiResponse< InlineResponse2002 > MeasurementsIdDeleteWithHttpInfo (int? id, string accessToken = null) { // verify the required parameter 'id' is set @@ -913,7 +1548,7 @@ public InlineResponse2002 MeasurementsIdDelete (int? id) var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -922,40 +1557,67 @@ public InlineResponse2002 MeasurementsIdDelete (int? id) String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling MeasurementsIdDelete: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling MeasurementsIdDelete: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling MeasurementsIdDelete: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling MeasurementsIdDelete: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse2002) ApiClient.Deserialize(response, typeof(InlineResponse2002)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2002) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2002))); + } /// /// Delete Measurement Delete Measurement /// /// id of Measurement - /// InlineResponse2002 - public async System.Threading.Tasks.Task MeasurementsIdDeleteAsync (int? id) + /// User's OAuth2 access token + /// Task of InlineResponse2002 + public async System.Threading.Tasks.Task MeasurementsIdDeleteAsync (int? id, string accessToken = null) + { + ApiResponse response = await MeasurementsIdDeleteAsyncWithHttpInfo(id, accessToken); + return response.Data; + + } + + /// + /// Delete Measurement Delete Measurement + /// + /// id of Measurement + /// User's OAuth2 access token + /// Task of ApiResponse (InlineResponse2002) + public async System.Threading.Tasks.Task> MeasurementsIdDeleteAsyncWithHttpInfo (int? id, string accessToken = null) { // verify the required parameter 'id' is set if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling MeasurementsIdDelete"); @@ -974,29 +1636,45 @@ public async System.Threading.Tasks.Task MeasurementsIdDelet String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; - + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling MeasurementsIdDelete: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams); - return (InlineResponse2002) ApiClient.Deserialize(response, typeof(InlineResponse2002)); + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling MeasurementsIdDelete: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling MeasurementsIdDelete: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2002) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2002))); + } } diff --git a/src/main/csharp/io/swagger/Api/OrganizationApi.cs b/src/main/csharp/io/swagger/Api/OrganizationApi.cs new file mode 100644 index 0000000..a884f6f --- /dev/null +++ b/src/main/csharp/io/swagger/Api/OrganizationApi.cs @@ -0,0 +1,2003 @@ +using System; +using System.IO; +using System.Collections.Generic; +using System.Linq; +using RestSharp; +using IO.Swagger.Client; +using IO.Swagger.Model; + +namespace IO.Swagger.Api +{ + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IOrganizationApi + { + + /// + /// Get all Connections + /// + /// + /// Get all Connections + /// + /// Organization's OAuth2 access token + /// The id for the connector data source for which the connection is connected + /// Indicates whether a connector is currently connected to a service for a user. + /// Error message if there is a problem with authorizing this connection. + /// Time at which an update was requested by a user. + /// Indicates whether a connector is currently updated. + /// Indicates if there was an error during the update. + /// The time at which the connector was last successfully updated. + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// InlineResponse2005 + InlineResponse2005 OrganizationConnectionsGet (string accessToken = null, int? connectorId = null, string connectStatus = null, string connectError = null, string updateRequestedAt = null, string updateStatus = null, string updateError = null, string lastSuccessfulUpdatedAt = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Get all Connections + /// + /// + /// Get all Connections + /// + /// Organization's OAuth2 access token + /// The id for the connector data source for which the connection is connected + /// Indicates whether a connector is currently connected to a service for a user. + /// Error message if there is a problem with authorizing this connection. + /// Time at which an update was requested by a user. + /// Indicates whether a connector is currently updated. + /// Indicates if there was an error during the update. + /// The time at which the connector was last successfully updated. + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// ApiResponse of InlineResponse2005 + ApiResponse OrganizationConnectionsGetWithHttpInfo (string accessToken = null, int? connectorId = null, string connectStatus = null, string connectError = null, string updateRequestedAt = null, string updateStatus = null, string updateError = null, string lastSuccessfulUpdatedAt = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Get all Connections + /// + /// + /// Get all Connections + /// + /// Organization's OAuth2 access token + /// The id for the connector data source for which the connection is connected + /// Indicates whether a connector is currently connected to a service for a user. + /// Error message if there is a problem with authorizing this connection. + /// Time at which an update was requested by a user. + /// Indicates whether a connector is currently updated. + /// Indicates if there was an error during the update. + /// The time at which the connector was last successfully updated. + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of InlineResponse2005 + System.Threading.Tasks.Task OrganizationConnectionsGetAsync (string accessToken = null, int? connectorId = null, string connectStatus = null, string connectError = null, string updateRequestedAt = null, string updateStatus = null, string updateError = null, string lastSuccessfulUpdatedAt = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Get all Connections + /// + /// + /// Get all Connections + /// + /// Organization's OAuth2 access token + /// The id for the connector data source for which the connection is connected + /// Indicates whether a connector is currently connected to a service for a user. + /// Error message if there is a problem with authorizing this connection. + /// Time at which an update was requested by a user. + /// Indicates whether a connector is currently updated. + /// Indicates if there was an error during the update. + /// The time at which the connector was last successfully updated. + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of ApiResponse (InlineResponse2005) + System.Threading.Tasks.Task> OrganizationConnectionsGetAsyncWithHttpInfo (string accessToken = null, int? connectorId = null, string connectStatus = null, string connectError = null, string updateRequestedAt = null, string updateStatus = null, string updateError = null, string lastSuccessfulUpdatedAt = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Get all Credentials + /// + /// + /// Get all Credentials + /// + /// Organization's OAuth2 access token + /// The id for the connector data source from which the credential was obtained + /// Attribute name such as token, userid, username, or password + /// Encrypted value for the attribute specified + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// InlineResponse20011 + InlineResponse20011 OrganizationCredentialsGet (string accessToken = null, int? connectorId = null, string attrKey = null, string attrValue = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Get all Credentials + /// + /// + /// Get all Credentials + /// + /// Organization's OAuth2 access token + /// The id for the connector data source from which the credential was obtained + /// Attribute name such as token, userid, username, or password + /// Encrypted value for the attribute specified + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// ApiResponse of InlineResponse20011 + ApiResponse OrganizationCredentialsGetWithHttpInfo (string accessToken = null, int? connectorId = null, string attrKey = null, string attrValue = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Get all Credentials + /// + /// + /// Get all Credentials + /// + /// Organization's OAuth2 access token + /// The id for the connector data source from which the credential was obtained + /// Attribute name such as token, userid, username, or password + /// Encrypted value for the attribute specified + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of InlineResponse20011 + System.Threading.Tasks.Task OrganizationCredentialsGetAsync (string accessToken = null, int? connectorId = null, string attrKey = null, string attrValue = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Get all Credentials + /// + /// + /// Get all Credentials + /// + /// Organization's OAuth2 access token + /// The id for the connector data source from which the credential was obtained + /// Attribute name such as token, userid, username, or password + /// Encrypted value for the attribute specified + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of ApiResponse (InlineResponse20011) + System.Threading.Tasks.Task> OrganizationCredentialsGetAsyncWithHttpInfo (string accessToken = null, int? connectorId = null, string attrKey = null, string attrValue = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Get measurements for all users using your application + /// + /// + /// Measurements are any value that can be recorded like daily steps, a mood rating, or apples eaten. + /// + /// Organization's OAuth2 access token + /// The ID of the client application which originally stored the measurement + /// The id for the connector data source from which the measurement was obtained + /// ID of the variable for which we are creating the measurement records + /// Application or device used to record the measurement values + /// start time for the measurement event. Use ISO 8601 datetime format + /// The value of the measurement after conversion to the default unit for that variable + /// The default unit id for the variable + /// Unconverted value of measurement as originally posted (before conversion to default unit) + /// Unit id of the measurement as originally submitted + /// Duration of the event being measurement in seconds + /// An optional note the user may include with their measurement + /// Latitude at which the measurement was taken + /// Longitude at which the measurement was taken + /// Optional human readable name for the location where the measurement was recorded + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// An error message if there is a problem with the measurement + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// InlineResponse20013 + InlineResponse20013 OrganizationMeasurementsGet (string accessToken = null, string clientId = null, int? connectorId = null, int? variableId = null, int? sourceId = null, string startTime = null, double? value = null, int? unitId = null, double? originalValue = null, int? originalUnitId = null, int? duration = null, string note = null, double? latitude = null, double? longitude = null, string location = null, string createdAt = null, string updatedAt = null, string error = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Get measurements for all users using your application + /// + /// + /// Measurements are any value that can be recorded like daily steps, a mood rating, or apples eaten. + /// + /// Organization's OAuth2 access token + /// The ID of the client application which originally stored the measurement + /// The id for the connector data source from which the measurement was obtained + /// ID of the variable for which we are creating the measurement records + /// Application or device used to record the measurement values + /// start time for the measurement event. Use ISO 8601 datetime format + /// The value of the measurement after conversion to the default unit for that variable + /// The default unit id for the variable + /// Unconverted value of measurement as originally posted (before conversion to default unit) + /// Unit id of the measurement as originally submitted + /// Duration of the event being measurement in seconds + /// An optional note the user may include with their measurement + /// Latitude at which the measurement was taken + /// Longitude at which the measurement was taken + /// Optional human readable name for the location where the measurement was recorded + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// An error message if there is a problem with the measurement + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// ApiResponse of InlineResponse20013 + ApiResponse OrganizationMeasurementsGetWithHttpInfo (string accessToken = null, string clientId = null, int? connectorId = null, int? variableId = null, int? sourceId = null, string startTime = null, double? value = null, int? unitId = null, double? originalValue = null, int? originalUnitId = null, int? duration = null, string note = null, double? latitude = null, double? longitude = null, string location = null, string createdAt = null, string updatedAt = null, string error = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Get measurements for all users using your application + /// + /// + /// Measurements are any value that can be recorded like daily steps, a mood rating, or apples eaten. + /// + /// Organization's OAuth2 access token + /// The ID of the client application which originally stored the measurement + /// The id for the connector data source from which the measurement was obtained + /// ID of the variable for which we are creating the measurement records + /// Application or device used to record the measurement values + /// start time for the measurement event. Use ISO 8601 datetime format + /// The value of the measurement after conversion to the default unit for that variable + /// The default unit id for the variable + /// Unconverted value of measurement as originally posted (before conversion to default unit) + /// Unit id of the measurement as originally submitted + /// Duration of the event being measurement in seconds + /// An optional note the user may include with their measurement + /// Latitude at which the measurement was taken + /// Longitude at which the measurement was taken + /// Optional human readable name for the location where the measurement was recorded + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// An error message if there is a problem with the measurement + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of InlineResponse20013 + System.Threading.Tasks.Task OrganizationMeasurementsGetAsync (string accessToken = null, string clientId = null, int? connectorId = null, int? variableId = null, int? sourceId = null, string startTime = null, double? value = null, int? unitId = null, double? originalValue = null, int? originalUnitId = null, int? duration = null, string note = null, double? latitude = null, double? longitude = null, string location = null, string createdAt = null, string updatedAt = null, string error = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Get measurements for all users using your application + /// + /// + /// Measurements are any value that can be recorded like daily steps, a mood rating, or apples eaten. + /// + /// Organization's OAuth2 access token + /// The ID of the client application which originally stored the measurement + /// The id for the connector data source from which the measurement was obtained + /// ID of the variable for which we are creating the measurement records + /// Application or device used to record the measurement values + /// start time for the measurement event. Use ISO 8601 datetime format + /// The value of the measurement after conversion to the default unit for that variable + /// The default unit id for the variable + /// Unconverted value of measurement as originally posted (before conversion to default unit) + /// Unit id of the measurement as originally submitted + /// Duration of the event being measurement in seconds + /// An optional note the user may include with their measurement + /// Latitude at which the measurement was taken + /// Longitude at which the measurement was taken + /// Optional human readable name for the location where the measurement was recorded + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// An error message if there is a problem with the measurement + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of ApiResponse (InlineResponse20013) + System.Threading.Tasks.Task> OrganizationMeasurementsGetAsyncWithHttpInfo (string accessToken = null, string clientId = null, int? connectorId = null, int? variableId = null, int? sourceId = null, string startTime = null, double? value = null, int? unitId = null, double? originalValue = null, int? originalUnitId = null, int? duration = null, string note = null, double? latitude = null, double? longitude = null, string location = null, string createdAt = null, string updatedAt = null, string error = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Get all Updates + /// + /// + /// Get all Updates + /// + /// Organization's OAuth2 access token + /// connector_id + /// number_of_measurements + /// success + /// message + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// InlineResponse20015 + InlineResponse20015 OrganizationUpdatesGet (string accessToken = null, int? connectorId = null, int? numberOfMeasurements = null, bool? success = null, string message = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Get all Updates + /// + /// + /// Get all Updates + /// + /// Organization's OAuth2 access token + /// connector_id + /// number_of_measurements + /// success + /// message + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// ApiResponse of InlineResponse20015 + ApiResponse OrganizationUpdatesGetWithHttpInfo (string accessToken = null, int? connectorId = null, int? numberOfMeasurements = null, bool? success = null, string message = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Get all Updates + /// + /// + /// Get all Updates + /// + /// Organization's OAuth2 access token + /// connector_id + /// number_of_measurements + /// success + /// message + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of InlineResponse20015 + System.Threading.Tasks.Task OrganizationUpdatesGetAsync (string accessToken = null, int? connectorId = null, int? numberOfMeasurements = null, bool? success = null, string message = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Get all Updates + /// + /// + /// Get all Updates + /// + /// Organization's OAuth2 access token + /// connector_id + /// number_of_measurements + /// success + /// message + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of ApiResponse (InlineResponse20015) + System.Threading.Tasks.Task> OrganizationUpdatesGetAsyncWithHttpInfo (string accessToken = null, int? connectorId = null, int? numberOfMeasurements = null, bool? success = null, string message = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Get all UserVariables + /// + /// + /// Get all UserVariables + /// + /// User's OAuth2 access token + /// The ID of the client application which last created or updated this user variable + /// ID of the parent variable if this variable has any parent + /// ID of variable + /// D of unit to use for this variable + /// Minimum reasonable value for this variable (uses default unit) + /// Maximum reasonable value for this variable (uses default unit) + /// Value for replacing null measurements + /// The Variable this Variable should be joined with. If the variable is joined with some other variable then it is not shown to user in the list of variables + /// Estimated number of seconds that pass before a stimulus produces a perceivable effect + /// Estimated duration of time following the onset delay in which a stimulus produces a perceivable effect + /// ID of variable category + /// updated + /// Is variable public + /// A value of 1 indicates that this variable is generally a cause in a causal relationship. An example of a causeOnly variable would be a variable such as Cloud Cover which would generally not be influenced by the behaviour of the user + /// 0 -> No filling, 1 -> Use filling-value + /// Number of measurements + /// Number of processed measurements + /// Number of measurements at last analysis + /// ID of last Unit + /// ID of last original Unit + /// Last original value which is stored + /// Last Value + /// Last original value which is stored + /// ID of last source + /// Number of correlations for this variable + /// status + /// error_message + /// When this variable or its settings were last updated + /// Standard deviation + /// Variance + /// Minimum recorded value of this variable + /// Maximum recorded value of this variable + /// Mean + /// Median + /// Most common Unit ID + /// Most common value + /// Number of unique daily values + /// Number of changes + /// Skewness + /// Kurtosis + /// Latitude + /// Longitude + /// Location + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// Outcome variables (those with `outcome` == 1) are variables for which a human would generally want to identify the influencing factors. These include symptoms of illness, physique, mood, cognitive performance, etc. Generally correlation calculations are only performed on outcome variables + /// Comma-separated list of source names to limit variables to those sources + /// Earliest source time + /// Latest source time + /// Earliest measurement time + /// Latest measurement time + /// Earliest filling time + /// Latest filling time + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// InlineResponse20016 + InlineResponse20016 OrganizationUserVariablesGet (string accessToken = null, string clientId = null, int? parentId = null, int? variableId = null, int? defaultUnitId = null, double? minimumAllowedValue = null, double? maximumAllowedValue = null, double? fillingValue = null, int? joinWith = null, int? onsetDelay = null, int? durationOfAction = null, int? variableCategoryId = null, int? updated = null, int? _public = null, bool? causeOnly = null, string fillingType = null, int? numberOfMeasurements = null, int? numberOfProcessedMeasurements = null, int? measurementsAtLastAnalysis = null, int? lastUnitId = null, int? lastOriginalUnitId = null, int? lastOriginalValue = null, double? lastValue = null, double? lastOriginalValue2 = null, int? lastSourceId = null, int? numberOfCorrelations = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, double? standardDeviation = null, double? variance = null, double? minimumRecordedValue = null, double? maximumRecordedValue = null, double? mean = null, double? median = null, int? mostCommonUnitId = null, double? mostCommonValue = null, double? numberOfUniqueDailyValues = null, int? numberOfChanges = null, double? skewness = null, double? kurtosis = null, double? latitude = null, double? longitude = null, string location = null, string createdAt = null, string updatedAt = null, bool? outcome = null, string sources = null, int? earliestSourceTime = null, int? latestSourceTime = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, int? earliestFillingTime = null, int? latestFillingTime = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Get all UserVariables + /// + /// + /// Get all UserVariables + /// + /// User's OAuth2 access token + /// The ID of the client application which last created or updated this user variable + /// ID of the parent variable if this variable has any parent + /// ID of variable + /// D of unit to use for this variable + /// Minimum reasonable value for this variable (uses default unit) + /// Maximum reasonable value for this variable (uses default unit) + /// Value for replacing null measurements + /// The Variable this Variable should be joined with. If the variable is joined with some other variable then it is not shown to user in the list of variables + /// Estimated number of seconds that pass before a stimulus produces a perceivable effect + /// Estimated duration of time following the onset delay in which a stimulus produces a perceivable effect + /// ID of variable category + /// updated + /// Is variable public + /// A value of 1 indicates that this variable is generally a cause in a causal relationship. An example of a causeOnly variable would be a variable such as Cloud Cover which would generally not be influenced by the behaviour of the user + /// 0 -> No filling, 1 -> Use filling-value + /// Number of measurements + /// Number of processed measurements + /// Number of measurements at last analysis + /// ID of last Unit + /// ID of last original Unit + /// Last original value which is stored + /// Last Value + /// Last original value which is stored + /// ID of last source + /// Number of correlations for this variable + /// status + /// error_message + /// When this variable or its settings were last updated + /// Standard deviation + /// Variance + /// Minimum recorded value of this variable + /// Maximum recorded value of this variable + /// Mean + /// Median + /// Most common Unit ID + /// Most common value + /// Number of unique daily values + /// Number of changes + /// Skewness + /// Kurtosis + /// Latitude + /// Longitude + /// Location + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// Outcome variables (those with `outcome` == 1) are variables for which a human would generally want to identify the influencing factors. These include symptoms of illness, physique, mood, cognitive performance, etc. Generally correlation calculations are only performed on outcome variables + /// Comma-separated list of source names to limit variables to those sources + /// Earliest source time + /// Latest source time + /// Earliest measurement time + /// Latest measurement time + /// Earliest filling time + /// Latest filling time + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// ApiResponse of InlineResponse20016 + ApiResponse OrganizationUserVariablesGetWithHttpInfo (string accessToken = null, string clientId = null, int? parentId = null, int? variableId = null, int? defaultUnitId = null, double? minimumAllowedValue = null, double? maximumAllowedValue = null, double? fillingValue = null, int? joinWith = null, int? onsetDelay = null, int? durationOfAction = null, int? variableCategoryId = null, int? updated = null, int? _public = null, bool? causeOnly = null, string fillingType = null, int? numberOfMeasurements = null, int? numberOfProcessedMeasurements = null, int? measurementsAtLastAnalysis = null, int? lastUnitId = null, int? lastOriginalUnitId = null, int? lastOriginalValue = null, double? lastValue = null, double? lastOriginalValue2 = null, int? lastSourceId = null, int? numberOfCorrelations = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, double? standardDeviation = null, double? variance = null, double? minimumRecordedValue = null, double? maximumRecordedValue = null, double? mean = null, double? median = null, int? mostCommonUnitId = null, double? mostCommonValue = null, double? numberOfUniqueDailyValues = null, int? numberOfChanges = null, double? skewness = null, double? kurtosis = null, double? latitude = null, double? longitude = null, string location = null, string createdAt = null, string updatedAt = null, bool? outcome = null, string sources = null, int? earliestSourceTime = null, int? latestSourceTime = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, int? earliestFillingTime = null, int? latestFillingTime = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Get all UserVariables + /// + /// + /// Get all UserVariables + /// + /// User's OAuth2 access token + /// The ID of the client application which last created or updated this user variable + /// ID of the parent variable if this variable has any parent + /// ID of variable + /// D of unit to use for this variable + /// Minimum reasonable value for this variable (uses default unit) + /// Maximum reasonable value for this variable (uses default unit) + /// Value for replacing null measurements + /// The Variable this Variable should be joined with. If the variable is joined with some other variable then it is not shown to user in the list of variables + /// Estimated number of seconds that pass before a stimulus produces a perceivable effect + /// Estimated duration of time following the onset delay in which a stimulus produces a perceivable effect + /// ID of variable category + /// updated + /// Is variable public + /// A value of 1 indicates that this variable is generally a cause in a causal relationship. An example of a causeOnly variable would be a variable such as Cloud Cover which would generally not be influenced by the behaviour of the user + /// 0 -> No filling, 1 -> Use filling-value + /// Number of measurements + /// Number of processed measurements + /// Number of measurements at last analysis + /// ID of last Unit + /// ID of last original Unit + /// Last original value which is stored + /// Last Value + /// Last original value which is stored + /// ID of last source + /// Number of correlations for this variable + /// status + /// error_message + /// When this variable or its settings were last updated + /// Standard deviation + /// Variance + /// Minimum recorded value of this variable + /// Maximum recorded value of this variable + /// Mean + /// Median + /// Most common Unit ID + /// Most common value + /// Number of unique daily values + /// Number of changes + /// Skewness + /// Kurtosis + /// Latitude + /// Longitude + /// Location + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// Outcome variables (those with `outcome` == 1) are variables for which a human would generally want to identify the influencing factors. These include symptoms of illness, physique, mood, cognitive performance, etc. Generally correlation calculations are only performed on outcome variables + /// Comma-separated list of source names to limit variables to those sources + /// Earliest source time + /// Latest source time + /// Earliest measurement time + /// Latest measurement time + /// Earliest filling time + /// Latest filling time + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of InlineResponse20016 + System.Threading.Tasks.Task OrganizationUserVariablesGetAsync (string accessToken = null, string clientId = null, int? parentId = null, int? variableId = null, int? defaultUnitId = null, double? minimumAllowedValue = null, double? maximumAllowedValue = null, double? fillingValue = null, int? joinWith = null, int? onsetDelay = null, int? durationOfAction = null, int? variableCategoryId = null, int? updated = null, int? _public = null, bool? causeOnly = null, string fillingType = null, int? numberOfMeasurements = null, int? numberOfProcessedMeasurements = null, int? measurementsAtLastAnalysis = null, int? lastUnitId = null, int? lastOriginalUnitId = null, int? lastOriginalValue = null, double? lastValue = null, double? lastOriginalValue2 = null, int? lastSourceId = null, int? numberOfCorrelations = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, double? standardDeviation = null, double? variance = null, double? minimumRecordedValue = null, double? maximumRecordedValue = null, double? mean = null, double? median = null, int? mostCommonUnitId = null, double? mostCommonValue = null, double? numberOfUniqueDailyValues = null, int? numberOfChanges = null, double? skewness = null, double? kurtosis = null, double? latitude = null, double? longitude = null, string location = null, string createdAt = null, string updatedAt = null, bool? outcome = null, string sources = null, int? earliestSourceTime = null, int? latestSourceTime = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, int? earliestFillingTime = null, int? latestFillingTime = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Get all UserVariables + /// + /// + /// Get all UserVariables + /// + /// User's OAuth2 access token + /// The ID of the client application which last created or updated this user variable + /// ID of the parent variable if this variable has any parent + /// ID of variable + /// D of unit to use for this variable + /// Minimum reasonable value for this variable (uses default unit) + /// Maximum reasonable value for this variable (uses default unit) + /// Value for replacing null measurements + /// The Variable this Variable should be joined with. If the variable is joined with some other variable then it is not shown to user in the list of variables + /// Estimated number of seconds that pass before a stimulus produces a perceivable effect + /// Estimated duration of time following the onset delay in which a stimulus produces a perceivable effect + /// ID of variable category + /// updated + /// Is variable public + /// A value of 1 indicates that this variable is generally a cause in a causal relationship. An example of a causeOnly variable would be a variable such as Cloud Cover which would generally not be influenced by the behaviour of the user + /// 0 -> No filling, 1 -> Use filling-value + /// Number of measurements + /// Number of processed measurements + /// Number of measurements at last analysis + /// ID of last Unit + /// ID of last original Unit + /// Last original value which is stored + /// Last Value + /// Last original value which is stored + /// ID of last source + /// Number of correlations for this variable + /// status + /// error_message + /// When this variable or its settings were last updated + /// Standard deviation + /// Variance + /// Minimum recorded value of this variable + /// Maximum recorded value of this variable + /// Mean + /// Median + /// Most common Unit ID + /// Most common value + /// Number of unique daily values + /// Number of changes + /// Skewness + /// Kurtosis + /// Latitude + /// Longitude + /// Location + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// Outcome variables (those with `outcome` == 1) are variables for which a human would generally want to identify the influencing factors. These include symptoms of illness, physique, mood, cognitive performance, etc. Generally correlation calculations are only performed on outcome variables + /// Comma-separated list of source names to limit variables to those sources + /// Earliest source time + /// Latest source time + /// Earliest measurement time + /// Latest measurement time + /// Earliest filling time + /// Latest filling time + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of ApiResponse (InlineResponse20016) + System.Threading.Tasks.Task> OrganizationUserVariablesGetAsyncWithHttpInfo (string accessToken = null, string clientId = null, int? parentId = null, int? variableId = null, int? defaultUnitId = null, double? minimumAllowedValue = null, double? maximumAllowedValue = null, double? fillingValue = null, int? joinWith = null, int? onsetDelay = null, int? durationOfAction = null, int? variableCategoryId = null, int? updated = null, int? _public = null, bool? causeOnly = null, string fillingType = null, int? numberOfMeasurements = null, int? numberOfProcessedMeasurements = null, int? measurementsAtLastAnalysis = null, int? lastUnitId = null, int? lastOriginalUnitId = null, int? lastOriginalValue = null, double? lastValue = null, double? lastOriginalValue2 = null, int? lastSourceId = null, int? numberOfCorrelations = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, double? standardDeviation = null, double? variance = null, double? minimumRecordedValue = null, double? maximumRecordedValue = null, double? mean = null, double? median = null, int? mostCommonUnitId = null, double? mostCommonValue = null, double? numberOfUniqueDailyValues = null, int? numberOfChanges = null, double? skewness = null, double? kurtosis = null, double? latitude = null, double? longitude = null, string location = null, string createdAt = null, string updatedAt = null, bool? outcome = null, string sources = null, int? earliestSourceTime = null, int? latestSourceTime = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, int? earliestFillingTime = null, int? latestFillingTime = null, int? limit = null, int? offset = null, string sort = null); + + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public class OrganizationApi : IOrganizationApi + { + /// + /// Initializes a new instance of the class. + /// + /// + public OrganizationApi(String basePath) + { + this.Configuration = new Configuration(new ApiClient(basePath)); + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public OrganizationApi(Configuration configuration = null) + { + if (configuration == null) // use the default one in Configuration + this.Configuration = Configuration.Default; + else + this.Configuration = configuration; + } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public String GetBasePath() + { + return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); + } + + /// + /// Sets the base path of the API client. + /// + /// The base path + [Obsolete("SetBasePath is deprecated, please do 'Configuraiton.ApiClient = new ApiClient(\"http://new-path\")' instead.")] + public void SetBasePath(String basePath) + { + // do nothing + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public Configuration Configuration {get; set;} + + /// + /// Gets the default header. + /// + /// Dictionary of HTTP header + [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] + public Dictionary DefaultHeader() + { + return this.Configuration.DefaultHeader; + } + + /// + /// Add default header. + /// + /// Header field name. + /// Header field value. + /// + [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] + public void AddDefaultHeader(string key, string value) + { + this.Configuration.AddDefaultHeader(key, value); + } + + + /// + /// Get all Connections Get all Connections + /// + /// Organization's OAuth2 access token + /// The id for the connector data source for which the connection is connected + /// Indicates whether a connector is currently connected to a service for a user. + /// Error message if there is a problem with authorizing this connection. + /// Time at which an update was requested by a user. + /// Indicates whether a connector is currently updated. + /// Indicates if there was an error during the update. + /// The time at which the connector was last successfully updated. + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// InlineResponse2005 + public InlineResponse2005 OrganizationConnectionsGet (string accessToken = null, int? connectorId = null, string connectStatus = null, string connectError = null, string updateRequestedAt = null, string updateStatus = null, string updateError = null, string lastSuccessfulUpdatedAt = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) + { + ApiResponse response = OrganizationConnectionsGetWithHttpInfo(accessToken, connectorId, connectStatus, connectError, updateRequestedAt, updateStatus, updateError, lastSuccessfulUpdatedAt, createdAt, updatedAt, limit, offset, sort); + return response.Data; + } + + /// + /// Get all Connections Get all Connections + /// + /// Organization's OAuth2 access token + /// The id for the connector data source for which the connection is connected + /// Indicates whether a connector is currently connected to a service for a user. + /// Error message if there is a problem with authorizing this connection. + /// Time at which an update was requested by a user. + /// Indicates whether a connector is currently updated. + /// Indicates if there was an error during the update. + /// The time at which the connector was last successfully updated. + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// ApiResponse of InlineResponse2005 + public ApiResponse< InlineResponse2005 > OrganizationConnectionsGetWithHttpInfo (string accessToken = null, int? connectorId = null, string connectStatus = null, string connectError = null, string updateRequestedAt = null, string updateStatus = null, string updateError = null, string lastSuccessfulUpdatedAt = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) + { + + + var path_ = "/organization/connections"; + + var pathParams = new Dictionary(); + var queryParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); + var formParams = new Dictionary(); + var fileParams = new Dictionary(); + String postBody = null; + + // to determine the Accept header + String[] http_header_accepts = new String[] { + "application/json" + }; + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); + if (http_header_accept != null) + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + pathParams.Add("format", "json"); + + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + if (connectorId != null) queryParams.Add("connector_id", Configuration.ApiClient.ParameterToString(connectorId)); // query parameter + if (connectStatus != null) queryParams.Add("connect_status", Configuration.ApiClient.ParameterToString(connectStatus)); // query parameter + if (connectError != null) queryParams.Add("connect_error", Configuration.ApiClient.ParameterToString(connectError)); // query parameter + if (updateRequestedAt != null) queryParams.Add("update_requested_at", Configuration.ApiClient.ParameterToString(updateRequestedAt)); // query parameter + if (updateStatus != null) queryParams.Add("update_status", Configuration.ApiClient.ParameterToString(updateStatus)); // query parameter + if (updateError != null) queryParams.Add("update_error", Configuration.ApiClient.ParameterToString(updateError)); // query parameter + if (lastSuccessfulUpdatedAt != null) queryParams.Add("last_successful_updated_at", Configuration.ApiClient.ParameterToString(lastSuccessfulUpdatedAt)); // query parameter + if (createdAt != null) queryParams.Add("created_at", Configuration.ApiClient.ParameterToString(createdAt)); // query parameter + if (updatedAt != null) queryParams.Add("updated_at", Configuration.ApiClient.ParameterToString(updatedAt)); // query parameter + if (limit != null) queryParams.Add("limit", Configuration.ApiClient.ParameterToString(limit)); // query parameter + if (offset != null) queryParams.Add("offset", Configuration.ApiClient.ParameterToString(offset)); // query parameter + if (sort != null) queryParams.Add("sort", Configuration.ApiClient.ParameterToString(sort)); // query parameter + + + + + + + + // make the HTTP request + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling OrganizationConnectionsGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling OrganizationConnectionsGet: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2005) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2005))); + + } + + /// + /// Get all Connections Get all Connections + /// + /// Organization's OAuth2 access token + /// The id for the connector data source for which the connection is connected + /// Indicates whether a connector is currently connected to a service for a user. + /// Error message if there is a problem with authorizing this connection. + /// Time at which an update was requested by a user. + /// Indicates whether a connector is currently updated. + /// Indicates if there was an error during the update. + /// The time at which the connector was last successfully updated. + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of InlineResponse2005 + public async System.Threading.Tasks.Task OrganizationConnectionsGetAsync (string accessToken = null, int? connectorId = null, string connectStatus = null, string connectError = null, string updateRequestedAt = null, string updateStatus = null, string updateError = null, string lastSuccessfulUpdatedAt = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) + { + ApiResponse response = await OrganizationConnectionsGetAsyncWithHttpInfo(accessToken, connectorId, connectStatus, connectError, updateRequestedAt, updateStatus, updateError, lastSuccessfulUpdatedAt, createdAt, updatedAt, limit, offset, sort); + return response.Data; + + } + + /// + /// Get all Connections Get all Connections + /// + /// Organization's OAuth2 access token + /// The id for the connector data source for which the connection is connected + /// Indicates whether a connector is currently connected to a service for a user. + /// Error message if there is a problem with authorizing this connection. + /// Time at which an update was requested by a user. + /// Indicates whether a connector is currently updated. + /// Indicates if there was an error during the update. + /// The time at which the connector was last successfully updated. + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of ApiResponse (InlineResponse2005) + public async System.Threading.Tasks.Task> OrganizationConnectionsGetAsyncWithHttpInfo (string accessToken = null, int? connectorId = null, string connectStatus = null, string connectError = null, string updateRequestedAt = null, string updateStatus = null, string updateError = null, string lastSuccessfulUpdatedAt = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) + { + + + var path_ = "/organization/connections"; + + var pathParams = new Dictionary(); + var queryParams = new Dictionary(); + var headerParams = new Dictionary(); + var formParams = new Dictionary(); + var fileParams = new Dictionary(); + String postBody = null; + + // to determine the Accept header + String[] http_header_accepts = new String[] { + "application/json" + }; + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); + if (http_header_accept != null) + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + pathParams.Add("format", "json"); + + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + if (connectorId != null) queryParams.Add("connector_id", Configuration.ApiClient.ParameterToString(connectorId)); // query parameter + if (connectStatus != null) queryParams.Add("connect_status", Configuration.ApiClient.ParameterToString(connectStatus)); // query parameter + if (connectError != null) queryParams.Add("connect_error", Configuration.ApiClient.ParameterToString(connectError)); // query parameter + if (updateRequestedAt != null) queryParams.Add("update_requested_at", Configuration.ApiClient.ParameterToString(updateRequestedAt)); // query parameter + if (updateStatus != null) queryParams.Add("update_status", Configuration.ApiClient.ParameterToString(updateStatus)); // query parameter + if (updateError != null) queryParams.Add("update_error", Configuration.ApiClient.ParameterToString(updateError)); // query parameter + if (lastSuccessfulUpdatedAt != null) queryParams.Add("last_successful_updated_at", Configuration.ApiClient.ParameterToString(lastSuccessfulUpdatedAt)); // query parameter + if (createdAt != null) queryParams.Add("created_at", Configuration.ApiClient.ParameterToString(createdAt)); // query parameter + if (updatedAt != null) queryParams.Add("updated_at", Configuration.ApiClient.ParameterToString(updatedAt)); // query parameter + if (limit != null) queryParams.Add("limit", Configuration.ApiClient.ParameterToString(limit)); // query parameter + if (offset != null) queryParams.Add("offset", Configuration.ApiClient.ParameterToString(offset)); // query parameter + if (sort != null) queryParams.Add("sort", Configuration.ApiClient.ParameterToString(sort)); // query parameter + + + + + + + + // make the HTTP request + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling OrganizationConnectionsGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling OrganizationConnectionsGet: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2005) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2005))); + + } + + /// + /// Get all Credentials Get all Credentials + /// + /// Organization's OAuth2 access token + /// The id for the connector data source from which the credential was obtained + /// Attribute name such as token, userid, username, or password + /// Encrypted value for the attribute specified + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// InlineResponse20011 + public InlineResponse20011 OrganizationCredentialsGet (string accessToken = null, int? connectorId = null, string attrKey = null, string attrValue = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) + { + ApiResponse response = OrganizationCredentialsGetWithHttpInfo(accessToken, connectorId, attrKey, attrValue, createdAt, updatedAt, limit, offset, sort); + return response.Data; + } + + /// + /// Get all Credentials Get all Credentials + /// + /// Organization's OAuth2 access token + /// The id for the connector data source from which the credential was obtained + /// Attribute name such as token, userid, username, or password + /// Encrypted value for the attribute specified + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// ApiResponse of InlineResponse20011 + public ApiResponse< InlineResponse20011 > OrganizationCredentialsGetWithHttpInfo (string accessToken = null, int? connectorId = null, string attrKey = null, string attrValue = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) + { + + + var path_ = "/organization/credentials"; + + var pathParams = new Dictionary(); + var queryParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); + var formParams = new Dictionary(); + var fileParams = new Dictionary(); + String postBody = null; + + // to determine the Accept header + String[] http_header_accepts = new String[] { + "application/json" + }; + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); + if (http_header_accept != null) + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + pathParams.Add("format", "json"); + + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + if (connectorId != null) queryParams.Add("connector_id", Configuration.ApiClient.ParameterToString(connectorId)); // query parameter + if (attrKey != null) queryParams.Add("attr_key", Configuration.ApiClient.ParameterToString(attrKey)); // query parameter + if (attrValue != null) queryParams.Add("attr_value", Configuration.ApiClient.ParameterToString(attrValue)); // query parameter + if (createdAt != null) queryParams.Add("created_at", Configuration.ApiClient.ParameterToString(createdAt)); // query parameter + if (updatedAt != null) queryParams.Add("updated_at", Configuration.ApiClient.ParameterToString(updatedAt)); // query parameter + if (limit != null) queryParams.Add("limit", Configuration.ApiClient.ParameterToString(limit)); // query parameter + if (offset != null) queryParams.Add("offset", Configuration.ApiClient.ParameterToString(offset)); // query parameter + if (sort != null) queryParams.Add("sort", Configuration.ApiClient.ParameterToString(sort)); // query parameter + + + + + + + + // make the HTTP request + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling OrganizationCredentialsGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling OrganizationCredentialsGet: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20011) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20011))); + + } + + /// + /// Get all Credentials Get all Credentials + /// + /// Organization's OAuth2 access token + /// The id for the connector data source from which the credential was obtained + /// Attribute name such as token, userid, username, or password + /// Encrypted value for the attribute specified + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of InlineResponse20011 + public async System.Threading.Tasks.Task OrganizationCredentialsGetAsync (string accessToken = null, int? connectorId = null, string attrKey = null, string attrValue = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) + { + ApiResponse response = await OrganizationCredentialsGetAsyncWithHttpInfo(accessToken, connectorId, attrKey, attrValue, createdAt, updatedAt, limit, offset, sort); + return response.Data; + + } + + /// + /// Get all Credentials Get all Credentials + /// + /// Organization's OAuth2 access token + /// The id for the connector data source from which the credential was obtained + /// Attribute name such as token, userid, username, or password + /// Encrypted value for the attribute specified + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of ApiResponse (InlineResponse20011) + public async System.Threading.Tasks.Task> OrganizationCredentialsGetAsyncWithHttpInfo (string accessToken = null, int? connectorId = null, string attrKey = null, string attrValue = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) + { + + + var path_ = "/organization/credentials"; + + var pathParams = new Dictionary(); + var queryParams = new Dictionary(); + var headerParams = new Dictionary(); + var formParams = new Dictionary(); + var fileParams = new Dictionary(); + String postBody = null; + + // to determine the Accept header + String[] http_header_accepts = new String[] { + "application/json" + }; + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); + if (http_header_accept != null) + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + pathParams.Add("format", "json"); + + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + if (connectorId != null) queryParams.Add("connector_id", Configuration.ApiClient.ParameterToString(connectorId)); // query parameter + if (attrKey != null) queryParams.Add("attr_key", Configuration.ApiClient.ParameterToString(attrKey)); // query parameter + if (attrValue != null) queryParams.Add("attr_value", Configuration.ApiClient.ParameterToString(attrValue)); // query parameter + if (createdAt != null) queryParams.Add("created_at", Configuration.ApiClient.ParameterToString(createdAt)); // query parameter + if (updatedAt != null) queryParams.Add("updated_at", Configuration.ApiClient.ParameterToString(updatedAt)); // query parameter + if (limit != null) queryParams.Add("limit", Configuration.ApiClient.ParameterToString(limit)); // query parameter + if (offset != null) queryParams.Add("offset", Configuration.ApiClient.ParameterToString(offset)); // query parameter + if (sort != null) queryParams.Add("sort", Configuration.ApiClient.ParameterToString(sort)); // query parameter + + + + + + + + // make the HTTP request + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling OrganizationCredentialsGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling OrganizationCredentialsGet: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20011) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20011))); + + } + + /// + /// Get measurements for all users using your application Measurements are any value that can be recorded like daily steps, a mood rating, or apples eaten. + /// + /// Organization's OAuth2 access token + /// The ID of the client application which originally stored the measurement + /// The id for the connector data source from which the measurement was obtained + /// ID of the variable for which we are creating the measurement records + /// Application or device used to record the measurement values + /// start time for the measurement event. Use ISO 8601 datetime format + /// The value of the measurement after conversion to the default unit for that variable + /// The default unit id for the variable + /// Unconverted value of measurement as originally posted (before conversion to default unit) + /// Unit id of the measurement as originally submitted + /// Duration of the event being measurement in seconds + /// An optional note the user may include with their measurement + /// Latitude at which the measurement was taken + /// Longitude at which the measurement was taken + /// Optional human readable name for the location where the measurement was recorded + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// An error message if there is a problem with the measurement + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// InlineResponse20013 + public InlineResponse20013 OrganizationMeasurementsGet (string accessToken = null, string clientId = null, int? connectorId = null, int? variableId = null, int? sourceId = null, string startTime = null, double? value = null, int? unitId = null, double? originalValue = null, int? originalUnitId = null, int? duration = null, string note = null, double? latitude = null, double? longitude = null, string location = null, string createdAt = null, string updatedAt = null, string error = null, int? limit = null, int? offset = null, string sort = null) + { + ApiResponse response = OrganizationMeasurementsGetWithHttpInfo(accessToken, clientId, connectorId, variableId, sourceId, startTime, value, unitId, originalValue, originalUnitId, duration, note, latitude, longitude, location, createdAt, updatedAt, error, limit, offset, sort); + return response.Data; + } + + /// + /// Get measurements for all users using your application Measurements are any value that can be recorded like daily steps, a mood rating, or apples eaten. + /// + /// Organization's OAuth2 access token + /// The ID of the client application which originally stored the measurement + /// The id for the connector data source from which the measurement was obtained + /// ID of the variable for which we are creating the measurement records + /// Application or device used to record the measurement values + /// start time for the measurement event. Use ISO 8601 datetime format + /// The value of the measurement after conversion to the default unit for that variable + /// The default unit id for the variable + /// Unconverted value of measurement as originally posted (before conversion to default unit) + /// Unit id of the measurement as originally submitted + /// Duration of the event being measurement in seconds + /// An optional note the user may include with their measurement + /// Latitude at which the measurement was taken + /// Longitude at which the measurement was taken + /// Optional human readable name for the location where the measurement was recorded + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// An error message if there is a problem with the measurement + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// ApiResponse of InlineResponse20013 + public ApiResponse< InlineResponse20013 > OrganizationMeasurementsGetWithHttpInfo (string accessToken = null, string clientId = null, int? connectorId = null, int? variableId = null, int? sourceId = null, string startTime = null, double? value = null, int? unitId = null, double? originalValue = null, int? originalUnitId = null, int? duration = null, string note = null, double? latitude = null, double? longitude = null, string location = null, string createdAt = null, string updatedAt = null, string error = null, int? limit = null, int? offset = null, string sort = null) + { + + + var path_ = "/organization/measurements"; + + var pathParams = new Dictionary(); + var queryParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); + var formParams = new Dictionary(); + var fileParams = new Dictionary(); + String postBody = null; + + // to determine the Accept header + String[] http_header_accepts = new String[] { + "application/json" + }; + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); + if (http_header_accept != null) + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + pathParams.Add("format", "json"); + + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + if (clientId != null) queryParams.Add("client_id", Configuration.ApiClient.ParameterToString(clientId)); // query parameter + if (connectorId != null) queryParams.Add("connector_id", Configuration.ApiClient.ParameterToString(connectorId)); // query parameter + if (variableId != null) queryParams.Add("variable_id", Configuration.ApiClient.ParameterToString(variableId)); // query parameter + if (sourceId != null) queryParams.Add("source_id", Configuration.ApiClient.ParameterToString(sourceId)); // query parameter + if (startTime != null) queryParams.Add("start_time", Configuration.ApiClient.ParameterToString(startTime)); // query parameter + if (value != null) queryParams.Add("value", Configuration.ApiClient.ParameterToString(value)); // query parameter + if (unitId != null) queryParams.Add("unit_id", Configuration.ApiClient.ParameterToString(unitId)); // query parameter + if (originalValue != null) queryParams.Add("original_value", Configuration.ApiClient.ParameterToString(originalValue)); // query parameter + if (originalUnitId != null) queryParams.Add("original_unit_id", Configuration.ApiClient.ParameterToString(originalUnitId)); // query parameter + if (duration != null) queryParams.Add("duration", Configuration.ApiClient.ParameterToString(duration)); // query parameter + if (note != null) queryParams.Add("note", Configuration.ApiClient.ParameterToString(note)); // query parameter + if (latitude != null) queryParams.Add("latitude", Configuration.ApiClient.ParameterToString(latitude)); // query parameter + if (longitude != null) queryParams.Add("longitude", Configuration.ApiClient.ParameterToString(longitude)); // query parameter + if (location != null) queryParams.Add("location", Configuration.ApiClient.ParameterToString(location)); // query parameter + if (createdAt != null) queryParams.Add("created_at", Configuration.ApiClient.ParameterToString(createdAt)); // query parameter + if (updatedAt != null) queryParams.Add("updated_at", Configuration.ApiClient.ParameterToString(updatedAt)); // query parameter + if (error != null) queryParams.Add("error", Configuration.ApiClient.ParameterToString(error)); // query parameter + if (limit != null) queryParams.Add("limit", Configuration.ApiClient.ParameterToString(limit)); // query parameter + if (offset != null) queryParams.Add("offset", Configuration.ApiClient.ParameterToString(offset)); // query parameter + if (sort != null) queryParams.Add("sort", Configuration.ApiClient.ParameterToString(sort)); // query parameter + + + + + + + + // make the HTTP request + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling OrganizationMeasurementsGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling OrganizationMeasurementsGet: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20013) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20013))); + + } + + /// + /// Get measurements for all users using your application Measurements are any value that can be recorded like daily steps, a mood rating, or apples eaten. + /// + /// Organization's OAuth2 access token + /// The ID of the client application which originally stored the measurement + /// The id for the connector data source from which the measurement was obtained + /// ID of the variable for which we are creating the measurement records + /// Application or device used to record the measurement values + /// start time for the measurement event. Use ISO 8601 datetime format + /// The value of the measurement after conversion to the default unit for that variable + /// The default unit id for the variable + /// Unconverted value of measurement as originally posted (before conversion to default unit) + /// Unit id of the measurement as originally submitted + /// Duration of the event being measurement in seconds + /// An optional note the user may include with their measurement + /// Latitude at which the measurement was taken + /// Longitude at which the measurement was taken + /// Optional human readable name for the location where the measurement was recorded + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// An error message if there is a problem with the measurement + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of InlineResponse20013 + public async System.Threading.Tasks.Task OrganizationMeasurementsGetAsync (string accessToken = null, string clientId = null, int? connectorId = null, int? variableId = null, int? sourceId = null, string startTime = null, double? value = null, int? unitId = null, double? originalValue = null, int? originalUnitId = null, int? duration = null, string note = null, double? latitude = null, double? longitude = null, string location = null, string createdAt = null, string updatedAt = null, string error = null, int? limit = null, int? offset = null, string sort = null) + { + ApiResponse response = await OrganizationMeasurementsGetAsyncWithHttpInfo(accessToken, clientId, connectorId, variableId, sourceId, startTime, value, unitId, originalValue, originalUnitId, duration, note, latitude, longitude, location, createdAt, updatedAt, error, limit, offset, sort); + return response.Data; + + } + + /// + /// Get measurements for all users using your application Measurements are any value that can be recorded like daily steps, a mood rating, or apples eaten. + /// + /// Organization's OAuth2 access token + /// The ID of the client application which originally stored the measurement + /// The id for the connector data source from which the measurement was obtained + /// ID of the variable for which we are creating the measurement records + /// Application or device used to record the measurement values + /// start time for the measurement event. Use ISO 8601 datetime format + /// The value of the measurement after conversion to the default unit for that variable + /// The default unit id for the variable + /// Unconverted value of measurement as originally posted (before conversion to default unit) + /// Unit id of the measurement as originally submitted + /// Duration of the event being measurement in seconds + /// An optional note the user may include with their measurement + /// Latitude at which the measurement was taken + /// Longitude at which the measurement was taken + /// Optional human readable name for the location where the measurement was recorded + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// An error message if there is a problem with the measurement + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of ApiResponse (InlineResponse20013) + public async System.Threading.Tasks.Task> OrganizationMeasurementsGetAsyncWithHttpInfo (string accessToken = null, string clientId = null, int? connectorId = null, int? variableId = null, int? sourceId = null, string startTime = null, double? value = null, int? unitId = null, double? originalValue = null, int? originalUnitId = null, int? duration = null, string note = null, double? latitude = null, double? longitude = null, string location = null, string createdAt = null, string updatedAt = null, string error = null, int? limit = null, int? offset = null, string sort = null) + { + + + var path_ = "/organization/measurements"; + + var pathParams = new Dictionary(); + var queryParams = new Dictionary(); + var headerParams = new Dictionary(); + var formParams = new Dictionary(); + var fileParams = new Dictionary(); + String postBody = null; + + // to determine the Accept header + String[] http_header_accepts = new String[] { + "application/json" + }; + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); + if (http_header_accept != null) + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + pathParams.Add("format", "json"); + + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + if (clientId != null) queryParams.Add("client_id", Configuration.ApiClient.ParameterToString(clientId)); // query parameter + if (connectorId != null) queryParams.Add("connector_id", Configuration.ApiClient.ParameterToString(connectorId)); // query parameter + if (variableId != null) queryParams.Add("variable_id", Configuration.ApiClient.ParameterToString(variableId)); // query parameter + if (sourceId != null) queryParams.Add("source_id", Configuration.ApiClient.ParameterToString(sourceId)); // query parameter + if (startTime != null) queryParams.Add("start_time", Configuration.ApiClient.ParameterToString(startTime)); // query parameter + if (value != null) queryParams.Add("value", Configuration.ApiClient.ParameterToString(value)); // query parameter + if (unitId != null) queryParams.Add("unit_id", Configuration.ApiClient.ParameterToString(unitId)); // query parameter + if (originalValue != null) queryParams.Add("original_value", Configuration.ApiClient.ParameterToString(originalValue)); // query parameter + if (originalUnitId != null) queryParams.Add("original_unit_id", Configuration.ApiClient.ParameterToString(originalUnitId)); // query parameter + if (duration != null) queryParams.Add("duration", Configuration.ApiClient.ParameterToString(duration)); // query parameter + if (note != null) queryParams.Add("note", Configuration.ApiClient.ParameterToString(note)); // query parameter + if (latitude != null) queryParams.Add("latitude", Configuration.ApiClient.ParameterToString(latitude)); // query parameter + if (longitude != null) queryParams.Add("longitude", Configuration.ApiClient.ParameterToString(longitude)); // query parameter + if (location != null) queryParams.Add("location", Configuration.ApiClient.ParameterToString(location)); // query parameter + if (createdAt != null) queryParams.Add("created_at", Configuration.ApiClient.ParameterToString(createdAt)); // query parameter + if (updatedAt != null) queryParams.Add("updated_at", Configuration.ApiClient.ParameterToString(updatedAt)); // query parameter + if (error != null) queryParams.Add("error", Configuration.ApiClient.ParameterToString(error)); // query parameter + if (limit != null) queryParams.Add("limit", Configuration.ApiClient.ParameterToString(limit)); // query parameter + if (offset != null) queryParams.Add("offset", Configuration.ApiClient.ParameterToString(offset)); // query parameter + if (sort != null) queryParams.Add("sort", Configuration.ApiClient.ParameterToString(sort)); // query parameter + + + + + + + + // make the HTTP request + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling OrganizationMeasurementsGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling OrganizationMeasurementsGet: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20013) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20013))); + + } + + /// + /// Get all Updates Get all Updates + /// + /// Organization's OAuth2 access token + /// connector_id + /// number_of_measurements + /// success + /// message + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// InlineResponse20015 + public InlineResponse20015 OrganizationUpdatesGet (string accessToken = null, int? connectorId = null, int? numberOfMeasurements = null, bool? success = null, string message = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) + { + ApiResponse response = OrganizationUpdatesGetWithHttpInfo(accessToken, connectorId, numberOfMeasurements, success, message, createdAt, updatedAt, limit, offset, sort); + return response.Data; + } + + /// + /// Get all Updates Get all Updates + /// + /// Organization's OAuth2 access token + /// connector_id + /// number_of_measurements + /// success + /// message + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// ApiResponse of InlineResponse20015 + public ApiResponse< InlineResponse20015 > OrganizationUpdatesGetWithHttpInfo (string accessToken = null, int? connectorId = null, int? numberOfMeasurements = null, bool? success = null, string message = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) + { + + + var path_ = "/organization/updates"; + + var pathParams = new Dictionary(); + var queryParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); + var formParams = new Dictionary(); + var fileParams = new Dictionary(); + String postBody = null; + + // to determine the Accept header + String[] http_header_accepts = new String[] { + "application/json" + }; + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); + if (http_header_accept != null) + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + pathParams.Add("format", "json"); + + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + if (connectorId != null) queryParams.Add("connector_id", Configuration.ApiClient.ParameterToString(connectorId)); // query parameter + if (numberOfMeasurements != null) queryParams.Add("number_of_measurements", Configuration.ApiClient.ParameterToString(numberOfMeasurements)); // query parameter + if (success != null) queryParams.Add("success", Configuration.ApiClient.ParameterToString(success)); // query parameter + if (message != null) queryParams.Add("message", Configuration.ApiClient.ParameterToString(message)); // query parameter + if (createdAt != null) queryParams.Add("created_at", Configuration.ApiClient.ParameterToString(createdAt)); // query parameter + if (updatedAt != null) queryParams.Add("updated_at", Configuration.ApiClient.ParameterToString(updatedAt)); // query parameter + if (limit != null) queryParams.Add("limit", Configuration.ApiClient.ParameterToString(limit)); // query parameter + if (offset != null) queryParams.Add("offset", Configuration.ApiClient.ParameterToString(offset)); // query parameter + if (sort != null) queryParams.Add("sort", Configuration.ApiClient.ParameterToString(sort)); // query parameter + + + + + + + + // make the HTTP request + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling OrganizationUpdatesGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling OrganizationUpdatesGet: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20015) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20015))); + + } + + /// + /// Get all Updates Get all Updates + /// + /// Organization's OAuth2 access token + /// connector_id + /// number_of_measurements + /// success + /// message + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of InlineResponse20015 + public async System.Threading.Tasks.Task OrganizationUpdatesGetAsync (string accessToken = null, int? connectorId = null, int? numberOfMeasurements = null, bool? success = null, string message = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) + { + ApiResponse response = await OrganizationUpdatesGetAsyncWithHttpInfo(accessToken, connectorId, numberOfMeasurements, success, message, createdAt, updatedAt, limit, offset, sort); + return response.Data; + + } + + /// + /// Get all Updates Get all Updates + /// + /// Organization's OAuth2 access token + /// connector_id + /// number_of_measurements + /// success + /// message + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of ApiResponse (InlineResponse20015) + public async System.Threading.Tasks.Task> OrganizationUpdatesGetAsyncWithHttpInfo (string accessToken = null, int? connectorId = null, int? numberOfMeasurements = null, bool? success = null, string message = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) + { + + + var path_ = "/organization/updates"; + + var pathParams = new Dictionary(); + var queryParams = new Dictionary(); + var headerParams = new Dictionary(); + var formParams = new Dictionary(); + var fileParams = new Dictionary(); + String postBody = null; + + // to determine the Accept header + String[] http_header_accepts = new String[] { + "application/json" + }; + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); + if (http_header_accept != null) + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + pathParams.Add("format", "json"); + + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + if (connectorId != null) queryParams.Add("connector_id", Configuration.ApiClient.ParameterToString(connectorId)); // query parameter + if (numberOfMeasurements != null) queryParams.Add("number_of_measurements", Configuration.ApiClient.ParameterToString(numberOfMeasurements)); // query parameter + if (success != null) queryParams.Add("success", Configuration.ApiClient.ParameterToString(success)); // query parameter + if (message != null) queryParams.Add("message", Configuration.ApiClient.ParameterToString(message)); // query parameter + if (createdAt != null) queryParams.Add("created_at", Configuration.ApiClient.ParameterToString(createdAt)); // query parameter + if (updatedAt != null) queryParams.Add("updated_at", Configuration.ApiClient.ParameterToString(updatedAt)); // query parameter + if (limit != null) queryParams.Add("limit", Configuration.ApiClient.ParameterToString(limit)); // query parameter + if (offset != null) queryParams.Add("offset", Configuration.ApiClient.ParameterToString(offset)); // query parameter + if (sort != null) queryParams.Add("sort", Configuration.ApiClient.ParameterToString(sort)); // query parameter + + + + + + + + // make the HTTP request + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling OrganizationUpdatesGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling OrganizationUpdatesGet: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20015) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20015))); + + } + + /// + /// Get all UserVariables Get all UserVariables + /// + /// User's OAuth2 access token + /// The ID of the client application which last created or updated this user variable + /// ID of the parent variable if this variable has any parent + /// ID of variable + /// D of unit to use for this variable + /// Minimum reasonable value for this variable (uses default unit) + /// Maximum reasonable value for this variable (uses default unit) + /// Value for replacing null measurements + /// The Variable this Variable should be joined with. If the variable is joined with some other variable then it is not shown to user in the list of variables + /// Estimated number of seconds that pass before a stimulus produces a perceivable effect + /// Estimated duration of time following the onset delay in which a stimulus produces a perceivable effect + /// ID of variable category + /// updated + /// Is variable public + /// A value of 1 indicates that this variable is generally a cause in a causal relationship. An example of a causeOnly variable would be a variable such as Cloud Cover which would generally not be influenced by the behaviour of the user + /// 0 -> No filling, 1 -> Use filling-value + /// Number of measurements + /// Number of processed measurements + /// Number of measurements at last analysis + /// ID of last Unit + /// ID of last original Unit + /// Last original value which is stored + /// Last Value + /// Last original value which is stored + /// ID of last source + /// Number of correlations for this variable + /// status + /// error_message + /// When this variable or its settings were last updated + /// Standard deviation + /// Variance + /// Minimum recorded value of this variable + /// Maximum recorded value of this variable + /// Mean + /// Median + /// Most common Unit ID + /// Most common value + /// Number of unique daily values + /// Number of changes + /// Skewness + /// Kurtosis + /// Latitude + /// Longitude + /// Location + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// Outcome variables (those with `outcome` == 1) are variables for which a human would generally want to identify the influencing factors. These include symptoms of illness, physique, mood, cognitive performance, etc. Generally correlation calculations are only performed on outcome variables + /// Comma-separated list of source names to limit variables to those sources + /// Earliest source time + /// Latest source time + /// Earliest measurement time + /// Latest measurement time + /// Earliest filling time + /// Latest filling time + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// InlineResponse20016 + public InlineResponse20016 OrganizationUserVariablesGet (string accessToken = null, string clientId = null, int? parentId = null, int? variableId = null, int? defaultUnitId = null, double? minimumAllowedValue = null, double? maximumAllowedValue = null, double? fillingValue = null, int? joinWith = null, int? onsetDelay = null, int? durationOfAction = null, int? variableCategoryId = null, int? updated = null, int? _public = null, bool? causeOnly = null, string fillingType = null, int? numberOfMeasurements = null, int? numberOfProcessedMeasurements = null, int? measurementsAtLastAnalysis = null, int? lastUnitId = null, int? lastOriginalUnitId = null, int? lastOriginalValue = null, double? lastValue = null, double? lastOriginalValue2 = null, int? lastSourceId = null, int? numberOfCorrelations = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, double? standardDeviation = null, double? variance = null, double? minimumRecordedValue = null, double? maximumRecordedValue = null, double? mean = null, double? median = null, int? mostCommonUnitId = null, double? mostCommonValue = null, double? numberOfUniqueDailyValues = null, int? numberOfChanges = null, double? skewness = null, double? kurtosis = null, double? latitude = null, double? longitude = null, string location = null, string createdAt = null, string updatedAt = null, bool? outcome = null, string sources = null, int? earliestSourceTime = null, int? latestSourceTime = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, int? earliestFillingTime = null, int? latestFillingTime = null, int? limit = null, int? offset = null, string sort = null) + { + ApiResponse response = OrganizationUserVariablesGetWithHttpInfo(accessToken, clientId, parentId, variableId, defaultUnitId, minimumAllowedValue, maximumAllowedValue, fillingValue, joinWith, onsetDelay, durationOfAction, variableCategoryId, updated, _public, causeOnly, fillingType, numberOfMeasurements, numberOfProcessedMeasurements, measurementsAtLastAnalysis, lastUnitId, lastOriginalUnitId, lastOriginalValue, lastValue, lastOriginalValue2, lastSourceId, numberOfCorrelations, status, errorMessage, lastSuccessfulUpdateTime, standardDeviation, variance, minimumRecordedValue, maximumRecordedValue, mean, median, mostCommonUnitId, mostCommonValue, numberOfUniqueDailyValues, numberOfChanges, skewness, kurtosis, latitude, longitude, location, createdAt, updatedAt, outcome, sources, earliestSourceTime, latestSourceTime, earliestMeasurementTime, latestMeasurementTime, earliestFillingTime, latestFillingTime, limit, offset, sort); + return response.Data; + } + + /// + /// Get all UserVariables Get all UserVariables + /// + /// User's OAuth2 access token + /// The ID of the client application which last created or updated this user variable + /// ID of the parent variable if this variable has any parent + /// ID of variable + /// D of unit to use for this variable + /// Minimum reasonable value for this variable (uses default unit) + /// Maximum reasonable value for this variable (uses default unit) + /// Value for replacing null measurements + /// The Variable this Variable should be joined with. If the variable is joined with some other variable then it is not shown to user in the list of variables + /// Estimated number of seconds that pass before a stimulus produces a perceivable effect + /// Estimated duration of time following the onset delay in which a stimulus produces a perceivable effect + /// ID of variable category + /// updated + /// Is variable public + /// A value of 1 indicates that this variable is generally a cause in a causal relationship. An example of a causeOnly variable would be a variable such as Cloud Cover which would generally not be influenced by the behaviour of the user + /// 0 -> No filling, 1 -> Use filling-value + /// Number of measurements + /// Number of processed measurements + /// Number of measurements at last analysis + /// ID of last Unit + /// ID of last original Unit + /// Last original value which is stored + /// Last Value + /// Last original value which is stored + /// ID of last source + /// Number of correlations for this variable + /// status + /// error_message + /// When this variable or its settings were last updated + /// Standard deviation + /// Variance + /// Minimum recorded value of this variable + /// Maximum recorded value of this variable + /// Mean + /// Median + /// Most common Unit ID + /// Most common value + /// Number of unique daily values + /// Number of changes + /// Skewness + /// Kurtosis + /// Latitude + /// Longitude + /// Location + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// Outcome variables (those with `outcome` == 1) are variables for which a human would generally want to identify the influencing factors. These include symptoms of illness, physique, mood, cognitive performance, etc. Generally correlation calculations are only performed on outcome variables + /// Comma-separated list of source names to limit variables to those sources + /// Earliest source time + /// Latest source time + /// Earliest measurement time + /// Latest measurement time + /// Earliest filling time + /// Latest filling time + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// ApiResponse of InlineResponse20016 + public ApiResponse< InlineResponse20016 > OrganizationUserVariablesGetWithHttpInfo (string accessToken = null, string clientId = null, int? parentId = null, int? variableId = null, int? defaultUnitId = null, double? minimumAllowedValue = null, double? maximumAllowedValue = null, double? fillingValue = null, int? joinWith = null, int? onsetDelay = null, int? durationOfAction = null, int? variableCategoryId = null, int? updated = null, int? _public = null, bool? causeOnly = null, string fillingType = null, int? numberOfMeasurements = null, int? numberOfProcessedMeasurements = null, int? measurementsAtLastAnalysis = null, int? lastUnitId = null, int? lastOriginalUnitId = null, int? lastOriginalValue = null, double? lastValue = null, double? lastOriginalValue2 = null, int? lastSourceId = null, int? numberOfCorrelations = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, double? standardDeviation = null, double? variance = null, double? minimumRecordedValue = null, double? maximumRecordedValue = null, double? mean = null, double? median = null, int? mostCommonUnitId = null, double? mostCommonValue = null, double? numberOfUniqueDailyValues = null, int? numberOfChanges = null, double? skewness = null, double? kurtosis = null, double? latitude = null, double? longitude = null, string location = null, string createdAt = null, string updatedAt = null, bool? outcome = null, string sources = null, int? earliestSourceTime = null, int? latestSourceTime = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, int? earliestFillingTime = null, int? latestFillingTime = null, int? limit = null, int? offset = null, string sort = null) + { + + + var path_ = "/organization/userVariables"; + + var pathParams = new Dictionary(); + var queryParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); + var formParams = new Dictionary(); + var fileParams = new Dictionary(); + String postBody = null; + + // to determine the Accept header + String[] http_header_accepts = new String[] { + "application/json" + }; + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); + if (http_header_accept != null) + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + pathParams.Add("format", "json"); + + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + if (clientId != null) queryParams.Add("client_id", Configuration.ApiClient.ParameterToString(clientId)); // query parameter + if (parentId != null) queryParams.Add("parent_id", Configuration.ApiClient.ParameterToString(parentId)); // query parameter + if (variableId != null) queryParams.Add("variable_id", Configuration.ApiClient.ParameterToString(variableId)); // query parameter + if (defaultUnitId != null) queryParams.Add("default_unit_id", Configuration.ApiClient.ParameterToString(defaultUnitId)); // query parameter + if (minimumAllowedValue != null) queryParams.Add("minimum_allowed_value", Configuration.ApiClient.ParameterToString(minimumAllowedValue)); // query parameter + if (maximumAllowedValue != null) queryParams.Add("maximum_allowed_value", Configuration.ApiClient.ParameterToString(maximumAllowedValue)); // query parameter + if (fillingValue != null) queryParams.Add("filling_value", Configuration.ApiClient.ParameterToString(fillingValue)); // query parameter + if (joinWith != null) queryParams.Add("join_with", Configuration.ApiClient.ParameterToString(joinWith)); // query parameter + if (onsetDelay != null) queryParams.Add("onset_delay", Configuration.ApiClient.ParameterToString(onsetDelay)); // query parameter + if (durationOfAction != null) queryParams.Add("duration_of_action", Configuration.ApiClient.ParameterToString(durationOfAction)); // query parameter + if (variableCategoryId != null) queryParams.Add("variable_category_id", Configuration.ApiClient.ParameterToString(variableCategoryId)); // query parameter + if (updated != null) queryParams.Add("updated", Configuration.ApiClient.ParameterToString(updated)); // query parameter + if (_public != null) queryParams.Add("public", Configuration.ApiClient.ParameterToString(_public)); // query parameter + if (causeOnly != null) queryParams.Add("cause_only", Configuration.ApiClient.ParameterToString(causeOnly)); // query parameter + if (fillingType != null) queryParams.Add("filling_type", Configuration.ApiClient.ParameterToString(fillingType)); // query parameter + if (numberOfMeasurements != null) queryParams.Add("number_of_measurements", Configuration.ApiClient.ParameterToString(numberOfMeasurements)); // query parameter + if (numberOfProcessedMeasurements != null) queryParams.Add("number_of_processed_measurements", Configuration.ApiClient.ParameterToString(numberOfProcessedMeasurements)); // query parameter + if (measurementsAtLastAnalysis != null) queryParams.Add("measurements_at_last_analysis", Configuration.ApiClient.ParameterToString(measurementsAtLastAnalysis)); // query parameter + if (lastUnitId != null) queryParams.Add("last_unit_id", Configuration.ApiClient.ParameterToString(lastUnitId)); // query parameter + if (lastOriginalUnitId != null) queryParams.Add("last_original_unit_id", Configuration.ApiClient.ParameterToString(lastOriginalUnitId)); // query parameter + if (lastOriginalValue != null) queryParams.Add("last_original_value", Configuration.ApiClient.ParameterToString(lastOriginalValue)); // query parameter + if (lastValue != null) queryParams.Add("last_value", Configuration.ApiClient.ParameterToString(lastValue)); // query parameter + if (lastOriginalValue2 != null) queryParams.Add("last_original_value", Configuration.ApiClient.ParameterToString(lastOriginalValue2)); // query parameter + if (lastSourceId != null) queryParams.Add("last_source_id", Configuration.ApiClient.ParameterToString(lastSourceId)); // query parameter + if (numberOfCorrelations != null) queryParams.Add("number_of_correlations", Configuration.ApiClient.ParameterToString(numberOfCorrelations)); // query parameter + if (status != null) queryParams.Add("status", Configuration.ApiClient.ParameterToString(status)); // query parameter + if (errorMessage != null) queryParams.Add("error_message", Configuration.ApiClient.ParameterToString(errorMessage)); // query parameter + if (lastSuccessfulUpdateTime != null) queryParams.Add("last_successful_update_time", Configuration.ApiClient.ParameterToString(lastSuccessfulUpdateTime)); // query parameter + if (standardDeviation != null) queryParams.Add("standard_deviation", Configuration.ApiClient.ParameterToString(standardDeviation)); // query parameter + if (variance != null) queryParams.Add("variance", Configuration.ApiClient.ParameterToString(variance)); // query parameter + if (minimumRecordedValue != null) queryParams.Add("minimum_recorded_value", Configuration.ApiClient.ParameterToString(minimumRecordedValue)); // query parameter + if (maximumRecordedValue != null) queryParams.Add("maximum_recorded_value", Configuration.ApiClient.ParameterToString(maximumRecordedValue)); // query parameter + if (mean != null) queryParams.Add("mean", Configuration.ApiClient.ParameterToString(mean)); // query parameter + if (median != null) queryParams.Add("median", Configuration.ApiClient.ParameterToString(median)); // query parameter + if (mostCommonUnitId != null) queryParams.Add("most_common_unit_id", Configuration.ApiClient.ParameterToString(mostCommonUnitId)); // query parameter + if (mostCommonValue != null) queryParams.Add("most_common_value", Configuration.ApiClient.ParameterToString(mostCommonValue)); // query parameter + if (numberOfUniqueDailyValues != null) queryParams.Add("number_of_unique_daily_values", Configuration.ApiClient.ParameterToString(numberOfUniqueDailyValues)); // query parameter + if (numberOfChanges != null) queryParams.Add("number_of_changes", Configuration.ApiClient.ParameterToString(numberOfChanges)); // query parameter + if (skewness != null) queryParams.Add("skewness", Configuration.ApiClient.ParameterToString(skewness)); // query parameter + if (kurtosis != null) queryParams.Add("kurtosis", Configuration.ApiClient.ParameterToString(kurtosis)); // query parameter + if (latitude != null) queryParams.Add("latitude", Configuration.ApiClient.ParameterToString(latitude)); // query parameter + if (longitude != null) queryParams.Add("longitude", Configuration.ApiClient.ParameterToString(longitude)); // query parameter + if (location != null) queryParams.Add("location", Configuration.ApiClient.ParameterToString(location)); // query parameter + if (createdAt != null) queryParams.Add("created_at", Configuration.ApiClient.ParameterToString(createdAt)); // query parameter + if (updatedAt != null) queryParams.Add("updated_at", Configuration.ApiClient.ParameterToString(updatedAt)); // query parameter + if (outcome != null) queryParams.Add("outcome", Configuration.ApiClient.ParameterToString(outcome)); // query parameter + if (sources != null) queryParams.Add("sources", Configuration.ApiClient.ParameterToString(sources)); // query parameter + if (earliestSourceTime != null) queryParams.Add("earliest_source_time", Configuration.ApiClient.ParameterToString(earliestSourceTime)); // query parameter + if (latestSourceTime != null) queryParams.Add("latest_source_time", Configuration.ApiClient.ParameterToString(latestSourceTime)); // query parameter + if (earliestMeasurementTime != null) queryParams.Add("earliest_measurement_time", Configuration.ApiClient.ParameterToString(earliestMeasurementTime)); // query parameter + if (latestMeasurementTime != null) queryParams.Add("latest_measurement_time", Configuration.ApiClient.ParameterToString(latestMeasurementTime)); // query parameter + if (earliestFillingTime != null) queryParams.Add("earliest_filling_time", Configuration.ApiClient.ParameterToString(earliestFillingTime)); // query parameter + if (latestFillingTime != null) queryParams.Add("latest_filling_time", Configuration.ApiClient.ParameterToString(latestFillingTime)); // query parameter + if (limit != null) queryParams.Add("limit", Configuration.ApiClient.ParameterToString(limit)); // query parameter + if (offset != null) queryParams.Add("offset", Configuration.ApiClient.ParameterToString(offset)); // query parameter + if (sort != null) queryParams.Add("sort", Configuration.ApiClient.ParameterToString(sort)); // query parameter + + + + + + + + // make the HTTP request + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling OrganizationUserVariablesGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling OrganizationUserVariablesGet: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20016) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20016))); + + } + + /// + /// Get all UserVariables Get all UserVariables + /// + /// User's OAuth2 access token + /// The ID of the client application which last created or updated this user variable + /// ID of the parent variable if this variable has any parent + /// ID of variable + /// D of unit to use for this variable + /// Minimum reasonable value for this variable (uses default unit) + /// Maximum reasonable value for this variable (uses default unit) + /// Value for replacing null measurements + /// The Variable this Variable should be joined with. If the variable is joined with some other variable then it is not shown to user in the list of variables + /// Estimated number of seconds that pass before a stimulus produces a perceivable effect + /// Estimated duration of time following the onset delay in which a stimulus produces a perceivable effect + /// ID of variable category + /// updated + /// Is variable public + /// A value of 1 indicates that this variable is generally a cause in a causal relationship. An example of a causeOnly variable would be a variable such as Cloud Cover which would generally not be influenced by the behaviour of the user + /// 0 -> No filling, 1 -> Use filling-value + /// Number of measurements + /// Number of processed measurements + /// Number of measurements at last analysis + /// ID of last Unit + /// ID of last original Unit + /// Last original value which is stored + /// Last Value + /// Last original value which is stored + /// ID of last source + /// Number of correlations for this variable + /// status + /// error_message + /// When this variable or its settings were last updated + /// Standard deviation + /// Variance + /// Minimum recorded value of this variable + /// Maximum recorded value of this variable + /// Mean + /// Median + /// Most common Unit ID + /// Most common value + /// Number of unique daily values + /// Number of changes + /// Skewness + /// Kurtosis + /// Latitude + /// Longitude + /// Location + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// Outcome variables (those with `outcome` == 1) are variables for which a human would generally want to identify the influencing factors. These include symptoms of illness, physique, mood, cognitive performance, etc. Generally correlation calculations are only performed on outcome variables + /// Comma-separated list of source names to limit variables to those sources + /// Earliest source time + /// Latest source time + /// Earliest measurement time + /// Latest measurement time + /// Earliest filling time + /// Latest filling time + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of InlineResponse20016 + public async System.Threading.Tasks.Task OrganizationUserVariablesGetAsync (string accessToken = null, string clientId = null, int? parentId = null, int? variableId = null, int? defaultUnitId = null, double? minimumAllowedValue = null, double? maximumAllowedValue = null, double? fillingValue = null, int? joinWith = null, int? onsetDelay = null, int? durationOfAction = null, int? variableCategoryId = null, int? updated = null, int? _public = null, bool? causeOnly = null, string fillingType = null, int? numberOfMeasurements = null, int? numberOfProcessedMeasurements = null, int? measurementsAtLastAnalysis = null, int? lastUnitId = null, int? lastOriginalUnitId = null, int? lastOriginalValue = null, double? lastValue = null, double? lastOriginalValue2 = null, int? lastSourceId = null, int? numberOfCorrelations = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, double? standardDeviation = null, double? variance = null, double? minimumRecordedValue = null, double? maximumRecordedValue = null, double? mean = null, double? median = null, int? mostCommonUnitId = null, double? mostCommonValue = null, double? numberOfUniqueDailyValues = null, int? numberOfChanges = null, double? skewness = null, double? kurtosis = null, double? latitude = null, double? longitude = null, string location = null, string createdAt = null, string updatedAt = null, bool? outcome = null, string sources = null, int? earliestSourceTime = null, int? latestSourceTime = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, int? earliestFillingTime = null, int? latestFillingTime = null, int? limit = null, int? offset = null, string sort = null) + { + ApiResponse response = await OrganizationUserVariablesGetAsyncWithHttpInfo(accessToken, clientId, parentId, variableId, defaultUnitId, minimumAllowedValue, maximumAllowedValue, fillingValue, joinWith, onsetDelay, durationOfAction, variableCategoryId, updated, _public, causeOnly, fillingType, numberOfMeasurements, numberOfProcessedMeasurements, measurementsAtLastAnalysis, lastUnitId, lastOriginalUnitId, lastOriginalValue, lastValue, lastOriginalValue2, lastSourceId, numberOfCorrelations, status, errorMessage, lastSuccessfulUpdateTime, standardDeviation, variance, minimumRecordedValue, maximumRecordedValue, mean, median, mostCommonUnitId, mostCommonValue, numberOfUniqueDailyValues, numberOfChanges, skewness, kurtosis, latitude, longitude, location, createdAt, updatedAt, outcome, sources, earliestSourceTime, latestSourceTime, earliestMeasurementTime, latestMeasurementTime, earliestFillingTime, latestFillingTime, limit, offset, sort); + return response.Data; + + } + + /// + /// Get all UserVariables Get all UserVariables + /// + /// User's OAuth2 access token + /// The ID of the client application which last created or updated this user variable + /// ID of the parent variable if this variable has any parent + /// ID of variable + /// D of unit to use for this variable + /// Minimum reasonable value for this variable (uses default unit) + /// Maximum reasonable value for this variable (uses default unit) + /// Value for replacing null measurements + /// The Variable this Variable should be joined with. If the variable is joined with some other variable then it is not shown to user in the list of variables + /// Estimated number of seconds that pass before a stimulus produces a perceivable effect + /// Estimated duration of time following the onset delay in which a stimulus produces a perceivable effect + /// ID of variable category + /// updated + /// Is variable public + /// A value of 1 indicates that this variable is generally a cause in a causal relationship. An example of a causeOnly variable would be a variable such as Cloud Cover which would generally not be influenced by the behaviour of the user + /// 0 -> No filling, 1 -> Use filling-value + /// Number of measurements + /// Number of processed measurements + /// Number of measurements at last analysis + /// ID of last Unit + /// ID of last original Unit + /// Last original value which is stored + /// Last Value + /// Last original value which is stored + /// ID of last source + /// Number of correlations for this variable + /// status + /// error_message + /// When this variable or its settings were last updated + /// Standard deviation + /// Variance + /// Minimum recorded value of this variable + /// Maximum recorded value of this variable + /// Mean + /// Median + /// Most common Unit ID + /// Most common value + /// Number of unique daily values + /// Number of changes + /// Skewness + /// Kurtosis + /// Latitude + /// Longitude + /// Location + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// Outcome variables (those with `outcome` == 1) are variables for which a human would generally want to identify the influencing factors. These include symptoms of illness, physique, mood, cognitive performance, etc. Generally correlation calculations are only performed on outcome variables + /// Comma-separated list of source names to limit variables to those sources + /// Earliest source time + /// Latest source time + /// Earliest measurement time + /// Latest measurement time + /// Earliest filling time + /// Latest filling time + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of ApiResponse (InlineResponse20016) + public async System.Threading.Tasks.Task> OrganizationUserVariablesGetAsyncWithHttpInfo (string accessToken = null, string clientId = null, int? parentId = null, int? variableId = null, int? defaultUnitId = null, double? minimumAllowedValue = null, double? maximumAllowedValue = null, double? fillingValue = null, int? joinWith = null, int? onsetDelay = null, int? durationOfAction = null, int? variableCategoryId = null, int? updated = null, int? _public = null, bool? causeOnly = null, string fillingType = null, int? numberOfMeasurements = null, int? numberOfProcessedMeasurements = null, int? measurementsAtLastAnalysis = null, int? lastUnitId = null, int? lastOriginalUnitId = null, int? lastOriginalValue = null, double? lastValue = null, double? lastOriginalValue2 = null, int? lastSourceId = null, int? numberOfCorrelations = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, double? standardDeviation = null, double? variance = null, double? minimumRecordedValue = null, double? maximumRecordedValue = null, double? mean = null, double? median = null, int? mostCommonUnitId = null, double? mostCommonValue = null, double? numberOfUniqueDailyValues = null, int? numberOfChanges = null, double? skewness = null, double? kurtosis = null, double? latitude = null, double? longitude = null, string location = null, string createdAt = null, string updatedAt = null, bool? outcome = null, string sources = null, int? earliestSourceTime = null, int? latestSourceTime = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, int? earliestFillingTime = null, int? latestFillingTime = null, int? limit = null, int? offset = null, string sort = null) + { + + + var path_ = "/organization/userVariables"; + + var pathParams = new Dictionary(); + var queryParams = new Dictionary(); + var headerParams = new Dictionary(); + var formParams = new Dictionary(); + var fileParams = new Dictionary(); + String postBody = null; + + // to determine the Accept header + String[] http_header_accepts = new String[] { + "application/json" + }; + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); + if (http_header_accept != null) + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + pathParams.Add("format", "json"); + + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + if (clientId != null) queryParams.Add("client_id", Configuration.ApiClient.ParameterToString(clientId)); // query parameter + if (parentId != null) queryParams.Add("parent_id", Configuration.ApiClient.ParameterToString(parentId)); // query parameter + if (variableId != null) queryParams.Add("variable_id", Configuration.ApiClient.ParameterToString(variableId)); // query parameter + if (defaultUnitId != null) queryParams.Add("default_unit_id", Configuration.ApiClient.ParameterToString(defaultUnitId)); // query parameter + if (minimumAllowedValue != null) queryParams.Add("minimum_allowed_value", Configuration.ApiClient.ParameterToString(minimumAllowedValue)); // query parameter + if (maximumAllowedValue != null) queryParams.Add("maximum_allowed_value", Configuration.ApiClient.ParameterToString(maximumAllowedValue)); // query parameter + if (fillingValue != null) queryParams.Add("filling_value", Configuration.ApiClient.ParameterToString(fillingValue)); // query parameter + if (joinWith != null) queryParams.Add("join_with", Configuration.ApiClient.ParameterToString(joinWith)); // query parameter + if (onsetDelay != null) queryParams.Add("onset_delay", Configuration.ApiClient.ParameterToString(onsetDelay)); // query parameter + if (durationOfAction != null) queryParams.Add("duration_of_action", Configuration.ApiClient.ParameterToString(durationOfAction)); // query parameter + if (variableCategoryId != null) queryParams.Add("variable_category_id", Configuration.ApiClient.ParameterToString(variableCategoryId)); // query parameter + if (updated != null) queryParams.Add("updated", Configuration.ApiClient.ParameterToString(updated)); // query parameter + if (_public != null) queryParams.Add("public", Configuration.ApiClient.ParameterToString(_public)); // query parameter + if (causeOnly != null) queryParams.Add("cause_only", Configuration.ApiClient.ParameterToString(causeOnly)); // query parameter + if (fillingType != null) queryParams.Add("filling_type", Configuration.ApiClient.ParameterToString(fillingType)); // query parameter + if (numberOfMeasurements != null) queryParams.Add("number_of_measurements", Configuration.ApiClient.ParameterToString(numberOfMeasurements)); // query parameter + if (numberOfProcessedMeasurements != null) queryParams.Add("number_of_processed_measurements", Configuration.ApiClient.ParameterToString(numberOfProcessedMeasurements)); // query parameter + if (measurementsAtLastAnalysis != null) queryParams.Add("measurements_at_last_analysis", Configuration.ApiClient.ParameterToString(measurementsAtLastAnalysis)); // query parameter + if (lastUnitId != null) queryParams.Add("last_unit_id", Configuration.ApiClient.ParameterToString(lastUnitId)); // query parameter + if (lastOriginalUnitId != null) queryParams.Add("last_original_unit_id", Configuration.ApiClient.ParameterToString(lastOriginalUnitId)); // query parameter + if (lastOriginalValue != null) queryParams.Add("last_original_value", Configuration.ApiClient.ParameterToString(lastOriginalValue)); // query parameter + if (lastValue != null) queryParams.Add("last_value", Configuration.ApiClient.ParameterToString(lastValue)); // query parameter + if (lastOriginalValue2 != null) queryParams.Add("last_original_value", Configuration.ApiClient.ParameterToString(lastOriginalValue2)); // query parameter + if (lastSourceId != null) queryParams.Add("last_source_id", Configuration.ApiClient.ParameterToString(lastSourceId)); // query parameter + if (numberOfCorrelations != null) queryParams.Add("number_of_correlations", Configuration.ApiClient.ParameterToString(numberOfCorrelations)); // query parameter + if (status != null) queryParams.Add("status", Configuration.ApiClient.ParameterToString(status)); // query parameter + if (errorMessage != null) queryParams.Add("error_message", Configuration.ApiClient.ParameterToString(errorMessage)); // query parameter + if (lastSuccessfulUpdateTime != null) queryParams.Add("last_successful_update_time", Configuration.ApiClient.ParameterToString(lastSuccessfulUpdateTime)); // query parameter + if (standardDeviation != null) queryParams.Add("standard_deviation", Configuration.ApiClient.ParameterToString(standardDeviation)); // query parameter + if (variance != null) queryParams.Add("variance", Configuration.ApiClient.ParameterToString(variance)); // query parameter + if (minimumRecordedValue != null) queryParams.Add("minimum_recorded_value", Configuration.ApiClient.ParameterToString(minimumRecordedValue)); // query parameter + if (maximumRecordedValue != null) queryParams.Add("maximum_recorded_value", Configuration.ApiClient.ParameterToString(maximumRecordedValue)); // query parameter + if (mean != null) queryParams.Add("mean", Configuration.ApiClient.ParameterToString(mean)); // query parameter + if (median != null) queryParams.Add("median", Configuration.ApiClient.ParameterToString(median)); // query parameter + if (mostCommonUnitId != null) queryParams.Add("most_common_unit_id", Configuration.ApiClient.ParameterToString(mostCommonUnitId)); // query parameter + if (mostCommonValue != null) queryParams.Add("most_common_value", Configuration.ApiClient.ParameterToString(mostCommonValue)); // query parameter + if (numberOfUniqueDailyValues != null) queryParams.Add("number_of_unique_daily_values", Configuration.ApiClient.ParameterToString(numberOfUniqueDailyValues)); // query parameter + if (numberOfChanges != null) queryParams.Add("number_of_changes", Configuration.ApiClient.ParameterToString(numberOfChanges)); // query parameter + if (skewness != null) queryParams.Add("skewness", Configuration.ApiClient.ParameterToString(skewness)); // query parameter + if (kurtosis != null) queryParams.Add("kurtosis", Configuration.ApiClient.ParameterToString(kurtosis)); // query parameter + if (latitude != null) queryParams.Add("latitude", Configuration.ApiClient.ParameterToString(latitude)); // query parameter + if (longitude != null) queryParams.Add("longitude", Configuration.ApiClient.ParameterToString(longitude)); // query parameter + if (location != null) queryParams.Add("location", Configuration.ApiClient.ParameterToString(location)); // query parameter + if (createdAt != null) queryParams.Add("created_at", Configuration.ApiClient.ParameterToString(createdAt)); // query parameter + if (updatedAt != null) queryParams.Add("updated_at", Configuration.ApiClient.ParameterToString(updatedAt)); // query parameter + if (outcome != null) queryParams.Add("outcome", Configuration.ApiClient.ParameterToString(outcome)); // query parameter + if (sources != null) queryParams.Add("sources", Configuration.ApiClient.ParameterToString(sources)); // query parameter + if (earliestSourceTime != null) queryParams.Add("earliest_source_time", Configuration.ApiClient.ParameterToString(earliestSourceTime)); // query parameter + if (latestSourceTime != null) queryParams.Add("latest_source_time", Configuration.ApiClient.ParameterToString(latestSourceTime)); // query parameter + if (earliestMeasurementTime != null) queryParams.Add("earliest_measurement_time", Configuration.ApiClient.ParameterToString(earliestMeasurementTime)); // query parameter + if (latestMeasurementTime != null) queryParams.Add("latest_measurement_time", Configuration.ApiClient.ParameterToString(latestMeasurementTime)); // query parameter + if (earliestFillingTime != null) queryParams.Add("earliest_filling_time", Configuration.ApiClient.ParameterToString(earliestFillingTime)); // query parameter + if (latestFillingTime != null) queryParams.Add("latest_filling_time", Configuration.ApiClient.ParameterToString(latestFillingTime)); // query parameter + if (limit != null) queryParams.Add("limit", Configuration.ApiClient.ParameterToString(limit)); // query parameter + if (offset != null) queryParams.Add("offset", Configuration.ApiClient.ParameterToString(offset)); // query parameter + if (sort != null) queryParams.Add("sort", Configuration.ApiClient.ParameterToString(sort)); // query parameter + + + + + + + + // make the HTTP request + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling OrganizationUserVariablesGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling OrganizationUserVariablesGet: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20016) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20016))); + + } + + } + +} diff --git a/src/main/csharp/io/swagger/Api/SourceApi.cs b/src/main/csharp/io/swagger/Api/SourceApi.cs index 9427a80..b4c0cc0 100644 --- a/src/main/csharp/io/swagger/Api/SourceApi.cs +++ b/src/main/csharp/io/swagger/Api/SourceApi.cs @@ -1,6 +1,7 @@ using System; using System.IO; using System.Collections.Generic; +using System.Linq; using RestSharp; using IO.Swagger.Client; using IO.Swagger.Model; @@ -15,56 +16,116 @@ public interface ISourceApi { /// - /// Get all Sources + /// Get measurement sources /// /// - /// Get all Sources + /// Returns a list of all the apps from which measurement data is obtained. /// - /// client_id - /// name - /// created_at - /// updated_at - /// limit - /// offset - /// sort - /// InlineResponse20013 - InlineResponse20013 SourcesGet (string clientId, string name, string createdAt, string updatedAt, int? limit, int? offset, string sort); + /// User's OAuth2 access token + /// The ID of the client application which last created or updated this source + /// Name of the application or device + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// InlineResponse20017 + InlineResponse20017 SourcesGet (string accessToken = null, string clientId = null, string name = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); /// - /// Get all Sources + /// Get measurement sources /// /// - /// Get all Sources + /// Returns a list of all the apps from which measurement data is obtained. /// - /// client_id - /// name - /// created_at - /// updated_at - /// limit - /// offset - /// sort - /// InlineResponse20013 - System.Threading.Tasks.Task SourcesGetAsync (string clientId, string name, string createdAt, string updatedAt, int? limit, int? offset, string sort); + /// User's OAuth2 access token + /// The ID of the client application which last created or updated this source + /// Name of the application or device + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// ApiResponse of InlineResponse20017 + ApiResponse SourcesGetWithHttpInfo (string accessToken = null, string clientId = null, string name = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Get measurement sources + /// + /// + /// Returns a list of all the apps from which measurement data is obtained. + /// + /// User's OAuth2 access token + /// The ID of the client application which last created or updated this source + /// Name of the application or device + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of InlineResponse20017 + System.Threading.Tasks.Task SourcesGetAsync (string accessToken = null, string clientId = null, string name = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Get measurement sources + /// + /// + /// Returns a list of all the apps from which measurement data is obtained. + /// + /// User's OAuth2 access token + /// The ID of the client application which last created or updated this source + /// Name of the application or device + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of ApiResponse (InlineResponse20017) + System.Threading.Tasks.Task> SourcesGetAsyncWithHttpInfo (string accessToken = null, string clientId = null, string name = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); /// - /// Store Source + /// Add a data source /// /// - /// Store Source + /// Add a life-tracking app or device to the QuantiModo list of data sources. /// + /// User's OAuth2 access token /// Source that should be stored - /// InlineResponse20014 - InlineResponse20014 SourcesPost (Source body); + /// InlineResponse20018 + InlineResponse20018 SourcesPost (string accessToken = null, Source body = null); /// - /// Store Source + /// Add a data source + /// + /// + /// Add a life-tracking app or device to the QuantiModo list of data sources. + /// + /// User's OAuth2 access token + /// Source that should be stored + /// ApiResponse of InlineResponse20018 + ApiResponse SourcesPostWithHttpInfo (string accessToken = null, Source body = null); + + /// + /// Add a data source /// /// - /// Store Source + /// Add a life-tracking app or device to the QuantiModo list of data sources. /// + /// User's OAuth2 access token /// Source that should be stored - /// InlineResponse20014 - System.Threading.Tasks.Task SourcesPostAsync (Source body); + /// Task of InlineResponse20018 + System.Threading.Tasks.Task SourcesPostAsync (string accessToken = null, Source body = null); + + /// + /// Add a data source + /// + /// + /// Add a life-tracking app or device to the QuantiModo list of data sources. + /// + /// User's OAuth2 access token + /// Source that should be stored + /// Task of ApiResponse (InlineResponse20018) + System.Threading.Tasks.Task> SourcesPostAsyncWithHttpInfo (string accessToken = null, Source body = null); /// /// Get Source @@ -73,8 +134,9 @@ public interface ISourceApi /// Get Source /// /// id of Source - /// InlineResponse20014 - InlineResponse20014 SourcesIdGet (int? id); + /// User's OAuth2 access token + /// InlineResponse20018 + InlineResponse20018 SourcesIdGet (int? id, string accessToken = null); /// /// Get Source @@ -83,8 +145,31 @@ public interface ISourceApi /// Get Source /// /// id of Source - /// InlineResponse20014 - System.Threading.Tasks.Task SourcesIdGetAsync (int? id); + /// User's OAuth2 access token + /// ApiResponse of InlineResponse20018 + ApiResponse SourcesIdGetWithHttpInfo (int? id, string accessToken = null); + + /// + /// Get Source + /// + /// + /// Get Source + /// + /// id of Source + /// User's OAuth2 access token + /// Task of InlineResponse20018 + System.Threading.Tasks.Task SourcesIdGetAsync (int? id, string accessToken = null); + + /// + /// Get Source + /// + /// + /// Get Source + /// + /// id of Source + /// User's OAuth2 access token + /// Task of ApiResponse (InlineResponse20018) + System.Threading.Tasks.Task> SourcesIdGetAsyncWithHttpInfo (int? id, string accessToken = null); /// /// Update Source @@ -93,9 +178,10 @@ public interface ISourceApi /// Update Source /// /// id of Source + /// User's OAuth2 access token /// Source that should be updated /// InlineResponse2002 - InlineResponse2002 SourcesIdPut (int? id, Source body); + InlineResponse2002 SourcesIdPut (int? id, string accessToken = null, Source body = null); /// /// Update Source @@ -104,9 +190,34 @@ public interface ISourceApi /// Update Source /// /// id of Source + /// User's OAuth2 access token /// Source that should be updated - /// InlineResponse2002 - System.Threading.Tasks.Task SourcesIdPutAsync (int? id, Source body); + /// ApiResponse of InlineResponse2002 + ApiResponse SourcesIdPutWithHttpInfo (int? id, string accessToken = null, Source body = null); + + /// + /// Update Source + /// + /// + /// Update Source + /// + /// id of Source + /// User's OAuth2 access token + /// Source that should be updated + /// Task of InlineResponse2002 + System.Threading.Tasks.Task SourcesIdPutAsync (int? id, string accessToken = null, Source body = null); + + /// + /// Update Source + /// + /// + /// Update Source + /// + /// id of Source + /// User's OAuth2 access token + /// Source that should be updated + /// Task of ApiResponse (InlineResponse2002) + System.Threading.Tasks.Task> SourcesIdPutAsyncWithHttpInfo (int? id, string accessToken = null, Source body = null); /// /// Delete Source @@ -115,8 +226,9 @@ public interface ISourceApi /// Delete Source /// /// id of Source + /// User's OAuth2 access token /// InlineResponse2002 - InlineResponse2002 SourcesIdDelete (int? id); + InlineResponse2002 SourcesIdDelete (int? id, string accessToken = null); /// /// Delete Source @@ -125,8 +237,31 @@ public interface ISourceApi /// Delete Source /// /// id of Source - /// InlineResponse2002 - System.Threading.Tasks.Task SourcesIdDeleteAsync (int? id); + /// User's OAuth2 access token + /// ApiResponse of InlineResponse2002 + ApiResponse SourcesIdDeleteWithHttpInfo (int? id, string accessToken = null); + + /// + /// Delete Source + /// + /// + /// Delete Source + /// + /// id of Source + /// User's OAuth2 access token + /// Task of InlineResponse2002 + System.Threading.Tasks.Task SourcesIdDeleteAsync (int? id, string accessToken = null); + + /// + /// Delete Source + /// + /// + /// Delete Source + /// + /// id of Source + /// User's OAuth2 access token + /// Task of ApiResponse (InlineResponse2002) + System.Threading.Tasks.Task> SourcesIdDeleteAsyncWithHttpInfo (int? id, string accessToken = null); } @@ -138,63 +273,105 @@ public class SourceApi : ISourceApi /// /// Initializes a new instance of the class. /// - /// an instance of ApiClient (optional) /// - public SourceApi(ApiClient apiClient = null) + public SourceApi(String basePath) { - if (apiClient == null) // use the default one in Configuration - this.ApiClient = Configuration.DefaultApiClient; - else - this.ApiClient = apiClient; + this.Configuration = new Configuration(new ApiClient(basePath)); } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class + /// using Configuration object /// + /// An instance of Configuration /// - public SourceApi(String basePath) + public SourceApi(Configuration configuration = null) { - this.ApiClient = new ApiClient(basePath); + if (configuration == null) // use the default one in Configuration + this.Configuration = Configuration.Default; + else + this.Configuration = configuration; } - + + /// + /// Gets the base path of the API client. + /// + /// The base path + public String GetBasePath() + { + return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); + } + /// /// Sets the base path of the API client. /// - /// The base path /// The base path + [Obsolete("SetBasePath is deprecated, please do 'Configuraiton.ApiClient = new ApiClient(\"http://new-path\")' instead.")] public void SetBasePath(String basePath) { - this.ApiClient.BasePath = basePath; + // do nothing } /// - /// Gets the base path of the API client. + /// Gets or sets the configuration object /// - /// The base path - public String GetBasePath() + /// An instance of the Configuration + public Configuration Configuration {get; set;} + + /// + /// Gets the default header. + /// + /// Dictionary of HTTP header + [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] + public Dictionary DefaultHeader() { - return this.ApiClient.BasePath; + return this.Configuration.DefaultHeader; } - + /// - /// Gets or sets the API client. + /// Add default header. /// - /// An instance of the ApiClient - public ApiClient ApiClient {get; set;} - + /// Header field name. + /// Header field value. + /// + [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] + public void AddDefaultHeader(string key, string value) + { + this.Configuration.AddDefaultHeader(key, value); + } + /// - /// Get all Sources Get all Sources - /// - /// client_id - /// name - /// created_at - /// updated_at - /// limit - /// offset - /// sort - /// InlineResponse20013 - public InlineResponse20013 SourcesGet (string clientId, string name, string createdAt, string updatedAt, int? limit, int? offset, string sort) + /// Get measurement sources Returns a list of all the apps from which measurement data is obtained. + /// + /// User's OAuth2 access token + /// The ID of the client application which last created or updated this source + /// Name of the application or device + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// InlineResponse20017 + public InlineResponse20017 SourcesGet (string accessToken = null, string clientId = null, string name = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) + { + ApiResponse response = SourcesGetWithHttpInfo(accessToken, clientId, name, createdAt, updatedAt, limit, offset, sort); + return response.Data; + } + + /// + /// Get measurement sources Returns a list of all the apps from which measurement data is obtained. + /// + /// User's OAuth2 access token + /// The ID of the client application which last created or updated this source + /// Name of the application or device + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// ApiResponse of InlineResponse20017 + public ApiResponse< InlineResponse20017 > SourcesGetWithHttpInfo (string accessToken = null, string clientId = null, string name = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) { @@ -202,7 +379,7 @@ public InlineResponse20013 SourcesGet (string clientId, string name, string crea var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -211,52 +388,85 @@ public InlineResponse20013 SourcesGet (string clientId, string name, string crea String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (clientId != null) queryParams.Add("client_id", ApiClient.ParameterToString(clientId)); // query parameter - if (name != null) queryParams.Add("name", ApiClient.ParameterToString(name)); // query parameter - if (createdAt != null) queryParams.Add("created_at", ApiClient.ParameterToString(createdAt)); // query parameter - if (updatedAt != null) queryParams.Add("updated_at", ApiClient.ParameterToString(updatedAt)); // query parameter - if (limit != null) queryParams.Add("limit", ApiClient.ParameterToString(limit)); // query parameter - if (offset != null) queryParams.Add("offset", ApiClient.ParameterToString(offset)); // query parameter - if (sort != null) queryParams.Add("sort", ApiClient.ParameterToString(sort)); // query parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + if (clientId != null) queryParams.Add("client_id", Configuration.ApiClient.ParameterToString(clientId)); // query parameter + if (name != null) queryParams.Add("name", Configuration.ApiClient.ParameterToString(name)); // query parameter + if (createdAt != null) queryParams.Add("created_at", Configuration.ApiClient.ParameterToString(createdAt)); // query parameter + if (updatedAt != null) queryParams.Add("updated_at", Configuration.ApiClient.ParameterToString(updatedAt)); // query parameter + if (limit != null) queryParams.Add("limit", Configuration.ApiClient.ParameterToString(limit)); // query parameter + if (offset != null) queryParams.Add("offset", Configuration.ApiClient.ParameterToString(offset)); // query parameter + if (sort != null) queryParams.Add("sort", Configuration.ApiClient.ParameterToString(sort)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling SourcesGet: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling SourcesGet: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling SourcesGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling SourcesGet: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse20013) ApiClient.Deserialize(response, typeof(InlineResponse20013)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20017) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20017))); + } /// - /// Get all Sources Get all Sources + /// Get measurement sources Returns a list of all the apps from which measurement data is obtained. /// - /// client_id - /// name - /// created_at - /// updated_at - /// limit - /// offset - /// sort - /// InlineResponse20013 - public async System.Threading.Tasks.Task SourcesGetAsync (string clientId, string name, string createdAt, string updatedAt, int? limit, int? offset, string sort) + /// User's OAuth2 access token + /// The ID of the client application which last created or updated this source + /// Name of the application or device + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of InlineResponse20017 + public async System.Threading.Tasks.Task SourcesGetAsync (string accessToken = null, string clientId = null, string name = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) + { + ApiResponse response = await SourcesGetAsyncWithHttpInfo(accessToken, clientId, name, createdAt, updatedAt, limit, offset, sort); + return response.Data; + + } + + /// + /// Get measurement sources Returns a list of all the apps from which measurement data is obtained. + /// + /// User's OAuth2 access token + /// The ID of the client application which last created or updated this source + /// Name of the application or device + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of ApiResponse (InlineResponse20017) + public async System.Threading.Tasks.Task> SourcesGetAsyncWithHttpInfo (string accessToken = null, string clientId = null, string name = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) { @@ -273,43 +483,72 @@ public async System.Threading.Tasks.Task SourcesGetAsync (s String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (clientId != null) queryParams.Add("client_id", ApiClient.ParameterToString(clientId)); // query parameter - if (name != null) queryParams.Add("name", ApiClient.ParameterToString(name)); // query parameter - if (createdAt != null) queryParams.Add("created_at", ApiClient.ParameterToString(createdAt)); // query parameter - if (updatedAt != null) queryParams.Add("updated_at", ApiClient.ParameterToString(updatedAt)); // query parameter - if (limit != null) queryParams.Add("limit", ApiClient.ParameterToString(limit)); // query parameter - if (offset != null) queryParams.Add("offset", ApiClient.ParameterToString(offset)); // query parameter - if (sort != null) queryParams.Add("sort", ApiClient.ParameterToString(sort)); // query parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + if (clientId != null) queryParams.Add("client_id", Configuration.ApiClient.ParameterToString(clientId)); // query parameter + if (name != null) queryParams.Add("name", Configuration.ApiClient.ParameterToString(name)); // query parameter + if (createdAt != null) queryParams.Add("created_at", Configuration.ApiClient.ParameterToString(createdAt)); // query parameter + if (updatedAt != null) queryParams.Add("updated_at", Configuration.ApiClient.ParameterToString(updatedAt)); // query parameter + if (limit != null) queryParams.Add("limit", Configuration.ApiClient.ParameterToString(limit)); // query parameter + if (offset != null) queryParams.Add("offset", Configuration.ApiClient.ParameterToString(offset)); // query parameter + if (sort != null) queryParams.Add("sort", Configuration.ApiClient.ParameterToString(sort)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; - + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling SourcesGet: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling SourcesGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling SourcesGet: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse20013) ApiClient.Deserialize(response, typeof(InlineResponse20013)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20017) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20017))); + } /// - /// Store Source Store Source + /// Add a data source Add a life-tracking app or device to the QuantiModo list of data sources. + /// + /// User's OAuth2 access token + /// Source that should be stored + /// InlineResponse20018 + public InlineResponse20018 SourcesPost (string accessToken = null, Source body = null) + { + ApiResponse response = SourcesPostWithHttpInfo(accessToken, body); + return response.Data; + } + + /// + /// Add a data source Add a life-tracking app or device to the QuantiModo list of data sources. /// + /// User's OAuth2 access token /// Source that should be stored - /// InlineResponse20014 - public InlineResponse20014 SourcesPost (Source body) + /// ApiResponse of InlineResponse20018 + public ApiResponse< InlineResponse20018 > SourcesPostWithHttpInfo (string accessToken = null, Source body = null) { @@ -317,7 +556,7 @@ public InlineResponse20014 SourcesPost (Source body) var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -326,40 +565,67 @@ public InlineResponse20014 SourcesPost (Source body) String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - postBody = ApiClient.Serialize(body); // http body (model) parameter + postBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter + + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } - - // authentication setting, if any - String[] authSettings = new String[] { }; // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling SourcesPost: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling SourcesPost: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling SourcesPost: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling SourcesPost: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse20014) ApiClient.Deserialize(response, typeof(InlineResponse20014)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20018) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20018))); + } /// - /// Store Source Store Source + /// Add a data source Add a life-tracking app or device to the QuantiModo list of data sources. /// + /// User's OAuth2 access token /// Source that should be stored - /// InlineResponse20014 - public async System.Threading.Tasks.Task SourcesPostAsync (Source body) + /// Task of InlineResponse20018 + public async System.Threading.Tasks.Task SourcesPostAsync (string accessToken = null, Source body = null) + { + ApiResponse response = await SourcesPostAsyncWithHttpInfo(accessToken, body); + return response.Data; + + } + + /// + /// Add a data source Add a life-tracking app or device to the QuantiModo list of data sources. + /// + /// User's OAuth2 access token + /// Source that should be stored + /// Task of ApiResponse (InlineResponse20018) + public async System.Threading.Tasks.Task> SourcesPostAsyncWithHttpInfo (string accessToken = null, Source body = null) { @@ -376,37 +642,66 @@ public async System.Threading.Tasks.Task SourcesPostAsync ( String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - postBody = ApiClient.Serialize(body); // http body (model) parameter + postBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; - + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling SourcesPost: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams); - return (InlineResponse20014) ApiClient.Deserialize(response, typeof(InlineResponse20014)); + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling SourcesPost: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling SourcesPost: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20018) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20018))); + } /// /// Get Source Get Source /// /// id of Source - /// InlineResponse20014 - public InlineResponse20014 SourcesIdGet (int? id) + /// User's OAuth2 access token + /// InlineResponse20018 + public InlineResponse20018 SourcesIdGet (int? id, string accessToken = null) + { + ApiResponse response = SourcesIdGetWithHttpInfo(id, accessToken); + return response.Data; + } + + /// + /// Get Source Get Source + /// + /// id of Source + /// User's OAuth2 access token + /// ApiResponse of InlineResponse20018 + public ApiResponse< InlineResponse20018 > SourcesIdGetWithHttpInfo (int? id, string accessToken = null) { // verify the required parameter 'id' is set @@ -417,7 +712,7 @@ public InlineResponse20014 SourcesIdGet (int? id) var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -426,40 +721,67 @@ public InlineResponse20014 SourcesIdGet (int? id) String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling SourcesIdGet: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling SourcesIdGet: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling SourcesIdGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling SourcesIdGet: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse20014) ApiClient.Deserialize(response, typeof(InlineResponse20014)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20018) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20018))); + } /// /// Get Source Get Source /// /// id of Source - /// InlineResponse20014 - public async System.Threading.Tasks.Task SourcesIdGetAsync (int? id) + /// User's OAuth2 access token + /// Task of InlineResponse20018 + public async System.Threading.Tasks.Task SourcesIdGetAsync (int? id, string accessToken = null) + { + ApiResponse response = await SourcesIdGetAsyncWithHttpInfo(id, accessToken); + return response.Data; + + } + + /// + /// Get Source Get Source + /// + /// id of Source + /// User's OAuth2 access token + /// Task of ApiResponse (InlineResponse20018) + public async System.Threading.Tasks.Task> SourcesIdGetAsyncWithHttpInfo (int? id, string accessToken = null) { // verify the required parameter 'id' is set if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling SourcesIdGet"); @@ -478,38 +800,68 @@ public async System.Threading.Tasks.Task SourcesIdGetAsync String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; - + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling SourcesIdGet: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling SourcesIdGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling SourcesIdGet: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse20014) ApiClient.Deserialize(response, typeof(InlineResponse20014)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20018) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20018))); + } /// /// Update Source Update Source /// /// id of Source + /// User's OAuth2 access token /// Source that should be updated - /// InlineResponse2002 - public InlineResponse2002 SourcesIdPut (int? id, Source body) + /// InlineResponse2002 + public InlineResponse2002 SourcesIdPut (int? id, string accessToken = null, Source body = null) + { + ApiResponse response = SourcesIdPutWithHttpInfo(id, accessToken, body); + return response.Data; + } + + /// + /// Update Source Update Source + /// + /// id of Source + /// User's OAuth2 access token + /// Source that should be updated + /// ApiResponse of InlineResponse2002 + public ApiResponse< InlineResponse2002 > SourcesIdPutWithHttpInfo (int? id, string accessToken = null, Source body = null) { // verify the required parameter 'id' is set @@ -520,7 +872,7 @@ public InlineResponse2002 SourcesIdPut (int? id, Source body) var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -529,42 +881,70 @@ public InlineResponse2002 SourcesIdPut (int? id, Source body) String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - postBody = ApiClient.Serialize(body); // http body (model) parameter + postBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter + + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } - - // authentication setting, if any - String[] authSettings = new String[] { }; // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling SourcesIdPut: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling SourcesIdPut: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling SourcesIdPut: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling SourcesIdPut: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse2002) ApiClient.Deserialize(response, typeof(InlineResponse2002)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2002) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2002))); + } /// /// Update Source Update Source /// /// id of Source + /// User's OAuth2 access token /// Source that should be updated - /// InlineResponse2002 - public async System.Threading.Tasks.Task SourcesIdPutAsync (int? id, Source body) + /// Task of InlineResponse2002 + public async System.Threading.Tasks.Task SourcesIdPutAsync (int? id, string accessToken = null, Source body = null) + { + ApiResponse response = await SourcesIdPutAsyncWithHttpInfo(id, accessToken, body); + return response.Data; + + } + + /// + /// Update Source Update Source + /// + /// id of Source + /// User's OAuth2 access token + /// Source that should be updated + /// Task of ApiResponse (InlineResponse2002) + public async System.Threading.Tasks.Task> SourcesIdPutAsyncWithHttpInfo (int? id, string accessToken = null, Source body = null) { // verify the required parameter 'id' is set if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling SourcesIdPut"); @@ -583,38 +963,67 @@ public async System.Threading.Tasks.Task SourcesIdPutAsync ( String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - postBody = ApiClient.Serialize(body); // http body (model) parameter + postBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; - + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling SourcesIdPut: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams); - return (InlineResponse2002) ApiClient.Deserialize(response, typeof(InlineResponse2002)); + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling SourcesIdPut: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling SourcesIdPut: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2002) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2002))); + } /// /// Delete Source Delete Source /// /// id of Source - /// InlineResponse2002 - public InlineResponse2002 SourcesIdDelete (int? id) + /// User's OAuth2 access token + /// InlineResponse2002 + public InlineResponse2002 SourcesIdDelete (int? id, string accessToken = null) + { + ApiResponse response = SourcesIdDeleteWithHttpInfo(id, accessToken); + return response.Data; + } + + /// + /// Delete Source Delete Source + /// + /// id of Source + /// User's OAuth2 access token + /// ApiResponse of InlineResponse2002 + public ApiResponse< InlineResponse2002 > SourcesIdDeleteWithHttpInfo (int? id, string accessToken = null) { // verify the required parameter 'id' is set @@ -625,7 +1034,7 @@ public InlineResponse2002 SourcesIdDelete (int? id) var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -634,40 +1043,67 @@ public InlineResponse2002 SourcesIdDelete (int? id) String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling SourcesIdDelete: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling SourcesIdDelete: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling SourcesIdDelete: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling SourcesIdDelete: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse2002) ApiClient.Deserialize(response, typeof(InlineResponse2002)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2002) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2002))); + } /// /// Delete Source Delete Source /// /// id of Source - /// InlineResponse2002 - public async System.Threading.Tasks.Task SourcesIdDeleteAsync (int? id) + /// User's OAuth2 access token + /// Task of InlineResponse2002 + public async System.Threading.Tasks.Task SourcesIdDeleteAsync (int? id, string accessToken = null) + { + ApiResponse response = await SourcesIdDeleteAsyncWithHttpInfo(id, accessToken); + return response.Data; + + } + + /// + /// Delete Source Delete Source + /// + /// id of Source + /// User's OAuth2 access token + /// Task of ApiResponse (InlineResponse2002) + public async System.Threading.Tasks.Task> SourcesIdDeleteAsyncWithHttpInfo (int? id, string accessToken = null) { // verify the required parameter 'id' is set if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling SourcesIdDelete"); @@ -686,29 +1122,45 @@ public async System.Threading.Tasks.Task SourcesIdDeleteAsyn String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; - + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling SourcesIdDelete: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams); - return (InlineResponse2002) ApiClient.Deserialize(response, typeof(InlineResponse2002)); + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling SourcesIdDelete: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling SourcesIdDelete: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2002) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2002))); + } } diff --git a/src/main/csharp/io/swagger/Api/UnitApi.cs b/src/main/csharp/io/swagger/Api/UnitApi.cs index 1be1048..511e9e8 100644 --- a/src/main/csharp/io/swagger/Api/UnitApi.cs +++ b/src/main/csharp/io/swagger/Api/UnitApi.cs @@ -1,6 +1,7 @@ using System; using System.IO; using System.Collections.Generic; +using System.Linq; using RestSharp; using IO.Swagger.Client; using IO.Swagger.Model; @@ -15,50 +16,104 @@ public interface IUnitApi { /// - /// Get all Units + /// Get all available units /// /// - /// Get all Units + /// Get all available units /// - /// client_id - /// name - /// abbreviated_name - /// category_id - /// minimum_value - /// maximum_value + /// User's OAuth2 access token + /// The ID of the client application which last created or updated this unit + /// Unit name + /// Unit abbreviation + /// Unit category ID + /// Minimum value permitted for this unit + /// Maximum value permitted for this unit /// updated - /// multiply - /// add - /// created_at - /// updated_at - /// limit - /// offset - /// sort - /// InlineResponse20017 - InlineResponse20017 UnitsGet (string clientId, string name, string abbreviatedName, bool? categoryId, double? minimumValue, double? maximumValue, int? updated, double? multiply, double? add, string createdAt, string updatedAt, int? limit, int? offset, string sort); + /// ID of default unit for this units category + /// Value multiplied to convert to default unit in this unit category + /// Value which should be added to convert to default unit + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// InlineResponse20021 + InlineResponse20021 UnitsGet (string accessToken = null, string clientId = null, string name = null, string abbreviatedName = null, int? categoryId = null, double? minimumValue = null, double? maximumValue = null, int? updated = null, int? defaultUnitId = null, double? multiply = null, double? add = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); /// - /// Get all Units + /// Get all available units /// /// - /// Get all Units + /// Get all available units /// - /// client_id - /// name - /// abbreviated_name - /// category_id - /// minimum_value - /// maximum_value + /// User's OAuth2 access token + /// The ID of the client application which last created or updated this unit + /// Unit name + /// Unit abbreviation + /// Unit category ID + /// Minimum value permitted for this unit + /// Maximum value permitted for this unit /// updated - /// multiply - /// add - /// created_at - /// updated_at - /// limit - /// offset - /// sort - /// InlineResponse20017 - System.Threading.Tasks.Task UnitsGetAsync (string clientId, string name, string abbreviatedName, bool? categoryId, double? minimumValue, double? maximumValue, int? updated, double? multiply, double? add, string createdAt, string updatedAt, int? limit, int? offset, string sort); + /// ID of default unit for this units category + /// Value multiplied to convert to default unit in this unit category + /// Value which should be added to convert to default unit + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// ApiResponse of InlineResponse20021 + ApiResponse UnitsGetWithHttpInfo (string accessToken = null, string clientId = null, string name = null, string abbreviatedName = null, int? categoryId = null, double? minimumValue = null, double? maximumValue = null, int? updated = null, int? defaultUnitId = null, double? multiply = null, double? add = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Get all available units + /// + /// + /// Get all available units + /// + /// User's OAuth2 access token + /// The ID of the client application which last created or updated this unit + /// Unit name + /// Unit abbreviation + /// Unit category ID + /// Minimum value permitted for this unit + /// Maximum value permitted for this unit + /// updated + /// ID of default unit for this units category + /// Value multiplied to convert to default unit in this unit category + /// Value which should be added to convert to default unit + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of InlineResponse20021 + System.Threading.Tasks.Task UnitsGetAsync (string accessToken = null, string clientId = null, string name = null, string abbreviatedName = null, int? categoryId = null, double? minimumValue = null, double? maximumValue = null, int? updated = null, int? defaultUnitId = null, double? multiply = null, double? add = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Get all available units + /// + /// + /// Get all available units + /// + /// User's OAuth2 access token + /// The ID of the client application which last created or updated this unit + /// Unit name + /// Unit abbreviation + /// Unit category ID + /// Minimum value permitted for this unit + /// Maximum value permitted for this unit + /// updated + /// ID of default unit for this units category + /// Value multiplied to convert to default unit in this unit category + /// Value which should be added to convert to default unit + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of ApiResponse (InlineResponse20021) + System.Threading.Tasks.Task> UnitsGetAsyncWithHttpInfo (string accessToken = null, string clientId = null, string name = null, string abbreviatedName = null, int? categoryId = null, double? minimumValue = null, double? maximumValue = null, int? updated = null, int? defaultUnitId = null, double? multiply = null, double? add = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); /// /// Store Unit @@ -66,9 +121,10 @@ public interface IUnitApi /// /// Store Unit /// + /// User's OAuth2 access token /// Unit that should be stored - /// InlineResponse20018 - InlineResponse20018 UnitsPost (Unit body); + /// InlineResponse20022 + InlineResponse20022 UnitsPost (string accessToken = null, Unit body = null); /// /// Store Unit @@ -76,9 +132,32 @@ public interface IUnitApi /// /// Store Unit /// + /// User's OAuth2 access token + /// Unit that should be stored + /// ApiResponse of InlineResponse20022 + ApiResponse UnitsPostWithHttpInfo (string accessToken = null, Unit body = null); + + /// + /// Store Unit + /// + /// + /// Store Unit + /// + /// User's OAuth2 access token /// Unit that should be stored - /// InlineResponse20018 - System.Threading.Tasks.Task UnitsPostAsync (Unit body); + /// Task of InlineResponse20022 + System.Threading.Tasks.Task UnitsPostAsync (string accessToken = null, Unit body = null); + + /// + /// Store Unit + /// + /// + /// Store Unit + /// + /// User's OAuth2 access token + /// Unit that should be stored + /// Task of ApiResponse (InlineResponse20022) + System.Threading.Tasks.Task> UnitsPostAsyncWithHttpInfo (string accessToken = null, Unit body = null); /// /// Get Unit @@ -87,8 +166,9 @@ public interface IUnitApi /// Get Unit /// /// id of Unit - /// InlineResponse20018 - InlineResponse20018 UnitsIdGet (int? id); + /// User's OAuth2 access token + /// InlineResponse20022 + InlineResponse20022 UnitsIdGet (int? id, string accessToken = null); /// /// Get Unit @@ -97,8 +177,31 @@ public interface IUnitApi /// Get Unit /// /// id of Unit - /// InlineResponse20018 - System.Threading.Tasks.Task UnitsIdGetAsync (int? id); + /// User's OAuth2 access token + /// ApiResponse of InlineResponse20022 + ApiResponse UnitsIdGetWithHttpInfo (int? id, string accessToken = null); + + /// + /// Get Unit + /// + /// + /// Get Unit + /// + /// id of Unit + /// User's OAuth2 access token + /// Task of InlineResponse20022 + System.Threading.Tasks.Task UnitsIdGetAsync (int? id, string accessToken = null); + + /// + /// Get Unit + /// + /// + /// Get Unit + /// + /// id of Unit + /// User's OAuth2 access token + /// Task of ApiResponse (InlineResponse20022) + System.Threading.Tasks.Task> UnitsIdGetAsyncWithHttpInfo (int? id, string accessToken = null); /// /// Update Unit @@ -107,9 +210,10 @@ public interface IUnitApi /// Update Unit /// /// id of Unit + /// User's OAuth2 access token /// Unit that should be updated /// InlineResponse2002 - InlineResponse2002 UnitsIdPut (int? id, Unit body); + InlineResponse2002 UnitsIdPut (int? id, string accessToken = null, Unit body = null); /// /// Update Unit @@ -118,9 +222,34 @@ public interface IUnitApi /// Update Unit /// /// id of Unit + /// User's OAuth2 access token /// Unit that should be updated - /// InlineResponse2002 - System.Threading.Tasks.Task UnitsIdPutAsync (int? id, Unit body); + /// ApiResponse of InlineResponse2002 + ApiResponse UnitsIdPutWithHttpInfo (int? id, string accessToken = null, Unit body = null); + + /// + /// Update Unit + /// + /// + /// Update Unit + /// + /// id of Unit + /// User's OAuth2 access token + /// Unit that should be updated + /// Task of InlineResponse2002 + System.Threading.Tasks.Task UnitsIdPutAsync (int? id, string accessToken = null, Unit body = null); + + /// + /// Update Unit + /// + /// + /// Update Unit + /// + /// id of Unit + /// User's OAuth2 access token + /// Unit that should be updated + /// Task of ApiResponse (InlineResponse2002) + System.Threading.Tasks.Task> UnitsIdPutAsyncWithHttpInfo (int? id, string accessToken = null, Unit body = null); /// /// Delete Unit @@ -129,8 +258,9 @@ public interface IUnitApi /// Delete Unit /// /// id of Unit + /// User's OAuth2 access token /// InlineResponse2002 - InlineResponse2002 UnitsIdDelete (int? id); + InlineResponse2002 UnitsIdDelete (int? id, string accessToken = null); /// /// Delete Unit @@ -139,8 +269,31 @@ public interface IUnitApi /// Delete Unit /// /// id of Unit - /// InlineResponse2002 - System.Threading.Tasks.Task UnitsIdDeleteAsync (int? id); + /// User's OAuth2 access token + /// ApiResponse of InlineResponse2002 + ApiResponse UnitsIdDeleteWithHttpInfo (int? id, string accessToken = null); + + /// + /// Delete Unit + /// + /// + /// Delete Unit + /// + /// id of Unit + /// User's OAuth2 access token + /// Task of InlineResponse2002 + System.Threading.Tasks.Task UnitsIdDeleteAsync (int? id, string accessToken = null); + + /// + /// Delete Unit + /// + /// + /// Delete Unit + /// + /// id of Unit + /// User's OAuth2 access token + /// Task of ApiResponse (InlineResponse2002) + System.Threading.Tasks.Task> UnitsIdDeleteAsyncWithHttpInfo (int? id, string accessToken = null); } @@ -152,70 +305,121 @@ public class UnitApi : IUnitApi /// /// Initializes a new instance of the class. /// - /// an instance of ApiClient (optional) /// - public UnitApi(ApiClient apiClient = null) + public UnitApi(String basePath) { - if (apiClient == null) // use the default one in Configuration - this.ApiClient = Configuration.DefaultApiClient; - else - this.ApiClient = apiClient; + this.Configuration = new Configuration(new ApiClient(basePath)); } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class + /// using Configuration object /// + /// An instance of Configuration /// - public UnitApi(String basePath) + public UnitApi(Configuration configuration = null) + { + if (configuration == null) // use the default one in Configuration + this.Configuration = Configuration.Default; + else + this.Configuration = configuration; + } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public String GetBasePath() { - this.ApiClient = new ApiClient(basePath); + return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); } - + /// /// Sets the base path of the API client. /// - /// The base path /// The base path + [Obsolete("SetBasePath is deprecated, please do 'Configuraiton.ApiClient = new ApiClient(\"http://new-path\")' instead.")] public void SetBasePath(String basePath) { - this.ApiClient.BasePath = basePath; + // do nothing } /// - /// Gets the base path of the API client. + /// Gets or sets the configuration object /// - /// The base path - public String GetBasePath() + /// An instance of the Configuration + public Configuration Configuration {get; set;} + + /// + /// Gets the default header. + /// + /// Dictionary of HTTP header + [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] + public Dictionary DefaultHeader() { - return this.ApiClient.BasePath; + return this.Configuration.DefaultHeader; } - + /// - /// Gets or sets the API client. + /// Add default header. /// - /// An instance of the ApiClient - public ApiClient ApiClient {get; set;} - + /// Header field name. + /// Header field value. + /// + [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] + public void AddDefaultHeader(string key, string value) + { + this.Configuration.AddDefaultHeader(key, value); + } + /// - /// Get all Units Get all Units + /// Get all available units Get all available units /// - /// client_id - /// name - /// abbreviated_name - /// category_id - /// minimum_value - /// maximum_value + /// User's OAuth2 access token + /// The ID of the client application which last created or updated this unit + /// Unit name + /// Unit abbreviation + /// Unit category ID + /// Minimum value permitted for this unit + /// Maximum value permitted for this unit /// updated - /// multiply - /// add - /// created_at - /// updated_at - /// limit - /// offset - /// sort - /// InlineResponse20017 - public InlineResponse20017 UnitsGet (string clientId, string name, string abbreviatedName, bool? categoryId, double? minimumValue, double? maximumValue, int? updated, double? multiply, double? add, string createdAt, string updatedAt, int? limit, int? offset, string sort) + /// ID of default unit for this units category + /// Value multiplied to convert to default unit in this unit category + /// Value which should be added to convert to default unit + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// InlineResponse20021 + public InlineResponse20021 UnitsGet (string accessToken = null, string clientId = null, string name = null, string abbreviatedName = null, int? categoryId = null, double? minimumValue = null, double? maximumValue = null, int? updated = null, int? defaultUnitId = null, double? multiply = null, double? add = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) + { + ApiResponse response = UnitsGetWithHttpInfo(accessToken, clientId, name, abbreviatedName, categoryId, minimumValue, maximumValue, updated, defaultUnitId, multiply, add, createdAt, updatedAt, limit, offset, sort); + return response.Data; + } + + /// + /// Get all available units Get all available units + /// + /// User's OAuth2 access token + /// The ID of the client application which last created or updated this unit + /// Unit name + /// Unit abbreviation + /// Unit category ID + /// Minimum value permitted for this unit + /// Maximum value permitted for this unit + /// updated + /// ID of default unit for this units category + /// Value multiplied to convert to default unit in this unit category + /// Value which should be added to convert to default unit + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// ApiResponse of InlineResponse20021 + public ApiResponse< InlineResponse20021 > UnitsGetWithHttpInfo (string accessToken = null, string clientId = null, string name = null, string abbreviatedName = null, int? categoryId = null, double? minimumValue = null, double? maximumValue = null, int? updated = null, int? defaultUnitId = null, double? multiply = null, double? add = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) { @@ -223,7 +427,7 @@ public InlineResponse20017 UnitsGet (string clientId, string name, string abbrev var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -232,66 +436,109 @@ public InlineResponse20017 UnitsGet (string clientId, string name, string abbrev String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (clientId != null) queryParams.Add("client_id", ApiClient.ParameterToString(clientId)); // query parameter - if (name != null) queryParams.Add("name", ApiClient.ParameterToString(name)); // query parameter - if (abbreviatedName != null) queryParams.Add("abbreviated_name", ApiClient.ParameterToString(abbreviatedName)); // query parameter - if (categoryId != null) queryParams.Add("category_id", ApiClient.ParameterToString(categoryId)); // query parameter - if (minimumValue != null) queryParams.Add("minimum_value", ApiClient.ParameterToString(minimumValue)); // query parameter - if (maximumValue != null) queryParams.Add("maximum_value", ApiClient.ParameterToString(maximumValue)); // query parameter - if (updated != null) queryParams.Add("updated", ApiClient.ParameterToString(updated)); // query parameter - if (multiply != null) queryParams.Add("multiply", ApiClient.ParameterToString(multiply)); // query parameter - if (add != null) queryParams.Add("add", ApiClient.ParameterToString(add)); // query parameter - if (createdAt != null) queryParams.Add("created_at", ApiClient.ParameterToString(createdAt)); // query parameter - if (updatedAt != null) queryParams.Add("updated_at", ApiClient.ParameterToString(updatedAt)); // query parameter - if (limit != null) queryParams.Add("limit", ApiClient.ParameterToString(limit)); // query parameter - if (offset != null) queryParams.Add("offset", ApiClient.ParameterToString(offset)); // query parameter - if (sort != null) queryParams.Add("sort", ApiClient.ParameterToString(sort)); // query parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + if (clientId != null) queryParams.Add("client_id", Configuration.ApiClient.ParameterToString(clientId)); // query parameter + if (name != null) queryParams.Add("name", Configuration.ApiClient.ParameterToString(name)); // query parameter + if (abbreviatedName != null) queryParams.Add("abbreviated_name", Configuration.ApiClient.ParameterToString(abbreviatedName)); // query parameter + if (categoryId != null) queryParams.Add("category_id", Configuration.ApiClient.ParameterToString(categoryId)); // query parameter + if (minimumValue != null) queryParams.Add("minimum_value", Configuration.ApiClient.ParameterToString(minimumValue)); // query parameter + if (maximumValue != null) queryParams.Add("maximum_value", Configuration.ApiClient.ParameterToString(maximumValue)); // query parameter + if (updated != null) queryParams.Add("updated", Configuration.ApiClient.ParameterToString(updated)); // query parameter + if (defaultUnitId != null) queryParams.Add("default_unit_id", Configuration.ApiClient.ParameterToString(defaultUnitId)); // query parameter + if (multiply != null) queryParams.Add("multiply", Configuration.ApiClient.ParameterToString(multiply)); // query parameter + if (add != null) queryParams.Add("add", Configuration.ApiClient.ParameterToString(add)); // query parameter + if (createdAt != null) queryParams.Add("created_at", Configuration.ApiClient.ParameterToString(createdAt)); // query parameter + if (updatedAt != null) queryParams.Add("updated_at", Configuration.ApiClient.ParameterToString(updatedAt)); // query parameter + if (limit != null) queryParams.Add("limit", Configuration.ApiClient.ParameterToString(limit)); // query parameter + if (offset != null) queryParams.Add("offset", Configuration.ApiClient.ParameterToString(offset)); // query parameter + if (sort != null) queryParams.Add("sort", Configuration.ApiClient.ParameterToString(sort)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling UnitsGet: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling UnitsGet: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling UnitsGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling UnitsGet: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse20017) ApiClient.Deserialize(response, typeof(InlineResponse20017)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20021) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20021))); + } /// - /// Get all Units Get all Units + /// Get all available units Get all available units + /// + /// User's OAuth2 access token + /// The ID of the client application which last created or updated this unit + /// Unit name + /// Unit abbreviation + /// Unit category ID + /// Minimum value permitted for this unit + /// Maximum value permitted for this unit + /// updated + /// ID of default unit for this units category + /// Value multiplied to convert to default unit in this unit category + /// Value which should be added to convert to default unit + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of InlineResponse20021 + public async System.Threading.Tasks.Task UnitsGetAsync (string accessToken = null, string clientId = null, string name = null, string abbreviatedName = null, int? categoryId = null, double? minimumValue = null, double? maximumValue = null, int? updated = null, int? defaultUnitId = null, double? multiply = null, double? add = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) + { + ApiResponse response = await UnitsGetAsyncWithHttpInfo(accessToken, clientId, name, abbreviatedName, categoryId, minimumValue, maximumValue, updated, defaultUnitId, multiply, add, createdAt, updatedAt, limit, offset, sort); + return response.Data; + + } + + /// + /// Get all available units Get all available units /// - /// client_id - /// name - /// abbreviated_name - /// category_id - /// minimum_value - /// maximum_value + /// User's OAuth2 access token + /// The ID of the client application which last created or updated this unit + /// Unit name + /// Unit abbreviation + /// Unit category ID + /// Minimum value permitted for this unit + /// Maximum value permitted for this unit /// updated - /// multiply - /// add - /// created_at - /// updated_at - /// limit - /// offset - /// sort - /// InlineResponse20017 - public async System.Threading.Tasks.Task UnitsGetAsync (string clientId, string name, string abbreviatedName, bool? categoryId, double? minimumValue, double? maximumValue, int? updated, double? multiply, double? add, string createdAt, string updatedAt, int? limit, int? offset, string sort) + /// ID of default unit for this units category + /// Value multiplied to convert to default unit in this unit category + /// Value which should be added to convert to default unit + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of ApiResponse (InlineResponse20021) + public async System.Threading.Tasks.Task> UnitsGetAsyncWithHttpInfo (string accessToken = null, string clientId = null, string name = null, string abbreviatedName = null, int? categoryId = null, double? minimumValue = null, double? maximumValue = null, int? updated = null, int? defaultUnitId = null, double? multiply = null, double? add = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) { @@ -308,50 +555,80 @@ public async System.Threading.Tasks.Task UnitsGetAsync (str String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (clientId != null) queryParams.Add("client_id", ApiClient.ParameterToString(clientId)); // query parameter - if (name != null) queryParams.Add("name", ApiClient.ParameterToString(name)); // query parameter - if (abbreviatedName != null) queryParams.Add("abbreviated_name", ApiClient.ParameterToString(abbreviatedName)); // query parameter - if (categoryId != null) queryParams.Add("category_id", ApiClient.ParameterToString(categoryId)); // query parameter - if (minimumValue != null) queryParams.Add("minimum_value", ApiClient.ParameterToString(minimumValue)); // query parameter - if (maximumValue != null) queryParams.Add("maximum_value", ApiClient.ParameterToString(maximumValue)); // query parameter - if (updated != null) queryParams.Add("updated", ApiClient.ParameterToString(updated)); // query parameter - if (multiply != null) queryParams.Add("multiply", ApiClient.ParameterToString(multiply)); // query parameter - if (add != null) queryParams.Add("add", ApiClient.ParameterToString(add)); // query parameter - if (createdAt != null) queryParams.Add("created_at", ApiClient.ParameterToString(createdAt)); // query parameter - if (updatedAt != null) queryParams.Add("updated_at", ApiClient.ParameterToString(updatedAt)); // query parameter - if (limit != null) queryParams.Add("limit", ApiClient.ParameterToString(limit)); // query parameter - if (offset != null) queryParams.Add("offset", ApiClient.ParameterToString(offset)); // query parameter - if (sort != null) queryParams.Add("sort", ApiClient.ParameterToString(sort)); // query parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + if (clientId != null) queryParams.Add("client_id", Configuration.ApiClient.ParameterToString(clientId)); // query parameter + if (name != null) queryParams.Add("name", Configuration.ApiClient.ParameterToString(name)); // query parameter + if (abbreviatedName != null) queryParams.Add("abbreviated_name", Configuration.ApiClient.ParameterToString(abbreviatedName)); // query parameter + if (categoryId != null) queryParams.Add("category_id", Configuration.ApiClient.ParameterToString(categoryId)); // query parameter + if (minimumValue != null) queryParams.Add("minimum_value", Configuration.ApiClient.ParameterToString(minimumValue)); // query parameter + if (maximumValue != null) queryParams.Add("maximum_value", Configuration.ApiClient.ParameterToString(maximumValue)); // query parameter + if (updated != null) queryParams.Add("updated", Configuration.ApiClient.ParameterToString(updated)); // query parameter + if (defaultUnitId != null) queryParams.Add("default_unit_id", Configuration.ApiClient.ParameterToString(defaultUnitId)); // query parameter + if (multiply != null) queryParams.Add("multiply", Configuration.ApiClient.ParameterToString(multiply)); // query parameter + if (add != null) queryParams.Add("add", Configuration.ApiClient.ParameterToString(add)); // query parameter + if (createdAt != null) queryParams.Add("created_at", Configuration.ApiClient.ParameterToString(createdAt)); // query parameter + if (updatedAt != null) queryParams.Add("updated_at", Configuration.ApiClient.ParameterToString(updatedAt)); // query parameter + if (limit != null) queryParams.Add("limit", Configuration.ApiClient.ParameterToString(limit)); // query parameter + if (offset != null) queryParams.Add("offset", Configuration.ApiClient.ParameterToString(offset)); // query parameter + if (sort != null) queryParams.Add("sort", Configuration.ApiClient.ParameterToString(sort)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; - + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling UnitsGet: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling UnitsGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling UnitsGet: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse20017) ApiClient.Deserialize(response, typeof(InlineResponse20017)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20021) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20021))); + } /// /// Store Unit Store Unit /// + /// User's OAuth2 access token /// Unit that should be stored - /// InlineResponse20018 - public InlineResponse20018 UnitsPost (Unit body) + /// InlineResponse20022 + public InlineResponse20022 UnitsPost (string accessToken = null, Unit body = null) + { + ApiResponse response = UnitsPostWithHttpInfo(accessToken, body); + return response.Data; + } + + /// + /// Store Unit Store Unit + /// + /// User's OAuth2 access token + /// Unit that should be stored + /// ApiResponse of InlineResponse20022 + public ApiResponse< InlineResponse20022 > UnitsPostWithHttpInfo (string accessToken = null, Unit body = null) { @@ -359,7 +636,7 @@ public InlineResponse20018 UnitsPost (Unit body) var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -368,40 +645,67 @@ public InlineResponse20018 UnitsPost (Unit body) String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - postBody = ApiClient.Serialize(body); // http body (model) parameter + postBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter + + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } - - // authentication setting, if any - String[] authSettings = new String[] { }; // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling UnitsPost: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling UnitsPost: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling UnitsPost: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling UnitsPost: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse20018) ApiClient.Deserialize(response, typeof(InlineResponse20018)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20022) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20022))); + } /// /// Store Unit Store Unit /// + /// User's OAuth2 access token + /// Unit that should be stored + /// Task of InlineResponse20022 + public async System.Threading.Tasks.Task UnitsPostAsync (string accessToken = null, Unit body = null) + { + ApiResponse response = await UnitsPostAsyncWithHttpInfo(accessToken, body); + return response.Data; + + } + + /// + /// Store Unit Store Unit + /// + /// User's OAuth2 access token /// Unit that should be stored - /// InlineResponse20018 - public async System.Threading.Tasks.Task UnitsPostAsync (Unit body) + /// Task of ApiResponse (InlineResponse20022) + public async System.Threading.Tasks.Task> UnitsPostAsyncWithHttpInfo (string accessToken = null, Unit body = null) { @@ -418,37 +722,66 @@ public async System.Threading.Tasks.Task UnitsPostAsync (Un String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - postBody = ApiClient.Serialize(body); // http body (model) parameter + postBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; - + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling UnitsPost: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling UnitsPost: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling UnitsPost: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse20018) ApiClient.Deserialize(response, typeof(InlineResponse20018)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20022) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20022))); + } /// /// Get Unit Get Unit /// /// id of Unit - /// InlineResponse20018 - public InlineResponse20018 UnitsIdGet (int? id) + /// User's OAuth2 access token + /// InlineResponse20022 + public InlineResponse20022 UnitsIdGet (int? id, string accessToken = null) + { + ApiResponse response = UnitsIdGetWithHttpInfo(id, accessToken); + return response.Data; + } + + /// + /// Get Unit Get Unit + /// + /// id of Unit + /// User's OAuth2 access token + /// ApiResponse of InlineResponse20022 + public ApiResponse< InlineResponse20022 > UnitsIdGetWithHttpInfo (int? id, string accessToken = null) { // verify the required parameter 'id' is set @@ -459,7 +792,7 @@ public InlineResponse20018 UnitsIdGet (int? id) var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -468,40 +801,67 @@ public InlineResponse20018 UnitsIdGet (int? id) String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling UnitsIdGet: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling UnitsIdGet: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling UnitsIdGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling UnitsIdGet: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse20018) ApiClient.Deserialize(response, typeof(InlineResponse20018)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20022) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20022))); + } /// /// Get Unit Get Unit /// /// id of Unit - /// InlineResponse20018 - public async System.Threading.Tasks.Task UnitsIdGetAsync (int? id) + /// User's OAuth2 access token + /// Task of InlineResponse20022 + public async System.Threading.Tasks.Task UnitsIdGetAsync (int? id, string accessToken = null) + { + ApiResponse response = await UnitsIdGetAsyncWithHttpInfo(id, accessToken); + return response.Data; + + } + + /// + /// Get Unit Get Unit + /// + /// id of Unit + /// User's OAuth2 access token + /// Task of ApiResponse (InlineResponse20022) + public async System.Threading.Tasks.Task> UnitsIdGetAsyncWithHttpInfo (int? id, string accessToken = null) { // verify the required parameter 'id' is set if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling UnitsIdGet"); @@ -520,38 +880,68 @@ public async System.Threading.Tasks.Task UnitsIdGetAsync (i String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; - + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling UnitsIdGet: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling UnitsIdGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling UnitsIdGet: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse20018) ApiClient.Deserialize(response, typeof(InlineResponse20018)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20022) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20022))); + } /// /// Update Unit Update Unit /// /// id of Unit + /// User's OAuth2 access token /// Unit that should be updated - /// InlineResponse2002 - public InlineResponse2002 UnitsIdPut (int? id, Unit body) + /// InlineResponse2002 + public InlineResponse2002 UnitsIdPut (int? id, string accessToken = null, Unit body = null) + { + ApiResponse response = UnitsIdPutWithHttpInfo(id, accessToken, body); + return response.Data; + } + + /// + /// Update Unit Update Unit + /// + /// id of Unit + /// User's OAuth2 access token + /// Unit that should be updated + /// ApiResponse of InlineResponse2002 + public ApiResponse< InlineResponse2002 > UnitsIdPutWithHttpInfo (int? id, string accessToken = null, Unit body = null) { // verify the required parameter 'id' is set @@ -562,7 +952,7 @@ public InlineResponse2002 UnitsIdPut (int? id, Unit body) var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -571,42 +961,70 @@ public InlineResponse2002 UnitsIdPut (int? id, Unit body) String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - postBody = ApiClient.Serialize(body); // http body (model) parameter + postBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter + + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } - - // authentication setting, if any - String[] authSettings = new String[] { }; // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling UnitsIdPut: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling UnitsIdPut: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling UnitsIdPut: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling UnitsIdPut: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse2002) ApiClient.Deserialize(response, typeof(InlineResponse2002)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2002) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2002))); + } /// /// Update Unit Update Unit /// /// id of Unit + /// User's OAuth2 access token /// Unit that should be updated - /// InlineResponse2002 - public async System.Threading.Tasks.Task UnitsIdPutAsync (int? id, Unit body) + /// Task of InlineResponse2002 + public async System.Threading.Tasks.Task UnitsIdPutAsync (int? id, string accessToken = null, Unit body = null) + { + ApiResponse response = await UnitsIdPutAsyncWithHttpInfo(id, accessToken, body); + return response.Data; + + } + + /// + /// Update Unit Update Unit + /// + /// id of Unit + /// User's OAuth2 access token + /// Unit that should be updated + /// Task of ApiResponse (InlineResponse2002) + public async System.Threading.Tasks.Task> UnitsIdPutAsyncWithHttpInfo (int? id, string accessToken = null, Unit body = null) { // verify the required parameter 'id' is set if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling UnitsIdPut"); @@ -625,38 +1043,67 @@ public async System.Threading.Tasks.Task UnitsIdPutAsync (in String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - postBody = ApiClient.Serialize(body); // http body (model) parameter + postBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; - + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling UnitsIdPut: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling UnitsIdPut: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling UnitsIdPut: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse2002) ApiClient.Deserialize(response, typeof(InlineResponse2002)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2002) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2002))); + } /// /// Delete Unit Delete Unit /// /// id of Unit - /// InlineResponse2002 - public InlineResponse2002 UnitsIdDelete (int? id) + /// User's OAuth2 access token + /// InlineResponse2002 + public InlineResponse2002 UnitsIdDelete (int? id, string accessToken = null) + { + ApiResponse response = UnitsIdDeleteWithHttpInfo(id, accessToken); + return response.Data; + } + + /// + /// Delete Unit Delete Unit + /// + /// id of Unit + /// User's OAuth2 access token + /// ApiResponse of InlineResponse2002 + public ApiResponse< InlineResponse2002 > UnitsIdDeleteWithHttpInfo (int? id, string accessToken = null) { // verify the required parameter 'id' is set @@ -667,7 +1114,7 @@ public InlineResponse2002 UnitsIdDelete (int? id) var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -676,40 +1123,67 @@ public InlineResponse2002 UnitsIdDelete (int? id) String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling UnitsIdDelete: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling UnitsIdDelete: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling UnitsIdDelete: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling UnitsIdDelete: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse2002) ApiClient.Deserialize(response, typeof(InlineResponse2002)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2002) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2002))); + } /// /// Delete Unit Delete Unit /// /// id of Unit - /// InlineResponse2002 - public async System.Threading.Tasks.Task UnitsIdDeleteAsync (int? id) + /// User's OAuth2 access token + /// Task of InlineResponse2002 + public async System.Threading.Tasks.Task UnitsIdDeleteAsync (int? id, string accessToken = null) + { + ApiResponse response = await UnitsIdDeleteAsyncWithHttpInfo(id, accessToken); + return response.Data; + + } + + /// + /// Delete Unit Delete Unit + /// + /// id of Unit + /// User's OAuth2 access token + /// Task of ApiResponse (InlineResponse2002) + public async System.Threading.Tasks.Task> UnitsIdDeleteAsyncWithHttpInfo (int? id, string accessToken = null) { // verify the required parameter 'id' is set if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling UnitsIdDelete"); @@ -728,29 +1202,45 @@ public async System.Threading.Tasks.Task UnitsIdDeleteAsync String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; - + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling UnitsIdDelete: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams); - return (InlineResponse2002) ApiClient.Deserialize(response, typeof(InlineResponse2002)); + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling UnitsIdDelete: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling UnitsIdDelete: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2002) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2002))); + } } diff --git a/src/main/csharp/io/swagger/Api/UnitCategoryApi.cs b/src/main/csharp/io/swagger/Api/UnitCategoryApi.cs index 3f8b718..06216df 100644 --- a/src/main/csharp/io/swagger/Api/UnitCategoryApi.cs +++ b/src/main/csharp/io/swagger/Api/UnitCategoryApi.cs @@ -1,6 +1,7 @@ using System; using System.IO; using System.Collections.Generic; +using System.Linq; using RestSharp; using IO.Swagger.Client; using IO.Swagger.Model; @@ -15,34 +16,68 @@ public interface IUnitCategoryApi { /// - /// Get all UnitCategories + /// Get unit categories /// /// - /// Get all UnitCategories + /// Get a list of the categories of measurement units such as 'Distance', 'Duration', 'Energy', 'Frequency', 'Miscellany', 'Pressure', 'Proportion', 'Rating', 'Temperature', 'Volume', and 'Weight'. /// - /// name - /// created_at - /// updated_at - /// limit - /// offset - /// sort - /// InlineResponse20015 - InlineResponse20015 UnitCategoriesGet (string name, string createdAt, string updatedAt, int? limit, int? offset, string sort); + /// User's OAuth2 access token + /// Unit category name + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// InlineResponse20019 + InlineResponse20019 UnitCategoriesGet (string accessToken = null, string name = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); /// - /// Get all UnitCategories + /// Get unit categories /// /// - /// Get all UnitCategories + /// Get a list of the categories of measurement units such as 'Distance', 'Duration', 'Energy', 'Frequency', 'Miscellany', 'Pressure', 'Proportion', 'Rating', 'Temperature', 'Volume', and 'Weight'. /// - /// name - /// created_at - /// updated_at - /// limit - /// offset - /// sort - /// InlineResponse20015 - System.Threading.Tasks.Task UnitCategoriesGetAsync (string name, string createdAt, string updatedAt, int? limit, int? offset, string sort); + /// User's OAuth2 access token + /// Unit category name + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// ApiResponse of InlineResponse20019 + ApiResponse UnitCategoriesGetWithHttpInfo (string accessToken = null, string name = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Get unit categories + /// + /// + /// Get a list of the categories of measurement units such as 'Distance', 'Duration', 'Energy', 'Frequency', 'Miscellany', 'Pressure', 'Proportion', 'Rating', 'Temperature', 'Volume', and 'Weight'. + /// + /// User's OAuth2 access token + /// Unit category name + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of InlineResponse20019 + System.Threading.Tasks.Task UnitCategoriesGetAsync (string accessToken = null, string name = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Get unit categories + /// + /// + /// Get a list of the categories of measurement units such as 'Distance', 'Duration', 'Energy', 'Frequency', 'Miscellany', 'Pressure', 'Proportion', 'Rating', 'Temperature', 'Volume', and 'Weight'. + /// + /// User's OAuth2 access token + /// Unit category name + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of ApiResponse (InlineResponse20019) + System.Threading.Tasks.Task> UnitCategoriesGetAsyncWithHttpInfo (string accessToken = null, string name = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); /// /// Store UnitCategory @@ -50,9 +85,10 @@ public interface IUnitCategoryApi /// /// Store UnitCategory /// + /// User's OAuth2 access token /// UnitCategory that should be stored - /// InlineResponse20016 - InlineResponse20016 UnitCategoriesPost (UnitCategory body); + /// InlineResponse20020 + InlineResponse20020 UnitCategoriesPost (string accessToken = null, UnitCategory body = null); /// /// Store UnitCategory @@ -60,9 +96,32 @@ public interface IUnitCategoryApi /// /// Store UnitCategory /// + /// User's OAuth2 access token + /// UnitCategory that should be stored + /// ApiResponse of InlineResponse20020 + ApiResponse UnitCategoriesPostWithHttpInfo (string accessToken = null, UnitCategory body = null); + + /// + /// Store UnitCategory + /// + /// + /// Store UnitCategory + /// + /// User's OAuth2 access token + /// UnitCategory that should be stored + /// Task of InlineResponse20020 + System.Threading.Tasks.Task UnitCategoriesPostAsync (string accessToken = null, UnitCategory body = null); + + /// + /// Store UnitCategory + /// + /// + /// Store UnitCategory + /// + /// User's OAuth2 access token /// UnitCategory that should be stored - /// InlineResponse20016 - System.Threading.Tasks.Task UnitCategoriesPostAsync (UnitCategory body); + /// Task of ApiResponse (InlineResponse20020) + System.Threading.Tasks.Task> UnitCategoriesPostAsyncWithHttpInfo (string accessToken = null, UnitCategory body = null); /// /// Get UnitCategory @@ -71,8 +130,9 @@ public interface IUnitCategoryApi /// Get UnitCategory /// /// id of UnitCategory - /// InlineResponse20016 - InlineResponse20016 UnitCategoriesIdGet (int? id); + /// User's OAuth2 access token + /// InlineResponse20020 + InlineResponse20020 UnitCategoriesIdGet (int? id, string accessToken = null); /// /// Get UnitCategory @@ -81,8 +141,31 @@ public interface IUnitCategoryApi /// Get UnitCategory /// /// id of UnitCategory - /// InlineResponse20016 - System.Threading.Tasks.Task UnitCategoriesIdGetAsync (int? id); + /// User's OAuth2 access token + /// ApiResponse of InlineResponse20020 + ApiResponse UnitCategoriesIdGetWithHttpInfo (int? id, string accessToken = null); + + /// + /// Get UnitCategory + /// + /// + /// Get UnitCategory + /// + /// id of UnitCategory + /// User's OAuth2 access token + /// Task of InlineResponse20020 + System.Threading.Tasks.Task UnitCategoriesIdGetAsync (int? id, string accessToken = null); + + /// + /// Get UnitCategory + /// + /// + /// Get UnitCategory + /// + /// id of UnitCategory + /// User's OAuth2 access token + /// Task of ApiResponse (InlineResponse20020) + System.Threading.Tasks.Task> UnitCategoriesIdGetAsyncWithHttpInfo (int? id, string accessToken = null); /// /// Update UnitCategory @@ -91,9 +174,10 @@ public interface IUnitCategoryApi /// Update UnitCategory /// /// id of UnitCategory + /// User's OAuth2 access token /// UnitCategory that should be updated /// InlineResponse2002 - InlineResponse2002 UnitCategoriesIdPut (int? id, UnitCategory body); + InlineResponse2002 UnitCategoriesIdPut (int? id, string accessToken = null, UnitCategory body = null); /// /// Update UnitCategory @@ -102,9 +186,34 @@ public interface IUnitCategoryApi /// Update UnitCategory /// /// id of UnitCategory + /// User's OAuth2 access token /// UnitCategory that should be updated - /// InlineResponse2002 - System.Threading.Tasks.Task UnitCategoriesIdPutAsync (int? id, UnitCategory body); + /// ApiResponse of InlineResponse2002 + ApiResponse UnitCategoriesIdPutWithHttpInfo (int? id, string accessToken = null, UnitCategory body = null); + + /// + /// Update UnitCategory + /// + /// + /// Update UnitCategory + /// + /// id of UnitCategory + /// User's OAuth2 access token + /// UnitCategory that should be updated + /// Task of InlineResponse2002 + System.Threading.Tasks.Task UnitCategoriesIdPutAsync (int? id, string accessToken = null, UnitCategory body = null); + + /// + /// Update UnitCategory + /// + /// + /// Update UnitCategory + /// + /// id of UnitCategory + /// User's OAuth2 access token + /// UnitCategory that should be updated + /// Task of ApiResponse (InlineResponse2002) + System.Threading.Tasks.Task> UnitCategoriesIdPutAsyncWithHttpInfo (int? id, string accessToken = null, UnitCategory body = null); /// /// Delete UnitCategory @@ -113,8 +222,9 @@ public interface IUnitCategoryApi /// Delete UnitCategory /// /// id of UnitCategory + /// User's OAuth2 access token /// InlineResponse2002 - InlineResponse2002 UnitCategoriesIdDelete (int? id); + InlineResponse2002 UnitCategoriesIdDelete (int? id, string accessToken = null); /// /// Delete UnitCategory @@ -123,8 +233,31 @@ public interface IUnitCategoryApi /// Delete UnitCategory /// /// id of UnitCategory - /// InlineResponse2002 - System.Threading.Tasks.Task UnitCategoriesIdDeleteAsync (int? id); + /// User's OAuth2 access token + /// ApiResponse of InlineResponse2002 + ApiResponse UnitCategoriesIdDeleteWithHttpInfo (int? id, string accessToken = null); + + /// + /// Delete UnitCategory + /// + /// + /// Delete UnitCategory + /// + /// id of UnitCategory + /// User's OAuth2 access token + /// Task of InlineResponse2002 + System.Threading.Tasks.Task UnitCategoriesIdDeleteAsync (int? id, string accessToken = null); + + /// + /// Delete UnitCategory + /// + /// + /// Delete UnitCategory + /// + /// id of UnitCategory + /// User's OAuth2 access token + /// Task of ApiResponse (InlineResponse2002) + System.Threading.Tasks.Task> UnitCategoriesIdDeleteAsyncWithHttpInfo (int? id, string accessToken = null); } @@ -136,62 +269,103 @@ public class UnitCategoryApi : IUnitCategoryApi /// /// Initializes a new instance of the class. /// - /// an instance of ApiClient (optional) /// - public UnitCategoryApi(ApiClient apiClient = null) + public UnitCategoryApi(String basePath) { - if (apiClient == null) // use the default one in Configuration - this.ApiClient = Configuration.DefaultApiClient; - else - this.ApiClient = apiClient; + this.Configuration = new Configuration(new ApiClient(basePath)); } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class + /// using Configuration object /// + /// An instance of Configuration /// - public UnitCategoryApi(String basePath) + public UnitCategoryApi(Configuration configuration = null) { - this.ApiClient = new ApiClient(basePath); + if (configuration == null) // use the default one in Configuration + this.Configuration = Configuration.Default; + else + this.Configuration = configuration; } - + + /// + /// Gets the base path of the API client. + /// + /// The base path + public String GetBasePath() + { + return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); + } + /// /// Sets the base path of the API client. /// - /// The base path /// The base path + [Obsolete("SetBasePath is deprecated, please do 'Configuraiton.ApiClient = new ApiClient(\"http://new-path\")' instead.")] public void SetBasePath(String basePath) { - this.ApiClient.BasePath = basePath; + // do nothing } /// - /// Gets the base path of the API client. + /// Gets or sets the configuration object /// - /// The base path - public String GetBasePath() + /// An instance of the Configuration + public Configuration Configuration {get; set;} + + /// + /// Gets the default header. + /// + /// Dictionary of HTTP header + [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] + public Dictionary DefaultHeader() { - return this.ApiClient.BasePath; + return this.Configuration.DefaultHeader; } - + /// - /// Gets or sets the API client. + /// Add default header. /// - /// An instance of the ApiClient - public ApiClient ApiClient {get; set;} - + /// Header field name. + /// Header field value. + /// + [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] + public void AddDefaultHeader(string key, string value) + { + this.Configuration.AddDefaultHeader(key, value); + } + /// - /// Get all UnitCategories Get all UnitCategories + /// Get unit categories Get a list of the categories of measurement units such as 'Distance', 'Duration', 'Energy', 'Frequency', 'Miscellany', 'Pressure', 'Proportion', 'Rating', 'Temperature', 'Volume', and 'Weight'. + /// + /// User's OAuth2 access token + /// Unit category name + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// InlineResponse20019 + public InlineResponse20019 UnitCategoriesGet (string accessToken = null, string name = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) + { + ApiResponse response = UnitCategoriesGetWithHttpInfo(accessToken, name, createdAt, updatedAt, limit, offset, sort); + return response.Data; + } + + /// + /// Get unit categories Get a list of the categories of measurement units such as 'Distance', 'Duration', 'Energy', 'Frequency', 'Miscellany', 'Pressure', 'Proportion', 'Rating', 'Temperature', 'Volume', and 'Weight'. /// - /// name - /// created_at - /// updated_at - /// limit - /// offset - /// sort - /// InlineResponse20015 - public InlineResponse20015 UnitCategoriesGet (string name, string createdAt, string updatedAt, int? limit, int? offset, string sort) + /// User's OAuth2 access token + /// Unit category name + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// ApiResponse of InlineResponse20019 + public ApiResponse< InlineResponse20019 > UnitCategoriesGetWithHttpInfo (string accessToken = null, string name = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) { @@ -199,7 +373,7 @@ public InlineResponse20015 UnitCategoriesGet (string name, string createdAt, str var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -208,50 +382,82 @@ public InlineResponse20015 UnitCategoriesGet (string name, string createdAt, str String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (name != null) queryParams.Add("name", ApiClient.ParameterToString(name)); // query parameter - if (createdAt != null) queryParams.Add("created_at", ApiClient.ParameterToString(createdAt)); // query parameter - if (updatedAt != null) queryParams.Add("updated_at", ApiClient.ParameterToString(updatedAt)); // query parameter - if (limit != null) queryParams.Add("limit", ApiClient.ParameterToString(limit)); // query parameter - if (offset != null) queryParams.Add("offset", ApiClient.ParameterToString(offset)); // query parameter - if (sort != null) queryParams.Add("sort", ApiClient.ParameterToString(sort)); // query parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + if (name != null) queryParams.Add("name", Configuration.ApiClient.ParameterToString(name)); // query parameter + if (createdAt != null) queryParams.Add("created_at", Configuration.ApiClient.ParameterToString(createdAt)); // query parameter + if (updatedAt != null) queryParams.Add("updated_at", Configuration.ApiClient.ParameterToString(updatedAt)); // query parameter + if (limit != null) queryParams.Add("limit", Configuration.ApiClient.ParameterToString(limit)); // query parameter + if (offset != null) queryParams.Add("offset", Configuration.ApiClient.ParameterToString(offset)); // query parameter + if (sort != null) queryParams.Add("sort", Configuration.ApiClient.ParameterToString(sort)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling UnitCategoriesGet: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling UnitCategoriesGet: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling UnitCategoriesGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling UnitCategoriesGet: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse20015) ApiClient.Deserialize(response, typeof(InlineResponse20015)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20019) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20019))); + } /// - /// Get all UnitCategories Get all UnitCategories + /// Get unit categories Get a list of the categories of measurement units such as 'Distance', 'Duration', 'Energy', 'Frequency', 'Miscellany', 'Pressure', 'Proportion', 'Rating', 'Temperature', 'Volume', and 'Weight'. /// - /// name - /// created_at - /// updated_at - /// limit - /// offset - /// sort - /// InlineResponse20015 - public async System.Threading.Tasks.Task UnitCategoriesGetAsync (string name, string createdAt, string updatedAt, int? limit, int? offset, string sort) + /// User's OAuth2 access token + /// Unit category name + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of InlineResponse20019 + public async System.Threading.Tasks.Task UnitCategoriesGetAsync (string accessToken = null, string name = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) + { + ApiResponse response = await UnitCategoriesGetAsyncWithHttpInfo(accessToken, name, createdAt, updatedAt, limit, offset, sort); + return response.Data; + + } + + /// + /// Get unit categories Get a list of the categories of measurement units such as 'Distance', 'Duration', 'Energy', 'Frequency', 'Miscellany', 'Pressure', 'Proportion', 'Rating', 'Temperature', 'Volume', and 'Weight'. + /// + /// User's OAuth2 access token + /// Unit category name + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of ApiResponse (InlineResponse20019) + public async System.Threading.Tasks.Task> UnitCategoriesGetAsyncWithHttpInfo (string accessToken = null, string name = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) { @@ -268,42 +474,71 @@ public async System.Threading.Tasks.Task UnitCategoriesGetA String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (name != null) queryParams.Add("name", ApiClient.ParameterToString(name)); // query parameter - if (createdAt != null) queryParams.Add("created_at", ApiClient.ParameterToString(createdAt)); // query parameter - if (updatedAt != null) queryParams.Add("updated_at", ApiClient.ParameterToString(updatedAt)); // query parameter - if (limit != null) queryParams.Add("limit", ApiClient.ParameterToString(limit)); // query parameter - if (offset != null) queryParams.Add("offset", ApiClient.ParameterToString(offset)); // query parameter - if (sort != null) queryParams.Add("sort", ApiClient.ParameterToString(sort)); // query parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + if (name != null) queryParams.Add("name", Configuration.ApiClient.ParameterToString(name)); // query parameter + if (createdAt != null) queryParams.Add("created_at", Configuration.ApiClient.ParameterToString(createdAt)); // query parameter + if (updatedAt != null) queryParams.Add("updated_at", Configuration.ApiClient.ParameterToString(updatedAt)); // query parameter + if (limit != null) queryParams.Add("limit", Configuration.ApiClient.ParameterToString(limit)); // query parameter + if (offset != null) queryParams.Add("offset", Configuration.ApiClient.ParameterToString(offset)); // query parameter + if (sort != null) queryParams.Add("sort", Configuration.ApiClient.ParameterToString(sort)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; - + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling UnitCategoriesGet: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling UnitCategoriesGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling UnitCategoriesGet: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse20015) ApiClient.Deserialize(response, typeof(InlineResponse20015)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20019) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20019))); + } /// /// Store UnitCategory Store UnitCategory /// + /// User's OAuth2 access token /// UnitCategory that should be stored - /// InlineResponse20016 - public InlineResponse20016 UnitCategoriesPost (UnitCategory body) + /// InlineResponse20020 + public InlineResponse20020 UnitCategoriesPost (string accessToken = null, UnitCategory body = null) + { + ApiResponse response = UnitCategoriesPostWithHttpInfo(accessToken, body); + return response.Data; + } + + /// + /// Store UnitCategory Store UnitCategory + /// + /// User's OAuth2 access token + /// UnitCategory that should be stored + /// ApiResponse of InlineResponse20020 + public ApiResponse< InlineResponse20020 > UnitCategoriesPostWithHttpInfo (string accessToken = null, UnitCategory body = null) { @@ -311,7 +546,7 @@ public InlineResponse20016 UnitCategoriesPost (UnitCategory body) var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -320,40 +555,67 @@ public InlineResponse20016 UnitCategoriesPost (UnitCategory body) String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - postBody = ApiClient.Serialize(body); // http body (model) parameter + postBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter + + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } - - // authentication setting, if any - String[] authSettings = new String[] { }; // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling UnitCategoriesPost: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling UnitCategoriesPost: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling UnitCategoriesPost: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling UnitCategoriesPost: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse20016) ApiClient.Deserialize(response, typeof(InlineResponse20016)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20020) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20020))); + } /// /// Store UnitCategory Store UnitCategory /// + /// User's OAuth2 access token + /// UnitCategory that should be stored + /// Task of InlineResponse20020 + public async System.Threading.Tasks.Task UnitCategoriesPostAsync (string accessToken = null, UnitCategory body = null) + { + ApiResponse response = await UnitCategoriesPostAsyncWithHttpInfo(accessToken, body); + return response.Data; + + } + + /// + /// Store UnitCategory Store UnitCategory + /// + /// User's OAuth2 access token /// UnitCategory that should be stored - /// InlineResponse20016 - public async System.Threading.Tasks.Task UnitCategoriesPostAsync (UnitCategory body) + /// Task of ApiResponse (InlineResponse20020) + public async System.Threading.Tasks.Task> UnitCategoriesPostAsyncWithHttpInfo (string accessToken = null, UnitCategory body = null) { @@ -370,37 +632,66 @@ public async System.Threading.Tasks.Task UnitCategoriesPost String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - postBody = ApiClient.Serialize(body); // http body (model) parameter + postBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; - + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling UnitCategoriesPost: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling UnitCategoriesPost: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling UnitCategoriesPost: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse20016) ApiClient.Deserialize(response, typeof(InlineResponse20016)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20020) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20020))); + } /// /// Get UnitCategory Get UnitCategory /// /// id of UnitCategory - /// InlineResponse20016 - public InlineResponse20016 UnitCategoriesIdGet (int? id) + /// User's OAuth2 access token + /// InlineResponse20020 + public InlineResponse20020 UnitCategoriesIdGet (int? id, string accessToken = null) + { + ApiResponse response = UnitCategoriesIdGetWithHttpInfo(id, accessToken); + return response.Data; + } + + /// + /// Get UnitCategory Get UnitCategory + /// + /// id of UnitCategory + /// User's OAuth2 access token + /// ApiResponse of InlineResponse20020 + public ApiResponse< InlineResponse20020 > UnitCategoriesIdGetWithHttpInfo (int? id, string accessToken = null) { // verify the required parameter 'id' is set @@ -411,7 +702,7 @@ public InlineResponse20016 UnitCategoriesIdGet (int? id) var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -420,40 +711,67 @@ public InlineResponse20016 UnitCategoriesIdGet (int? id) String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling UnitCategoriesIdGet: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling UnitCategoriesIdGet: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling UnitCategoriesIdGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling UnitCategoriesIdGet: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse20016) ApiClient.Deserialize(response, typeof(InlineResponse20016)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20020) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20020))); + } /// /// Get UnitCategory Get UnitCategory /// /// id of UnitCategory - /// InlineResponse20016 - public async System.Threading.Tasks.Task UnitCategoriesIdGetAsync (int? id) + /// User's OAuth2 access token + /// Task of InlineResponse20020 + public async System.Threading.Tasks.Task UnitCategoriesIdGetAsync (int? id, string accessToken = null) + { + ApiResponse response = await UnitCategoriesIdGetAsyncWithHttpInfo(id, accessToken); + return response.Data; + + } + + /// + /// Get UnitCategory Get UnitCategory + /// + /// id of UnitCategory + /// User's OAuth2 access token + /// Task of ApiResponse (InlineResponse20020) + public async System.Threading.Tasks.Task> UnitCategoriesIdGetAsyncWithHttpInfo (int? id, string accessToken = null) { // verify the required parameter 'id' is set if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling UnitCategoriesIdGet"); @@ -472,38 +790,68 @@ public async System.Threading.Tasks.Task UnitCategoriesIdGe String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; - + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling UnitCategoriesIdGet: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); - return (InlineResponse20016) ApiClient.Deserialize(response, typeof(InlineResponse20016)); + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling UnitCategoriesIdGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling UnitCategoriesIdGet: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20020) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20020))); + } /// /// Update UnitCategory Update UnitCategory /// /// id of UnitCategory + /// User's OAuth2 access token /// UnitCategory that should be updated - /// InlineResponse2002 - public InlineResponse2002 UnitCategoriesIdPut (int? id, UnitCategory body) + /// InlineResponse2002 + public InlineResponse2002 UnitCategoriesIdPut (int? id, string accessToken = null, UnitCategory body = null) + { + ApiResponse response = UnitCategoriesIdPutWithHttpInfo(id, accessToken, body); + return response.Data; + } + + /// + /// Update UnitCategory Update UnitCategory + /// + /// id of UnitCategory + /// User's OAuth2 access token + /// UnitCategory that should be updated + /// ApiResponse of InlineResponse2002 + public ApiResponse< InlineResponse2002 > UnitCategoriesIdPutWithHttpInfo (int? id, string accessToken = null, UnitCategory body = null) { // verify the required parameter 'id' is set @@ -514,7 +862,7 @@ public InlineResponse2002 UnitCategoriesIdPut (int? id, UnitCategory body) var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -523,42 +871,70 @@ public InlineResponse2002 UnitCategoriesIdPut (int? id, UnitCategory body) String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - postBody = ApiClient.Serialize(body); // http body (model) parameter + postBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter + + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } - - // authentication setting, if any - String[] authSettings = new String[] { }; // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling UnitCategoriesIdPut: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling UnitCategoriesIdPut: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling UnitCategoriesIdPut: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling UnitCategoriesIdPut: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse2002) ApiClient.Deserialize(response, typeof(InlineResponse2002)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2002) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2002))); + } /// /// Update UnitCategory Update UnitCategory /// /// id of UnitCategory + /// User's OAuth2 access token /// UnitCategory that should be updated - /// InlineResponse2002 - public async System.Threading.Tasks.Task UnitCategoriesIdPutAsync (int? id, UnitCategory body) + /// Task of InlineResponse2002 + public async System.Threading.Tasks.Task UnitCategoriesIdPutAsync (int? id, string accessToken = null, UnitCategory body = null) + { + ApiResponse response = await UnitCategoriesIdPutAsyncWithHttpInfo(id, accessToken, body); + return response.Data; + + } + + /// + /// Update UnitCategory Update UnitCategory + /// + /// id of UnitCategory + /// User's OAuth2 access token + /// UnitCategory that should be updated + /// Task of ApiResponse (InlineResponse2002) + public async System.Threading.Tasks.Task> UnitCategoriesIdPutAsyncWithHttpInfo (int? id, string accessToken = null, UnitCategory body = null) { // verify the required parameter 'id' is set if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling UnitCategoriesIdPut"); @@ -577,38 +953,67 @@ public async System.Threading.Tasks.Task UnitCategoriesIdPut String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - postBody = ApiClient.Serialize(body); // http body (model) parameter + postBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; - + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling UnitCategoriesIdPut: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling UnitCategoriesIdPut: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling UnitCategoriesIdPut: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse2002) ApiClient.Deserialize(response, typeof(InlineResponse2002)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2002) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2002))); + } /// /// Delete UnitCategory Delete UnitCategory /// /// id of UnitCategory - /// InlineResponse2002 - public InlineResponse2002 UnitCategoriesIdDelete (int? id) + /// User's OAuth2 access token + /// InlineResponse2002 + public InlineResponse2002 UnitCategoriesIdDelete (int? id, string accessToken = null) + { + ApiResponse response = UnitCategoriesIdDeleteWithHttpInfo(id, accessToken); + return response.Data; + } + + /// + /// Delete UnitCategory Delete UnitCategory + /// + /// id of UnitCategory + /// User's OAuth2 access token + /// ApiResponse of InlineResponse2002 + public ApiResponse< InlineResponse2002 > UnitCategoriesIdDeleteWithHttpInfo (int? id, string accessToken = null) { // verify the required parameter 'id' is set @@ -619,7 +1024,7 @@ public InlineResponse2002 UnitCategoriesIdDelete (int? id) var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -628,40 +1033,67 @@ public InlineResponse2002 UnitCategoriesIdDelete (int? id) String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling UnitCategoriesIdDelete: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling UnitCategoriesIdDelete: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling UnitCategoriesIdDelete: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling UnitCategoriesIdDelete: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse2002) ApiClient.Deserialize(response, typeof(InlineResponse2002)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2002) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2002))); + } /// /// Delete UnitCategory Delete UnitCategory /// /// id of UnitCategory - /// InlineResponse2002 - public async System.Threading.Tasks.Task UnitCategoriesIdDeleteAsync (int? id) + /// User's OAuth2 access token + /// Task of InlineResponse2002 + public async System.Threading.Tasks.Task UnitCategoriesIdDeleteAsync (int? id, string accessToken = null) + { + ApiResponse response = await UnitCategoriesIdDeleteAsyncWithHttpInfo(id, accessToken); + return response.Data; + + } + + /// + /// Delete UnitCategory Delete UnitCategory + /// + /// id of UnitCategory + /// User's OAuth2 access token + /// Task of ApiResponse (InlineResponse2002) + public async System.Threading.Tasks.Task> UnitCategoriesIdDeleteAsyncWithHttpInfo (int? id, string accessToken = null) { // verify the required parameter 'id' is set if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling UnitCategoriesIdDelete"); @@ -680,29 +1112,45 @@ public async System.Threading.Tasks.Task UnitCategoriesIdDel String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; - + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling UnitCategoriesIdDelete: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams); - return (InlineResponse2002) ApiClient.Deserialize(response, typeof(InlineResponse2002)); + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling UnitCategoriesIdDelete: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling UnitCategoriesIdDelete: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2002) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2002))); + } } diff --git a/src/main/csharp/io/swagger/Api/UpdateApi.cs b/src/main/csharp/io/swagger/Api/UpdateApi.cs index 6e526be..deb65f0 100644 --- a/src/main/csharp/io/swagger/Api/UpdateApi.cs +++ b/src/main/csharp/io/swagger/Api/UpdateApi.cs @@ -1,6 +1,7 @@ using System; using System.IO; using System.Collections.Generic; +using System.Linq; using RestSharp; using IO.Swagger.Client; using IO.Swagger.Model; @@ -20,18 +21,19 @@ public interface IUpdateApi /// /// Get all Updates /// + /// User's OAuth2 access token /// user_id /// connector_id /// number_of_measurements /// success /// message - /// created_at - /// updated_at - /// limit - /// offset - /// sort - /// InlineResponse20019 - InlineResponse20019 UpdatesGet (int? userId, int? connectorId, int? numberOfMeasurements, bool? success, string message, string createdAt, string updatedAt, int? limit, int? offset, string sort); + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// InlineResponse20015 + InlineResponse20015 UpdatesGet (string accessToken = null, int? userId = null, int? connectorId = null, int? numberOfMeasurements = null, bool? success = null, string message = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); /// /// Get all Updates @@ -39,18 +41,59 @@ public interface IUpdateApi /// /// Get all Updates /// + /// User's OAuth2 access token /// user_id /// connector_id /// number_of_measurements /// success /// message - /// created_at - /// updated_at - /// limit - /// offset - /// sort - /// InlineResponse20019 - System.Threading.Tasks.Task UpdatesGetAsync (int? userId, int? connectorId, int? numberOfMeasurements, bool? success, string message, string createdAt, string updatedAt, int? limit, int? offset, string sort); + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// ApiResponse of InlineResponse20015 + ApiResponse UpdatesGetWithHttpInfo (string accessToken = null, int? userId = null, int? connectorId = null, int? numberOfMeasurements = null, bool? success = null, string message = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Get all Updates + /// + /// + /// Get all Updates + /// + /// User's OAuth2 access token + /// user_id + /// connector_id + /// number_of_measurements + /// success + /// message + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of InlineResponse20015 + System.Threading.Tasks.Task UpdatesGetAsync (string accessToken = null, int? userId = null, int? connectorId = null, int? numberOfMeasurements = null, bool? success = null, string message = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Get all Updates + /// + /// + /// Get all Updates + /// + /// User's OAuth2 access token + /// user_id + /// connector_id + /// number_of_measurements + /// success + /// message + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of ApiResponse (InlineResponse20015) + System.Threading.Tasks.Task> UpdatesGetAsyncWithHttpInfo (string accessToken = null, int? userId = null, int? connectorId = null, int? numberOfMeasurements = null, bool? success = null, string message = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); /// /// Store Update @@ -58,9 +101,10 @@ public interface IUpdateApi /// /// Store Update /// + /// User's OAuth2 access token /// Update that should be stored - /// InlineResponse20020 - InlineResponse20020 UpdatesPost (Update body); + /// InlineResponse20023 + InlineResponse20023 UpdatesPost (string accessToken = null, Update body = null); /// /// Store Update @@ -68,9 +112,32 @@ public interface IUpdateApi /// /// Store Update /// + /// User's OAuth2 access token + /// Update that should be stored + /// ApiResponse of InlineResponse20023 + ApiResponse UpdatesPostWithHttpInfo (string accessToken = null, Update body = null); + + /// + /// Store Update + /// + /// + /// Store Update + /// + /// User's OAuth2 access token + /// Update that should be stored + /// Task of InlineResponse20023 + System.Threading.Tasks.Task UpdatesPostAsync (string accessToken = null, Update body = null); + + /// + /// Store Update + /// + /// + /// Store Update + /// + /// User's OAuth2 access token /// Update that should be stored - /// InlineResponse20020 - System.Threading.Tasks.Task UpdatesPostAsync (Update body); + /// Task of ApiResponse (InlineResponse20023) + System.Threading.Tasks.Task> UpdatesPostAsyncWithHttpInfo (string accessToken = null, Update body = null); /// /// Get Update @@ -79,8 +146,9 @@ public interface IUpdateApi /// Get Update /// /// id of Update - /// InlineResponse20020 - InlineResponse20020 UpdatesIdGet (int? id); + /// User's OAuth2 access token + /// InlineResponse20023 + InlineResponse20023 UpdatesIdGet (int? id, string accessToken = null); /// /// Get Update @@ -89,8 +157,31 @@ public interface IUpdateApi /// Get Update /// /// id of Update - /// InlineResponse20020 - System.Threading.Tasks.Task UpdatesIdGetAsync (int? id); + /// User's OAuth2 access token + /// ApiResponse of InlineResponse20023 + ApiResponse UpdatesIdGetWithHttpInfo (int? id, string accessToken = null); + + /// + /// Get Update + /// + /// + /// Get Update + /// + /// id of Update + /// User's OAuth2 access token + /// Task of InlineResponse20023 + System.Threading.Tasks.Task UpdatesIdGetAsync (int? id, string accessToken = null); + + /// + /// Get Update + /// + /// + /// Get Update + /// + /// id of Update + /// User's OAuth2 access token + /// Task of ApiResponse (InlineResponse20023) + System.Threading.Tasks.Task> UpdatesIdGetAsyncWithHttpInfo (int? id, string accessToken = null); /// /// Update Update @@ -99,9 +190,10 @@ public interface IUpdateApi /// Update Update /// /// id of Update + /// User's OAuth2 access token /// Update that should be updated /// InlineResponse2002 - InlineResponse2002 UpdatesIdPut (int? id, Update body); + InlineResponse2002 UpdatesIdPut (int? id, string accessToken = null, Update body = null); /// /// Update Update @@ -110,9 +202,34 @@ public interface IUpdateApi /// Update Update /// /// id of Update + /// User's OAuth2 access token /// Update that should be updated - /// InlineResponse2002 - System.Threading.Tasks.Task UpdatesIdPutAsync (int? id, Update body); + /// ApiResponse of InlineResponse2002 + ApiResponse UpdatesIdPutWithHttpInfo (int? id, string accessToken = null, Update body = null); + + /// + /// Update Update + /// + /// + /// Update Update + /// + /// id of Update + /// User's OAuth2 access token + /// Update that should be updated + /// Task of InlineResponse2002 + System.Threading.Tasks.Task UpdatesIdPutAsync (int? id, string accessToken = null, Update body = null); + + /// + /// Update Update + /// + /// + /// Update Update + /// + /// id of Update + /// User's OAuth2 access token + /// Update that should be updated + /// Task of ApiResponse (InlineResponse2002) + System.Threading.Tasks.Task> UpdatesIdPutAsyncWithHttpInfo (int? id, string accessToken = null, Update body = null); /// /// Delete Update @@ -121,8 +238,9 @@ public interface IUpdateApi /// Delete Update /// /// id of Update + /// User's OAuth2 access token /// InlineResponse2002 - InlineResponse2002 UpdatesIdDelete (int? id); + InlineResponse2002 UpdatesIdDelete (int? id, string accessToken = null); /// /// Delete Update @@ -131,8 +249,31 @@ public interface IUpdateApi /// Delete Update /// /// id of Update - /// InlineResponse2002 - System.Threading.Tasks.Task UpdatesIdDeleteAsync (int? id); + /// User's OAuth2 access token + /// ApiResponse of InlineResponse2002 + ApiResponse UpdatesIdDeleteWithHttpInfo (int? id, string accessToken = null); + + /// + /// Delete Update + /// + /// + /// Delete Update + /// + /// id of Update + /// User's OAuth2 access token + /// Task of InlineResponse2002 + System.Threading.Tasks.Task UpdatesIdDeleteAsync (int? id, string accessToken = null); + + /// + /// Delete Update + /// + /// + /// Delete Update + /// + /// id of Update + /// User's OAuth2 access token + /// Task of ApiResponse (InlineResponse2002) + System.Threading.Tasks.Task> UpdatesIdDeleteAsyncWithHttpInfo (int? id, string accessToken = null); } @@ -144,66 +285,111 @@ public class UpdateApi : IUpdateApi /// /// Initializes a new instance of the class. /// - /// an instance of ApiClient (optional) /// - public UpdateApi(ApiClient apiClient = null) + public UpdateApi(String basePath) { - if (apiClient == null) // use the default one in Configuration - this.ApiClient = Configuration.DefaultApiClient; - else - this.ApiClient = apiClient; + this.Configuration = new Configuration(new ApiClient(basePath)); } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class + /// using Configuration object /// + /// An instance of Configuration /// - public UpdateApi(String basePath) + public UpdateApi(Configuration configuration = null) { - this.ApiClient = new ApiClient(basePath); + if (configuration == null) // use the default one in Configuration + this.Configuration = Configuration.Default; + else + this.Configuration = configuration; } - + + /// + /// Gets the base path of the API client. + /// + /// The base path + public String GetBasePath() + { + return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); + } + /// /// Sets the base path of the API client. /// - /// The base path /// The base path + [Obsolete("SetBasePath is deprecated, please do 'Configuraiton.ApiClient = new ApiClient(\"http://new-path\")' instead.")] public void SetBasePath(String basePath) { - this.ApiClient.BasePath = basePath; + // do nothing } /// - /// Gets the base path of the API client. + /// Gets or sets the configuration object /// - /// The base path - public String GetBasePath() + /// An instance of the Configuration + public Configuration Configuration {get; set;} + + /// + /// Gets the default header. + /// + /// Dictionary of HTTP header + [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] + public Dictionary DefaultHeader() { - return this.ApiClient.BasePath; + return this.Configuration.DefaultHeader; } - + /// - /// Gets or sets the API client. + /// Add default header. /// - /// An instance of the ApiClient - public ApiClient ApiClient {get; set;} - + /// Header field name. + /// Header field value. + /// + [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] + public void AddDefaultHeader(string key, string value) + { + this.Configuration.AddDefaultHeader(key, value); + } + /// /// Get all Updates Get all Updates /// + /// User's OAuth2 access token + /// user_id + /// connector_id + /// number_of_measurements + /// success + /// message + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// InlineResponse20015 + public InlineResponse20015 UpdatesGet (string accessToken = null, int? userId = null, int? connectorId = null, int? numberOfMeasurements = null, bool? success = null, string message = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) + { + ApiResponse response = UpdatesGetWithHttpInfo(accessToken, userId, connectorId, numberOfMeasurements, success, message, createdAt, updatedAt, limit, offset, sort); + return response.Data; + } + + /// + /// Get all Updates Get all Updates + /// + /// User's OAuth2 access token /// user_id /// connector_id /// number_of_measurements /// success /// message - /// created_at - /// updated_at - /// limit - /// offset - /// sort - /// InlineResponse20019 - public InlineResponse20019 UpdatesGet (int? userId, int? connectorId, int? numberOfMeasurements, bool? success, string message, string createdAt, string updatedAt, int? limit, int? offset, string sort) + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// ApiResponse of InlineResponse20015 + public ApiResponse< InlineResponse20015 > UpdatesGetWithHttpInfo (string accessToken = null, int? userId = null, int? connectorId = null, int? numberOfMeasurements = null, bool? success = null, string message = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) { @@ -211,7 +397,7 @@ public InlineResponse20019 UpdatesGet (int? userId, int? connectorId, int? numbe var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -220,58 +406,94 @@ public InlineResponse20019 UpdatesGet (int? userId, int? connectorId, int? numbe String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (userId != null) queryParams.Add("user_id", ApiClient.ParameterToString(userId)); // query parameter - if (connectorId != null) queryParams.Add("connector_id", ApiClient.ParameterToString(connectorId)); // query parameter - if (numberOfMeasurements != null) queryParams.Add("number_of_measurements", ApiClient.ParameterToString(numberOfMeasurements)); // query parameter - if (success != null) queryParams.Add("success", ApiClient.ParameterToString(success)); // query parameter - if (message != null) queryParams.Add("message", ApiClient.ParameterToString(message)); // query parameter - if (createdAt != null) queryParams.Add("created_at", ApiClient.ParameterToString(createdAt)); // query parameter - if (updatedAt != null) queryParams.Add("updated_at", ApiClient.ParameterToString(updatedAt)); // query parameter - if (limit != null) queryParams.Add("limit", ApiClient.ParameterToString(limit)); // query parameter - if (offset != null) queryParams.Add("offset", ApiClient.ParameterToString(offset)); // query parameter - if (sort != null) queryParams.Add("sort", ApiClient.ParameterToString(sort)); // query parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + if (userId != null) queryParams.Add("user_id", Configuration.ApiClient.ParameterToString(userId)); // query parameter + if (connectorId != null) queryParams.Add("connector_id", Configuration.ApiClient.ParameterToString(connectorId)); // query parameter + if (numberOfMeasurements != null) queryParams.Add("number_of_measurements", Configuration.ApiClient.ParameterToString(numberOfMeasurements)); // query parameter + if (success != null) queryParams.Add("success", Configuration.ApiClient.ParameterToString(success)); // query parameter + if (message != null) queryParams.Add("message", Configuration.ApiClient.ParameterToString(message)); // query parameter + if (createdAt != null) queryParams.Add("created_at", Configuration.ApiClient.ParameterToString(createdAt)); // query parameter + if (updatedAt != null) queryParams.Add("updated_at", Configuration.ApiClient.ParameterToString(updatedAt)); // query parameter + if (limit != null) queryParams.Add("limit", Configuration.ApiClient.ParameterToString(limit)); // query parameter + if (offset != null) queryParams.Add("offset", Configuration.ApiClient.ParameterToString(offset)); // query parameter + if (sort != null) queryParams.Add("sort", Configuration.ApiClient.ParameterToString(sort)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling UpdatesGet: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling UpdatesGet: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling UpdatesGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling UpdatesGet: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse20019) ApiClient.Deserialize(response, typeof(InlineResponse20019)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20015) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20015))); + } /// /// Get all Updates Get all Updates /// + /// User's OAuth2 access token /// user_id /// connector_id /// number_of_measurements /// success /// message - /// created_at - /// updated_at - /// limit - /// offset - /// sort - /// InlineResponse20019 - public async System.Threading.Tasks.Task UpdatesGetAsync (int? userId, int? connectorId, int? numberOfMeasurements, bool? success, string message, string createdAt, string updatedAt, int? limit, int? offset, string sort) + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of InlineResponse20015 + public async System.Threading.Tasks.Task UpdatesGetAsync (string accessToken = null, int? userId = null, int? connectorId = null, int? numberOfMeasurements = null, bool? success = null, string message = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) + { + ApiResponse response = await UpdatesGetAsyncWithHttpInfo(accessToken, userId, connectorId, numberOfMeasurements, success, message, createdAt, updatedAt, limit, offset, sort); + return response.Data; + + } + + /// + /// Get all Updates Get all Updates + /// + /// User's OAuth2 access token + /// user_id + /// connector_id + /// number_of_measurements + /// success + /// message + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of ApiResponse (InlineResponse20015) + public async System.Threading.Tasks.Task> UpdatesGetAsyncWithHttpInfo (string accessToken = null, int? userId = null, int? connectorId = null, int? numberOfMeasurements = null, bool? success = null, string message = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) { @@ -288,46 +510,75 @@ public async System.Threading.Tasks.Task UpdatesGetAsync (i String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (userId != null) queryParams.Add("user_id", ApiClient.ParameterToString(userId)); // query parameter - if (connectorId != null) queryParams.Add("connector_id", ApiClient.ParameterToString(connectorId)); // query parameter - if (numberOfMeasurements != null) queryParams.Add("number_of_measurements", ApiClient.ParameterToString(numberOfMeasurements)); // query parameter - if (success != null) queryParams.Add("success", ApiClient.ParameterToString(success)); // query parameter - if (message != null) queryParams.Add("message", ApiClient.ParameterToString(message)); // query parameter - if (createdAt != null) queryParams.Add("created_at", ApiClient.ParameterToString(createdAt)); // query parameter - if (updatedAt != null) queryParams.Add("updated_at", ApiClient.ParameterToString(updatedAt)); // query parameter - if (limit != null) queryParams.Add("limit", ApiClient.ParameterToString(limit)); // query parameter - if (offset != null) queryParams.Add("offset", ApiClient.ParameterToString(offset)); // query parameter - if (sort != null) queryParams.Add("sort", ApiClient.ParameterToString(sort)); // query parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + if (userId != null) queryParams.Add("user_id", Configuration.ApiClient.ParameterToString(userId)); // query parameter + if (connectorId != null) queryParams.Add("connector_id", Configuration.ApiClient.ParameterToString(connectorId)); // query parameter + if (numberOfMeasurements != null) queryParams.Add("number_of_measurements", Configuration.ApiClient.ParameterToString(numberOfMeasurements)); // query parameter + if (success != null) queryParams.Add("success", Configuration.ApiClient.ParameterToString(success)); // query parameter + if (message != null) queryParams.Add("message", Configuration.ApiClient.ParameterToString(message)); // query parameter + if (createdAt != null) queryParams.Add("created_at", Configuration.ApiClient.ParameterToString(createdAt)); // query parameter + if (updatedAt != null) queryParams.Add("updated_at", Configuration.ApiClient.ParameterToString(updatedAt)); // query parameter + if (limit != null) queryParams.Add("limit", Configuration.ApiClient.ParameterToString(limit)); // query parameter + if (offset != null) queryParams.Add("offset", Configuration.ApiClient.ParameterToString(offset)); // query parameter + if (sort != null) queryParams.Add("sort", Configuration.ApiClient.ParameterToString(sort)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; - + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling UpdatesGet: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); - return (InlineResponse20019) ApiClient.Deserialize(response, typeof(InlineResponse20019)); + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling UpdatesGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling UpdatesGet: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20015) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20015))); + } /// /// Store Update Store Update /// + /// User's OAuth2 access token + /// Update that should be stored + /// InlineResponse20023 + public InlineResponse20023 UpdatesPost (string accessToken = null, Update body = null) + { + ApiResponse response = UpdatesPostWithHttpInfo(accessToken, body); + return response.Data; + } + + /// + /// Store Update Store Update + /// + /// User's OAuth2 access token /// Update that should be stored - /// InlineResponse20020 - public InlineResponse20020 UpdatesPost (Update body) + /// ApiResponse of InlineResponse20023 + public ApiResponse< InlineResponse20023 > UpdatesPostWithHttpInfo (string accessToken = null, Update body = null) { @@ -335,7 +586,7 @@ public InlineResponse20020 UpdatesPost (Update body) var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -344,40 +595,67 @@ public InlineResponse20020 UpdatesPost (Update body) String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - postBody = ApiClient.Serialize(body); // http body (model) parameter + postBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter + + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } - - // authentication setting, if any - String[] authSettings = new String[] { }; // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling UpdatesPost: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling UpdatesPost: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling UpdatesPost: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling UpdatesPost: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse20020) ApiClient.Deserialize(response, typeof(InlineResponse20020)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20023) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20023))); + } /// /// Store Update Store Update /// + /// User's OAuth2 access token + /// Update that should be stored + /// Task of InlineResponse20023 + public async System.Threading.Tasks.Task UpdatesPostAsync (string accessToken = null, Update body = null) + { + ApiResponse response = await UpdatesPostAsyncWithHttpInfo(accessToken, body); + return response.Data; + + } + + /// + /// Store Update Store Update + /// + /// User's OAuth2 access token /// Update that should be stored - /// InlineResponse20020 - public async System.Threading.Tasks.Task UpdatesPostAsync (Update body) + /// Task of ApiResponse (InlineResponse20023) + public async System.Threading.Tasks.Task> UpdatesPostAsyncWithHttpInfo (string accessToken = null, Update body = null) { @@ -394,37 +672,66 @@ public async System.Threading.Tasks.Task UpdatesPostAsync ( String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - postBody = ApiClient.Serialize(body); // http body (model) parameter + postBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; - + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling UpdatesPost: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams); - return (InlineResponse20020) ApiClient.Deserialize(response, typeof(InlineResponse20020)); + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling UpdatesPost: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling UpdatesPost: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20023) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20023))); + } /// /// Get Update Get Update /// /// id of Update - /// InlineResponse20020 - public InlineResponse20020 UpdatesIdGet (int? id) + /// User's OAuth2 access token + /// InlineResponse20023 + public InlineResponse20023 UpdatesIdGet (int? id, string accessToken = null) + { + ApiResponse response = UpdatesIdGetWithHttpInfo(id, accessToken); + return response.Data; + } + + /// + /// Get Update Get Update + /// + /// id of Update + /// User's OAuth2 access token + /// ApiResponse of InlineResponse20023 + public ApiResponse< InlineResponse20023 > UpdatesIdGetWithHttpInfo (int? id, string accessToken = null) { // verify the required parameter 'id' is set @@ -435,7 +742,7 @@ public InlineResponse20020 UpdatesIdGet (int? id) var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -444,40 +751,67 @@ public InlineResponse20020 UpdatesIdGet (int? id) String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling UpdatesIdGet: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling UpdatesIdGet: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling UpdatesIdGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling UpdatesIdGet: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse20020) ApiClient.Deserialize(response, typeof(InlineResponse20020)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20023) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20023))); + } /// /// Get Update Get Update /// /// id of Update - /// InlineResponse20020 - public async System.Threading.Tasks.Task UpdatesIdGetAsync (int? id) + /// User's OAuth2 access token + /// Task of InlineResponse20023 + public async System.Threading.Tasks.Task UpdatesIdGetAsync (int? id, string accessToken = null) + { + ApiResponse response = await UpdatesIdGetAsyncWithHttpInfo(id, accessToken); + return response.Data; + + } + + /// + /// Get Update Get Update + /// + /// id of Update + /// User's OAuth2 access token + /// Task of ApiResponse (InlineResponse20023) + public async System.Threading.Tasks.Task> UpdatesIdGetAsyncWithHttpInfo (int? id, string accessToken = null) { // verify the required parameter 'id' is set if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling UpdatesIdGet"); @@ -496,38 +830,68 @@ public async System.Threading.Tasks.Task UpdatesIdGetAsync String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; - + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling UpdatesIdGet: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling UpdatesIdGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling UpdatesIdGet: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse20020) ApiClient.Deserialize(response, typeof(InlineResponse20020)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20023) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20023))); + } /// /// Update Update Update Update /// /// id of Update + /// User's OAuth2 access token /// Update that should be updated - /// InlineResponse2002 - public InlineResponse2002 UpdatesIdPut (int? id, Update body) + /// InlineResponse2002 + public InlineResponse2002 UpdatesIdPut (int? id, string accessToken = null, Update body = null) + { + ApiResponse response = UpdatesIdPutWithHttpInfo(id, accessToken, body); + return response.Data; + } + + /// + /// Update Update Update Update + /// + /// id of Update + /// User's OAuth2 access token + /// Update that should be updated + /// ApiResponse of InlineResponse2002 + public ApiResponse< InlineResponse2002 > UpdatesIdPutWithHttpInfo (int? id, string accessToken = null, Update body = null) { // verify the required parameter 'id' is set @@ -538,7 +902,7 @@ public InlineResponse2002 UpdatesIdPut (int? id, Update body) var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -547,42 +911,70 @@ public InlineResponse2002 UpdatesIdPut (int? id, Update body) String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - postBody = ApiClient.Serialize(body); // http body (model) parameter + postBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter + + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } - - // authentication setting, if any - String[] authSettings = new String[] { }; // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling UpdatesIdPut: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling UpdatesIdPut: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling UpdatesIdPut: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling UpdatesIdPut: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse2002) ApiClient.Deserialize(response, typeof(InlineResponse2002)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2002) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2002))); + } /// /// Update Update Update Update /// /// id of Update + /// User's OAuth2 access token /// Update that should be updated - /// InlineResponse2002 - public async System.Threading.Tasks.Task UpdatesIdPutAsync (int? id, Update body) + /// Task of InlineResponse2002 + public async System.Threading.Tasks.Task UpdatesIdPutAsync (int? id, string accessToken = null, Update body = null) + { + ApiResponse response = await UpdatesIdPutAsyncWithHttpInfo(id, accessToken, body); + return response.Data; + + } + + /// + /// Update Update Update Update + /// + /// id of Update + /// User's OAuth2 access token + /// Update that should be updated + /// Task of ApiResponse (InlineResponse2002) + public async System.Threading.Tasks.Task> UpdatesIdPutAsyncWithHttpInfo (int? id, string accessToken = null, Update body = null) { // verify the required parameter 'id' is set if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling UpdatesIdPut"); @@ -601,38 +993,67 @@ public async System.Threading.Tasks.Task UpdatesIdPutAsync ( String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - postBody = ApiClient.Serialize(body); // http body (model) parameter + postBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; - + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling UpdatesIdPut: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams); - return (InlineResponse2002) ApiClient.Deserialize(response, typeof(InlineResponse2002)); + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling UpdatesIdPut: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling UpdatesIdPut: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2002) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2002))); + } /// /// Delete Update Delete Update /// /// id of Update - /// InlineResponse2002 - public InlineResponse2002 UpdatesIdDelete (int? id) + /// User's OAuth2 access token + /// InlineResponse2002 + public InlineResponse2002 UpdatesIdDelete (int? id, string accessToken = null) + { + ApiResponse response = UpdatesIdDeleteWithHttpInfo(id, accessToken); + return response.Data; + } + + /// + /// Delete Update Delete Update + /// + /// id of Update + /// User's OAuth2 access token + /// ApiResponse of InlineResponse2002 + public ApiResponse< InlineResponse2002 > UpdatesIdDeleteWithHttpInfo (int? id, string accessToken = null) { // verify the required parameter 'id' is set @@ -643,7 +1064,7 @@ public InlineResponse2002 UpdatesIdDelete (int? id) var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -652,40 +1073,67 @@ public InlineResponse2002 UpdatesIdDelete (int? id) String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling UpdatesIdDelete: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling UpdatesIdDelete: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling UpdatesIdDelete: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling UpdatesIdDelete: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse2002) ApiClient.Deserialize(response, typeof(InlineResponse2002)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2002) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2002))); + } /// /// Delete Update Delete Update /// /// id of Update - /// InlineResponse2002 - public async System.Threading.Tasks.Task UpdatesIdDeleteAsync (int? id) + /// User's OAuth2 access token + /// Task of InlineResponse2002 + public async System.Threading.Tasks.Task UpdatesIdDeleteAsync (int? id, string accessToken = null) + { + ApiResponse response = await UpdatesIdDeleteAsyncWithHttpInfo(id, accessToken); + return response.Data; + + } + + /// + /// Delete Update Delete Update + /// + /// id of Update + /// User's OAuth2 access token + /// Task of ApiResponse (InlineResponse2002) + public async System.Threading.Tasks.Task> UpdatesIdDeleteAsyncWithHttpInfo (int? id, string accessToken = null) { // verify the required parameter 'id' is set if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling UpdatesIdDelete"); @@ -704,29 +1152,45 @@ public async System.Threading.Tasks.Task UpdatesIdDeleteAsyn String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; - + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling UpdatesIdDelete: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams); - return (InlineResponse2002) ApiClient.Deserialize(response, typeof(InlineResponse2002)); + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling UpdatesIdDelete: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling UpdatesIdDelete: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2002) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2002))); + } } diff --git a/src/main/csharp/io/swagger/Api/UserVariableApi.cs b/src/main/csharp/io/swagger/Api/UserVariableApi.cs index 54ef4f3..b72b68c 100644 --- a/src/main/csharp/io/swagger/Api/UserVariableApi.cs +++ b/src/main/csharp/io/swagger/Api/UserVariableApi.cs @@ -1,6 +1,7 @@ using System; using System.IO; using System.Collections.Generic; +using System.Linq; using RestSharp; using IO.Swagger.Client; using IO.Swagger.Model; @@ -20,62 +21,66 @@ public interface IUserVariableApi /// /// Get all UserVariables /// - /// client_id - /// variable_id - /// default_unit_id - /// minimum_allowed_value - /// maximum_allowed_value - /// filling_value - /// join_with - /// onset_delay - /// duration_of_action - /// variable_category_id + /// User's OAuth2 access token + /// The ID of the client application which last created or updated this user variable + /// ID of the parent variable if this variable has any parent + /// ID of variable + /// User ID + /// D of unit to use for this variable + /// Minimum reasonable value for this variable (uses default unit) + /// Maximum reasonable value for this variable (uses default unit) + /// Value for replacing null measurements + /// The Variable this Variable should be joined with. If the variable is joined with some other variable then it is not shown to user in the list of variables + /// Estimated number of seconds that pass before a stimulus produces a perceivable effect + /// Estimated duration of time following the onset delay in which a stimulus produces a perceivable effect + /// ID of variable category /// updated - /// public - /// cause_only - /// filling_type - /// number_of_measurements - /// number_of_processed_measurements - /// measurements_at_last_analysis - /// last_unit_id - /// last_original_unit_id - /// last_original_value - /// last_value - /// last_source_id - /// number_of_correlations + /// Is variable public + /// A value of 1 indicates that this variable is generally a cause in a causal relationship. An example of a causeOnly variable would be a variable such as Cloud Cover which would generally not be influenced by the behaviour of the user + /// 0 -> No filling, 1 -> Use filling-value + /// Number of measurements + /// Number of processed measurements + /// Number of measurements at last analysis + /// ID of last Unit + /// ID of last original Unit + /// Last original value which is stored + /// Last Value + /// Last original value which is stored + /// ID of last source + /// Number of correlations for this variable /// status /// error_message - /// last_successful_update_time - /// standard_deviation - /// variance - /// minimum_recorded_daily_value - /// maximum_recorded_daily_value - /// mean - /// median - /// most_common_unit_id - /// most_common_value - /// number_of_unique_daily_values - /// number_of_changes - /// skewness - /// kurtosis - /// latitude - /// longitude - /// location - /// created_at - /// updated_at - /// outcome - /// sources - /// earliest_source_time - /// latest_source_time - /// earliest_measurement_time - /// latest_measurement_time - /// earliest_filling_time - /// latest_filling_time - /// limit - /// offset - /// sort - /// InlineResponse20021 - InlineResponse20021 UserVariablesGet (string clientId, int? variableId, int? defaultUnitId, double? minimumAllowedValue, double? maximumAllowedValue, double? fillingValue, int? joinWith, int? onsetDelay, int? durationOfAction, int? variableCategoryId, int? updated, int? _public, bool? causeOnly, string fillingType, int? numberOfMeasurements, int? numberOfProcessedMeasurements, int? measurementsAtLastAnalysis, int? lastUnitId, int? lastOriginalUnitId, int? lastOriginalValue, double? lastValue, int? lastSourceId, int? numberOfCorrelations, string status, string errorMessage, string lastSuccessfulUpdateTime, double? standardDeviation, double? variance, double? minimumRecordedDailyValue, double? maximumRecordedDailyValue, double? mean, double? median, int? mostCommonUnitId, double? mostCommonValue, double? numberOfUniqueDailyValues, int? numberOfChanges, double? skewness, double? kurtosis, double? latitude, double? longitude, string location, string createdAt, string updatedAt, bool? outcome, string sources, int? earliestSourceTime, int? latestSourceTime, int? earliestMeasurementTime, int? latestMeasurementTime, int? earliestFillingTime, int? latestFillingTime, int? limit, int? offset, string sort); + /// When this variable or its settings were last updated + /// Standard deviation + /// Variance + /// Minimum recorded value of this variable + /// Maximum recorded value of this variable + /// Mean + /// Median + /// Most common Unit ID + /// Most common value + /// Number of unique daily values + /// Number of changes + /// Skewness + /// Kurtosis + /// Latitude + /// Longitude + /// Location + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// Outcome variables (those with `outcome` == 1) are variables for which a human would generally want to identify the influencing factors. These include symptoms of illness, physique, mood, cognitive performance, etc. Generally correlation calculations are only performed on outcome variables + /// Comma-separated list of source names to limit variables to those sources + /// Earliest source time + /// Latest source time + /// Earliest measurement time + /// Latest measurement time + /// Earliest filling time + /// Latest filling time + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// InlineResponse20016 + InlineResponse20016 UserVariablesGet (string accessToken = null, string clientId = null, int? parentId = null, int? variableId = null, int? userId = null, int? defaultUnitId = null, double? minimumAllowedValue = null, double? maximumAllowedValue = null, double? fillingValue = null, int? joinWith = null, int? onsetDelay = null, int? durationOfAction = null, int? variableCategoryId = null, int? updated = null, int? _public = null, bool? causeOnly = null, string fillingType = null, int? numberOfMeasurements = null, int? numberOfProcessedMeasurements = null, int? measurementsAtLastAnalysis = null, int? lastUnitId = null, int? lastOriginalUnitId = null, int? lastOriginalValue = null, double? lastValue = null, double? lastOriginalValue2 = null, int? lastSourceId = null, int? numberOfCorrelations = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, double? standardDeviation = null, double? variance = null, double? minimumRecordedValue = null, double? maximumRecordedValue = null, double? mean = null, double? median = null, int? mostCommonUnitId = null, double? mostCommonValue = null, double? numberOfUniqueDailyValues = null, int? numberOfChanges = null, double? skewness = null, double? kurtosis = null, double? latitude = null, double? longitude = null, string location = null, string createdAt = null, string updatedAt = null, bool? outcome = null, string sources = null, int? earliestSourceTime = null, int? latestSourceTime = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, int? earliestFillingTime = null, int? latestFillingTime = null, int? limit = null, int? offset = null, string sort = null); /// /// Get all UserVariables @@ -83,82 +88,244 @@ public interface IUserVariableApi /// /// Get all UserVariables /// - /// client_id - /// variable_id - /// default_unit_id - /// minimum_allowed_value - /// maximum_allowed_value - /// filling_value - /// join_with - /// onset_delay - /// duration_of_action - /// variable_category_id + /// User's OAuth2 access token + /// The ID of the client application which last created or updated this user variable + /// ID of the parent variable if this variable has any parent + /// ID of variable + /// User ID + /// D of unit to use for this variable + /// Minimum reasonable value for this variable (uses default unit) + /// Maximum reasonable value for this variable (uses default unit) + /// Value for replacing null measurements + /// The Variable this Variable should be joined with. If the variable is joined with some other variable then it is not shown to user in the list of variables + /// Estimated number of seconds that pass before a stimulus produces a perceivable effect + /// Estimated duration of time following the onset delay in which a stimulus produces a perceivable effect + /// ID of variable category /// updated - /// public - /// cause_only - /// filling_type - /// number_of_measurements - /// number_of_processed_measurements - /// measurements_at_last_analysis - /// last_unit_id - /// last_original_unit_id - /// last_original_value - /// last_value - /// last_source_id - /// number_of_correlations + /// Is variable public + /// A value of 1 indicates that this variable is generally a cause in a causal relationship. An example of a causeOnly variable would be a variable such as Cloud Cover which would generally not be influenced by the behaviour of the user + /// 0 -> No filling, 1 -> Use filling-value + /// Number of measurements + /// Number of processed measurements + /// Number of measurements at last analysis + /// ID of last Unit + /// ID of last original Unit + /// Last original value which is stored + /// Last Value + /// Last original value which is stored + /// ID of last source + /// Number of correlations for this variable /// status /// error_message - /// last_successful_update_time - /// standard_deviation - /// variance - /// minimum_recorded_daily_value - /// maximum_recorded_daily_value - /// mean - /// median - /// most_common_unit_id - /// most_common_value - /// number_of_unique_daily_values - /// number_of_changes - /// skewness - /// kurtosis - /// latitude - /// longitude - /// location - /// created_at - /// updated_at - /// outcome - /// sources - /// earliest_source_time - /// latest_source_time - /// earliest_measurement_time - /// latest_measurement_time - /// earliest_filling_time - /// latest_filling_time - /// limit - /// offset - /// sort - /// InlineResponse20021 - System.Threading.Tasks.Task UserVariablesGetAsync (string clientId, int? variableId, int? defaultUnitId, double? minimumAllowedValue, double? maximumAllowedValue, double? fillingValue, int? joinWith, int? onsetDelay, int? durationOfAction, int? variableCategoryId, int? updated, int? _public, bool? causeOnly, string fillingType, int? numberOfMeasurements, int? numberOfProcessedMeasurements, int? measurementsAtLastAnalysis, int? lastUnitId, int? lastOriginalUnitId, int? lastOriginalValue, double? lastValue, int? lastSourceId, int? numberOfCorrelations, string status, string errorMessage, string lastSuccessfulUpdateTime, double? standardDeviation, double? variance, double? minimumRecordedDailyValue, double? maximumRecordedDailyValue, double? mean, double? median, int? mostCommonUnitId, double? mostCommonValue, double? numberOfUniqueDailyValues, int? numberOfChanges, double? skewness, double? kurtosis, double? latitude, double? longitude, string location, string createdAt, string updatedAt, bool? outcome, string sources, int? earliestSourceTime, int? latestSourceTime, int? earliestMeasurementTime, int? latestMeasurementTime, int? earliestFillingTime, int? latestFillingTime, int? limit, int? offset, string sort); + /// When this variable or its settings were last updated + /// Standard deviation + /// Variance + /// Minimum recorded value of this variable + /// Maximum recorded value of this variable + /// Mean + /// Median + /// Most common Unit ID + /// Most common value + /// Number of unique daily values + /// Number of changes + /// Skewness + /// Kurtosis + /// Latitude + /// Longitude + /// Location + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// Outcome variables (those with `outcome` == 1) are variables for which a human would generally want to identify the influencing factors. These include symptoms of illness, physique, mood, cognitive performance, etc. Generally correlation calculations are only performed on outcome variables + /// Comma-separated list of source names to limit variables to those sources + /// Earliest source time + /// Latest source time + /// Earliest measurement time + /// Latest measurement time + /// Earliest filling time + /// Latest filling time + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// ApiResponse of InlineResponse20016 + ApiResponse UserVariablesGetWithHttpInfo (string accessToken = null, string clientId = null, int? parentId = null, int? variableId = null, int? userId = null, int? defaultUnitId = null, double? minimumAllowedValue = null, double? maximumAllowedValue = null, double? fillingValue = null, int? joinWith = null, int? onsetDelay = null, int? durationOfAction = null, int? variableCategoryId = null, int? updated = null, int? _public = null, bool? causeOnly = null, string fillingType = null, int? numberOfMeasurements = null, int? numberOfProcessedMeasurements = null, int? measurementsAtLastAnalysis = null, int? lastUnitId = null, int? lastOriginalUnitId = null, int? lastOriginalValue = null, double? lastValue = null, double? lastOriginalValue2 = null, int? lastSourceId = null, int? numberOfCorrelations = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, double? standardDeviation = null, double? variance = null, double? minimumRecordedValue = null, double? maximumRecordedValue = null, double? mean = null, double? median = null, int? mostCommonUnitId = null, double? mostCommonValue = null, double? numberOfUniqueDailyValues = null, int? numberOfChanges = null, double? skewness = null, double? kurtosis = null, double? latitude = null, double? longitude = null, string location = null, string createdAt = null, string updatedAt = null, bool? outcome = null, string sources = null, int? earliestSourceTime = null, int? latestSourceTime = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, int? earliestFillingTime = null, int? latestFillingTime = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Get all UserVariables + /// + /// + /// Get all UserVariables + /// + /// User's OAuth2 access token + /// The ID of the client application which last created or updated this user variable + /// ID of the parent variable if this variable has any parent + /// ID of variable + /// User ID + /// D of unit to use for this variable + /// Minimum reasonable value for this variable (uses default unit) + /// Maximum reasonable value for this variable (uses default unit) + /// Value for replacing null measurements + /// The Variable this Variable should be joined with. If the variable is joined with some other variable then it is not shown to user in the list of variables + /// Estimated number of seconds that pass before a stimulus produces a perceivable effect + /// Estimated duration of time following the onset delay in which a stimulus produces a perceivable effect + /// ID of variable category + /// updated + /// Is variable public + /// A value of 1 indicates that this variable is generally a cause in a causal relationship. An example of a causeOnly variable would be a variable such as Cloud Cover which would generally not be influenced by the behaviour of the user + /// 0 -> No filling, 1 -> Use filling-value + /// Number of measurements + /// Number of processed measurements + /// Number of measurements at last analysis + /// ID of last Unit + /// ID of last original Unit + /// Last original value which is stored + /// Last Value + /// Last original value which is stored + /// ID of last source + /// Number of correlations for this variable + /// status + /// error_message + /// When this variable or its settings were last updated + /// Standard deviation + /// Variance + /// Minimum recorded value of this variable + /// Maximum recorded value of this variable + /// Mean + /// Median + /// Most common Unit ID + /// Most common value + /// Number of unique daily values + /// Number of changes + /// Skewness + /// Kurtosis + /// Latitude + /// Longitude + /// Location + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// Outcome variables (those with `outcome` == 1) are variables for which a human would generally want to identify the influencing factors. These include symptoms of illness, physique, mood, cognitive performance, etc. Generally correlation calculations are only performed on outcome variables + /// Comma-separated list of source names to limit variables to those sources + /// Earliest source time + /// Latest source time + /// Earliest measurement time + /// Latest measurement time + /// Earliest filling time + /// Latest filling time + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of InlineResponse20016 + System.Threading.Tasks.Task UserVariablesGetAsync (string accessToken = null, string clientId = null, int? parentId = null, int? variableId = null, int? userId = null, int? defaultUnitId = null, double? minimumAllowedValue = null, double? maximumAllowedValue = null, double? fillingValue = null, int? joinWith = null, int? onsetDelay = null, int? durationOfAction = null, int? variableCategoryId = null, int? updated = null, int? _public = null, bool? causeOnly = null, string fillingType = null, int? numberOfMeasurements = null, int? numberOfProcessedMeasurements = null, int? measurementsAtLastAnalysis = null, int? lastUnitId = null, int? lastOriginalUnitId = null, int? lastOriginalValue = null, double? lastValue = null, double? lastOriginalValue2 = null, int? lastSourceId = null, int? numberOfCorrelations = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, double? standardDeviation = null, double? variance = null, double? minimumRecordedValue = null, double? maximumRecordedValue = null, double? mean = null, double? median = null, int? mostCommonUnitId = null, double? mostCommonValue = null, double? numberOfUniqueDailyValues = null, int? numberOfChanges = null, double? skewness = null, double? kurtosis = null, double? latitude = null, double? longitude = null, string location = null, string createdAt = null, string updatedAt = null, bool? outcome = null, string sources = null, int? earliestSourceTime = null, int? latestSourceTime = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, int? earliestFillingTime = null, int? latestFillingTime = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Get all UserVariables + /// + /// + /// Get all UserVariables + /// + /// User's OAuth2 access token + /// The ID of the client application which last created or updated this user variable + /// ID of the parent variable if this variable has any parent + /// ID of variable + /// User ID + /// D of unit to use for this variable + /// Minimum reasonable value for this variable (uses default unit) + /// Maximum reasonable value for this variable (uses default unit) + /// Value for replacing null measurements + /// The Variable this Variable should be joined with. If the variable is joined with some other variable then it is not shown to user in the list of variables + /// Estimated number of seconds that pass before a stimulus produces a perceivable effect + /// Estimated duration of time following the onset delay in which a stimulus produces a perceivable effect + /// ID of variable category + /// updated + /// Is variable public + /// A value of 1 indicates that this variable is generally a cause in a causal relationship. An example of a causeOnly variable would be a variable such as Cloud Cover which would generally not be influenced by the behaviour of the user + /// 0 -> No filling, 1 -> Use filling-value + /// Number of measurements + /// Number of processed measurements + /// Number of measurements at last analysis + /// ID of last Unit + /// ID of last original Unit + /// Last original value which is stored + /// Last Value + /// Last original value which is stored + /// ID of last source + /// Number of correlations for this variable + /// status + /// error_message + /// When this variable or its settings were last updated + /// Standard deviation + /// Variance + /// Minimum recorded value of this variable + /// Maximum recorded value of this variable + /// Mean + /// Median + /// Most common Unit ID + /// Most common value + /// Number of unique daily values + /// Number of changes + /// Skewness + /// Kurtosis + /// Latitude + /// Longitude + /// Location + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// Outcome variables (those with `outcome` == 1) are variables for which a human would generally want to identify the influencing factors. These include symptoms of illness, physique, mood, cognitive performance, etc. Generally correlation calculations are only performed on outcome variables + /// Comma-separated list of source names to limit variables to those sources + /// Earliest source time + /// Latest source time + /// Earliest measurement time + /// Latest measurement time + /// Earliest filling time + /// Latest filling time + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of ApiResponse (InlineResponse20016) + System.Threading.Tasks.Task> UserVariablesGetAsyncWithHttpInfo (string accessToken = null, string clientId = null, int? parentId = null, int? variableId = null, int? userId = null, int? defaultUnitId = null, double? minimumAllowedValue = null, double? maximumAllowedValue = null, double? fillingValue = null, int? joinWith = null, int? onsetDelay = null, int? durationOfAction = null, int? variableCategoryId = null, int? updated = null, int? _public = null, bool? causeOnly = null, string fillingType = null, int? numberOfMeasurements = null, int? numberOfProcessedMeasurements = null, int? measurementsAtLastAnalysis = null, int? lastUnitId = null, int? lastOriginalUnitId = null, int? lastOriginalValue = null, double? lastValue = null, double? lastOriginalValue2 = null, int? lastSourceId = null, int? numberOfCorrelations = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, double? standardDeviation = null, double? variance = null, double? minimumRecordedValue = null, double? maximumRecordedValue = null, double? mean = null, double? median = null, int? mostCommonUnitId = null, double? mostCommonValue = null, double? numberOfUniqueDailyValues = null, int? numberOfChanges = null, double? skewness = null, double? kurtosis = null, double? latitude = null, double? longitude = null, string location = null, string createdAt = null, string updatedAt = null, bool? outcome = null, string sources = null, int? earliestSourceTime = null, int? latestSourceTime = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, int? earliestFillingTime = null, int? latestFillingTime = null, int? limit = null, int? offset = null, string sort = null); /// /// Store UserVariable /// /// - /// Store UserVariable + /// Users can change things like the display name for a variable. They can also change the parameters used in analysis of that variable such as the expected duration of action for a variable to have an effect, the estimated delay before the onset of action. In order to filter out erroneous data, they are able to set the maximum and minimum reasonable daily values for a variable. /// + /// User's OAuth2 access token /// UserVariable that should be stored - /// InlineResponse20022 - InlineResponse20022 UserVariablesPost (UserVariable body); + /// InlineResponse20026 + InlineResponse20026 UserVariablesPost (string accessToken = null, UserVariable body = null); /// /// Store UserVariable /// /// + /// Users can change things like the display name for a variable. They can also change the parameters used in analysis of that variable such as the expected duration of action for a variable to have an effect, the estimated delay before the onset of action. In order to filter out erroneous data, they are able to set the maximum and minimum reasonable daily values for a variable. + /// + /// User's OAuth2 access token + /// UserVariable that should be stored + /// ApiResponse of InlineResponse20026 + ApiResponse UserVariablesPostWithHttpInfo (string accessToken = null, UserVariable body = null); + + /// + /// Store UserVariable + /// + /// + /// Users can change things like the display name for a variable. They can also change the parameters used in analysis of that variable such as the expected duration of action for a variable to have an effect, the estimated delay before the onset of action. In order to filter out erroneous data, they are able to set the maximum and minimum reasonable daily values for a variable. + /// + /// User's OAuth2 access token + /// UserVariable that should be stored + /// Task of InlineResponse20026 + System.Threading.Tasks.Task UserVariablesPostAsync (string accessToken = null, UserVariable body = null); + + /// /// Store UserVariable + /// + /// + /// Users can change things like the display name for a variable. They can also change the parameters used in analysis of that variable such as the expected duration of action for a variable to have an effect, the estimated delay before the onset of action. In order to filter out erroneous data, they are able to set the maximum and minimum reasonable daily values for a variable. /// + /// User's OAuth2 access token /// UserVariable that should be stored - /// InlineResponse20022 - System.Threading.Tasks.Task UserVariablesPostAsync (UserVariable body); + /// Task of ApiResponse (InlineResponse20026) + System.Threading.Tasks.Task> UserVariablesPostAsyncWithHttpInfo (string accessToken = null, UserVariable body = null); /// /// Get UserVariable @@ -167,8 +334,9 @@ public interface IUserVariableApi /// Get UserVariable /// /// id of UserVariable - /// InlineResponse20022 - InlineResponse20022 UserVariablesIdGet (int? id); + /// User's OAuth2 access token + /// InlineResponse20026 + InlineResponse20026 UserVariablesIdGet (int? id, string accessToken = null); /// /// Get UserVariable @@ -177,8 +345,31 @@ public interface IUserVariableApi /// Get UserVariable /// /// id of UserVariable - /// InlineResponse20022 - System.Threading.Tasks.Task UserVariablesIdGetAsync (int? id); + /// User's OAuth2 access token + /// ApiResponse of InlineResponse20026 + ApiResponse UserVariablesIdGetWithHttpInfo (int? id, string accessToken = null); + + /// + /// Get UserVariable + /// + /// + /// Get UserVariable + /// + /// id of UserVariable + /// User's OAuth2 access token + /// Task of InlineResponse20026 + System.Threading.Tasks.Task UserVariablesIdGetAsync (int? id, string accessToken = null); + + /// + /// Get UserVariable + /// + /// + /// Get UserVariable + /// + /// id of UserVariable + /// User's OAuth2 access token + /// Task of ApiResponse (InlineResponse20026) + System.Threading.Tasks.Task> UserVariablesIdGetAsyncWithHttpInfo (int? id, string accessToken = null); /// /// Update UserVariable @@ -187,9 +378,10 @@ public interface IUserVariableApi /// Update UserVariable /// /// id of UserVariable + /// User's OAuth2 access token /// UserVariable that should be updated /// InlineResponse2002 - InlineResponse2002 UserVariablesIdPut (int? id, UserVariable body); + InlineResponse2002 UserVariablesIdPut (int? id, string accessToken = null, UserVariable body = null); /// /// Update UserVariable @@ -198,9 +390,34 @@ public interface IUserVariableApi /// Update UserVariable /// /// id of UserVariable + /// User's OAuth2 access token /// UserVariable that should be updated - /// InlineResponse2002 - System.Threading.Tasks.Task UserVariablesIdPutAsync (int? id, UserVariable body); + /// ApiResponse of InlineResponse2002 + ApiResponse UserVariablesIdPutWithHttpInfo (int? id, string accessToken = null, UserVariable body = null); + + /// + /// Update UserVariable + /// + /// + /// Update UserVariable + /// + /// id of UserVariable + /// User's OAuth2 access token + /// UserVariable that should be updated + /// Task of InlineResponse2002 + System.Threading.Tasks.Task UserVariablesIdPutAsync (int? id, string accessToken = null, UserVariable body = null); + + /// + /// Update UserVariable + /// + /// + /// Update UserVariable + /// + /// id of UserVariable + /// User's OAuth2 access token + /// UserVariable that should be updated + /// Task of ApiResponse (InlineResponse2002) + System.Threading.Tasks.Task> UserVariablesIdPutAsyncWithHttpInfo (int? id, string accessToken = null, UserVariable body = null); /// /// Delete UserVariable @@ -209,8 +426,9 @@ public interface IUserVariableApi /// Delete UserVariable /// /// id of UserVariable + /// User's OAuth2 access token /// InlineResponse2002 - InlineResponse2002 UserVariablesIdDelete (int? id); + InlineResponse2002 UserVariablesIdDelete (int? id, string accessToken = null); /// /// Delete UserVariable @@ -219,8 +437,31 @@ public interface IUserVariableApi /// Delete UserVariable /// /// id of UserVariable - /// InlineResponse2002 - System.Threading.Tasks.Task UserVariablesIdDeleteAsync (int? id); + /// User's OAuth2 access token + /// ApiResponse of InlineResponse2002 + ApiResponse UserVariablesIdDeleteWithHttpInfo (int? id, string accessToken = null); + + /// + /// Delete UserVariable + /// + /// + /// Delete UserVariable + /// + /// id of UserVariable + /// User's OAuth2 access token + /// Task of InlineResponse2002 + System.Threading.Tasks.Task UserVariablesIdDeleteAsync (int? id, string accessToken = null); + + /// + /// Delete UserVariable + /// + /// + /// Delete UserVariable + /// + /// id of UserVariable + /// User's OAuth2 access token + /// Task of ApiResponse (InlineResponse2002) + System.Threading.Tasks.Task> UserVariablesIdDeleteAsyncWithHttpInfo (int? id, string accessToken = null); } @@ -232,110 +473,205 @@ public class UserVariableApi : IUserVariableApi /// /// Initializes a new instance of the class. /// - /// an instance of ApiClient (optional) /// - public UserVariableApi(ApiClient apiClient = null) + public UserVariableApi(String basePath) { - if (apiClient == null) // use the default one in Configuration - this.ApiClient = Configuration.DefaultApiClient; - else - this.ApiClient = apiClient; + this.Configuration = new Configuration(new ApiClient(basePath)); } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class + /// using Configuration object /// + /// An instance of Configuration /// - public UserVariableApi(String basePath) + public UserVariableApi(Configuration configuration = null) { - this.ApiClient = new ApiClient(basePath); + if (configuration == null) // use the default one in Configuration + this.Configuration = Configuration.Default; + else + this.Configuration = configuration; } - + + /// + /// Gets the base path of the API client. + /// + /// The base path + public String GetBasePath() + { + return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); + } + /// /// Sets the base path of the API client. /// - /// The base path /// The base path + [Obsolete("SetBasePath is deprecated, please do 'Configuraiton.ApiClient = new ApiClient(\"http://new-path\")' instead.")] public void SetBasePath(String basePath) { - this.ApiClient.BasePath = basePath; + // do nothing } /// - /// Gets the base path of the API client. + /// Gets or sets the configuration object /// - /// The base path - public String GetBasePath() + /// An instance of the Configuration + public Configuration Configuration {get; set;} + + /// + /// Gets the default header. + /// + /// Dictionary of HTTP header + [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] + public Dictionary DefaultHeader() { - return this.ApiClient.BasePath; + return this.Configuration.DefaultHeader; } - + /// - /// Gets or sets the API client. + /// Add default header. /// - /// An instance of the ApiClient - public ApiClient ApiClient {get; set;} - + /// Header field name. + /// Header field value. + /// + [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] + public void AddDefaultHeader(string key, string value) + { + this.Configuration.AddDefaultHeader(key, value); + } + /// /// Get all UserVariables Get all UserVariables /// - /// client_id - /// variable_id - /// default_unit_id - /// minimum_allowed_value - /// maximum_allowed_value - /// filling_value - /// join_with - /// onset_delay - /// duration_of_action - /// variable_category_id + /// User's OAuth2 access token + /// The ID of the client application which last created or updated this user variable + /// ID of the parent variable if this variable has any parent + /// ID of variable + /// User ID + /// D of unit to use for this variable + /// Minimum reasonable value for this variable (uses default unit) + /// Maximum reasonable value for this variable (uses default unit) + /// Value for replacing null measurements + /// The Variable this Variable should be joined with. If the variable is joined with some other variable then it is not shown to user in the list of variables + /// Estimated number of seconds that pass before a stimulus produces a perceivable effect + /// Estimated duration of time following the onset delay in which a stimulus produces a perceivable effect + /// ID of variable category + /// updated + /// Is variable public + /// A value of 1 indicates that this variable is generally a cause in a causal relationship. An example of a causeOnly variable would be a variable such as Cloud Cover which would generally not be influenced by the behaviour of the user + /// 0 -> No filling, 1 -> Use filling-value + /// Number of measurements + /// Number of processed measurements + /// Number of measurements at last analysis + /// ID of last Unit + /// ID of last original Unit + /// Last original value which is stored + /// Last Value + /// Last original value which is stored + /// ID of last source + /// Number of correlations for this variable + /// status + /// error_message + /// When this variable or its settings were last updated + /// Standard deviation + /// Variance + /// Minimum recorded value of this variable + /// Maximum recorded value of this variable + /// Mean + /// Median + /// Most common Unit ID + /// Most common value + /// Number of unique daily values + /// Number of changes + /// Skewness + /// Kurtosis + /// Latitude + /// Longitude + /// Location + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// Outcome variables (those with `outcome` == 1) are variables for which a human would generally want to identify the influencing factors. These include symptoms of illness, physique, mood, cognitive performance, etc. Generally correlation calculations are only performed on outcome variables + /// Comma-separated list of source names to limit variables to those sources + /// Earliest source time + /// Latest source time + /// Earliest measurement time + /// Latest measurement time + /// Earliest filling time + /// Latest filling time + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// InlineResponse20016 + public InlineResponse20016 UserVariablesGet (string accessToken = null, string clientId = null, int? parentId = null, int? variableId = null, int? userId = null, int? defaultUnitId = null, double? minimumAllowedValue = null, double? maximumAllowedValue = null, double? fillingValue = null, int? joinWith = null, int? onsetDelay = null, int? durationOfAction = null, int? variableCategoryId = null, int? updated = null, int? _public = null, bool? causeOnly = null, string fillingType = null, int? numberOfMeasurements = null, int? numberOfProcessedMeasurements = null, int? measurementsAtLastAnalysis = null, int? lastUnitId = null, int? lastOriginalUnitId = null, int? lastOriginalValue = null, double? lastValue = null, double? lastOriginalValue2 = null, int? lastSourceId = null, int? numberOfCorrelations = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, double? standardDeviation = null, double? variance = null, double? minimumRecordedValue = null, double? maximumRecordedValue = null, double? mean = null, double? median = null, int? mostCommonUnitId = null, double? mostCommonValue = null, double? numberOfUniqueDailyValues = null, int? numberOfChanges = null, double? skewness = null, double? kurtosis = null, double? latitude = null, double? longitude = null, string location = null, string createdAt = null, string updatedAt = null, bool? outcome = null, string sources = null, int? earliestSourceTime = null, int? latestSourceTime = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, int? earliestFillingTime = null, int? latestFillingTime = null, int? limit = null, int? offset = null, string sort = null) + { + ApiResponse response = UserVariablesGetWithHttpInfo(accessToken, clientId, parentId, variableId, userId, defaultUnitId, minimumAllowedValue, maximumAllowedValue, fillingValue, joinWith, onsetDelay, durationOfAction, variableCategoryId, updated, _public, causeOnly, fillingType, numberOfMeasurements, numberOfProcessedMeasurements, measurementsAtLastAnalysis, lastUnitId, lastOriginalUnitId, lastOriginalValue, lastValue, lastOriginalValue2, lastSourceId, numberOfCorrelations, status, errorMessage, lastSuccessfulUpdateTime, standardDeviation, variance, minimumRecordedValue, maximumRecordedValue, mean, median, mostCommonUnitId, mostCommonValue, numberOfUniqueDailyValues, numberOfChanges, skewness, kurtosis, latitude, longitude, location, createdAt, updatedAt, outcome, sources, earliestSourceTime, latestSourceTime, earliestMeasurementTime, latestMeasurementTime, earliestFillingTime, latestFillingTime, limit, offset, sort); + return response.Data; + } + + /// + /// Get all UserVariables Get all UserVariables + /// + /// User's OAuth2 access token + /// The ID of the client application which last created or updated this user variable + /// ID of the parent variable if this variable has any parent + /// ID of variable + /// User ID + /// D of unit to use for this variable + /// Minimum reasonable value for this variable (uses default unit) + /// Maximum reasonable value for this variable (uses default unit) + /// Value for replacing null measurements + /// The Variable this Variable should be joined with. If the variable is joined with some other variable then it is not shown to user in the list of variables + /// Estimated number of seconds that pass before a stimulus produces a perceivable effect + /// Estimated duration of time following the onset delay in which a stimulus produces a perceivable effect + /// ID of variable category /// updated - /// public - /// cause_only - /// filling_type - /// number_of_measurements - /// number_of_processed_measurements - /// measurements_at_last_analysis - /// last_unit_id - /// last_original_unit_id - /// last_original_value - /// last_value - /// last_source_id - /// number_of_correlations + /// Is variable public + /// A value of 1 indicates that this variable is generally a cause in a causal relationship. An example of a causeOnly variable would be a variable such as Cloud Cover which would generally not be influenced by the behaviour of the user + /// 0 -> No filling, 1 -> Use filling-value + /// Number of measurements + /// Number of processed measurements + /// Number of measurements at last analysis + /// ID of last Unit + /// ID of last original Unit + /// Last original value which is stored + /// Last Value + /// Last original value which is stored + /// ID of last source + /// Number of correlations for this variable /// status /// error_message - /// last_successful_update_time - /// standard_deviation - /// variance - /// minimum_recorded_daily_value - /// maximum_recorded_daily_value - /// mean - /// median - /// most_common_unit_id - /// most_common_value - /// number_of_unique_daily_values - /// number_of_changes - /// skewness - /// kurtosis - /// latitude - /// longitude - /// location - /// created_at - /// updated_at - /// outcome - /// sources - /// earliest_source_time - /// latest_source_time - /// earliest_measurement_time - /// latest_measurement_time - /// earliest_filling_time - /// latest_filling_time - /// limit - /// offset - /// sort - /// InlineResponse20021 - public InlineResponse20021 UserVariablesGet (string clientId, int? variableId, int? defaultUnitId, double? minimumAllowedValue, double? maximumAllowedValue, double? fillingValue, int? joinWith, int? onsetDelay, int? durationOfAction, int? variableCategoryId, int? updated, int? _public, bool? causeOnly, string fillingType, int? numberOfMeasurements, int? numberOfProcessedMeasurements, int? measurementsAtLastAnalysis, int? lastUnitId, int? lastOriginalUnitId, int? lastOriginalValue, double? lastValue, int? lastSourceId, int? numberOfCorrelations, string status, string errorMessage, string lastSuccessfulUpdateTime, double? standardDeviation, double? variance, double? minimumRecordedDailyValue, double? maximumRecordedDailyValue, double? mean, double? median, int? mostCommonUnitId, double? mostCommonValue, double? numberOfUniqueDailyValues, int? numberOfChanges, double? skewness, double? kurtosis, double? latitude, double? longitude, string location, string createdAt, string updatedAt, bool? outcome, string sources, int? earliestSourceTime, int? latestSourceTime, int? earliestMeasurementTime, int? latestMeasurementTime, int? earliestFillingTime, int? latestFillingTime, int? limit, int? offset, string sort) + /// When this variable or its settings were last updated + /// Standard deviation + /// Variance + /// Minimum recorded value of this variable + /// Maximum recorded value of this variable + /// Mean + /// Median + /// Most common Unit ID + /// Most common value + /// Number of unique daily values + /// Number of changes + /// Skewness + /// Kurtosis + /// Latitude + /// Longitude + /// Location + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// Outcome variables (those with `outcome` == 1) are variables for which a human would generally want to identify the influencing factors. These include symptoms of illness, physique, mood, cognitive performance, etc. Generally correlation calculations are only performed on outcome variables + /// Comma-separated list of source names to limit variables to those sources + /// Earliest source time + /// Latest source time + /// Earliest measurement time + /// Latest measurement time + /// Earliest filling time + /// Latest filling time + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// ApiResponse of InlineResponse20016 + public ApiResponse< InlineResponse20016 > UserVariablesGetWithHttpInfo (string accessToken = null, string clientId = null, int? parentId = null, int? variableId = null, int? userId = null, int? defaultUnitId = null, double? minimumAllowedValue = null, double? maximumAllowedValue = null, double? fillingValue = null, int? joinWith = null, int? onsetDelay = null, int? durationOfAction = null, int? variableCategoryId = null, int? updated = null, int? _public = null, bool? causeOnly = null, string fillingType = null, int? numberOfMeasurements = null, int? numberOfProcessedMeasurements = null, int? measurementsAtLastAnalysis = null, int? lastUnitId = null, int? lastOriginalUnitId = null, int? lastOriginalValue = null, double? lastValue = null, double? lastOriginalValue2 = null, int? lastSourceId = null, int? numberOfCorrelations = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, double? standardDeviation = null, double? variance = null, double? minimumRecordedValue = null, double? maximumRecordedValue = null, double? mean = null, double? median = null, int? mostCommonUnitId = null, double? mostCommonValue = null, double? numberOfUniqueDailyValues = null, int? numberOfChanges = null, double? skewness = null, double? kurtosis = null, double? latitude = null, double? longitude = null, string location = null, string createdAt = null, string updatedAt = null, bool? outcome = null, string sources = null, int? earliestSourceTime = null, int? latestSourceTime = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, int? earliestFillingTime = null, int? latestFillingTime = null, int? limit = null, int? offset = null, string sort = null) { @@ -343,7 +679,7 @@ public InlineResponse20021 UserVariablesGet (string clientId, int? variableId, i var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -352,146 +688,235 @@ public InlineResponse20021 UserVariablesGet (string clientId, int? variableId, i String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (clientId != null) queryParams.Add("client_id", ApiClient.ParameterToString(clientId)); // query parameter - if (variableId != null) queryParams.Add("variable_id", ApiClient.ParameterToString(variableId)); // query parameter - if (defaultUnitId != null) queryParams.Add("default_unit_id", ApiClient.ParameterToString(defaultUnitId)); // query parameter - if (minimumAllowedValue != null) queryParams.Add("minimum_allowed_value", ApiClient.ParameterToString(minimumAllowedValue)); // query parameter - if (maximumAllowedValue != null) queryParams.Add("maximum_allowed_value", ApiClient.ParameterToString(maximumAllowedValue)); // query parameter - if (fillingValue != null) queryParams.Add("filling_value", ApiClient.ParameterToString(fillingValue)); // query parameter - if (joinWith != null) queryParams.Add("join_with", ApiClient.ParameterToString(joinWith)); // query parameter - if (onsetDelay != null) queryParams.Add("onset_delay", ApiClient.ParameterToString(onsetDelay)); // query parameter - if (durationOfAction != null) queryParams.Add("duration_of_action", ApiClient.ParameterToString(durationOfAction)); // query parameter - if (variableCategoryId != null) queryParams.Add("variable_category_id", ApiClient.ParameterToString(variableCategoryId)); // query parameter - if (updated != null) queryParams.Add("updated", ApiClient.ParameterToString(updated)); // query parameter - if (_public != null) queryParams.Add("public", ApiClient.ParameterToString(_public)); // query parameter - if (causeOnly != null) queryParams.Add("cause_only", ApiClient.ParameterToString(causeOnly)); // query parameter - if (fillingType != null) queryParams.Add("filling_type", ApiClient.ParameterToString(fillingType)); // query parameter - if (numberOfMeasurements != null) queryParams.Add("number_of_measurements", ApiClient.ParameterToString(numberOfMeasurements)); // query parameter - if (numberOfProcessedMeasurements != null) queryParams.Add("number_of_processed_measurements", ApiClient.ParameterToString(numberOfProcessedMeasurements)); // query parameter - if (measurementsAtLastAnalysis != null) queryParams.Add("measurements_at_last_analysis", ApiClient.ParameterToString(measurementsAtLastAnalysis)); // query parameter - if (lastUnitId != null) queryParams.Add("last_unit_id", ApiClient.ParameterToString(lastUnitId)); // query parameter - if (lastOriginalUnitId != null) queryParams.Add("last_original_unit_id", ApiClient.ParameterToString(lastOriginalUnitId)); // query parameter - if (lastOriginalValue != null) queryParams.Add("last_original_value", ApiClient.ParameterToString(lastOriginalValue)); // query parameter - if (lastValue != null) queryParams.Add("last_value", ApiClient.ParameterToString(lastValue)); // query parameter - if (lastSourceId != null) queryParams.Add("last_source_id", ApiClient.ParameterToString(lastSourceId)); // query parameter - if (numberOfCorrelations != null) queryParams.Add("number_of_correlations", ApiClient.ParameterToString(numberOfCorrelations)); // query parameter - if (status != null) queryParams.Add("status", ApiClient.ParameterToString(status)); // query parameter - if (errorMessage != null) queryParams.Add("error_message", ApiClient.ParameterToString(errorMessage)); // query parameter - if (lastSuccessfulUpdateTime != null) queryParams.Add("last_successful_update_time", ApiClient.ParameterToString(lastSuccessfulUpdateTime)); // query parameter - if (standardDeviation != null) queryParams.Add("standard_deviation", ApiClient.ParameterToString(standardDeviation)); // query parameter - if (variance != null) queryParams.Add("variance", ApiClient.ParameterToString(variance)); // query parameter - if (minimumRecordedDailyValue != null) queryParams.Add("minimum_recorded_daily_value", ApiClient.ParameterToString(minimumRecordedDailyValue)); // query parameter - if (maximumRecordedDailyValue != null) queryParams.Add("maximum_recorded_daily_value", ApiClient.ParameterToString(maximumRecordedDailyValue)); // query parameter - if (mean != null) queryParams.Add("mean", ApiClient.ParameterToString(mean)); // query parameter - if (median != null) queryParams.Add("median", ApiClient.ParameterToString(median)); // query parameter - if (mostCommonUnitId != null) queryParams.Add("most_common_unit_id", ApiClient.ParameterToString(mostCommonUnitId)); // query parameter - if (mostCommonValue != null) queryParams.Add("most_common_value", ApiClient.ParameterToString(mostCommonValue)); // query parameter - if (numberOfUniqueDailyValues != null) queryParams.Add("number_of_unique_daily_values", ApiClient.ParameterToString(numberOfUniqueDailyValues)); // query parameter - if (numberOfChanges != null) queryParams.Add("number_of_changes", ApiClient.ParameterToString(numberOfChanges)); // query parameter - if (skewness != null) queryParams.Add("skewness", ApiClient.ParameterToString(skewness)); // query parameter - if (kurtosis != null) queryParams.Add("kurtosis", ApiClient.ParameterToString(kurtosis)); // query parameter - if (latitude != null) queryParams.Add("latitude", ApiClient.ParameterToString(latitude)); // query parameter - if (longitude != null) queryParams.Add("longitude", ApiClient.ParameterToString(longitude)); // query parameter - if (location != null) queryParams.Add("location", ApiClient.ParameterToString(location)); // query parameter - if (createdAt != null) queryParams.Add("created_at", ApiClient.ParameterToString(createdAt)); // query parameter - if (updatedAt != null) queryParams.Add("updated_at", ApiClient.ParameterToString(updatedAt)); // query parameter - if (outcome != null) queryParams.Add("outcome", ApiClient.ParameterToString(outcome)); // query parameter - if (sources != null) queryParams.Add("sources", ApiClient.ParameterToString(sources)); // query parameter - if (earliestSourceTime != null) queryParams.Add("earliest_source_time", ApiClient.ParameterToString(earliestSourceTime)); // query parameter - if (latestSourceTime != null) queryParams.Add("latest_source_time", ApiClient.ParameterToString(latestSourceTime)); // query parameter - if (earliestMeasurementTime != null) queryParams.Add("earliest_measurement_time", ApiClient.ParameterToString(earliestMeasurementTime)); // query parameter - if (latestMeasurementTime != null) queryParams.Add("latest_measurement_time", ApiClient.ParameterToString(latestMeasurementTime)); // query parameter - if (earliestFillingTime != null) queryParams.Add("earliest_filling_time", ApiClient.ParameterToString(earliestFillingTime)); // query parameter - if (latestFillingTime != null) queryParams.Add("latest_filling_time", ApiClient.ParameterToString(latestFillingTime)); // query parameter - if (limit != null) queryParams.Add("limit", ApiClient.ParameterToString(limit)); // query parameter - if (offset != null) queryParams.Add("offset", ApiClient.ParameterToString(offset)); // query parameter - if (sort != null) queryParams.Add("sort", ApiClient.ParameterToString(sort)); // query parameter - - - - - - // authentication setting, if any - String[] authSettings = new String[] { }; + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + if (clientId != null) queryParams.Add("client_id", Configuration.ApiClient.ParameterToString(clientId)); // query parameter + if (parentId != null) queryParams.Add("parent_id", Configuration.ApiClient.ParameterToString(parentId)); // query parameter + if (variableId != null) queryParams.Add("variable_id", Configuration.ApiClient.ParameterToString(variableId)); // query parameter + if (userId != null) queryParams.Add("user_id", Configuration.ApiClient.ParameterToString(userId)); // query parameter + if (defaultUnitId != null) queryParams.Add("default_unit_id", Configuration.ApiClient.ParameterToString(defaultUnitId)); // query parameter + if (minimumAllowedValue != null) queryParams.Add("minimum_allowed_value", Configuration.ApiClient.ParameterToString(minimumAllowedValue)); // query parameter + if (maximumAllowedValue != null) queryParams.Add("maximum_allowed_value", Configuration.ApiClient.ParameterToString(maximumAllowedValue)); // query parameter + if (fillingValue != null) queryParams.Add("filling_value", Configuration.ApiClient.ParameterToString(fillingValue)); // query parameter + if (joinWith != null) queryParams.Add("join_with", Configuration.ApiClient.ParameterToString(joinWith)); // query parameter + if (onsetDelay != null) queryParams.Add("onset_delay", Configuration.ApiClient.ParameterToString(onsetDelay)); // query parameter + if (durationOfAction != null) queryParams.Add("duration_of_action", Configuration.ApiClient.ParameterToString(durationOfAction)); // query parameter + if (variableCategoryId != null) queryParams.Add("variable_category_id", Configuration.ApiClient.ParameterToString(variableCategoryId)); // query parameter + if (updated != null) queryParams.Add("updated", Configuration.ApiClient.ParameterToString(updated)); // query parameter + if (_public != null) queryParams.Add("public", Configuration.ApiClient.ParameterToString(_public)); // query parameter + if (causeOnly != null) queryParams.Add("cause_only", Configuration.ApiClient.ParameterToString(causeOnly)); // query parameter + if (fillingType != null) queryParams.Add("filling_type", Configuration.ApiClient.ParameterToString(fillingType)); // query parameter + if (numberOfMeasurements != null) queryParams.Add("number_of_measurements", Configuration.ApiClient.ParameterToString(numberOfMeasurements)); // query parameter + if (numberOfProcessedMeasurements != null) queryParams.Add("number_of_processed_measurements", Configuration.ApiClient.ParameterToString(numberOfProcessedMeasurements)); // query parameter + if (measurementsAtLastAnalysis != null) queryParams.Add("measurements_at_last_analysis", Configuration.ApiClient.ParameterToString(measurementsAtLastAnalysis)); // query parameter + if (lastUnitId != null) queryParams.Add("last_unit_id", Configuration.ApiClient.ParameterToString(lastUnitId)); // query parameter + if (lastOriginalUnitId != null) queryParams.Add("last_original_unit_id", Configuration.ApiClient.ParameterToString(lastOriginalUnitId)); // query parameter + if (lastOriginalValue != null) queryParams.Add("last_original_value", Configuration.ApiClient.ParameterToString(lastOriginalValue)); // query parameter + if (lastValue != null) queryParams.Add("last_value", Configuration.ApiClient.ParameterToString(lastValue)); // query parameter + if (lastOriginalValue2 != null) queryParams.Add("last_original_value", Configuration.ApiClient.ParameterToString(lastOriginalValue2)); // query parameter + if (lastSourceId != null) queryParams.Add("last_source_id", Configuration.ApiClient.ParameterToString(lastSourceId)); // query parameter + if (numberOfCorrelations != null) queryParams.Add("number_of_correlations", Configuration.ApiClient.ParameterToString(numberOfCorrelations)); // query parameter + if (status != null) queryParams.Add("status", Configuration.ApiClient.ParameterToString(status)); // query parameter + if (errorMessage != null) queryParams.Add("error_message", Configuration.ApiClient.ParameterToString(errorMessage)); // query parameter + if (lastSuccessfulUpdateTime != null) queryParams.Add("last_successful_update_time", Configuration.ApiClient.ParameterToString(lastSuccessfulUpdateTime)); // query parameter + if (standardDeviation != null) queryParams.Add("standard_deviation", Configuration.ApiClient.ParameterToString(standardDeviation)); // query parameter + if (variance != null) queryParams.Add("variance", Configuration.ApiClient.ParameterToString(variance)); // query parameter + if (minimumRecordedValue != null) queryParams.Add("minimum_recorded_value", Configuration.ApiClient.ParameterToString(minimumRecordedValue)); // query parameter + if (maximumRecordedValue != null) queryParams.Add("maximum_recorded_value", Configuration.ApiClient.ParameterToString(maximumRecordedValue)); // query parameter + if (mean != null) queryParams.Add("mean", Configuration.ApiClient.ParameterToString(mean)); // query parameter + if (median != null) queryParams.Add("median", Configuration.ApiClient.ParameterToString(median)); // query parameter + if (mostCommonUnitId != null) queryParams.Add("most_common_unit_id", Configuration.ApiClient.ParameterToString(mostCommonUnitId)); // query parameter + if (mostCommonValue != null) queryParams.Add("most_common_value", Configuration.ApiClient.ParameterToString(mostCommonValue)); // query parameter + if (numberOfUniqueDailyValues != null) queryParams.Add("number_of_unique_daily_values", Configuration.ApiClient.ParameterToString(numberOfUniqueDailyValues)); // query parameter + if (numberOfChanges != null) queryParams.Add("number_of_changes", Configuration.ApiClient.ParameterToString(numberOfChanges)); // query parameter + if (skewness != null) queryParams.Add("skewness", Configuration.ApiClient.ParameterToString(skewness)); // query parameter + if (kurtosis != null) queryParams.Add("kurtosis", Configuration.ApiClient.ParameterToString(kurtosis)); // query parameter + if (latitude != null) queryParams.Add("latitude", Configuration.ApiClient.ParameterToString(latitude)); // query parameter + if (longitude != null) queryParams.Add("longitude", Configuration.ApiClient.ParameterToString(longitude)); // query parameter + if (location != null) queryParams.Add("location", Configuration.ApiClient.ParameterToString(location)); // query parameter + if (createdAt != null) queryParams.Add("created_at", Configuration.ApiClient.ParameterToString(createdAt)); // query parameter + if (updatedAt != null) queryParams.Add("updated_at", Configuration.ApiClient.ParameterToString(updatedAt)); // query parameter + if (outcome != null) queryParams.Add("outcome", Configuration.ApiClient.ParameterToString(outcome)); // query parameter + if (sources != null) queryParams.Add("sources", Configuration.ApiClient.ParameterToString(sources)); // query parameter + if (earliestSourceTime != null) queryParams.Add("earliest_source_time", Configuration.ApiClient.ParameterToString(earliestSourceTime)); // query parameter + if (latestSourceTime != null) queryParams.Add("latest_source_time", Configuration.ApiClient.ParameterToString(latestSourceTime)); // query parameter + if (earliestMeasurementTime != null) queryParams.Add("earliest_measurement_time", Configuration.ApiClient.ParameterToString(earliestMeasurementTime)); // query parameter + if (latestMeasurementTime != null) queryParams.Add("latest_measurement_time", Configuration.ApiClient.ParameterToString(latestMeasurementTime)); // query parameter + if (earliestFillingTime != null) queryParams.Add("earliest_filling_time", Configuration.ApiClient.ParameterToString(earliestFillingTime)); // query parameter + if (latestFillingTime != null) queryParams.Add("latest_filling_time", Configuration.ApiClient.ParameterToString(latestFillingTime)); // query parameter + if (limit != null) queryParams.Add("limit", Configuration.ApiClient.ParameterToString(limit)); // query parameter + if (offset != null) queryParams.Add("offset", Configuration.ApiClient.ParameterToString(offset)); // query parameter + if (sort != null) queryParams.Add("sort", Configuration.ApiClient.ParameterToString(sort)); // query parameter + + + + + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling UserVariablesGet: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling UserVariablesGet: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling UserVariablesGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling UserVariablesGet: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse20021) ApiClient.Deserialize(response, typeof(InlineResponse20021)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20016) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20016))); + } /// /// Get all UserVariables Get all UserVariables /// - /// client_id - /// variable_id - /// default_unit_id - /// minimum_allowed_value - /// maximum_allowed_value - /// filling_value - /// join_with - /// onset_delay - /// duration_of_action - /// variable_category_id + /// User's OAuth2 access token + /// The ID of the client application which last created or updated this user variable + /// ID of the parent variable if this variable has any parent + /// ID of variable + /// User ID + /// D of unit to use for this variable + /// Minimum reasonable value for this variable (uses default unit) + /// Maximum reasonable value for this variable (uses default unit) + /// Value for replacing null measurements + /// The Variable this Variable should be joined with. If the variable is joined with some other variable then it is not shown to user in the list of variables + /// Estimated number of seconds that pass before a stimulus produces a perceivable effect + /// Estimated duration of time following the onset delay in which a stimulus produces a perceivable effect + /// ID of variable category + /// updated + /// Is variable public + /// A value of 1 indicates that this variable is generally a cause in a causal relationship. An example of a causeOnly variable would be a variable such as Cloud Cover which would generally not be influenced by the behaviour of the user + /// 0 -> No filling, 1 -> Use filling-value + /// Number of measurements + /// Number of processed measurements + /// Number of measurements at last analysis + /// ID of last Unit + /// ID of last original Unit + /// Last original value which is stored + /// Last Value + /// Last original value which is stored + /// ID of last source + /// Number of correlations for this variable + /// status + /// error_message + /// When this variable or its settings were last updated + /// Standard deviation + /// Variance + /// Minimum recorded value of this variable + /// Maximum recorded value of this variable + /// Mean + /// Median + /// Most common Unit ID + /// Most common value + /// Number of unique daily values + /// Number of changes + /// Skewness + /// Kurtosis + /// Latitude + /// Longitude + /// Location + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// Outcome variables (those with `outcome` == 1) are variables for which a human would generally want to identify the influencing factors. These include symptoms of illness, physique, mood, cognitive performance, etc. Generally correlation calculations are only performed on outcome variables + /// Comma-separated list of source names to limit variables to those sources + /// Earliest source time + /// Latest source time + /// Earliest measurement time + /// Latest measurement time + /// Earliest filling time + /// Latest filling time + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of InlineResponse20016 + public async System.Threading.Tasks.Task UserVariablesGetAsync (string accessToken = null, string clientId = null, int? parentId = null, int? variableId = null, int? userId = null, int? defaultUnitId = null, double? minimumAllowedValue = null, double? maximumAllowedValue = null, double? fillingValue = null, int? joinWith = null, int? onsetDelay = null, int? durationOfAction = null, int? variableCategoryId = null, int? updated = null, int? _public = null, bool? causeOnly = null, string fillingType = null, int? numberOfMeasurements = null, int? numberOfProcessedMeasurements = null, int? measurementsAtLastAnalysis = null, int? lastUnitId = null, int? lastOriginalUnitId = null, int? lastOriginalValue = null, double? lastValue = null, double? lastOriginalValue2 = null, int? lastSourceId = null, int? numberOfCorrelations = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, double? standardDeviation = null, double? variance = null, double? minimumRecordedValue = null, double? maximumRecordedValue = null, double? mean = null, double? median = null, int? mostCommonUnitId = null, double? mostCommonValue = null, double? numberOfUniqueDailyValues = null, int? numberOfChanges = null, double? skewness = null, double? kurtosis = null, double? latitude = null, double? longitude = null, string location = null, string createdAt = null, string updatedAt = null, bool? outcome = null, string sources = null, int? earliestSourceTime = null, int? latestSourceTime = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, int? earliestFillingTime = null, int? latestFillingTime = null, int? limit = null, int? offset = null, string sort = null) + { + ApiResponse response = await UserVariablesGetAsyncWithHttpInfo(accessToken, clientId, parentId, variableId, userId, defaultUnitId, minimumAllowedValue, maximumAllowedValue, fillingValue, joinWith, onsetDelay, durationOfAction, variableCategoryId, updated, _public, causeOnly, fillingType, numberOfMeasurements, numberOfProcessedMeasurements, measurementsAtLastAnalysis, lastUnitId, lastOriginalUnitId, lastOriginalValue, lastValue, lastOriginalValue2, lastSourceId, numberOfCorrelations, status, errorMessage, lastSuccessfulUpdateTime, standardDeviation, variance, minimumRecordedValue, maximumRecordedValue, mean, median, mostCommonUnitId, mostCommonValue, numberOfUniqueDailyValues, numberOfChanges, skewness, kurtosis, latitude, longitude, location, createdAt, updatedAt, outcome, sources, earliestSourceTime, latestSourceTime, earliestMeasurementTime, latestMeasurementTime, earliestFillingTime, latestFillingTime, limit, offset, sort); + return response.Data; + + } + + /// + /// Get all UserVariables Get all UserVariables + /// + /// User's OAuth2 access token + /// The ID of the client application which last created or updated this user variable + /// ID of the parent variable if this variable has any parent + /// ID of variable + /// User ID + /// D of unit to use for this variable + /// Minimum reasonable value for this variable (uses default unit) + /// Maximum reasonable value for this variable (uses default unit) + /// Value for replacing null measurements + /// The Variable this Variable should be joined with. If the variable is joined with some other variable then it is not shown to user in the list of variables + /// Estimated number of seconds that pass before a stimulus produces a perceivable effect + /// Estimated duration of time following the onset delay in which a stimulus produces a perceivable effect + /// ID of variable category /// updated - /// public - /// cause_only - /// filling_type - /// number_of_measurements - /// number_of_processed_measurements - /// measurements_at_last_analysis - /// last_unit_id - /// last_original_unit_id - /// last_original_value - /// last_value - /// last_source_id - /// number_of_correlations + /// Is variable public + /// A value of 1 indicates that this variable is generally a cause in a causal relationship. An example of a causeOnly variable would be a variable such as Cloud Cover which would generally not be influenced by the behaviour of the user + /// 0 -> No filling, 1 -> Use filling-value + /// Number of measurements + /// Number of processed measurements + /// Number of measurements at last analysis + /// ID of last Unit + /// ID of last original Unit + /// Last original value which is stored + /// Last Value + /// Last original value which is stored + /// ID of last source + /// Number of correlations for this variable /// status /// error_message - /// last_successful_update_time - /// standard_deviation - /// variance - /// minimum_recorded_daily_value - /// maximum_recorded_daily_value - /// mean - /// median - /// most_common_unit_id - /// most_common_value - /// number_of_unique_daily_values - /// number_of_changes - /// skewness - /// kurtosis - /// latitude - /// longitude - /// location - /// created_at - /// updated_at - /// outcome - /// sources - /// earliest_source_time - /// latest_source_time - /// earliest_measurement_time - /// latest_measurement_time - /// earliest_filling_time - /// latest_filling_time - /// limit - /// offset - /// sort - /// InlineResponse20021 - public async System.Threading.Tasks.Task UserVariablesGetAsync (string clientId, int? variableId, int? defaultUnitId, double? minimumAllowedValue, double? maximumAllowedValue, double? fillingValue, int? joinWith, int? onsetDelay, int? durationOfAction, int? variableCategoryId, int? updated, int? _public, bool? causeOnly, string fillingType, int? numberOfMeasurements, int? numberOfProcessedMeasurements, int? measurementsAtLastAnalysis, int? lastUnitId, int? lastOriginalUnitId, int? lastOriginalValue, double? lastValue, int? lastSourceId, int? numberOfCorrelations, string status, string errorMessage, string lastSuccessfulUpdateTime, double? standardDeviation, double? variance, double? minimumRecordedDailyValue, double? maximumRecordedDailyValue, double? mean, double? median, int? mostCommonUnitId, double? mostCommonValue, double? numberOfUniqueDailyValues, int? numberOfChanges, double? skewness, double? kurtosis, double? latitude, double? longitude, string location, string createdAt, string updatedAt, bool? outcome, string sources, int? earliestSourceTime, int? latestSourceTime, int? earliestMeasurementTime, int? latestMeasurementTime, int? earliestFillingTime, int? latestFillingTime, int? limit, int? offset, string sort) + /// When this variable or its settings were last updated + /// Standard deviation + /// Variance + /// Minimum recorded value of this variable + /// Maximum recorded value of this variable + /// Mean + /// Median + /// Most common Unit ID + /// Most common value + /// Number of unique daily values + /// Number of changes + /// Skewness + /// Kurtosis + /// Latitude + /// Longitude + /// Location + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// Outcome variables (those with `outcome` == 1) are variables for which a human would generally want to identify the influencing factors. These include symptoms of illness, physique, mood, cognitive performance, etc. Generally correlation calculations are only performed on outcome variables + /// Comma-separated list of source names to limit variables to those sources + /// Earliest source time + /// Latest source time + /// Earliest measurement time + /// Latest measurement time + /// Earliest filling time + /// Latest filling time + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of ApiResponse (InlineResponse20016) + public async System.Threading.Tasks.Task> UserVariablesGetAsyncWithHttpInfo (string accessToken = null, string clientId = null, int? parentId = null, int? variableId = null, int? userId = null, int? defaultUnitId = null, double? minimumAllowedValue = null, double? maximumAllowedValue = null, double? fillingValue = null, int? joinWith = null, int? onsetDelay = null, int? durationOfAction = null, int? variableCategoryId = null, int? updated = null, int? _public = null, bool? causeOnly = null, string fillingType = null, int? numberOfMeasurements = null, int? numberOfProcessedMeasurements = null, int? measurementsAtLastAnalysis = null, int? lastUnitId = null, int? lastOriginalUnitId = null, int? lastOriginalValue = null, double? lastValue = null, double? lastOriginalValue2 = null, int? lastSourceId = null, int? numberOfCorrelations = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, double? standardDeviation = null, double? variance = null, double? minimumRecordedValue = null, double? maximumRecordedValue = null, double? mean = null, double? median = null, int? mostCommonUnitId = null, double? mostCommonValue = null, double? numberOfUniqueDailyValues = null, int? numberOfChanges = null, double? skewness = null, double? kurtosis = null, double? latitude = null, double? longitude = null, string location = null, string createdAt = null, string updatedAt = null, bool? outcome = null, string sources = null, int? earliestSourceTime = null, int? latestSourceTime = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, int? earliestFillingTime = null, int? latestFillingTime = null, int? limit = null, int? offset = null, string sort = null) { @@ -508,90 +933,122 @@ public async System.Threading.Tasks.Task UserVariablesGetAs String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (clientId != null) queryParams.Add("client_id", ApiClient.ParameterToString(clientId)); // query parameter - if (variableId != null) queryParams.Add("variable_id", ApiClient.ParameterToString(variableId)); // query parameter - if (defaultUnitId != null) queryParams.Add("default_unit_id", ApiClient.ParameterToString(defaultUnitId)); // query parameter - if (minimumAllowedValue != null) queryParams.Add("minimum_allowed_value", ApiClient.ParameterToString(minimumAllowedValue)); // query parameter - if (maximumAllowedValue != null) queryParams.Add("maximum_allowed_value", ApiClient.ParameterToString(maximumAllowedValue)); // query parameter - if (fillingValue != null) queryParams.Add("filling_value", ApiClient.ParameterToString(fillingValue)); // query parameter - if (joinWith != null) queryParams.Add("join_with", ApiClient.ParameterToString(joinWith)); // query parameter - if (onsetDelay != null) queryParams.Add("onset_delay", ApiClient.ParameterToString(onsetDelay)); // query parameter - if (durationOfAction != null) queryParams.Add("duration_of_action", ApiClient.ParameterToString(durationOfAction)); // query parameter - if (variableCategoryId != null) queryParams.Add("variable_category_id", ApiClient.ParameterToString(variableCategoryId)); // query parameter - if (updated != null) queryParams.Add("updated", ApiClient.ParameterToString(updated)); // query parameter - if (_public != null) queryParams.Add("public", ApiClient.ParameterToString(_public)); // query parameter - if (causeOnly != null) queryParams.Add("cause_only", ApiClient.ParameterToString(causeOnly)); // query parameter - if (fillingType != null) queryParams.Add("filling_type", ApiClient.ParameterToString(fillingType)); // query parameter - if (numberOfMeasurements != null) queryParams.Add("number_of_measurements", ApiClient.ParameterToString(numberOfMeasurements)); // query parameter - if (numberOfProcessedMeasurements != null) queryParams.Add("number_of_processed_measurements", ApiClient.ParameterToString(numberOfProcessedMeasurements)); // query parameter - if (measurementsAtLastAnalysis != null) queryParams.Add("measurements_at_last_analysis", ApiClient.ParameterToString(measurementsAtLastAnalysis)); // query parameter - if (lastUnitId != null) queryParams.Add("last_unit_id", ApiClient.ParameterToString(lastUnitId)); // query parameter - if (lastOriginalUnitId != null) queryParams.Add("last_original_unit_id", ApiClient.ParameterToString(lastOriginalUnitId)); // query parameter - if (lastOriginalValue != null) queryParams.Add("last_original_value", ApiClient.ParameterToString(lastOriginalValue)); // query parameter - if (lastValue != null) queryParams.Add("last_value", ApiClient.ParameterToString(lastValue)); // query parameter - if (lastSourceId != null) queryParams.Add("last_source_id", ApiClient.ParameterToString(lastSourceId)); // query parameter - if (numberOfCorrelations != null) queryParams.Add("number_of_correlations", ApiClient.ParameterToString(numberOfCorrelations)); // query parameter - if (status != null) queryParams.Add("status", ApiClient.ParameterToString(status)); // query parameter - if (errorMessage != null) queryParams.Add("error_message", ApiClient.ParameterToString(errorMessage)); // query parameter - if (lastSuccessfulUpdateTime != null) queryParams.Add("last_successful_update_time", ApiClient.ParameterToString(lastSuccessfulUpdateTime)); // query parameter - if (standardDeviation != null) queryParams.Add("standard_deviation", ApiClient.ParameterToString(standardDeviation)); // query parameter - if (variance != null) queryParams.Add("variance", ApiClient.ParameterToString(variance)); // query parameter - if (minimumRecordedDailyValue != null) queryParams.Add("minimum_recorded_daily_value", ApiClient.ParameterToString(minimumRecordedDailyValue)); // query parameter - if (maximumRecordedDailyValue != null) queryParams.Add("maximum_recorded_daily_value", ApiClient.ParameterToString(maximumRecordedDailyValue)); // query parameter - if (mean != null) queryParams.Add("mean", ApiClient.ParameterToString(mean)); // query parameter - if (median != null) queryParams.Add("median", ApiClient.ParameterToString(median)); // query parameter - if (mostCommonUnitId != null) queryParams.Add("most_common_unit_id", ApiClient.ParameterToString(mostCommonUnitId)); // query parameter - if (mostCommonValue != null) queryParams.Add("most_common_value", ApiClient.ParameterToString(mostCommonValue)); // query parameter - if (numberOfUniqueDailyValues != null) queryParams.Add("number_of_unique_daily_values", ApiClient.ParameterToString(numberOfUniqueDailyValues)); // query parameter - if (numberOfChanges != null) queryParams.Add("number_of_changes", ApiClient.ParameterToString(numberOfChanges)); // query parameter - if (skewness != null) queryParams.Add("skewness", ApiClient.ParameterToString(skewness)); // query parameter - if (kurtosis != null) queryParams.Add("kurtosis", ApiClient.ParameterToString(kurtosis)); // query parameter - if (latitude != null) queryParams.Add("latitude", ApiClient.ParameterToString(latitude)); // query parameter - if (longitude != null) queryParams.Add("longitude", ApiClient.ParameterToString(longitude)); // query parameter - if (location != null) queryParams.Add("location", ApiClient.ParameterToString(location)); // query parameter - if (createdAt != null) queryParams.Add("created_at", ApiClient.ParameterToString(createdAt)); // query parameter - if (updatedAt != null) queryParams.Add("updated_at", ApiClient.ParameterToString(updatedAt)); // query parameter - if (outcome != null) queryParams.Add("outcome", ApiClient.ParameterToString(outcome)); // query parameter - if (sources != null) queryParams.Add("sources", ApiClient.ParameterToString(sources)); // query parameter - if (earliestSourceTime != null) queryParams.Add("earliest_source_time", ApiClient.ParameterToString(earliestSourceTime)); // query parameter - if (latestSourceTime != null) queryParams.Add("latest_source_time", ApiClient.ParameterToString(latestSourceTime)); // query parameter - if (earliestMeasurementTime != null) queryParams.Add("earliest_measurement_time", ApiClient.ParameterToString(earliestMeasurementTime)); // query parameter - if (latestMeasurementTime != null) queryParams.Add("latest_measurement_time", ApiClient.ParameterToString(latestMeasurementTime)); // query parameter - if (earliestFillingTime != null) queryParams.Add("earliest_filling_time", ApiClient.ParameterToString(earliestFillingTime)); // query parameter - if (latestFillingTime != null) queryParams.Add("latest_filling_time", ApiClient.ParameterToString(latestFillingTime)); // query parameter - if (limit != null) queryParams.Add("limit", ApiClient.ParameterToString(limit)); // query parameter - if (offset != null) queryParams.Add("offset", ApiClient.ParameterToString(offset)); // query parameter - if (sort != null) queryParams.Add("sort", ApiClient.ParameterToString(sort)); // query parameter - - - - - - // authentication setting, if any - String[] authSettings = new String[] { }; - + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + if (clientId != null) queryParams.Add("client_id", Configuration.ApiClient.ParameterToString(clientId)); // query parameter + if (parentId != null) queryParams.Add("parent_id", Configuration.ApiClient.ParameterToString(parentId)); // query parameter + if (variableId != null) queryParams.Add("variable_id", Configuration.ApiClient.ParameterToString(variableId)); // query parameter + if (userId != null) queryParams.Add("user_id", Configuration.ApiClient.ParameterToString(userId)); // query parameter + if (defaultUnitId != null) queryParams.Add("default_unit_id", Configuration.ApiClient.ParameterToString(defaultUnitId)); // query parameter + if (minimumAllowedValue != null) queryParams.Add("minimum_allowed_value", Configuration.ApiClient.ParameterToString(minimumAllowedValue)); // query parameter + if (maximumAllowedValue != null) queryParams.Add("maximum_allowed_value", Configuration.ApiClient.ParameterToString(maximumAllowedValue)); // query parameter + if (fillingValue != null) queryParams.Add("filling_value", Configuration.ApiClient.ParameterToString(fillingValue)); // query parameter + if (joinWith != null) queryParams.Add("join_with", Configuration.ApiClient.ParameterToString(joinWith)); // query parameter + if (onsetDelay != null) queryParams.Add("onset_delay", Configuration.ApiClient.ParameterToString(onsetDelay)); // query parameter + if (durationOfAction != null) queryParams.Add("duration_of_action", Configuration.ApiClient.ParameterToString(durationOfAction)); // query parameter + if (variableCategoryId != null) queryParams.Add("variable_category_id", Configuration.ApiClient.ParameterToString(variableCategoryId)); // query parameter + if (updated != null) queryParams.Add("updated", Configuration.ApiClient.ParameterToString(updated)); // query parameter + if (_public != null) queryParams.Add("public", Configuration.ApiClient.ParameterToString(_public)); // query parameter + if (causeOnly != null) queryParams.Add("cause_only", Configuration.ApiClient.ParameterToString(causeOnly)); // query parameter + if (fillingType != null) queryParams.Add("filling_type", Configuration.ApiClient.ParameterToString(fillingType)); // query parameter + if (numberOfMeasurements != null) queryParams.Add("number_of_measurements", Configuration.ApiClient.ParameterToString(numberOfMeasurements)); // query parameter + if (numberOfProcessedMeasurements != null) queryParams.Add("number_of_processed_measurements", Configuration.ApiClient.ParameterToString(numberOfProcessedMeasurements)); // query parameter + if (measurementsAtLastAnalysis != null) queryParams.Add("measurements_at_last_analysis", Configuration.ApiClient.ParameterToString(measurementsAtLastAnalysis)); // query parameter + if (lastUnitId != null) queryParams.Add("last_unit_id", Configuration.ApiClient.ParameterToString(lastUnitId)); // query parameter + if (lastOriginalUnitId != null) queryParams.Add("last_original_unit_id", Configuration.ApiClient.ParameterToString(lastOriginalUnitId)); // query parameter + if (lastOriginalValue != null) queryParams.Add("last_original_value", Configuration.ApiClient.ParameterToString(lastOriginalValue)); // query parameter + if (lastValue != null) queryParams.Add("last_value", Configuration.ApiClient.ParameterToString(lastValue)); // query parameter + if (lastOriginalValue2 != null) queryParams.Add("last_original_value", Configuration.ApiClient.ParameterToString(lastOriginalValue2)); // query parameter + if (lastSourceId != null) queryParams.Add("last_source_id", Configuration.ApiClient.ParameterToString(lastSourceId)); // query parameter + if (numberOfCorrelations != null) queryParams.Add("number_of_correlations", Configuration.ApiClient.ParameterToString(numberOfCorrelations)); // query parameter + if (status != null) queryParams.Add("status", Configuration.ApiClient.ParameterToString(status)); // query parameter + if (errorMessage != null) queryParams.Add("error_message", Configuration.ApiClient.ParameterToString(errorMessage)); // query parameter + if (lastSuccessfulUpdateTime != null) queryParams.Add("last_successful_update_time", Configuration.ApiClient.ParameterToString(lastSuccessfulUpdateTime)); // query parameter + if (standardDeviation != null) queryParams.Add("standard_deviation", Configuration.ApiClient.ParameterToString(standardDeviation)); // query parameter + if (variance != null) queryParams.Add("variance", Configuration.ApiClient.ParameterToString(variance)); // query parameter + if (minimumRecordedValue != null) queryParams.Add("minimum_recorded_value", Configuration.ApiClient.ParameterToString(minimumRecordedValue)); // query parameter + if (maximumRecordedValue != null) queryParams.Add("maximum_recorded_value", Configuration.ApiClient.ParameterToString(maximumRecordedValue)); // query parameter + if (mean != null) queryParams.Add("mean", Configuration.ApiClient.ParameterToString(mean)); // query parameter + if (median != null) queryParams.Add("median", Configuration.ApiClient.ParameterToString(median)); // query parameter + if (mostCommonUnitId != null) queryParams.Add("most_common_unit_id", Configuration.ApiClient.ParameterToString(mostCommonUnitId)); // query parameter + if (mostCommonValue != null) queryParams.Add("most_common_value", Configuration.ApiClient.ParameterToString(mostCommonValue)); // query parameter + if (numberOfUniqueDailyValues != null) queryParams.Add("number_of_unique_daily_values", Configuration.ApiClient.ParameterToString(numberOfUniqueDailyValues)); // query parameter + if (numberOfChanges != null) queryParams.Add("number_of_changes", Configuration.ApiClient.ParameterToString(numberOfChanges)); // query parameter + if (skewness != null) queryParams.Add("skewness", Configuration.ApiClient.ParameterToString(skewness)); // query parameter + if (kurtosis != null) queryParams.Add("kurtosis", Configuration.ApiClient.ParameterToString(kurtosis)); // query parameter + if (latitude != null) queryParams.Add("latitude", Configuration.ApiClient.ParameterToString(latitude)); // query parameter + if (longitude != null) queryParams.Add("longitude", Configuration.ApiClient.ParameterToString(longitude)); // query parameter + if (location != null) queryParams.Add("location", Configuration.ApiClient.ParameterToString(location)); // query parameter + if (createdAt != null) queryParams.Add("created_at", Configuration.ApiClient.ParameterToString(createdAt)); // query parameter + if (updatedAt != null) queryParams.Add("updated_at", Configuration.ApiClient.ParameterToString(updatedAt)); // query parameter + if (outcome != null) queryParams.Add("outcome", Configuration.ApiClient.ParameterToString(outcome)); // query parameter + if (sources != null) queryParams.Add("sources", Configuration.ApiClient.ParameterToString(sources)); // query parameter + if (earliestSourceTime != null) queryParams.Add("earliest_source_time", Configuration.ApiClient.ParameterToString(earliestSourceTime)); // query parameter + if (latestSourceTime != null) queryParams.Add("latest_source_time", Configuration.ApiClient.ParameterToString(latestSourceTime)); // query parameter + if (earliestMeasurementTime != null) queryParams.Add("earliest_measurement_time", Configuration.ApiClient.ParameterToString(earliestMeasurementTime)); // query parameter + if (latestMeasurementTime != null) queryParams.Add("latest_measurement_time", Configuration.ApiClient.ParameterToString(latestMeasurementTime)); // query parameter + if (earliestFillingTime != null) queryParams.Add("earliest_filling_time", Configuration.ApiClient.ParameterToString(earliestFillingTime)); // query parameter + if (latestFillingTime != null) queryParams.Add("latest_filling_time", Configuration.ApiClient.ParameterToString(latestFillingTime)); // query parameter + if (limit != null) queryParams.Add("limit", Configuration.ApiClient.ParameterToString(limit)); // query parameter + if (offset != null) queryParams.Add("offset", Configuration.ApiClient.ParameterToString(offset)); // query parameter + if (sort != null) queryParams.Add("sort", Configuration.ApiClient.ParameterToString(sort)); // query parameter + + + + + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling UserVariablesGet: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); - return (InlineResponse20021) ApiClient.Deserialize(response, typeof(InlineResponse20021)); + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling UserVariablesGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling UserVariablesGet: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20016) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20016))); + } /// - /// Store UserVariable Store UserVariable + /// Store UserVariable Users can change things like the display name for a variable. They can also change the parameters used in analysis of that variable such as the expected duration of action for a variable to have an effect, the estimated delay before the onset of action. In order to filter out erroneous data, they are able to set the maximum and minimum reasonable daily values for a variable. /// + /// User's OAuth2 access token /// UserVariable that should be stored - /// InlineResponse20022 - public InlineResponse20022 UserVariablesPost (UserVariable body) + /// InlineResponse20026 + public InlineResponse20026 UserVariablesPost (string accessToken = null, UserVariable body = null) + { + ApiResponse response = UserVariablesPostWithHttpInfo(accessToken, body); + return response.Data; + } + + /// + /// Store UserVariable Users can change things like the display name for a variable. They can also change the parameters used in analysis of that variable such as the expected duration of action for a variable to have an effect, the estimated delay before the onset of action. In order to filter out erroneous data, they are able to set the maximum and minimum reasonable daily values for a variable. + /// + /// User's OAuth2 access token + /// UserVariable that should be stored + /// ApiResponse of InlineResponse20026 + public ApiResponse< InlineResponse20026 > UserVariablesPostWithHttpInfo (string accessToken = null, UserVariable body = null) { @@ -599,7 +1056,7 @@ public InlineResponse20022 UserVariablesPost (UserVariable body) var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -608,40 +1065,67 @@ public InlineResponse20022 UserVariablesPost (UserVariable body) String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - postBody = ApiClient.Serialize(body); // http body (model) parameter + postBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter + + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } - - // authentication setting, if any - String[] authSettings = new String[] { }; // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling UserVariablesPost: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling UserVariablesPost: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling UserVariablesPost: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling UserVariablesPost: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse20022) ApiClient.Deserialize(response, typeof(InlineResponse20022)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20026) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20026))); + } /// - /// Store UserVariable Store UserVariable + /// Store UserVariable Users can change things like the display name for a variable. They can also change the parameters used in analysis of that variable such as the expected duration of action for a variable to have an effect, the estimated delay before the onset of action. In order to filter out erroneous data, they are able to set the maximum and minimum reasonable daily values for a variable. + /// + /// User's OAuth2 access token + /// UserVariable that should be stored + /// Task of InlineResponse20026 + public async System.Threading.Tasks.Task UserVariablesPostAsync (string accessToken = null, UserVariable body = null) + { + ApiResponse response = await UserVariablesPostAsyncWithHttpInfo(accessToken, body); + return response.Data; + + } + + /// + /// Store UserVariable Users can change things like the display name for a variable. They can also change the parameters used in analysis of that variable such as the expected duration of action for a variable to have an effect, the estimated delay before the onset of action. In order to filter out erroneous data, they are able to set the maximum and minimum reasonable daily values for a variable. /// + /// User's OAuth2 access token /// UserVariable that should be stored - /// InlineResponse20022 - public async System.Threading.Tasks.Task UserVariablesPostAsync (UserVariable body) + /// Task of ApiResponse (InlineResponse20026) + public async System.Threading.Tasks.Task> UserVariablesPostAsyncWithHttpInfo (string accessToken = null, UserVariable body = null) { @@ -658,37 +1142,66 @@ public async System.Threading.Tasks.Task UserVariablesPostA String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - postBody = ApiClient.Serialize(body); // http body (model) parameter + postBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; - + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling UserVariablesPost: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams); - return (InlineResponse20022) ApiClient.Deserialize(response, typeof(InlineResponse20022)); + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling UserVariablesPost: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling UserVariablesPost: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20026) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20026))); + } /// /// Get UserVariable Get UserVariable /// /// id of UserVariable - /// InlineResponse20022 - public InlineResponse20022 UserVariablesIdGet (int? id) + /// User's OAuth2 access token + /// InlineResponse20026 + public InlineResponse20026 UserVariablesIdGet (int? id, string accessToken = null) + { + ApiResponse response = UserVariablesIdGetWithHttpInfo(id, accessToken); + return response.Data; + } + + /// + /// Get UserVariable Get UserVariable + /// + /// id of UserVariable + /// User's OAuth2 access token + /// ApiResponse of InlineResponse20026 + public ApiResponse< InlineResponse20026 > UserVariablesIdGetWithHttpInfo (int? id, string accessToken = null) { // verify the required parameter 'id' is set @@ -699,7 +1212,7 @@ public InlineResponse20022 UserVariablesIdGet (int? id) var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -708,40 +1221,67 @@ public InlineResponse20022 UserVariablesIdGet (int? id) String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling UserVariablesIdGet: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling UserVariablesIdGet: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling UserVariablesIdGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling UserVariablesIdGet: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse20022) ApiClient.Deserialize(response, typeof(InlineResponse20022)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20026) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20026))); + } /// /// Get UserVariable Get UserVariable /// /// id of UserVariable - /// InlineResponse20022 - public async System.Threading.Tasks.Task UserVariablesIdGetAsync (int? id) + /// User's OAuth2 access token + /// Task of InlineResponse20026 + public async System.Threading.Tasks.Task UserVariablesIdGetAsync (int? id, string accessToken = null) + { + ApiResponse response = await UserVariablesIdGetAsyncWithHttpInfo(id, accessToken); + return response.Data; + + } + + /// + /// Get UserVariable Get UserVariable + /// + /// id of UserVariable + /// User's OAuth2 access token + /// Task of ApiResponse (InlineResponse20026) + public async System.Threading.Tasks.Task> UserVariablesIdGetAsyncWithHttpInfo (int? id, string accessToken = null) { // verify the required parameter 'id' is set if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling UserVariablesIdGet"); @@ -760,38 +1300,68 @@ public async System.Threading.Tasks.Task UserVariablesIdGet String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; - + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling UserVariablesIdGet: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling UserVariablesIdGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling UserVariablesIdGet: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse20022) ApiClient.Deserialize(response, typeof(InlineResponse20022)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20026) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20026))); + } /// /// Update UserVariable Update UserVariable /// /// id of UserVariable + /// User's OAuth2 access token + /// UserVariable that should be updated + /// InlineResponse2002 + public InlineResponse2002 UserVariablesIdPut (int? id, string accessToken = null, UserVariable body = null) + { + ApiResponse response = UserVariablesIdPutWithHttpInfo(id, accessToken, body); + return response.Data; + } + + /// + /// Update UserVariable Update UserVariable + /// + /// id of UserVariable + /// User's OAuth2 access token /// UserVariable that should be updated - /// InlineResponse2002 - public InlineResponse2002 UserVariablesIdPut (int? id, UserVariable body) + /// ApiResponse of InlineResponse2002 + public ApiResponse< InlineResponse2002 > UserVariablesIdPutWithHttpInfo (int? id, string accessToken = null, UserVariable body = null) { // verify the required parameter 'id' is set @@ -802,7 +1372,7 @@ public InlineResponse2002 UserVariablesIdPut (int? id, UserVariable body) var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -811,42 +1381,70 @@ public InlineResponse2002 UserVariablesIdPut (int? id, UserVariable body) String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - postBody = ApiClient.Serialize(body); // http body (model) parameter + postBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter + + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } - - // authentication setting, if any - String[] authSettings = new String[] { }; // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling UserVariablesIdPut: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling UserVariablesIdPut: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling UserVariablesIdPut: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling UserVariablesIdPut: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse2002) ApiClient.Deserialize(response, typeof(InlineResponse2002)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2002) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2002))); + } /// /// Update UserVariable Update UserVariable /// /// id of UserVariable + /// User's OAuth2 access token /// UserVariable that should be updated - /// InlineResponse2002 - public async System.Threading.Tasks.Task UserVariablesIdPutAsync (int? id, UserVariable body) + /// Task of InlineResponse2002 + public async System.Threading.Tasks.Task UserVariablesIdPutAsync (int? id, string accessToken = null, UserVariable body = null) + { + ApiResponse response = await UserVariablesIdPutAsyncWithHttpInfo(id, accessToken, body); + return response.Data; + + } + + /// + /// Update UserVariable Update UserVariable + /// + /// id of UserVariable + /// User's OAuth2 access token + /// UserVariable that should be updated + /// Task of ApiResponse (InlineResponse2002) + public async System.Threading.Tasks.Task> UserVariablesIdPutAsyncWithHttpInfo (int? id, string accessToken = null, UserVariable body = null) { // verify the required parameter 'id' is set if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling UserVariablesIdPut"); @@ -865,38 +1463,67 @@ public async System.Threading.Tasks.Task UserVariablesIdPutA String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - postBody = ApiClient.Serialize(body); // http body (model) parameter + postBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; - + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling UserVariablesIdPut: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling UserVariablesIdPut: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling UserVariablesIdPut: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse2002) ApiClient.Deserialize(response, typeof(InlineResponse2002)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2002) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2002))); + } /// /// Delete UserVariable Delete UserVariable /// /// id of UserVariable - /// InlineResponse2002 - public InlineResponse2002 UserVariablesIdDelete (int? id) + /// User's OAuth2 access token + /// InlineResponse2002 + public InlineResponse2002 UserVariablesIdDelete (int? id, string accessToken = null) + { + ApiResponse response = UserVariablesIdDeleteWithHttpInfo(id, accessToken); + return response.Data; + } + + /// + /// Delete UserVariable Delete UserVariable + /// + /// id of UserVariable + /// User's OAuth2 access token + /// ApiResponse of InlineResponse2002 + public ApiResponse< InlineResponse2002 > UserVariablesIdDeleteWithHttpInfo (int? id, string accessToken = null) { // verify the required parameter 'id' is set @@ -907,7 +1534,7 @@ public InlineResponse2002 UserVariablesIdDelete (int? id) var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -916,40 +1543,67 @@ public InlineResponse2002 UserVariablesIdDelete (int? id) String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling UserVariablesIdDelete: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling UserVariablesIdDelete: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling UserVariablesIdDelete: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling UserVariablesIdDelete: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse2002) ApiClient.Deserialize(response, typeof(InlineResponse2002)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2002) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2002))); + } /// /// Delete UserVariable Delete UserVariable /// /// id of UserVariable - /// InlineResponse2002 - public async System.Threading.Tasks.Task UserVariablesIdDeleteAsync (int? id) + /// User's OAuth2 access token + /// Task of InlineResponse2002 + public async System.Threading.Tasks.Task UserVariablesIdDeleteAsync (int? id, string accessToken = null) + { + ApiResponse response = await UserVariablesIdDeleteAsyncWithHttpInfo(id, accessToken); + return response.Data; + + } + + /// + /// Delete UserVariable Delete UserVariable + /// + /// id of UserVariable + /// User's OAuth2 access token + /// Task of ApiResponse (InlineResponse2002) + public async System.Threading.Tasks.Task> UserVariablesIdDeleteAsyncWithHttpInfo (int? id, string accessToken = null) { // verify the required parameter 'id' is set if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling UserVariablesIdDelete"); @@ -968,29 +1622,45 @@ public async System.Threading.Tasks.Task UserVariablesIdDele String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; - + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling UserVariablesIdDelete: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams); - return (InlineResponse2002) ApiClient.Deserialize(response, typeof(InlineResponse2002)); + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling UserVariablesIdDelete: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling UserVariablesIdDelete: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2002) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2002))); + } } diff --git a/src/main/csharp/io/swagger/Api/UserVariableRelationshipApi.cs b/src/main/csharp/io/swagger/Api/UserVariableRelationshipApi.cs new file mode 100644 index 0000000..4bb8236 --- /dev/null +++ b/src/main/csharp/io/swagger/Api/UserVariableRelationshipApi.cs @@ -0,0 +1,1298 @@ +using System; +using System.IO; +using System.Collections.Generic; +using System.Linq; +using RestSharp; +using IO.Swagger.Client; +using IO.Swagger.Model; + +namespace IO.Swagger.Api +{ + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface IUserVariableRelationshipApi + { + + /// + /// Get all UserVariableRelationships + /// + /// + /// Get all UserVariableRelationships + /// + /// User's OAuth2 access token + /// id + /// Our confidence that a consistent predictive relationship exists based on the amount of evidence, reproducibility, and other factors + /// A quantitative representation of our confidence that a consistent predictive relationship exists based on the amount of evidence, reproducibility, and other factors + /// Direction is positive if higher predictor values generally precede higher outcome values. Direction is negative if higher predictor values generally precede lower outcome values. + /// Estimated number of seconds following the onset delay in which a stimulus produces a perceivable effect + /// error_message + /// Estimated number of seconds that pass before a stimulus produces a perceivable effect + /// Variable ID for the outcome variable + /// Variable ID for the predictor variable + /// ID for default unit of the predictor variable + /// A value representative of the relevance of this predictor relative to other predictors of this outcome. Usually used for relevancy sorting. + /// Can be weak, medium, or strong based on the size of the effect which the predictor appears to have on the outcome relative to other variable relationship strength scores. + /// A value represented to the size of the effect which the predictor appears to have on the outcome. + /// user_id + /// vote + /// Value for the predictor variable (in it's default unit) which typically precedes an above average outcome value + /// Value for the predictor variable (in it's default unit) which typically precedes a below average outcome value + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// InlineResponse20024 + InlineResponse20024 UserVariableRelationshipsGet (string accessToken = null, int? id = null, string confidenceLevel = null, double? confidenceScore = null, string direction = null, int? durationOfAction = null, string errorMessage = null, int? onsetDelay = null, int? outcomeVariableId = null, int? predictorVariableId = null, int? predictorUnitId = null, double? sinnRank = null, string strengthLevel = null, double? strengthScore = null, int? userId = null, string vote = null, double? valuePredictingHighOutcome = null, double? valuePredictingLowOutcome = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Get all UserVariableRelationships + /// + /// + /// Get all UserVariableRelationships + /// + /// User's OAuth2 access token + /// id + /// Our confidence that a consistent predictive relationship exists based on the amount of evidence, reproducibility, and other factors + /// A quantitative representation of our confidence that a consistent predictive relationship exists based on the amount of evidence, reproducibility, and other factors + /// Direction is positive if higher predictor values generally precede higher outcome values. Direction is negative if higher predictor values generally precede lower outcome values. + /// Estimated number of seconds following the onset delay in which a stimulus produces a perceivable effect + /// error_message + /// Estimated number of seconds that pass before a stimulus produces a perceivable effect + /// Variable ID for the outcome variable + /// Variable ID for the predictor variable + /// ID for default unit of the predictor variable + /// A value representative of the relevance of this predictor relative to other predictors of this outcome. Usually used for relevancy sorting. + /// Can be weak, medium, or strong based on the size of the effect which the predictor appears to have on the outcome relative to other variable relationship strength scores. + /// A value represented to the size of the effect which the predictor appears to have on the outcome. + /// user_id + /// vote + /// Value for the predictor variable (in it's default unit) which typically precedes an above average outcome value + /// Value for the predictor variable (in it's default unit) which typically precedes a below average outcome value + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// ApiResponse of InlineResponse20024 + ApiResponse UserVariableRelationshipsGetWithHttpInfo (string accessToken = null, int? id = null, string confidenceLevel = null, double? confidenceScore = null, string direction = null, int? durationOfAction = null, string errorMessage = null, int? onsetDelay = null, int? outcomeVariableId = null, int? predictorVariableId = null, int? predictorUnitId = null, double? sinnRank = null, string strengthLevel = null, double? strengthScore = null, int? userId = null, string vote = null, double? valuePredictingHighOutcome = null, double? valuePredictingLowOutcome = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Get all UserVariableRelationships + /// + /// + /// Get all UserVariableRelationships + /// + /// User's OAuth2 access token + /// id + /// Our confidence that a consistent predictive relationship exists based on the amount of evidence, reproducibility, and other factors + /// A quantitative representation of our confidence that a consistent predictive relationship exists based on the amount of evidence, reproducibility, and other factors + /// Direction is positive if higher predictor values generally precede higher outcome values. Direction is negative if higher predictor values generally precede lower outcome values. + /// Estimated number of seconds following the onset delay in which a stimulus produces a perceivable effect + /// error_message + /// Estimated number of seconds that pass before a stimulus produces a perceivable effect + /// Variable ID for the outcome variable + /// Variable ID for the predictor variable + /// ID for default unit of the predictor variable + /// A value representative of the relevance of this predictor relative to other predictors of this outcome. Usually used for relevancy sorting. + /// Can be weak, medium, or strong based on the size of the effect which the predictor appears to have on the outcome relative to other variable relationship strength scores. + /// A value represented to the size of the effect which the predictor appears to have on the outcome. + /// user_id + /// vote + /// Value for the predictor variable (in it's default unit) which typically precedes an above average outcome value + /// Value for the predictor variable (in it's default unit) which typically precedes a below average outcome value + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of InlineResponse20024 + System.Threading.Tasks.Task UserVariableRelationshipsGetAsync (string accessToken = null, int? id = null, string confidenceLevel = null, double? confidenceScore = null, string direction = null, int? durationOfAction = null, string errorMessage = null, int? onsetDelay = null, int? outcomeVariableId = null, int? predictorVariableId = null, int? predictorUnitId = null, double? sinnRank = null, string strengthLevel = null, double? strengthScore = null, int? userId = null, string vote = null, double? valuePredictingHighOutcome = null, double? valuePredictingLowOutcome = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Get all UserVariableRelationships + /// + /// + /// Get all UserVariableRelationships + /// + /// User's OAuth2 access token + /// id + /// Our confidence that a consistent predictive relationship exists based on the amount of evidence, reproducibility, and other factors + /// A quantitative representation of our confidence that a consistent predictive relationship exists based on the amount of evidence, reproducibility, and other factors + /// Direction is positive if higher predictor values generally precede higher outcome values. Direction is negative if higher predictor values generally precede lower outcome values. + /// Estimated number of seconds following the onset delay in which a stimulus produces a perceivable effect + /// error_message + /// Estimated number of seconds that pass before a stimulus produces a perceivable effect + /// Variable ID for the outcome variable + /// Variable ID for the predictor variable + /// ID for default unit of the predictor variable + /// A value representative of the relevance of this predictor relative to other predictors of this outcome. Usually used for relevancy sorting. + /// Can be weak, medium, or strong based on the size of the effect which the predictor appears to have on the outcome relative to other variable relationship strength scores. + /// A value represented to the size of the effect which the predictor appears to have on the outcome. + /// user_id + /// vote + /// Value for the predictor variable (in it's default unit) which typically precedes an above average outcome value + /// Value for the predictor variable (in it's default unit) which typically precedes a below average outcome value + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of ApiResponse (InlineResponse20024) + System.Threading.Tasks.Task> UserVariableRelationshipsGetAsyncWithHttpInfo (string accessToken = null, int? id = null, string confidenceLevel = null, double? confidenceScore = null, string direction = null, int? durationOfAction = null, string errorMessage = null, int? onsetDelay = null, int? outcomeVariableId = null, int? predictorVariableId = null, int? predictorUnitId = null, double? sinnRank = null, string strengthLevel = null, double? strengthScore = null, int? userId = null, string vote = null, double? valuePredictingHighOutcome = null, double? valuePredictingLowOutcome = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Store UserVariableRelationship + /// + /// + /// Store UserVariableRelationship + /// + /// User's OAuth2 access token + /// UserVariableRelationship that should be stored + /// InlineResponse20025 + InlineResponse20025 UserVariableRelationshipsPost (string accessToken = null, UserVariableRelationship body = null); + + /// + /// Store UserVariableRelationship + /// + /// + /// Store UserVariableRelationship + /// + /// User's OAuth2 access token + /// UserVariableRelationship that should be stored + /// ApiResponse of InlineResponse20025 + ApiResponse UserVariableRelationshipsPostWithHttpInfo (string accessToken = null, UserVariableRelationship body = null); + + /// + /// Store UserVariableRelationship + /// + /// + /// Store UserVariableRelationship + /// + /// User's OAuth2 access token + /// UserVariableRelationship that should be stored + /// Task of InlineResponse20025 + System.Threading.Tasks.Task UserVariableRelationshipsPostAsync (string accessToken = null, UserVariableRelationship body = null); + + /// + /// Store UserVariableRelationship + /// + /// + /// Store UserVariableRelationship + /// + /// User's OAuth2 access token + /// UserVariableRelationship that should be stored + /// Task of ApiResponse (InlineResponse20025) + System.Threading.Tasks.Task> UserVariableRelationshipsPostAsyncWithHttpInfo (string accessToken = null, UserVariableRelationship body = null); + + /// + /// Get UserVariableRelationship + /// + /// + /// Get UserVariableRelationship + /// + /// id of UserVariableRelationship + /// User's OAuth2 access token + /// InlineResponse20025 + InlineResponse20025 UserVariableRelationshipsIdGet (int? id, string accessToken = null); + + /// + /// Get UserVariableRelationship + /// + /// + /// Get UserVariableRelationship + /// + /// id of UserVariableRelationship + /// User's OAuth2 access token + /// ApiResponse of InlineResponse20025 + ApiResponse UserVariableRelationshipsIdGetWithHttpInfo (int? id, string accessToken = null); + + /// + /// Get UserVariableRelationship + /// + /// + /// Get UserVariableRelationship + /// + /// id of UserVariableRelationship + /// User's OAuth2 access token + /// Task of InlineResponse20025 + System.Threading.Tasks.Task UserVariableRelationshipsIdGetAsync (int? id, string accessToken = null); + + /// + /// Get UserVariableRelationship + /// + /// + /// Get UserVariableRelationship + /// + /// id of UserVariableRelationship + /// User's OAuth2 access token + /// Task of ApiResponse (InlineResponse20025) + System.Threading.Tasks.Task> UserVariableRelationshipsIdGetAsyncWithHttpInfo (int? id, string accessToken = null); + + /// + /// Update UserVariableRelationship + /// + /// + /// Update UserVariableRelationship + /// + /// id of UserVariableRelationship + /// User's OAuth2 access token + /// UserVariableRelationship that should be updated + /// InlineResponse2002 + InlineResponse2002 UserVariableRelationshipsIdPut (int? id, string accessToken = null, UserVariableRelationship body = null); + + /// + /// Update UserVariableRelationship + /// + /// + /// Update UserVariableRelationship + /// + /// id of UserVariableRelationship + /// User's OAuth2 access token + /// UserVariableRelationship that should be updated + /// ApiResponse of InlineResponse2002 + ApiResponse UserVariableRelationshipsIdPutWithHttpInfo (int? id, string accessToken = null, UserVariableRelationship body = null); + + /// + /// Update UserVariableRelationship + /// + /// + /// Update UserVariableRelationship + /// + /// id of UserVariableRelationship + /// User's OAuth2 access token + /// UserVariableRelationship that should be updated + /// Task of InlineResponse2002 + System.Threading.Tasks.Task UserVariableRelationshipsIdPutAsync (int? id, string accessToken = null, UserVariableRelationship body = null); + + /// + /// Update UserVariableRelationship + /// + /// + /// Update UserVariableRelationship + /// + /// id of UserVariableRelationship + /// User's OAuth2 access token + /// UserVariableRelationship that should be updated + /// Task of ApiResponse (InlineResponse2002) + System.Threading.Tasks.Task> UserVariableRelationshipsIdPutAsyncWithHttpInfo (int? id, string accessToken = null, UserVariableRelationship body = null); + + /// + /// Delete UserVariableRelationship + /// + /// + /// Delete UserVariableRelationship + /// + /// id of UserVariableRelationship + /// User's OAuth2 access token + /// InlineResponse2002 + InlineResponse2002 UserVariableRelationshipsIdDelete (int? id, string accessToken = null); + + /// + /// Delete UserVariableRelationship + /// + /// + /// Delete UserVariableRelationship + /// + /// id of UserVariableRelationship + /// User's OAuth2 access token + /// ApiResponse of InlineResponse2002 + ApiResponse UserVariableRelationshipsIdDeleteWithHttpInfo (int? id, string accessToken = null); + + /// + /// Delete UserVariableRelationship + /// + /// + /// Delete UserVariableRelationship + /// + /// id of UserVariableRelationship + /// User's OAuth2 access token + /// Task of InlineResponse2002 + System.Threading.Tasks.Task UserVariableRelationshipsIdDeleteAsync (int? id, string accessToken = null); + + /// + /// Delete UserVariableRelationship + /// + /// + /// Delete UserVariableRelationship + /// + /// id of UserVariableRelationship + /// User's OAuth2 access token + /// Task of ApiResponse (InlineResponse2002) + System.Threading.Tasks.Task> UserVariableRelationshipsIdDeleteAsyncWithHttpInfo (int? id, string accessToken = null); + + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public class UserVariableRelationshipApi : IUserVariableRelationshipApi + { + /// + /// Initializes a new instance of the class. + /// + /// + public UserVariableRelationshipApi(String basePath) + { + this.Configuration = new Configuration(new ApiClient(basePath)); + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public UserVariableRelationshipApi(Configuration configuration = null) + { + if (configuration == null) // use the default one in Configuration + this.Configuration = Configuration.Default; + else + this.Configuration = configuration; + } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public String GetBasePath() + { + return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); + } + + /// + /// Sets the base path of the API client. + /// + /// The base path + [Obsolete("SetBasePath is deprecated, please do 'Configuraiton.ApiClient = new ApiClient(\"http://new-path\")' instead.")] + public void SetBasePath(String basePath) + { + // do nothing + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public Configuration Configuration {get; set;} + + /// + /// Gets the default header. + /// + /// Dictionary of HTTP header + [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] + public Dictionary DefaultHeader() + { + return this.Configuration.DefaultHeader; + } + + /// + /// Add default header. + /// + /// Header field name. + /// Header field value. + /// + [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] + public void AddDefaultHeader(string key, string value) + { + this.Configuration.AddDefaultHeader(key, value); + } + + + /// + /// Get all UserVariableRelationships Get all UserVariableRelationships + /// + /// User's OAuth2 access token + /// id + /// Our confidence that a consistent predictive relationship exists based on the amount of evidence, reproducibility, and other factors + /// A quantitative representation of our confidence that a consistent predictive relationship exists based on the amount of evidence, reproducibility, and other factors + /// Direction is positive if higher predictor values generally precede higher outcome values. Direction is negative if higher predictor values generally precede lower outcome values. + /// Estimated number of seconds following the onset delay in which a stimulus produces a perceivable effect + /// error_message + /// Estimated number of seconds that pass before a stimulus produces a perceivable effect + /// Variable ID for the outcome variable + /// Variable ID for the predictor variable + /// ID for default unit of the predictor variable + /// A value representative of the relevance of this predictor relative to other predictors of this outcome. Usually used for relevancy sorting. + /// Can be weak, medium, or strong based on the size of the effect which the predictor appears to have on the outcome relative to other variable relationship strength scores. + /// A value represented to the size of the effect which the predictor appears to have on the outcome. + /// user_id + /// vote + /// Value for the predictor variable (in it's default unit) which typically precedes an above average outcome value + /// Value for the predictor variable (in it's default unit) which typically precedes a below average outcome value + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// InlineResponse20024 + public InlineResponse20024 UserVariableRelationshipsGet (string accessToken = null, int? id = null, string confidenceLevel = null, double? confidenceScore = null, string direction = null, int? durationOfAction = null, string errorMessage = null, int? onsetDelay = null, int? outcomeVariableId = null, int? predictorVariableId = null, int? predictorUnitId = null, double? sinnRank = null, string strengthLevel = null, double? strengthScore = null, int? userId = null, string vote = null, double? valuePredictingHighOutcome = null, double? valuePredictingLowOutcome = null, int? limit = null, int? offset = null, string sort = null) + { + ApiResponse response = UserVariableRelationshipsGetWithHttpInfo(accessToken, id, confidenceLevel, confidenceScore, direction, durationOfAction, errorMessage, onsetDelay, outcomeVariableId, predictorVariableId, predictorUnitId, sinnRank, strengthLevel, strengthScore, userId, vote, valuePredictingHighOutcome, valuePredictingLowOutcome, limit, offset, sort); + return response.Data; + } + + /// + /// Get all UserVariableRelationships Get all UserVariableRelationships + /// + /// User's OAuth2 access token + /// id + /// Our confidence that a consistent predictive relationship exists based on the amount of evidence, reproducibility, and other factors + /// A quantitative representation of our confidence that a consistent predictive relationship exists based on the amount of evidence, reproducibility, and other factors + /// Direction is positive if higher predictor values generally precede higher outcome values. Direction is negative if higher predictor values generally precede lower outcome values. + /// Estimated number of seconds following the onset delay in which a stimulus produces a perceivable effect + /// error_message + /// Estimated number of seconds that pass before a stimulus produces a perceivable effect + /// Variable ID for the outcome variable + /// Variable ID for the predictor variable + /// ID for default unit of the predictor variable + /// A value representative of the relevance of this predictor relative to other predictors of this outcome. Usually used for relevancy sorting. + /// Can be weak, medium, or strong based on the size of the effect which the predictor appears to have on the outcome relative to other variable relationship strength scores. + /// A value represented to the size of the effect which the predictor appears to have on the outcome. + /// user_id + /// vote + /// Value for the predictor variable (in it's default unit) which typically precedes an above average outcome value + /// Value for the predictor variable (in it's default unit) which typically precedes a below average outcome value + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// ApiResponse of InlineResponse20024 + public ApiResponse< InlineResponse20024 > UserVariableRelationshipsGetWithHttpInfo (string accessToken = null, int? id = null, string confidenceLevel = null, double? confidenceScore = null, string direction = null, int? durationOfAction = null, string errorMessage = null, int? onsetDelay = null, int? outcomeVariableId = null, int? predictorVariableId = null, int? predictorUnitId = null, double? sinnRank = null, string strengthLevel = null, double? strengthScore = null, int? userId = null, string vote = null, double? valuePredictingHighOutcome = null, double? valuePredictingLowOutcome = null, int? limit = null, int? offset = null, string sort = null) + { + + + var path_ = "/userVariableRelationships"; + + var pathParams = new Dictionary(); + var queryParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); + var formParams = new Dictionary(); + var fileParams = new Dictionary(); + String postBody = null; + + // to determine the Accept header + String[] http_header_accepts = new String[] { + "application/json" + }; + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); + if (http_header_accept != null) + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + pathParams.Add("format", "json"); + + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + if (id != null) queryParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // query parameter + if (confidenceLevel != null) queryParams.Add("confidence_level", Configuration.ApiClient.ParameterToString(confidenceLevel)); // query parameter + if (confidenceScore != null) queryParams.Add("confidence_score", Configuration.ApiClient.ParameterToString(confidenceScore)); // query parameter + if (direction != null) queryParams.Add("direction", Configuration.ApiClient.ParameterToString(direction)); // query parameter + if (durationOfAction != null) queryParams.Add("duration_of_action", Configuration.ApiClient.ParameterToString(durationOfAction)); // query parameter + if (errorMessage != null) queryParams.Add("error_message", Configuration.ApiClient.ParameterToString(errorMessage)); // query parameter + if (onsetDelay != null) queryParams.Add("onset_delay", Configuration.ApiClient.ParameterToString(onsetDelay)); // query parameter + if (outcomeVariableId != null) queryParams.Add("outcome_variable_id", Configuration.ApiClient.ParameterToString(outcomeVariableId)); // query parameter + if (predictorVariableId != null) queryParams.Add("predictor_variable_id", Configuration.ApiClient.ParameterToString(predictorVariableId)); // query parameter + if (predictorUnitId != null) queryParams.Add("predictor_unit_id", Configuration.ApiClient.ParameterToString(predictorUnitId)); // query parameter + if (sinnRank != null) queryParams.Add("sinn_rank", Configuration.ApiClient.ParameterToString(sinnRank)); // query parameter + if (strengthLevel != null) queryParams.Add("strength_level", Configuration.ApiClient.ParameterToString(strengthLevel)); // query parameter + if (strengthScore != null) queryParams.Add("strength_score", Configuration.ApiClient.ParameterToString(strengthScore)); // query parameter + if (userId != null) queryParams.Add("user_id", Configuration.ApiClient.ParameterToString(userId)); // query parameter + if (vote != null) queryParams.Add("vote", Configuration.ApiClient.ParameterToString(vote)); // query parameter + if (valuePredictingHighOutcome != null) queryParams.Add("value_predicting_high_outcome", Configuration.ApiClient.ParameterToString(valuePredictingHighOutcome)); // query parameter + if (valuePredictingLowOutcome != null) queryParams.Add("value_predicting_low_outcome", Configuration.ApiClient.ParameterToString(valuePredictingLowOutcome)); // query parameter + if (limit != null) queryParams.Add("limit", Configuration.ApiClient.ParameterToString(limit)); // query parameter + if (offset != null) queryParams.Add("offset", Configuration.ApiClient.ParameterToString(offset)); // query parameter + if (sort != null) queryParams.Add("sort", Configuration.ApiClient.ParameterToString(sort)); // query parameter + + + + + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + + // make the HTTP request + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling UserVariableRelationshipsGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling UserVariableRelationshipsGet: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20024) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20024))); + + } + + /// + /// Get all UserVariableRelationships Get all UserVariableRelationships + /// + /// User's OAuth2 access token + /// id + /// Our confidence that a consistent predictive relationship exists based on the amount of evidence, reproducibility, and other factors + /// A quantitative representation of our confidence that a consistent predictive relationship exists based on the amount of evidence, reproducibility, and other factors + /// Direction is positive if higher predictor values generally precede higher outcome values. Direction is negative if higher predictor values generally precede lower outcome values. + /// Estimated number of seconds following the onset delay in which a stimulus produces a perceivable effect + /// error_message + /// Estimated number of seconds that pass before a stimulus produces a perceivable effect + /// Variable ID for the outcome variable + /// Variable ID for the predictor variable + /// ID for default unit of the predictor variable + /// A value representative of the relevance of this predictor relative to other predictors of this outcome. Usually used for relevancy sorting. + /// Can be weak, medium, or strong based on the size of the effect which the predictor appears to have on the outcome relative to other variable relationship strength scores. + /// A value represented to the size of the effect which the predictor appears to have on the outcome. + /// user_id + /// vote + /// Value for the predictor variable (in it's default unit) which typically precedes an above average outcome value + /// Value for the predictor variable (in it's default unit) which typically precedes a below average outcome value + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of InlineResponse20024 + public async System.Threading.Tasks.Task UserVariableRelationshipsGetAsync (string accessToken = null, int? id = null, string confidenceLevel = null, double? confidenceScore = null, string direction = null, int? durationOfAction = null, string errorMessage = null, int? onsetDelay = null, int? outcomeVariableId = null, int? predictorVariableId = null, int? predictorUnitId = null, double? sinnRank = null, string strengthLevel = null, double? strengthScore = null, int? userId = null, string vote = null, double? valuePredictingHighOutcome = null, double? valuePredictingLowOutcome = null, int? limit = null, int? offset = null, string sort = null) + { + ApiResponse response = await UserVariableRelationshipsGetAsyncWithHttpInfo(accessToken, id, confidenceLevel, confidenceScore, direction, durationOfAction, errorMessage, onsetDelay, outcomeVariableId, predictorVariableId, predictorUnitId, sinnRank, strengthLevel, strengthScore, userId, vote, valuePredictingHighOutcome, valuePredictingLowOutcome, limit, offset, sort); + return response.Data; + + } + + /// + /// Get all UserVariableRelationships Get all UserVariableRelationships + /// + /// User's OAuth2 access token + /// id + /// Our confidence that a consistent predictive relationship exists based on the amount of evidence, reproducibility, and other factors + /// A quantitative representation of our confidence that a consistent predictive relationship exists based on the amount of evidence, reproducibility, and other factors + /// Direction is positive if higher predictor values generally precede higher outcome values. Direction is negative if higher predictor values generally precede lower outcome values. + /// Estimated number of seconds following the onset delay in which a stimulus produces a perceivable effect + /// error_message + /// Estimated number of seconds that pass before a stimulus produces a perceivable effect + /// Variable ID for the outcome variable + /// Variable ID for the predictor variable + /// ID for default unit of the predictor variable + /// A value representative of the relevance of this predictor relative to other predictors of this outcome. Usually used for relevancy sorting. + /// Can be weak, medium, or strong based on the size of the effect which the predictor appears to have on the outcome relative to other variable relationship strength scores. + /// A value represented to the size of the effect which the predictor appears to have on the outcome. + /// user_id + /// vote + /// Value for the predictor variable (in it's default unit) which typically precedes an above average outcome value + /// Value for the predictor variable (in it's default unit) which typically precedes a below average outcome value + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of ApiResponse (InlineResponse20024) + public async System.Threading.Tasks.Task> UserVariableRelationshipsGetAsyncWithHttpInfo (string accessToken = null, int? id = null, string confidenceLevel = null, double? confidenceScore = null, string direction = null, int? durationOfAction = null, string errorMessage = null, int? onsetDelay = null, int? outcomeVariableId = null, int? predictorVariableId = null, int? predictorUnitId = null, double? sinnRank = null, string strengthLevel = null, double? strengthScore = null, int? userId = null, string vote = null, double? valuePredictingHighOutcome = null, double? valuePredictingLowOutcome = null, int? limit = null, int? offset = null, string sort = null) + { + + + var path_ = "/userVariableRelationships"; + + var pathParams = new Dictionary(); + var queryParams = new Dictionary(); + var headerParams = new Dictionary(); + var formParams = new Dictionary(); + var fileParams = new Dictionary(); + String postBody = null; + + // to determine the Accept header + String[] http_header_accepts = new String[] { + "application/json" + }; + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); + if (http_header_accept != null) + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + pathParams.Add("format", "json"); + + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + if (id != null) queryParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // query parameter + if (confidenceLevel != null) queryParams.Add("confidence_level", Configuration.ApiClient.ParameterToString(confidenceLevel)); // query parameter + if (confidenceScore != null) queryParams.Add("confidence_score", Configuration.ApiClient.ParameterToString(confidenceScore)); // query parameter + if (direction != null) queryParams.Add("direction", Configuration.ApiClient.ParameterToString(direction)); // query parameter + if (durationOfAction != null) queryParams.Add("duration_of_action", Configuration.ApiClient.ParameterToString(durationOfAction)); // query parameter + if (errorMessage != null) queryParams.Add("error_message", Configuration.ApiClient.ParameterToString(errorMessage)); // query parameter + if (onsetDelay != null) queryParams.Add("onset_delay", Configuration.ApiClient.ParameterToString(onsetDelay)); // query parameter + if (outcomeVariableId != null) queryParams.Add("outcome_variable_id", Configuration.ApiClient.ParameterToString(outcomeVariableId)); // query parameter + if (predictorVariableId != null) queryParams.Add("predictor_variable_id", Configuration.ApiClient.ParameterToString(predictorVariableId)); // query parameter + if (predictorUnitId != null) queryParams.Add("predictor_unit_id", Configuration.ApiClient.ParameterToString(predictorUnitId)); // query parameter + if (sinnRank != null) queryParams.Add("sinn_rank", Configuration.ApiClient.ParameterToString(sinnRank)); // query parameter + if (strengthLevel != null) queryParams.Add("strength_level", Configuration.ApiClient.ParameterToString(strengthLevel)); // query parameter + if (strengthScore != null) queryParams.Add("strength_score", Configuration.ApiClient.ParameterToString(strengthScore)); // query parameter + if (userId != null) queryParams.Add("user_id", Configuration.ApiClient.ParameterToString(userId)); // query parameter + if (vote != null) queryParams.Add("vote", Configuration.ApiClient.ParameterToString(vote)); // query parameter + if (valuePredictingHighOutcome != null) queryParams.Add("value_predicting_high_outcome", Configuration.ApiClient.ParameterToString(valuePredictingHighOutcome)); // query parameter + if (valuePredictingLowOutcome != null) queryParams.Add("value_predicting_low_outcome", Configuration.ApiClient.ParameterToString(valuePredictingLowOutcome)); // query parameter + if (limit != null) queryParams.Add("limit", Configuration.ApiClient.ParameterToString(limit)); // query parameter + if (offset != null) queryParams.Add("offset", Configuration.ApiClient.ParameterToString(offset)); // query parameter + if (sort != null) queryParams.Add("sort", Configuration.ApiClient.ParameterToString(sort)); // query parameter + + + + + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + + // make the HTTP request + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling UserVariableRelationshipsGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling UserVariableRelationshipsGet: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20024) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20024))); + + } + + /// + /// Store UserVariableRelationship Store UserVariableRelationship + /// + /// User's OAuth2 access token + /// UserVariableRelationship that should be stored + /// InlineResponse20025 + public InlineResponse20025 UserVariableRelationshipsPost (string accessToken = null, UserVariableRelationship body = null) + { + ApiResponse response = UserVariableRelationshipsPostWithHttpInfo(accessToken, body); + return response.Data; + } + + /// + /// Store UserVariableRelationship Store UserVariableRelationship + /// + /// User's OAuth2 access token + /// UserVariableRelationship that should be stored + /// ApiResponse of InlineResponse20025 + public ApiResponse< InlineResponse20025 > UserVariableRelationshipsPostWithHttpInfo (string accessToken = null, UserVariableRelationship body = null) + { + + + var path_ = "/userVariableRelationships"; + + var pathParams = new Dictionary(); + var queryParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); + var formParams = new Dictionary(); + var fileParams = new Dictionary(); + String postBody = null; + + // to determine the Accept header + String[] http_header_accepts = new String[] { + "application/json" + }; + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); + if (http_header_accept != null) + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + pathParams.Add("format", "json"); + + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + + + + postBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter + + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + + // make the HTTP request + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling UserVariableRelationshipsPost: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling UserVariableRelationshipsPost: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20025) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20025))); + + } + + /// + /// Store UserVariableRelationship Store UserVariableRelationship + /// + /// User's OAuth2 access token + /// UserVariableRelationship that should be stored + /// Task of InlineResponse20025 + public async System.Threading.Tasks.Task UserVariableRelationshipsPostAsync (string accessToken = null, UserVariableRelationship body = null) + { + ApiResponse response = await UserVariableRelationshipsPostAsyncWithHttpInfo(accessToken, body); + return response.Data; + + } + + /// + /// Store UserVariableRelationship Store UserVariableRelationship + /// + /// User's OAuth2 access token + /// UserVariableRelationship that should be stored + /// Task of ApiResponse (InlineResponse20025) + public async System.Threading.Tasks.Task> UserVariableRelationshipsPostAsyncWithHttpInfo (string accessToken = null, UserVariableRelationship body = null) + { + + + var path_ = "/userVariableRelationships"; + + var pathParams = new Dictionary(); + var queryParams = new Dictionary(); + var headerParams = new Dictionary(); + var formParams = new Dictionary(); + var fileParams = new Dictionary(); + String postBody = null; + + // to determine the Accept header + String[] http_header_accepts = new String[] { + "application/json" + }; + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); + if (http_header_accept != null) + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + pathParams.Add("format", "json"); + + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + + + + postBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter + + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + + // make the HTTP request + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling UserVariableRelationshipsPost: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling UserVariableRelationshipsPost: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20025) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20025))); + + } + + /// + /// Get UserVariableRelationship Get UserVariableRelationship + /// + /// id of UserVariableRelationship + /// User's OAuth2 access token + /// InlineResponse20025 + public InlineResponse20025 UserVariableRelationshipsIdGet (int? id, string accessToken = null) + { + ApiResponse response = UserVariableRelationshipsIdGetWithHttpInfo(id, accessToken); + return response.Data; + } + + /// + /// Get UserVariableRelationship Get UserVariableRelationship + /// + /// id of UserVariableRelationship + /// User's OAuth2 access token + /// ApiResponse of InlineResponse20025 + public ApiResponse< InlineResponse20025 > UserVariableRelationshipsIdGetWithHttpInfo (int? id, string accessToken = null) + { + + // verify the required parameter 'id' is set + if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling UserVariableRelationshipsIdGet"); + + + var path_ = "/userVariableRelationships/{id}"; + + var pathParams = new Dictionary(); + var queryParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); + var formParams = new Dictionary(); + var fileParams = new Dictionary(); + String postBody = null; + + // to determine the Accept header + String[] http_header_accepts = new String[] { + "application/json" + }; + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); + if (http_header_accept != null) + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + pathParams.Add("format", "json"); + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + + + + + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + + // make the HTTP request + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling UserVariableRelationshipsIdGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling UserVariableRelationshipsIdGet: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20025) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20025))); + + } + + /// + /// Get UserVariableRelationship Get UserVariableRelationship + /// + /// id of UserVariableRelationship + /// User's OAuth2 access token + /// Task of InlineResponse20025 + public async System.Threading.Tasks.Task UserVariableRelationshipsIdGetAsync (int? id, string accessToken = null) + { + ApiResponse response = await UserVariableRelationshipsIdGetAsyncWithHttpInfo(id, accessToken); + return response.Data; + + } + + /// + /// Get UserVariableRelationship Get UserVariableRelationship + /// + /// id of UserVariableRelationship + /// User's OAuth2 access token + /// Task of ApiResponse (InlineResponse20025) + public async System.Threading.Tasks.Task> UserVariableRelationshipsIdGetAsyncWithHttpInfo (int? id, string accessToken = null) + { + // verify the required parameter 'id' is set + if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling UserVariableRelationshipsIdGet"); + + + var path_ = "/userVariableRelationships/{id}"; + + var pathParams = new Dictionary(); + var queryParams = new Dictionary(); + var headerParams = new Dictionary(); + var formParams = new Dictionary(); + var fileParams = new Dictionary(); + String postBody = null; + + // to determine the Accept header + String[] http_header_accepts = new String[] { + "application/json" + }; + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); + if (http_header_accept != null) + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + pathParams.Add("format", "json"); + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + + + + + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + + // make the HTTP request + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling UserVariableRelationshipsIdGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling UserVariableRelationshipsIdGet: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20025) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20025))); + + } + + /// + /// Update UserVariableRelationship Update UserVariableRelationship + /// + /// id of UserVariableRelationship + /// User's OAuth2 access token + /// UserVariableRelationship that should be updated + /// InlineResponse2002 + public InlineResponse2002 UserVariableRelationshipsIdPut (int? id, string accessToken = null, UserVariableRelationship body = null) + { + ApiResponse response = UserVariableRelationshipsIdPutWithHttpInfo(id, accessToken, body); + return response.Data; + } + + /// + /// Update UserVariableRelationship Update UserVariableRelationship + /// + /// id of UserVariableRelationship + /// User's OAuth2 access token + /// UserVariableRelationship that should be updated + /// ApiResponse of InlineResponse2002 + public ApiResponse< InlineResponse2002 > UserVariableRelationshipsIdPutWithHttpInfo (int? id, string accessToken = null, UserVariableRelationship body = null) + { + + // verify the required parameter 'id' is set + if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling UserVariableRelationshipsIdPut"); + + + var path_ = "/userVariableRelationships/{id}"; + + var pathParams = new Dictionary(); + var queryParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); + var formParams = new Dictionary(); + var fileParams = new Dictionary(); + String postBody = null; + + // to determine the Accept header + String[] http_header_accepts = new String[] { + "application/json" + }; + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); + if (http_header_accept != null) + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + pathParams.Add("format", "json"); + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + + + + postBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter + + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + + // make the HTTP request + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling UserVariableRelationshipsIdPut: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling UserVariableRelationshipsIdPut: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2002) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2002))); + + } + + /// + /// Update UserVariableRelationship Update UserVariableRelationship + /// + /// id of UserVariableRelationship + /// User's OAuth2 access token + /// UserVariableRelationship that should be updated + /// Task of InlineResponse2002 + public async System.Threading.Tasks.Task UserVariableRelationshipsIdPutAsync (int? id, string accessToken = null, UserVariableRelationship body = null) + { + ApiResponse response = await UserVariableRelationshipsIdPutAsyncWithHttpInfo(id, accessToken, body); + return response.Data; + + } + + /// + /// Update UserVariableRelationship Update UserVariableRelationship + /// + /// id of UserVariableRelationship + /// User's OAuth2 access token + /// UserVariableRelationship that should be updated + /// Task of ApiResponse (InlineResponse2002) + public async System.Threading.Tasks.Task> UserVariableRelationshipsIdPutAsyncWithHttpInfo (int? id, string accessToken = null, UserVariableRelationship body = null) + { + // verify the required parameter 'id' is set + if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling UserVariableRelationshipsIdPut"); + + + var path_ = "/userVariableRelationships/{id}"; + + var pathParams = new Dictionary(); + var queryParams = new Dictionary(); + var headerParams = new Dictionary(); + var formParams = new Dictionary(); + var fileParams = new Dictionary(); + String postBody = null; + + // to determine the Accept header + String[] http_header_accepts = new String[] { + "application/json" + }; + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); + if (http_header_accept != null) + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + pathParams.Add("format", "json"); + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + + + + postBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter + + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + + // make the HTTP request + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling UserVariableRelationshipsIdPut: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling UserVariableRelationshipsIdPut: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2002) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2002))); + + } + + /// + /// Delete UserVariableRelationship Delete UserVariableRelationship + /// + /// id of UserVariableRelationship + /// User's OAuth2 access token + /// InlineResponse2002 + public InlineResponse2002 UserVariableRelationshipsIdDelete (int? id, string accessToken = null) + { + ApiResponse response = UserVariableRelationshipsIdDeleteWithHttpInfo(id, accessToken); + return response.Data; + } + + /// + /// Delete UserVariableRelationship Delete UserVariableRelationship + /// + /// id of UserVariableRelationship + /// User's OAuth2 access token + /// ApiResponse of InlineResponse2002 + public ApiResponse< InlineResponse2002 > UserVariableRelationshipsIdDeleteWithHttpInfo (int? id, string accessToken = null) + { + + // verify the required parameter 'id' is set + if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling UserVariableRelationshipsIdDelete"); + + + var path_ = "/userVariableRelationships/{id}"; + + var pathParams = new Dictionary(); + var queryParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); + var formParams = new Dictionary(); + var fileParams = new Dictionary(); + String postBody = null; + + // to determine the Accept header + String[] http_header_accepts = new String[] { + "application/json" + }; + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); + if (http_header_accept != null) + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + pathParams.Add("format", "json"); + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + + + + + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + + // make the HTTP request + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling UserVariableRelationshipsIdDelete: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling UserVariableRelationshipsIdDelete: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2002) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2002))); + + } + + /// + /// Delete UserVariableRelationship Delete UserVariableRelationship + /// + /// id of UserVariableRelationship + /// User's OAuth2 access token + /// Task of InlineResponse2002 + public async System.Threading.Tasks.Task UserVariableRelationshipsIdDeleteAsync (int? id, string accessToken = null) + { + ApiResponse response = await UserVariableRelationshipsIdDeleteAsyncWithHttpInfo(id, accessToken); + return response.Data; + + } + + /// + /// Delete UserVariableRelationship Delete UserVariableRelationship + /// + /// id of UserVariableRelationship + /// User's OAuth2 access token + /// Task of ApiResponse (InlineResponse2002) + public async System.Threading.Tasks.Task> UserVariableRelationshipsIdDeleteAsyncWithHttpInfo (int? id, string accessToken = null) + { + // verify the required parameter 'id' is set + if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling UserVariableRelationshipsIdDelete"); + + + var path_ = "/userVariableRelationships/{id}"; + + var pathParams = new Dictionary(); + var queryParams = new Dictionary(); + var headerParams = new Dictionary(); + var formParams = new Dictionary(); + var fileParams = new Dictionary(); + String postBody = null; + + // to determine the Accept header + String[] http_header_accepts = new String[] { + "application/json" + }; + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); + if (http_header_accept != null) + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + pathParams.Add("format", "json"); + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + + + + + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + + // make the HTTP request + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling UserVariableRelationshipsIdDelete: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling UserVariableRelationshipsIdDelete: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2002) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2002))); + + } + + } + +} diff --git a/src/main/csharp/io/swagger/Api/VariableApi.cs b/src/main/csharp/io/swagger/Api/VariableApi.cs index 320ad9f..a52381d 100644 --- a/src/main/csharp/io/swagger/Api/VariableApi.cs +++ b/src/main/csharp/io/swagger/Api/VariableApi.cs @@ -1,6 +1,7 @@ using System; using System.IO; using System.Collections.Generic; +using System.Linq; using RestSharp; using IO.Swagger.Client; using IO.Swagger.Model; @@ -20,50 +21,48 @@ public interface IVariableApi /// /// Get all Variables /// + /// User's OAuth2 access token /// id - /// client_id - /// parent_id - /// name - /// variable_category_id - /// default_unit_id - /// combination_operation - /// filling_value - /// maximum_allowed_value - /// minimum_allowed_value - /// onset_delay - /// duration_of_action - /// public - /// cause_only - /// most_common_value - /// most_common_unit_id - /// standard_deviation - /// variance - /// mean - /// median - /// number_of_measurements - /// number_of_unique_values - /// skewness - /// kurtosis - /// latitude - /// longitude - /// location + /// The ID of the client application which last created or updated this common variable + /// ID of the parent variable if this variable has any parent + /// User-defined variable display name + /// Variable category ID + /// ID of the default unit for the variable + /// How to combine values of this variable (for instance, to see a summary of the values over a month) SUM or MEAN + /// Value for replacing null measurements + /// Maximum reasonable value for this variable (uses default unit) + /// Minimum reasonable value for this variable (uses default unit) + /// Estimated number of seconds that pass before a stimulus produces a perceivable effect + /// Estimated number of seconds following the onset delay in which a stimulus produces a perceivable effect + /// Is variable public + /// A value of 1 indicates that this variable is generally a cause in a causal relationship. An example of a causeOnly variable would be a variable such as Cloud Cover which would generally not be influenced by the behaviour of the user + /// Most common value + /// Most common Unit + /// Standard Deviation + /// Average variance for this variable based on all user data + /// Mean for this variable based on all user data + /// Median for this variable based on all user data + /// Number of measurements for this variable based on all user data + /// Number of unique values for this variable based on all user data + /// Skewness for this variable based on all user data + /// Kurtosis for this variable based on all user data /// status /// error_message - /// last_successful_update_time - /// created_at - /// updated_at - /// product_url - /// image_url - /// price - /// number_of_user_variables - /// outcome - /// minimum_recorded_value - /// maximum_recorded_value - /// limit - /// offset - /// sort - /// InlineResponse20027 - InlineResponse20027 VariablesGet (int? id, string clientId, int? parentId, string name, int? variableCategoryId, int? defaultUnitId, string combinationOperation, double? fillingValue, double? maximumAllowedValue, double? minimumAllowedValue, int? onsetDelay, int? durationOfAction, int? _public, bool? causeOnly, double? mostCommonValue, int? mostCommonUnitId, double? standardDeviation, double? variance, double? mean, double? median, double? numberOfMeasurements, double? numberOfUniqueValues, double? skewness, double? kurtosis, double? latitude, double? longitude, string location, string status, string errorMessage, string lastSuccessfulUpdateTime, string createdAt, string updatedAt, string productUrl, string imageUrl, double? price, int? numberOfUserVariables, bool? outcome, double? minimumRecordedValue, double? maximumRecordedValue, int? limit, int? offset, string sort); + /// When this variable or its settings were last updated + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// Product URL + /// Image URL + /// Price + /// Number of users who have data for this variable + /// Outcome variables (those with `outcome` == 1) are variables for which a human would generally want to identify the influencing factors. These include symptoms of illness, physique, mood, cognitive performance, etc. Generally correlation calculations are only performed on outcome variables. + /// Minimum recorded value of this variable based on all user data + /// Maximum recorded value of this variable based on all user data + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort records by a given field name. If the field name is prefixed with '-', it will sort in descending order. + /// InlineResponse20031 + InlineResponse20031 VariablesGet (string accessToken = null, int? id = null, string clientId = null, int? parentId = null, string name = null, int? variableCategoryId = null, int? defaultUnitId = null, string combinationOperation = null, double? fillingValue = null, double? maximumAllowedValue = null, double? minimumAllowedValue = null, int? onsetDelay = null, int? durationOfAction = null, int? _public = null, bool? causeOnly = null, double? mostCommonValue = null, int? mostCommonUnitId = null, double? standardDeviation = null, double? variance = null, double? mean = null, double? median = null, double? numberOfMeasurements = null, double? numberOfUniqueValues = null, double? skewness = null, double? kurtosis = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, string createdAt = null, string updatedAt = null, string productUrl = null, string imageUrl = null, double? price = null, int? numberOfUserVariables = null, bool? outcome = null, double? minimumRecordedValue = null, double? maximumRecordedValue = null, int? limit = null, int? offset = null, string sort = null); /// /// Get all Variables @@ -71,70 +70,190 @@ public interface IVariableApi /// /// Get all Variables /// + /// User's OAuth2 access token /// id - /// client_id - /// parent_id - /// name - /// variable_category_id - /// default_unit_id - /// combination_operation - /// filling_value - /// maximum_allowed_value - /// minimum_allowed_value - /// onset_delay - /// duration_of_action - /// public - /// cause_only - /// most_common_value - /// most_common_unit_id - /// standard_deviation - /// variance - /// mean - /// median - /// number_of_measurements - /// number_of_unique_values - /// skewness - /// kurtosis - /// latitude - /// longitude - /// location + /// The ID of the client application which last created or updated this common variable + /// ID of the parent variable if this variable has any parent + /// User-defined variable display name + /// Variable category ID + /// ID of the default unit for the variable + /// How to combine values of this variable (for instance, to see a summary of the values over a month) SUM or MEAN + /// Value for replacing null measurements + /// Maximum reasonable value for this variable (uses default unit) + /// Minimum reasonable value for this variable (uses default unit) + /// Estimated number of seconds that pass before a stimulus produces a perceivable effect + /// Estimated number of seconds following the onset delay in which a stimulus produces a perceivable effect + /// Is variable public + /// A value of 1 indicates that this variable is generally a cause in a causal relationship. An example of a causeOnly variable would be a variable such as Cloud Cover which would generally not be influenced by the behaviour of the user + /// Most common value + /// Most common Unit + /// Standard Deviation + /// Average variance for this variable based on all user data + /// Mean for this variable based on all user data + /// Median for this variable based on all user data + /// Number of measurements for this variable based on all user data + /// Number of unique values for this variable based on all user data + /// Skewness for this variable based on all user data + /// Kurtosis for this variable based on all user data /// status /// error_message - /// last_successful_update_time - /// created_at - /// updated_at - /// product_url - /// image_url - /// price - /// number_of_user_variables - /// outcome - /// minimum_recorded_value - /// maximum_recorded_value - /// limit - /// offset - /// sort - /// InlineResponse20027 - System.Threading.Tasks.Task VariablesGetAsync (int? id, string clientId, int? parentId, string name, int? variableCategoryId, int? defaultUnitId, string combinationOperation, double? fillingValue, double? maximumAllowedValue, double? minimumAllowedValue, int? onsetDelay, int? durationOfAction, int? _public, bool? causeOnly, double? mostCommonValue, int? mostCommonUnitId, double? standardDeviation, double? variance, double? mean, double? median, double? numberOfMeasurements, double? numberOfUniqueValues, double? skewness, double? kurtosis, double? latitude, double? longitude, string location, string status, string errorMessage, string lastSuccessfulUpdateTime, string createdAt, string updatedAt, string productUrl, string imageUrl, double? price, int? numberOfUserVariables, bool? outcome, double? minimumRecordedValue, double? maximumRecordedValue, int? limit, int? offset, string sort); + /// When this variable or its settings were last updated + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// Product URL + /// Image URL + /// Price + /// Number of users who have data for this variable + /// Outcome variables (those with `outcome` == 1) are variables for which a human would generally want to identify the influencing factors. These include symptoms of illness, physique, mood, cognitive performance, etc. Generally correlation calculations are only performed on outcome variables. + /// Minimum recorded value of this variable based on all user data + /// Maximum recorded value of this variable based on all user data + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort records by a given field name. If the field name is prefixed with '-', it will sort in descending order. + /// ApiResponse of InlineResponse20031 + ApiResponse VariablesGetWithHttpInfo (string accessToken = null, int? id = null, string clientId = null, int? parentId = null, string name = null, int? variableCategoryId = null, int? defaultUnitId = null, string combinationOperation = null, double? fillingValue = null, double? maximumAllowedValue = null, double? minimumAllowedValue = null, int? onsetDelay = null, int? durationOfAction = null, int? _public = null, bool? causeOnly = null, double? mostCommonValue = null, int? mostCommonUnitId = null, double? standardDeviation = null, double? variance = null, double? mean = null, double? median = null, double? numberOfMeasurements = null, double? numberOfUniqueValues = null, double? skewness = null, double? kurtosis = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, string createdAt = null, string updatedAt = null, string productUrl = null, string imageUrl = null, double? price = null, int? numberOfUserVariables = null, bool? outcome = null, double? minimumRecordedValue = null, double? maximumRecordedValue = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Get all Variables + /// + /// + /// Get all Variables + /// + /// User's OAuth2 access token + /// id + /// The ID of the client application which last created or updated this common variable + /// ID of the parent variable if this variable has any parent + /// User-defined variable display name + /// Variable category ID + /// ID of the default unit for the variable + /// How to combine values of this variable (for instance, to see a summary of the values over a month) SUM or MEAN + /// Value for replacing null measurements + /// Maximum reasonable value for this variable (uses default unit) + /// Minimum reasonable value for this variable (uses default unit) + /// Estimated number of seconds that pass before a stimulus produces a perceivable effect + /// Estimated number of seconds following the onset delay in which a stimulus produces a perceivable effect + /// Is variable public + /// A value of 1 indicates that this variable is generally a cause in a causal relationship. An example of a causeOnly variable would be a variable such as Cloud Cover which would generally not be influenced by the behaviour of the user + /// Most common value + /// Most common Unit + /// Standard Deviation + /// Average variance for this variable based on all user data + /// Mean for this variable based on all user data + /// Median for this variable based on all user data + /// Number of measurements for this variable based on all user data + /// Number of unique values for this variable based on all user data + /// Skewness for this variable based on all user data + /// Kurtosis for this variable based on all user data + /// status + /// error_message + /// When this variable or its settings were last updated + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// Product URL + /// Image URL + /// Price + /// Number of users who have data for this variable + /// Outcome variables (those with `outcome` == 1) are variables for which a human would generally want to identify the influencing factors. These include symptoms of illness, physique, mood, cognitive performance, etc. Generally correlation calculations are only performed on outcome variables. + /// Minimum recorded value of this variable based on all user data + /// Maximum recorded value of this variable based on all user data + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort records by a given field name. If the field name is prefixed with '-', it will sort in descending order. + /// Task of InlineResponse20031 + System.Threading.Tasks.Task VariablesGetAsync (string accessToken = null, int? id = null, string clientId = null, int? parentId = null, string name = null, int? variableCategoryId = null, int? defaultUnitId = null, string combinationOperation = null, double? fillingValue = null, double? maximumAllowedValue = null, double? minimumAllowedValue = null, int? onsetDelay = null, int? durationOfAction = null, int? _public = null, bool? causeOnly = null, double? mostCommonValue = null, int? mostCommonUnitId = null, double? standardDeviation = null, double? variance = null, double? mean = null, double? median = null, double? numberOfMeasurements = null, double? numberOfUniqueValues = null, double? skewness = null, double? kurtosis = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, string createdAt = null, string updatedAt = null, string productUrl = null, string imageUrl = null, double? price = null, int? numberOfUserVariables = null, bool? outcome = null, double? minimumRecordedValue = null, double? maximumRecordedValue = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Get all Variables + /// + /// + /// Get all Variables + /// + /// User's OAuth2 access token + /// id + /// The ID of the client application which last created or updated this common variable + /// ID of the parent variable if this variable has any parent + /// User-defined variable display name + /// Variable category ID + /// ID of the default unit for the variable + /// How to combine values of this variable (for instance, to see a summary of the values over a month) SUM or MEAN + /// Value for replacing null measurements + /// Maximum reasonable value for this variable (uses default unit) + /// Minimum reasonable value for this variable (uses default unit) + /// Estimated number of seconds that pass before a stimulus produces a perceivable effect + /// Estimated number of seconds following the onset delay in which a stimulus produces a perceivable effect + /// Is variable public + /// A value of 1 indicates that this variable is generally a cause in a causal relationship. An example of a causeOnly variable would be a variable such as Cloud Cover which would generally not be influenced by the behaviour of the user + /// Most common value + /// Most common Unit + /// Standard Deviation + /// Average variance for this variable based on all user data + /// Mean for this variable based on all user data + /// Median for this variable based on all user data + /// Number of measurements for this variable based on all user data + /// Number of unique values for this variable based on all user data + /// Skewness for this variable based on all user data + /// Kurtosis for this variable based on all user data + /// status + /// error_message + /// When this variable or its settings were last updated + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// Product URL + /// Image URL + /// Price + /// Number of users who have data for this variable + /// Outcome variables (those with `outcome` == 1) are variables for which a human would generally want to identify the influencing factors. These include symptoms of illness, physique, mood, cognitive performance, etc. Generally correlation calculations are only performed on outcome variables. + /// Minimum recorded value of this variable based on all user data + /// Maximum recorded value of this variable based on all user data + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort records by a given field name. If the field name is prefixed with '-', it will sort in descending order. + /// Task of ApiResponse (InlineResponse20031) + System.Threading.Tasks.Task> VariablesGetAsyncWithHttpInfo (string accessToken = null, int? id = null, string clientId = null, int? parentId = null, string name = null, int? variableCategoryId = null, int? defaultUnitId = null, string combinationOperation = null, double? fillingValue = null, double? maximumAllowedValue = null, double? minimumAllowedValue = null, int? onsetDelay = null, int? durationOfAction = null, int? _public = null, bool? causeOnly = null, double? mostCommonValue = null, int? mostCommonUnitId = null, double? standardDeviation = null, double? variance = null, double? mean = null, double? median = null, double? numberOfMeasurements = null, double? numberOfUniqueValues = null, double? skewness = null, double? kurtosis = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, string createdAt = null, string updatedAt = null, string productUrl = null, string imageUrl = null, double? price = null, int? numberOfUserVariables = null, bool? outcome = null, double? minimumRecordedValue = null, double? maximumRecordedValue = null, int? limit = null, int? offset = null, string sort = null); /// /// Store Variable /// /// - /// Store Variable + /// Allows the client to create a new variable in the `variables` table. /// + /// User's OAuth2 access token /// Variable that should be stored - /// InlineResponse20028 - InlineResponse20028 VariablesPost (Variable body); + /// InlineResponse20032 + InlineResponse20032 VariablesPost (string accessToken = null, Variable body = null); /// /// Store Variable /// /// + /// Allows the client to create a new variable in the `variables` table. + /// + /// User's OAuth2 access token + /// Variable that should be stored + /// ApiResponse of InlineResponse20032 + ApiResponse VariablesPostWithHttpInfo (string accessToken = null, Variable body = null); + + /// + /// Store Variable + /// + /// + /// Allows the client to create a new variable in the `variables` table. + /// + /// User's OAuth2 access token + /// Variable that should be stored + /// Task of InlineResponse20032 + System.Threading.Tasks.Task VariablesPostAsync (string accessToken = null, Variable body = null); + + /// /// Store Variable + /// + /// + /// Allows the client to create a new variable in the `variables` table. /// + /// User's OAuth2 access token /// Variable that should be stored - /// InlineResponse20028 - System.Threading.Tasks.Task VariablesPostAsync (Variable body); + /// Task of ApiResponse (InlineResponse20032) + System.Threading.Tasks.Task> VariablesPostAsyncWithHttpInfo (string accessToken = null, Variable body = null); /// /// Get Variable @@ -143,8 +262,9 @@ public interface IVariableApi /// Get Variable /// /// id of Variable - /// InlineResponse20028 - InlineResponse20028 VariablesIdGet (int? id); + /// User's OAuth2 access token + /// InlineResponse20032 + InlineResponse20032 VariablesIdGet (int? id, string accessToken = null); /// /// Get Variable @@ -153,8 +273,31 @@ public interface IVariableApi /// Get Variable /// /// id of Variable - /// InlineResponse20028 - System.Threading.Tasks.Task VariablesIdGetAsync (int? id); + /// User's OAuth2 access token + /// ApiResponse of InlineResponse20032 + ApiResponse VariablesIdGetWithHttpInfo (int? id, string accessToken = null); + + /// + /// Get Variable + /// + /// + /// Get Variable + /// + /// id of Variable + /// User's OAuth2 access token + /// Task of InlineResponse20032 + System.Threading.Tasks.Task VariablesIdGetAsync (int? id, string accessToken = null); + + /// + /// Get Variable + /// + /// + /// Get Variable + /// + /// id of Variable + /// User's OAuth2 access token + /// Task of ApiResponse (InlineResponse20032) + System.Threading.Tasks.Task> VariablesIdGetAsyncWithHttpInfo (int? id, string accessToken = null); /// /// Update Variable @@ -163,9 +306,10 @@ public interface IVariableApi /// Update Variable /// /// id of Variable + /// User's OAuth2 access token /// Variable that should be updated /// InlineResponse2002 - InlineResponse2002 VariablesIdPut (int? id, Variable body); + InlineResponse2002 VariablesIdPut (int? id, string accessToken = null, Variable body = null); /// /// Update Variable @@ -174,9 +318,34 @@ public interface IVariableApi /// Update Variable /// /// id of Variable + /// User's OAuth2 access token /// Variable that should be updated - /// InlineResponse2002 - System.Threading.Tasks.Task VariablesIdPutAsync (int? id, Variable body); + /// ApiResponse of InlineResponse2002 + ApiResponse VariablesIdPutWithHttpInfo (int? id, string accessToken = null, Variable body = null); + + /// + /// Update Variable + /// + /// + /// Update Variable + /// + /// id of Variable + /// User's OAuth2 access token + /// Variable that should be updated + /// Task of InlineResponse2002 + System.Threading.Tasks.Task VariablesIdPutAsync (int? id, string accessToken = null, Variable body = null); + + /// + /// Update Variable + /// + /// + /// Update Variable + /// + /// id of Variable + /// User's OAuth2 access token + /// Variable that should be updated + /// Task of ApiResponse (InlineResponse2002) + System.Threading.Tasks.Task> VariablesIdPutAsyncWithHttpInfo (int? id, string accessToken = null, Variable body = null); /// /// Delete Variable @@ -185,8 +354,9 @@ public interface IVariableApi /// Delete Variable /// /// id of Variable + /// User's OAuth2 access token /// InlineResponse2002 - InlineResponse2002 VariablesIdDelete (int? id); + InlineResponse2002 VariablesIdDelete (int? id, string accessToken = null); /// /// Delete Variable @@ -195,8 +365,31 @@ public interface IVariableApi /// Delete Variable /// /// id of Variable - /// InlineResponse2002 - System.Threading.Tasks.Task VariablesIdDeleteAsync (int? id); + /// User's OAuth2 access token + /// ApiResponse of InlineResponse2002 + ApiResponse VariablesIdDeleteWithHttpInfo (int? id, string accessToken = null); + + /// + /// Delete Variable + /// + /// + /// Delete Variable + /// + /// id of Variable + /// User's OAuth2 access token + /// Task of InlineResponse2002 + System.Threading.Tasks.Task VariablesIdDeleteAsync (int? id, string accessToken = null); + + /// + /// Delete Variable + /// + /// + /// Delete Variable + /// + /// id of Variable + /// User's OAuth2 access token + /// Task of ApiResponse (InlineResponse2002) + System.Threading.Tasks.Task> VariablesIdDeleteAsyncWithHttpInfo (int? id, string accessToken = null); } @@ -208,98 +401,169 @@ public class VariableApi : IVariableApi /// /// Initializes a new instance of the class. /// - /// an instance of ApiClient (optional) /// - public VariableApi(ApiClient apiClient = null) + public VariableApi(String basePath) { - if (apiClient == null) // use the default one in Configuration - this.ApiClient = Configuration.DefaultApiClient; - else - this.ApiClient = apiClient; + this.Configuration = new Configuration(new ApiClient(basePath)); } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class + /// using Configuration object /// + /// An instance of Configuration /// - public VariableApi(String basePath) + public VariableApi(Configuration configuration = null) { - this.ApiClient = new ApiClient(basePath); + if (configuration == null) // use the default one in Configuration + this.Configuration = Configuration.Default; + else + this.Configuration = configuration; } - + + /// + /// Gets the base path of the API client. + /// + /// The base path + public String GetBasePath() + { + return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); + } + /// /// Sets the base path of the API client. /// - /// The base path /// The base path + [Obsolete("SetBasePath is deprecated, please do 'Configuraiton.ApiClient = new ApiClient(\"http://new-path\")' instead.")] public void SetBasePath(String basePath) { - this.ApiClient.BasePath = basePath; + // do nothing } /// - /// Gets the base path of the API client. + /// Gets or sets the configuration object /// - /// The base path - public String GetBasePath() + /// An instance of the Configuration + public Configuration Configuration {get; set;} + + /// + /// Gets the default header. + /// + /// Dictionary of HTTP header + [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] + public Dictionary DefaultHeader() { - return this.ApiClient.BasePath; + return this.Configuration.DefaultHeader; } - + /// - /// Gets or sets the API client. + /// Add default header. /// - /// An instance of the ApiClient - public ApiClient ApiClient {get; set;} - + /// Header field name. + /// Header field value. + /// + [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] + public void AddDefaultHeader(string key, string value) + { + this.Configuration.AddDefaultHeader(key, value); + } + /// /// Get all Variables Get all Variables /// + /// User's OAuth2 access token + /// id + /// The ID of the client application which last created or updated this common variable + /// ID of the parent variable if this variable has any parent + /// User-defined variable display name + /// Variable category ID + /// ID of the default unit for the variable + /// How to combine values of this variable (for instance, to see a summary of the values over a month) SUM or MEAN + /// Value for replacing null measurements + /// Maximum reasonable value for this variable (uses default unit) + /// Minimum reasonable value for this variable (uses default unit) + /// Estimated number of seconds that pass before a stimulus produces a perceivable effect + /// Estimated number of seconds following the onset delay in which a stimulus produces a perceivable effect + /// Is variable public + /// A value of 1 indicates that this variable is generally a cause in a causal relationship. An example of a causeOnly variable would be a variable such as Cloud Cover which would generally not be influenced by the behaviour of the user + /// Most common value + /// Most common Unit + /// Standard Deviation + /// Average variance for this variable based on all user data + /// Mean for this variable based on all user data + /// Median for this variable based on all user data + /// Number of measurements for this variable based on all user data + /// Number of unique values for this variable based on all user data + /// Skewness for this variable based on all user data + /// Kurtosis for this variable based on all user data + /// status + /// error_message + /// When this variable or its settings were last updated + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// Product URL + /// Image URL + /// Price + /// Number of users who have data for this variable + /// Outcome variables (those with `outcome` == 1) are variables for which a human would generally want to identify the influencing factors. These include symptoms of illness, physique, mood, cognitive performance, etc. Generally correlation calculations are only performed on outcome variables. + /// Minimum recorded value of this variable based on all user data + /// Maximum recorded value of this variable based on all user data + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort records by a given field name. If the field name is prefixed with '-', it will sort in descending order. + /// InlineResponse20031 + public InlineResponse20031 VariablesGet (string accessToken = null, int? id = null, string clientId = null, int? parentId = null, string name = null, int? variableCategoryId = null, int? defaultUnitId = null, string combinationOperation = null, double? fillingValue = null, double? maximumAllowedValue = null, double? minimumAllowedValue = null, int? onsetDelay = null, int? durationOfAction = null, int? _public = null, bool? causeOnly = null, double? mostCommonValue = null, int? mostCommonUnitId = null, double? standardDeviation = null, double? variance = null, double? mean = null, double? median = null, double? numberOfMeasurements = null, double? numberOfUniqueValues = null, double? skewness = null, double? kurtosis = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, string createdAt = null, string updatedAt = null, string productUrl = null, string imageUrl = null, double? price = null, int? numberOfUserVariables = null, bool? outcome = null, double? minimumRecordedValue = null, double? maximumRecordedValue = null, int? limit = null, int? offset = null, string sort = null) + { + ApiResponse response = VariablesGetWithHttpInfo(accessToken, id, clientId, parentId, name, variableCategoryId, defaultUnitId, combinationOperation, fillingValue, maximumAllowedValue, minimumAllowedValue, onsetDelay, durationOfAction, _public, causeOnly, mostCommonValue, mostCommonUnitId, standardDeviation, variance, mean, median, numberOfMeasurements, numberOfUniqueValues, skewness, kurtosis, status, errorMessage, lastSuccessfulUpdateTime, createdAt, updatedAt, productUrl, imageUrl, price, numberOfUserVariables, outcome, minimumRecordedValue, maximumRecordedValue, limit, offset, sort); + return response.Data; + } + + /// + /// Get all Variables Get all Variables + /// + /// User's OAuth2 access token /// id - /// client_id - /// parent_id - /// name - /// variable_category_id - /// default_unit_id - /// combination_operation - /// filling_value - /// maximum_allowed_value - /// minimum_allowed_value - /// onset_delay - /// duration_of_action - /// public - /// cause_only - /// most_common_value - /// most_common_unit_id - /// standard_deviation - /// variance - /// mean - /// median - /// number_of_measurements - /// number_of_unique_values - /// skewness - /// kurtosis - /// latitude - /// longitude - /// location + /// The ID of the client application which last created or updated this common variable + /// ID of the parent variable if this variable has any parent + /// User-defined variable display name + /// Variable category ID + /// ID of the default unit for the variable + /// How to combine values of this variable (for instance, to see a summary of the values over a month) SUM or MEAN + /// Value for replacing null measurements + /// Maximum reasonable value for this variable (uses default unit) + /// Minimum reasonable value for this variable (uses default unit) + /// Estimated number of seconds that pass before a stimulus produces a perceivable effect + /// Estimated number of seconds following the onset delay in which a stimulus produces a perceivable effect + /// Is variable public + /// A value of 1 indicates that this variable is generally a cause in a causal relationship. An example of a causeOnly variable would be a variable such as Cloud Cover which would generally not be influenced by the behaviour of the user + /// Most common value + /// Most common Unit + /// Standard Deviation + /// Average variance for this variable based on all user data + /// Mean for this variable based on all user data + /// Median for this variable based on all user data + /// Number of measurements for this variable based on all user data + /// Number of unique values for this variable based on all user data + /// Skewness for this variable based on all user data + /// Kurtosis for this variable based on all user data /// status /// error_message - /// last_successful_update_time - /// created_at - /// updated_at - /// product_url - /// image_url - /// price - /// number_of_user_variables - /// outcome - /// minimum_recorded_value - /// maximum_recorded_value - /// limit - /// offset - /// sort - /// InlineResponse20027 - public InlineResponse20027 VariablesGet (int? id, string clientId, int? parentId, string name, int? variableCategoryId, int? defaultUnitId, string combinationOperation, double? fillingValue, double? maximumAllowedValue, double? minimumAllowedValue, int? onsetDelay, int? durationOfAction, int? _public, bool? causeOnly, double? mostCommonValue, int? mostCommonUnitId, double? standardDeviation, double? variance, double? mean, double? median, double? numberOfMeasurements, double? numberOfUniqueValues, double? skewness, double? kurtosis, double? latitude, double? longitude, string location, string status, string errorMessage, string lastSuccessfulUpdateTime, string createdAt, string updatedAt, string productUrl, string imageUrl, double? price, int? numberOfUserVariables, bool? outcome, double? minimumRecordedValue, double? maximumRecordedValue, int? limit, int? offset, string sort) + /// When this variable or its settings were last updated + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// Product URL + /// Image URL + /// Price + /// Number of users who have data for this variable + /// Outcome variables (those with `outcome` == 1) are variables for which a human would generally want to identify the influencing factors. These include symptoms of illness, physique, mood, cognitive performance, etc. Generally correlation calculations are only performed on outcome variables. + /// Minimum recorded value of this variable based on all user data + /// Maximum recorded value of this variable based on all user data + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort records by a given field name. If the field name is prefixed with '-', it will sort in descending order. + /// ApiResponse of InlineResponse20031 + public ApiResponse< InlineResponse20031 > VariablesGetWithHttpInfo (string accessToken = null, int? id = null, string clientId = null, int? parentId = null, string name = null, int? variableCategoryId = null, int? defaultUnitId = null, string combinationOperation = null, double? fillingValue = null, double? maximumAllowedValue = null, double? minimumAllowedValue = null, int? onsetDelay = null, int? durationOfAction = null, int? _public = null, bool? causeOnly = null, double? mostCommonValue = null, int? mostCommonUnitId = null, double? standardDeviation = null, double? variance = null, double? mean = null, double? median = null, double? numberOfMeasurements = null, double? numberOfUniqueValues = null, double? skewness = null, double? kurtosis = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, string createdAt = null, string updatedAt = null, string productUrl = null, string imageUrl = null, double? price = null, int? numberOfUserVariables = null, bool? outcome = null, double? minimumRecordedValue = null, double? maximumRecordedValue = null, int? limit = null, int? offset = null, string sort = null) { @@ -307,7 +571,7 @@ public InlineResponse20027 VariablesGet (int? id, string clientId, int? parentId var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -316,122 +580,181 @@ public InlineResponse20027 VariablesGet (int? id, string clientId, int? parentId String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) queryParams.Add("id", ApiClient.ParameterToString(id)); // query parameter - if (clientId != null) queryParams.Add("client_id", ApiClient.ParameterToString(clientId)); // query parameter - if (parentId != null) queryParams.Add("parent_id", ApiClient.ParameterToString(parentId)); // query parameter - if (name != null) queryParams.Add("name", ApiClient.ParameterToString(name)); // query parameter - if (variableCategoryId != null) queryParams.Add("variable_category_id", ApiClient.ParameterToString(variableCategoryId)); // query parameter - if (defaultUnitId != null) queryParams.Add("default_unit_id", ApiClient.ParameterToString(defaultUnitId)); // query parameter - if (combinationOperation != null) queryParams.Add("combination_operation", ApiClient.ParameterToString(combinationOperation)); // query parameter - if (fillingValue != null) queryParams.Add("filling_value", ApiClient.ParameterToString(fillingValue)); // query parameter - if (maximumAllowedValue != null) queryParams.Add("maximum_allowed_value", ApiClient.ParameterToString(maximumAllowedValue)); // query parameter - if (minimumAllowedValue != null) queryParams.Add("minimum_allowed_value", ApiClient.ParameterToString(minimumAllowedValue)); // query parameter - if (onsetDelay != null) queryParams.Add("onset_delay", ApiClient.ParameterToString(onsetDelay)); // query parameter - if (durationOfAction != null) queryParams.Add("duration_of_action", ApiClient.ParameterToString(durationOfAction)); // query parameter - if (_public != null) queryParams.Add("public", ApiClient.ParameterToString(_public)); // query parameter - if (causeOnly != null) queryParams.Add("cause_only", ApiClient.ParameterToString(causeOnly)); // query parameter - if (mostCommonValue != null) queryParams.Add("most_common_value", ApiClient.ParameterToString(mostCommonValue)); // query parameter - if (mostCommonUnitId != null) queryParams.Add("most_common_unit_id", ApiClient.ParameterToString(mostCommonUnitId)); // query parameter - if (standardDeviation != null) queryParams.Add("standard_deviation", ApiClient.ParameterToString(standardDeviation)); // query parameter - if (variance != null) queryParams.Add("variance", ApiClient.ParameterToString(variance)); // query parameter - if (mean != null) queryParams.Add("mean", ApiClient.ParameterToString(mean)); // query parameter - if (median != null) queryParams.Add("median", ApiClient.ParameterToString(median)); // query parameter - if (numberOfMeasurements != null) queryParams.Add("number_of_measurements", ApiClient.ParameterToString(numberOfMeasurements)); // query parameter - if (numberOfUniqueValues != null) queryParams.Add("number_of_unique_values", ApiClient.ParameterToString(numberOfUniqueValues)); // query parameter - if (skewness != null) queryParams.Add("skewness", ApiClient.ParameterToString(skewness)); // query parameter - if (kurtosis != null) queryParams.Add("kurtosis", ApiClient.ParameterToString(kurtosis)); // query parameter - if (latitude != null) queryParams.Add("latitude", ApiClient.ParameterToString(latitude)); // query parameter - if (longitude != null) queryParams.Add("longitude", ApiClient.ParameterToString(longitude)); // query parameter - if (location != null) queryParams.Add("location", ApiClient.ParameterToString(location)); // query parameter - if (status != null) queryParams.Add("status", ApiClient.ParameterToString(status)); // query parameter - if (errorMessage != null) queryParams.Add("error_message", ApiClient.ParameterToString(errorMessage)); // query parameter - if (lastSuccessfulUpdateTime != null) queryParams.Add("last_successful_update_time", ApiClient.ParameterToString(lastSuccessfulUpdateTime)); // query parameter - if (createdAt != null) queryParams.Add("created_at", ApiClient.ParameterToString(createdAt)); // query parameter - if (updatedAt != null) queryParams.Add("updated_at", ApiClient.ParameterToString(updatedAt)); // query parameter - if (productUrl != null) queryParams.Add("product_url", ApiClient.ParameterToString(productUrl)); // query parameter - if (imageUrl != null) queryParams.Add("image_url", ApiClient.ParameterToString(imageUrl)); // query parameter - if (price != null) queryParams.Add("price", ApiClient.ParameterToString(price)); // query parameter - if (numberOfUserVariables != null) queryParams.Add("number_of_user_variables", ApiClient.ParameterToString(numberOfUserVariables)); // query parameter - if (outcome != null) queryParams.Add("outcome", ApiClient.ParameterToString(outcome)); // query parameter - if (minimumRecordedValue != null) queryParams.Add("minimum_recorded_value", ApiClient.ParameterToString(minimumRecordedValue)); // query parameter - if (maximumRecordedValue != null) queryParams.Add("maximum_recorded_value", ApiClient.ParameterToString(maximumRecordedValue)); // query parameter - if (limit != null) queryParams.Add("limit", ApiClient.ParameterToString(limit)); // query parameter - if (offset != null) queryParams.Add("offset", ApiClient.ParameterToString(offset)); // query parameter - if (sort != null) queryParams.Add("sort", ApiClient.ParameterToString(sort)); // query parameter - - - - - - // authentication setting, if any - String[] authSettings = new String[] { }; + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + if (id != null) queryParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // query parameter + if (clientId != null) queryParams.Add("client_id", Configuration.ApiClient.ParameterToString(clientId)); // query parameter + if (parentId != null) queryParams.Add("parent_id", Configuration.ApiClient.ParameterToString(parentId)); // query parameter + if (name != null) queryParams.Add("name", Configuration.ApiClient.ParameterToString(name)); // query parameter + if (variableCategoryId != null) queryParams.Add("variable_category_id", Configuration.ApiClient.ParameterToString(variableCategoryId)); // query parameter + if (defaultUnitId != null) queryParams.Add("default_unit_id", Configuration.ApiClient.ParameterToString(defaultUnitId)); // query parameter + if (combinationOperation != null) queryParams.Add("combination_operation", Configuration.ApiClient.ParameterToString(combinationOperation)); // query parameter + if (fillingValue != null) queryParams.Add("filling_value", Configuration.ApiClient.ParameterToString(fillingValue)); // query parameter + if (maximumAllowedValue != null) queryParams.Add("maximum_allowed_value", Configuration.ApiClient.ParameterToString(maximumAllowedValue)); // query parameter + if (minimumAllowedValue != null) queryParams.Add("minimum_allowed_value", Configuration.ApiClient.ParameterToString(minimumAllowedValue)); // query parameter + if (onsetDelay != null) queryParams.Add("onset_delay", Configuration.ApiClient.ParameterToString(onsetDelay)); // query parameter + if (durationOfAction != null) queryParams.Add("duration_of_action", Configuration.ApiClient.ParameterToString(durationOfAction)); // query parameter + if (_public != null) queryParams.Add("public", Configuration.ApiClient.ParameterToString(_public)); // query parameter + if (causeOnly != null) queryParams.Add("cause_only", Configuration.ApiClient.ParameterToString(causeOnly)); // query parameter + if (mostCommonValue != null) queryParams.Add("most_common_value", Configuration.ApiClient.ParameterToString(mostCommonValue)); // query parameter + if (mostCommonUnitId != null) queryParams.Add("most_common_unit_id", Configuration.ApiClient.ParameterToString(mostCommonUnitId)); // query parameter + if (standardDeviation != null) queryParams.Add("standard_deviation", Configuration.ApiClient.ParameterToString(standardDeviation)); // query parameter + if (variance != null) queryParams.Add("variance", Configuration.ApiClient.ParameterToString(variance)); // query parameter + if (mean != null) queryParams.Add("mean", Configuration.ApiClient.ParameterToString(mean)); // query parameter + if (median != null) queryParams.Add("median", Configuration.ApiClient.ParameterToString(median)); // query parameter + if (numberOfMeasurements != null) queryParams.Add("number_of_measurements", Configuration.ApiClient.ParameterToString(numberOfMeasurements)); // query parameter + if (numberOfUniqueValues != null) queryParams.Add("number_of_unique_values", Configuration.ApiClient.ParameterToString(numberOfUniqueValues)); // query parameter + if (skewness != null) queryParams.Add("skewness", Configuration.ApiClient.ParameterToString(skewness)); // query parameter + if (kurtosis != null) queryParams.Add("kurtosis", Configuration.ApiClient.ParameterToString(kurtosis)); // query parameter + if (status != null) queryParams.Add("status", Configuration.ApiClient.ParameterToString(status)); // query parameter + if (errorMessage != null) queryParams.Add("error_message", Configuration.ApiClient.ParameterToString(errorMessage)); // query parameter + if (lastSuccessfulUpdateTime != null) queryParams.Add("last_successful_update_time", Configuration.ApiClient.ParameterToString(lastSuccessfulUpdateTime)); // query parameter + if (createdAt != null) queryParams.Add("created_at", Configuration.ApiClient.ParameterToString(createdAt)); // query parameter + if (updatedAt != null) queryParams.Add("updated_at", Configuration.ApiClient.ParameterToString(updatedAt)); // query parameter + if (productUrl != null) queryParams.Add("product_url", Configuration.ApiClient.ParameterToString(productUrl)); // query parameter + if (imageUrl != null) queryParams.Add("image_url", Configuration.ApiClient.ParameterToString(imageUrl)); // query parameter + if (price != null) queryParams.Add("price", Configuration.ApiClient.ParameterToString(price)); // query parameter + if (numberOfUserVariables != null) queryParams.Add("number_of_user_variables", Configuration.ApiClient.ParameterToString(numberOfUserVariables)); // query parameter + if (outcome != null) queryParams.Add("outcome", Configuration.ApiClient.ParameterToString(outcome)); // query parameter + if (minimumRecordedValue != null) queryParams.Add("minimum_recorded_value", Configuration.ApiClient.ParameterToString(minimumRecordedValue)); // query parameter + if (maximumRecordedValue != null) queryParams.Add("maximum_recorded_value", Configuration.ApiClient.ParameterToString(maximumRecordedValue)); // query parameter + if (limit != null) queryParams.Add("limit", Configuration.ApiClient.ParameterToString(limit)); // query parameter + if (offset != null) queryParams.Add("offset", Configuration.ApiClient.ParameterToString(offset)); // query parameter + if (sort != null) queryParams.Add("sort", Configuration.ApiClient.ParameterToString(sort)); // query parameter + + + + + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling VariablesGet: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling VariablesGet: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling VariablesGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling VariablesGet: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse20027) ApiClient.Deserialize(response, typeof(InlineResponse20027)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20031) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20031))); + } /// /// Get all Variables Get all Variables /// + /// User's OAuth2 access token + /// id + /// The ID of the client application which last created or updated this common variable + /// ID of the parent variable if this variable has any parent + /// User-defined variable display name + /// Variable category ID + /// ID of the default unit for the variable + /// How to combine values of this variable (for instance, to see a summary of the values over a month) SUM or MEAN + /// Value for replacing null measurements + /// Maximum reasonable value for this variable (uses default unit) + /// Minimum reasonable value for this variable (uses default unit) + /// Estimated number of seconds that pass before a stimulus produces a perceivable effect + /// Estimated number of seconds following the onset delay in which a stimulus produces a perceivable effect + /// Is variable public + /// A value of 1 indicates that this variable is generally a cause in a causal relationship. An example of a causeOnly variable would be a variable such as Cloud Cover which would generally not be influenced by the behaviour of the user + /// Most common value + /// Most common Unit + /// Standard Deviation + /// Average variance for this variable based on all user data + /// Mean for this variable based on all user data + /// Median for this variable based on all user data + /// Number of measurements for this variable based on all user data + /// Number of unique values for this variable based on all user data + /// Skewness for this variable based on all user data + /// Kurtosis for this variable based on all user data + /// status + /// error_message + /// When this variable or its settings were last updated + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// Product URL + /// Image URL + /// Price + /// Number of users who have data for this variable + /// Outcome variables (those with `outcome` == 1) are variables for which a human would generally want to identify the influencing factors. These include symptoms of illness, physique, mood, cognitive performance, etc. Generally correlation calculations are only performed on outcome variables. + /// Minimum recorded value of this variable based on all user data + /// Maximum recorded value of this variable based on all user data + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort records by a given field name. If the field name is prefixed with '-', it will sort in descending order. + /// Task of InlineResponse20031 + public async System.Threading.Tasks.Task VariablesGetAsync (string accessToken = null, int? id = null, string clientId = null, int? parentId = null, string name = null, int? variableCategoryId = null, int? defaultUnitId = null, string combinationOperation = null, double? fillingValue = null, double? maximumAllowedValue = null, double? minimumAllowedValue = null, int? onsetDelay = null, int? durationOfAction = null, int? _public = null, bool? causeOnly = null, double? mostCommonValue = null, int? mostCommonUnitId = null, double? standardDeviation = null, double? variance = null, double? mean = null, double? median = null, double? numberOfMeasurements = null, double? numberOfUniqueValues = null, double? skewness = null, double? kurtosis = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, string createdAt = null, string updatedAt = null, string productUrl = null, string imageUrl = null, double? price = null, int? numberOfUserVariables = null, bool? outcome = null, double? minimumRecordedValue = null, double? maximumRecordedValue = null, int? limit = null, int? offset = null, string sort = null) + { + ApiResponse response = await VariablesGetAsyncWithHttpInfo(accessToken, id, clientId, parentId, name, variableCategoryId, defaultUnitId, combinationOperation, fillingValue, maximumAllowedValue, minimumAllowedValue, onsetDelay, durationOfAction, _public, causeOnly, mostCommonValue, mostCommonUnitId, standardDeviation, variance, mean, median, numberOfMeasurements, numberOfUniqueValues, skewness, kurtosis, status, errorMessage, lastSuccessfulUpdateTime, createdAt, updatedAt, productUrl, imageUrl, price, numberOfUserVariables, outcome, minimumRecordedValue, maximumRecordedValue, limit, offset, sort); + return response.Data; + + } + + /// + /// Get all Variables Get all Variables + /// + /// User's OAuth2 access token /// id - /// client_id - /// parent_id - /// name - /// variable_category_id - /// default_unit_id - /// combination_operation - /// filling_value - /// maximum_allowed_value - /// minimum_allowed_value - /// onset_delay - /// duration_of_action - /// public - /// cause_only - /// most_common_value - /// most_common_unit_id - /// standard_deviation - /// variance - /// mean - /// median - /// number_of_measurements - /// number_of_unique_values - /// skewness - /// kurtosis - /// latitude - /// longitude - /// location + /// The ID of the client application which last created or updated this common variable + /// ID of the parent variable if this variable has any parent + /// User-defined variable display name + /// Variable category ID + /// ID of the default unit for the variable + /// How to combine values of this variable (for instance, to see a summary of the values over a month) SUM or MEAN + /// Value for replacing null measurements + /// Maximum reasonable value for this variable (uses default unit) + /// Minimum reasonable value for this variable (uses default unit) + /// Estimated number of seconds that pass before a stimulus produces a perceivable effect + /// Estimated number of seconds following the onset delay in which a stimulus produces a perceivable effect + /// Is variable public + /// A value of 1 indicates that this variable is generally a cause in a causal relationship. An example of a causeOnly variable would be a variable such as Cloud Cover which would generally not be influenced by the behaviour of the user + /// Most common value + /// Most common Unit + /// Standard Deviation + /// Average variance for this variable based on all user data + /// Mean for this variable based on all user data + /// Median for this variable based on all user data + /// Number of measurements for this variable based on all user data + /// Number of unique values for this variable based on all user data + /// Skewness for this variable based on all user data + /// Kurtosis for this variable based on all user data /// status /// error_message - /// last_successful_update_time - /// created_at - /// updated_at - /// product_url - /// image_url - /// price - /// number_of_user_variables - /// outcome - /// minimum_recorded_value - /// maximum_recorded_value - /// limit - /// offset - /// sort - /// InlineResponse20027 - public async System.Threading.Tasks.Task VariablesGetAsync (int? id, string clientId, int? parentId, string name, int? variableCategoryId, int? defaultUnitId, string combinationOperation, double? fillingValue, double? maximumAllowedValue, double? minimumAllowedValue, int? onsetDelay, int? durationOfAction, int? _public, bool? causeOnly, double? mostCommonValue, int? mostCommonUnitId, double? standardDeviation, double? variance, double? mean, double? median, double? numberOfMeasurements, double? numberOfUniqueValues, double? skewness, double? kurtosis, double? latitude, double? longitude, string location, string status, string errorMessage, string lastSuccessfulUpdateTime, string createdAt, string updatedAt, string productUrl, string imageUrl, double? price, int? numberOfUserVariables, bool? outcome, double? minimumRecordedValue, double? maximumRecordedValue, int? limit, int? offset, string sort) + /// When this variable or its settings were last updated + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// Product URL + /// Image URL + /// Price + /// Number of users who have data for this variable + /// Outcome variables (those with `outcome` == 1) are variables for which a human would generally want to identify the influencing factors. These include symptoms of illness, physique, mood, cognitive performance, etc. Generally correlation calculations are only performed on outcome variables. + /// Minimum recorded value of this variable based on all user data + /// Maximum recorded value of this variable based on all user data + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort records by a given field name. If the field name is prefixed with '-', it will sort in descending order. + /// Task of ApiResponse (InlineResponse20031) + public async System.Threading.Tasks.Task> VariablesGetAsyncWithHttpInfo (string accessToken = null, int? id = null, string clientId = null, int? parentId = null, string name = null, int? variableCategoryId = null, int? defaultUnitId = null, string combinationOperation = null, double? fillingValue = null, double? maximumAllowedValue = null, double? minimumAllowedValue = null, int? onsetDelay = null, int? durationOfAction = null, int? _public = null, bool? causeOnly = null, double? mostCommonValue = null, int? mostCommonUnitId = null, double? standardDeviation = null, double? variance = null, double? mean = null, double? median = null, double? numberOfMeasurements = null, double? numberOfUniqueValues = null, double? skewness = null, double? kurtosis = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, string createdAt = null, string updatedAt = null, string productUrl = null, string imageUrl = null, double? price = null, int? numberOfUserVariables = null, bool? outcome = null, double? minimumRecordedValue = null, double? maximumRecordedValue = null, int? limit = null, int? offset = null, string sort = null) { @@ -448,78 +771,104 @@ public async System.Threading.Tasks.Task VariablesGetAsync String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) queryParams.Add("id", ApiClient.ParameterToString(id)); // query parameter - if (clientId != null) queryParams.Add("client_id", ApiClient.ParameterToString(clientId)); // query parameter - if (parentId != null) queryParams.Add("parent_id", ApiClient.ParameterToString(parentId)); // query parameter - if (name != null) queryParams.Add("name", ApiClient.ParameterToString(name)); // query parameter - if (variableCategoryId != null) queryParams.Add("variable_category_id", ApiClient.ParameterToString(variableCategoryId)); // query parameter - if (defaultUnitId != null) queryParams.Add("default_unit_id", ApiClient.ParameterToString(defaultUnitId)); // query parameter - if (combinationOperation != null) queryParams.Add("combination_operation", ApiClient.ParameterToString(combinationOperation)); // query parameter - if (fillingValue != null) queryParams.Add("filling_value", ApiClient.ParameterToString(fillingValue)); // query parameter - if (maximumAllowedValue != null) queryParams.Add("maximum_allowed_value", ApiClient.ParameterToString(maximumAllowedValue)); // query parameter - if (minimumAllowedValue != null) queryParams.Add("minimum_allowed_value", ApiClient.ParameterToString(minimumAllowedValue)); // query parameter - if (onsetDelay != null) queryParams.Add("onset_delay", ApiClient.ParameterToString(onsetDelay)); // query parameter - if (durationOfAction != null) queryParams.Add("duration_of_action", ApiClient.ParameterToString(durationOfAction)); // query parameter - if (_public != null) queryParams.Add("public", ApiClient.ParameterToString(_public)); // query parameter - if (causeOnly != null) queryParams.Add("cause_only", ApiClient.ParameterToString(causeOnly)); // query parameter - if (mostCommonValue != null) queryParams.Add("most_common_value", ApiClient.ParameterToString(mostCommonValue)); // query parameter - if (mostCommonUnitId != null) queryParams.Add("most_common_unit_id", ApiClient.ParameterToString(mostCommonUnitId)); // query parameter - if (standardDeviation != null) queryParams.Add("standard_deviation", ApiClient.ParameterToString(standardDeviation)); // query parameter - if (variance != null) queryParams.Add("variance", ApiClient.ParameterToString(variance)); // query parameter - if (mean != null) queryParams.Add("mean", ApiClient.ParameterToString(mean)); // query parameter - if (median != null) queryParams.Add("median", ApiClient.ParameterToString(median)); // query parameter - if (numberOfMeasurements != null) queryParams.Add("number_of_measurements", ApiClient.ParameterToString(numberOfMeasurements)); // query parameter - if (numberOfUniqueValues != null) queryParams.Add("number_of_unique_values", ApiClient.ParameterToString(numberOfUniqueValues)); // query parameter - if (skewness != null) queryParams.Add("skewness", ApiClient.ParameterToString(skewness)); // query parameter - if (kurtosis != null) queryParams.Add("kurtosis", ApiClient.ParameterToString(kurtosis)); // query parameter - if (latitude != null) queryParams.Add("latitude", ApiClient.ParameterToString(latitude)); // query parameter - if (longitude != null) queryParams.Add("longitude", ApiClient.ParameterToString(longitude)); // query parameter - if (location != null) queryParams.Add("location", ApiClient.ParameterToString(location)); // query parameter - if (status != null) queryParams.Add("status", ApiClient.ParameterToString(status)); // query parameter - if (errorMessage != null) queryParams.Add("error_message", ApiClient.ParameterToString(errorMessage)); // query parameter - if (lastSuccessfulUpdateTime != null) queryParams.Add("last_successful_update_time", ApiClient.ParameterToString(lastSuccessfulUpdateTime)); // query parameter - if (createdAt != null) queryParams.Add("created_at", ApiClient.ParameterToString(createdAt)); // query parameter - if (updatedAt != null) queryParams.Add("updated_at", ApiClient.ParameterToString(updatedAt)); // query parameter - if (productUrl != null) queryParams.Add("product_url", ApiClient.ParameterToString(productUrl)); // query parameter - if (imageUrl != null) queryParams.Add("image_url", ApiClient.ParameterToString(imageUrl)); // query parameter - if (price != null) queryParams.Add("price", ApiClient.ParameterToString(price)); // query parameter - if (numberOfUserVariables != null) queryParams.Add("number_of_user_variables", ApiClient.ParameterToString(numberOfUserVariables)); // query parameter - if (outcome != null) queryParams.Add("outcome", ApiClient.ParameterToString(outcome)); // query parameter - if (minimumRecordedValue != null) queryParams.Add("minimum_recorded_value", ApiClient.ParameterToString(minimumRecordedValue)); // query parameter - if (maximumRecordedValue != null) queryParams.Add("maximum_recorded_value", ApiClient.ParameterToString(maximumRecordedValue)); // query parameter - if (limit != null) queryParams.Add("limit", ApiClient.ParameterToString(limit)); // query parameter - if (offset != null) queryParams.Add("offset", ApiClient.ParameterToString(offset)); // query parameter - if (sort != null) queryParams.Add("sort", ApiClient.ParameterToString(sort)); // query parameter - - - - - - // authentication setting, if any - String[] authSettings = new String[] { }; - + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + if (id != null) queryParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // query parameter + if (clientId != null) queryParams.Add("client_id", Configuration.ApiClient.ParameterToString(clientId)); // query parameter + if (parentId != null) queryParams.Add("parent_id", Configuration.ApiClient.ParameterToString(parentId)); // query parameter + if (name != null) queryParams.Add("name", Configuration.ApiClient.ParameterToString(name)); // query parameter + if (variableCategoryId != null) queryParams.Add("variable_category_id", Configuration.ApiClient.ParameterToString(variableCategoryId)); // query parameter + if (defaultUnitId != null) queryParams.Add("default_unit_id", Configuration.ApiClient.ParameterToString(defaultUnitId)); // query parameter + if (combinationOperation != null) queryParams.Add("combination_operation", Configuration.ApiClient.ParameterToString(combinationOperation)); // query parameter + if (fillingValue != null) queryParams.Add("filling_value", Configuration.ApiClient.ParameterToString(fillingValue)); // query parameter + if (maximumAllowedValue != null) queryParams.Add("maximum_allowed_value", Configuration.ApiClient.ParameterToString(maximumAllowedValue)); // query parameter + if (minimumAllowedValue != null) queryParams.Add("minimum_allowed_value", Configuration.ApiClient.ParameterToString(minimumAllowedValue)); // query parameter + if (onsetDelay != null) queryParams.Add("onset_delay", Configuration.ApiClient.ParameterToString(onsetDelay)); // query parameter + if (durationOfAction != null) queryParams.Add("duration_of_action", Configuration.ApiClient.ParameterToString(durationOfAction)); // query parameter + if (_public != null) queryParams.Add("public", Configuration.ApiClient.ParameterToString(_public)); // query parameter + if (causeOnly != null) queryParams.Add("cause_only", Configuration.ApiClient.ParameterToString(causeOnly)); // query parameter + if (mostCommonValue != null) queryParams.Add("most_common_value", Configuration.ApiClient.ParameterToString(mostCommonValue)); // query parameter + if (mostCommonUnitId != null) queryParams.Add("most_common_unit_id", Configuration.ApiClient.ParameterToString(mostCommonUnitId)); // query parameter + if (standardDeviation != null) queryParams.Add("standard_deviation", Configuration.ApiClient.ParameterToString(standardDeviation)); // query parameter + if (variance != null) queryParams.Add("variance", Configuration.ApiClient.ParameterToString(variance)); // query parameter + if (mean != null) queryParams.Add("mean", Configuration.ApiClient.ParameterToString(mean)); // query parameter + if (median != null) queryParams.Add("median", Configuration.ApiClient.ParameterToString(median)); // query parameter + if (numberOfMeasurements != null) queryParams.Add("number_of_measurements", Configuration.ApiClient.ParameterToString(numberOfMeasurements)); // query parameter + if (numberOfUniqueValues != null) queryParams.Add("number_of_unique_values", Configuration.ApiClient.ParameterToString(numberOfUniqueValues)); // query parameter + if (skewness != null) queryParams.Add("skewness", Configuration.ApiClient.ParameterToString(skewness)); // query parameter + if (kurtosis != null) queryParams.Add("kurtosis", Configuration.ApiClient.ParameterToString(kurtosis)); // query parameter + if (status != null) queryParams.Add("status", Configuration.ApiClient.ParameterToString(status)); // query parameter + if (errorMessage != null) queryParams.Add("error_message", Configuration.ApiClient.ParameterToString(errorMessage)); // query parameter + if (lastSuccessfulUpdateTime != null) queryParams.Add("last_successful_update_time", Configuration.ApiClient.ParameterToString(lastSuccessfulUpdateTime)); // query parameter + if (createdAt != null) queryParams.Add("created_at", Configuration.ApiClient.ParameterToString(createdAt)); // query parameter + if (updatedAt != null) queryParams.Add("updated_at", Configuration.ApiClient.ParameterToString(updatedAt)); // query parameter + if (productUrl != null) queryParams.Add("product_url", Configuration.ApiClient.ParameterToString(productUrl)); // query parameter + if (imageUrl != null) queryParams.Add("image_url", Configuration.ApiClient.ParameterToString(imageUrl)); // query parameter + if (price != null) queryParams.Add("price", Configuration.ApiClient.ParameterToString(price)); // query parameter + if (numberOfUserVariables != null) queryParams.Add("number_of_user_variables", Configuration.ApiClient.ParameterToString(numberOfUserVariables)); // query parameter + if (outcome != null) queryParams.Add("outcome", Configuration.ApiClient.ParameterToString(outcome)); // query parameter + if (minimumRecordedValue != null) queryParams.Add("minimum_recorded_value", Configuration.ApiClient.ParameterToString(minimumRecordedValue)); // query parameter + if (maximumRecordedValue != null) queryParams.Add("maximum_recorded_value", Configuration.ApiClient.ParameterToString(maximumRecordedValue)); // query parameter + if (limit != null) queryParams.Add("limit", Configuration.ApiClient.ParameterToString(limit)); // query parameter + if (offset != null) queryParams.Add("offset", Configuration.ApiClient.ParameterToString(offset)); // query parameter + if (sort != null) queryParams.Add("sort", Configuration.ApiClient.ParameterToString(sort)); // query parameter + + + + + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling VariablesGet: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); - return (InlineResponse20027) ApiClient.Deserialize(response, typeof(InlineResponse20027)); + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling VariablesGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling VariablesGet: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20031) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20031))); + } /// - /// Store Variable Store Variable + /// Store Variable Allows the client to create a new variable in the `variables` table. /// + /// User's OAuth2 access token /// Variable that should be stored - /// InlineResponse20028 - public InlineResponse20028 VariablesPost (Variable body) + /// InlineResponse20032 + public InlineResponse20032 VariablesPost (string accessToken = null, Variable body = null) + { + ApiResponse response = VariablesPostWithHttpInfo(accessToken, body); + return response.Data; + } + + /// + /// Store Variable Allows the client to create a new variable in the `variables` table. + /// + /// User's OAuth2 access token + /// Variable that should be stored + /// ApiResponse of InlineResponse20032 + public ApiResponse< InlineResponse20032 > VariablesPostWithHttpInfo (string accessToken = null, Variable body = null) { @@ -527,7 +876,7 @@ public InlineResponse20028 VariablesPost (Variable body) var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -536,40 +885,67 @@ public InlineResponse20028 VariablesPost (Variable body) String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - postBody = ApiClient.Serialize(body); // http body (model) parameter + postBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter + + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } - - // authentication setting, if any - String[] authSettings = new String[] { }; // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling VariablesPost: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling VariablesPost: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling VariablesPost: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling VariablesPost: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse20028) ApiClient.Deserialize(response, typeof(InlineResponse20028)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20032) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20032))); + } /// - /// Store Variable Store Variable + /// Store Variable Allows the client to create a new variable in the `variables` table. + /// + /// User's OAuth2 access token + /// Variable that should be stored + /// Task of InlineResponse20032 + public async System.Threading.Tasks.Task VariablesPostAsync (string accessToken = null, Variable body = null) + { + ApiResponse response = await VariablesPostAsyncWithHttpInfo(accessToken, body); + return response.Data; + + } + + /// + /// Store Variable Allows the client to create a new variable in the `variables` table. /// + /// User's OAuth2 access token /// Variable that should be stored - /// InlineResponse20028 - public async System.Threading.Tasks.Task VariablesPostAsync (Variable body) + /// Task of ApiResponse (InlineResponse20032) + public async System.Threading.Tasks.Task> VariablesPostAsyncWithHttpInfo (string accessToken = null, Variable body = null) { @@ -586,37 +962,66 @@ public async System.Threading.Tasks.Task VariablesPostAsync String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - postBody = ApiClient.Serialize(body); // http body (model) parameter + postBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; - + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling VariablesPost: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams); - return (InlineResponse20028) ApiClient.Deserialize(response, typeof(InlineResponse20028)); + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling VariablesPost: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling VariablesPost: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20032) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20032))); + } /// /// Get Variable Get Variable /// /// id of Variable - /// InlineResponse20028 - public InlineResponse20028 VariablesIdGet (int? id) + /// User's OAuth2 access token + /// InlineResponse20032 + public InlineResponse20032 VariablesIdGet (int? id, string accessToken = null) + { + ApiResponse response = VariablesIdGetWithHttpInfo(id, accessToken); + return response.Data; + } + + /// + /// Get Variable Get Variable + /// + /// id of Variable + /// User's OAuth2 access token + /// ApiResponse of InlineResponse20032 + public ApiResponse< InlineResponse20032 > VariablesIdGetWithHttpInfo (int? id, string accessToken = null) { // verify the required parameter 'id' is set @@ -627,7 +1032,7 @@ public InlineResponse20028 VariablesIdGet (int? id) var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -636,40 +1041,67 @@ public InlineResponse20028 VariablesIdGet (int? id) String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling VariablesIdGet: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling VariablesIdGet: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling VariablesIdGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling VariablesIdGet: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse20028) ApiClient.Deserialize(response, typeof(InlineResponse20028)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20032) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20032))); + } /// /// Get Variable Get Variable /// /// id of Variable - /// InlineResponse20028 - public async System.Threading.Tasks.Task VariablesIdGetAsync (int? id) + /// User's OAuth2 access token + /// Task of InlineResponse20032 + public async System.Threading.Tasks.Task VariablesIdGetAsync (int? id, string accessToken = null) + { + ApiResponse response = await VariablesIdGetAsyncWithHttpInfo(id, accessToken); + return response.Data; + + } + + /// + /// Get Variable Get Variable + /// + /// id of Variable + /// User's OAuth2 access token + /// Task of ApiResponse (InlineResponse20032) + public async System.Threading.Tasks.Task> VariablesIdGetAsyncWithHttpInfo (int? id, string accessToken = null) { // verify the required parameter 'id' is set if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling VariablesIdGet"); @@ -688,38 +1120,68 @@ public async System.Threading.Tasks.Task VariablesIdGetAsyn String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; - + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling VariablesIdGet: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling VariablesIdGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling VariablesIdGet: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse20028) ApiClient.Deserialize(response, typeof(InlineResponse20028)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20032) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20032))); + } /// /// Update Variable Update Variable /// /// id of Variable + /// User's OAuth2 access token + /// Variable that should be updated + /// InlineResponse2002 + public InlineResponse2002 VariablesIdPut (int? id, string accessToken = null, Variable body = null) + { + ApiResponse response = VariablesIdPutWithHttpInfo(id, accessToken, body); + return response.Data; + } + + /// + /// Update Variable Update Variable + /// + /// id of Variable + /// User's OAuth2 access token /// Variable that should be updated - /// InlineResponse2002 - public InlineResponse2002 VariablesIdPut (int? id, Variable body) + /// ApiResponse of InlineResponse2002 + public ApiResponse< InlineResponse2002 > VariablesIdPutWithHttpInfo (int? id, string accessToken = null, Variable body = null) { // verify the required parameter 'id' is set @@ -730,7 +1192,7 @@ public InlineResponse2002 VariablesIdPut (int? id, Variable body) var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -739,42 +1201,70 @@ public InlineResponse2002 VariablesIdPut (int? id, Variable body) String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - postBody = ApiClient.Serialize(body); // http body (model) parameter + postBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter + + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } - - // authentication setting, if any - String[] authSettings = new String[] { }; // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling VariablesIdPut: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling VariablesIdPut: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling VariablesIdPut: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling VariablesIdPut: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse2002) ApiClient.Deserialize(response, typeof(InlineResponse2002)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2002) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2002))); + } /// /// Update Variable Update Variable /// /// id of Variable + /// User's OAuth2 access token /// Variable that should be updated - /// InlineResponse2002 - public async System.Threading.Tasks.Task VariablesIdPutAsync (int? id, Variable body) + /// Task of InlineResponse2002 + public async System.Threading.Tasks.Task VariablesIdPutAsync (int? id, string accessToken = null, Variable body = null) + { + ApiResponse response = await VariablesIdPutAsyncWithHttpInfo(id, accessToken, body); + return response.Data; + + } + + /// + /// Update Variable Update Variable + /// + /// id of Variable + /// User's OAuth2 access token + /// Variable that should be updated + /// Task of ApiResponse (InlineResponse2002) + public async System.Threading.Tasks.Task> VariablesIdPutAsyncWithHttpInfo (int? id, string accessToken = null, Variable body = null) { // verify the required parameter 'id' is set if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling VariablesIdPut"); @@ -793,38 +1283,67 @@ public async System.Threading.Tasks.Task VariablesIdPutAsync String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - postBody = ApiClient.Serialize(body); // http body (model) parameter + postBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; - + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling VariablesIdPut: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling VariablesIdPut: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling VariablesIdPut: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse2002) ApiClient.Deserialize(response, typeof(InlineResponse2002)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2002) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2002))); + } /// /// Delete Variable Delete Variable /// /// id of Variable - /// InlineResponse2002 - public InlineResponse2002 VariablesIdDelete (int? id) + /// User's OAuth2 access token + /// InlineResponse2002 + public InlineResponse2002 VariablesIdDelete (int? id, string accessToken = null) + { + ApiResponse response = VariablesIdDeleteWithHttpInfo(id, accessToken); + return response.Data; + } + + /// + /// Delete Variable Delete Variable + /// + /// id of Variable + /// User's OAuth2 access token + /// ApiResponse of InlineResponse2002 + public ApiResponse< InlineResponse2002 > VariablesIdDeleteWithHttpInfo (int? id, string accessToken = null) { // verify the required parameter 'id' is set @@ -835,7 +1354,7 @@ public InlineResponse2002 VariablesIdDelete (int? id) var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -844,40 +1363,67 @@ public InlineResponse2002 VariablesIdDelete (int? id) String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling VariablesIdDelete: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling VariablesIdDelete: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling VariablesIdDelete: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling VariablesIdDelete: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse2002) ApiClient.Deserialize(response, typeof(InlineResponse2002)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2002) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2002))); + } /// /// Delete Variable Delete Variable /// /// id of Variable - /// InlineResponse2002 - public async System.Threading.Tasks.Task VariablesIdDeleteAsync (int? id) + /// User's OAuth2 access token + /// Task of InlineResponse2002 + public async System.Threading.Tasks.Task VariablesIdDeleteAsync (int? id, string accessToken = null) + { + ApiResponse response = await VariablesIdDeleteAsyncWithHttpInfo(id, accessToken); + return response.Data; + + } + + /// + /// Delete Variable Delete Variable + /// + /// id of Variable + /// User's OAuth2 access token + /// Task of ApiResponse (InlineResponse2002) + public async System.Threading.Tasks.Task> VariablesIdDeleteAsyncWithHttpInfo (int? id, string accessToken = null) { // verify the required parameter 'id' is set if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling VariablesIdDelete"); @@ -896,29 +1442,45 @@ public async System.Threading.Tasks.Task VariablesIdDeleteAs String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; - + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling VariablesIdDelete: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams); - return (InlineResponse2002) ApiClient.Deserialize(response, typeof(InlineResponse2002)); + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling VariablesIdDelete: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling VariablesIdDelete: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2002) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2002))); + } } diff --git a/src/main/csharp/io/swagger/Api/VariableCategoryApi.cs b/src/main/csharp/io/swagger/Api/VariableCategoryApi.cs index 34e50ca..3d3e272 100644 --- a/src/main/csharp/io/swagger/Api/VariableCategoryApi.cs +++ b/src/main/csharp/io/swagger/Api/VariableCategoryApi.cs @@ -1,6 +1,7 @@ using System; using System.IO; using System.Collections.Generic; +using System.Linq; using RestSharp; using IO.Swagger.Client; using IO.Swagger.Model; @@ -18,55 +19,113 @@ public interface IVariableCategoryApi /// Get all VariableCategories /// /// - /// Get all VariableCategories + /// The variable categories include Activity, Causes of Illness, Cognitive Performance, Conditions, Environment, Foods, Location, Miscellaneous, Mood, Nutrition, Physical Activity, Physique, Sleep, Social Interactions, Symptoms, Treatments, Vital Signs, and Work. /// - /// name - /// filling_value - /// maximum_allowed_value - /// minimum_allowed_value - /// duration_of_action - /// onset_delay - /// combination_operation + /// User's OAuth2 access token + /// Name of the category + /// Value for replacing null measurements + /// Maximum recorded value of this category + /// Minimum recorded value of this category + /// Estimated number of seconds following the onset delay in which a stimulus produces a perceivable effect + /// Estimated number of seconds that pass before a stimulus produces a perceivable effect + /// How to combine values of this variable (for instance, to see a summary of the values over a month) SUM or MEAN /// updated - /// cause_only - /// public + /// A value of 1 indicates that this category is generally a cause in a causal relationship. An example of a causeOnly category would be a category such as Work which would generally not be influenced by the behaviour of the user + /// Is category public /// outcome - /// created_at - /// updated_at - /// image_url - /// default_unit_id - /// limit - /// offset - /// sort - /// InlineResponse20023 - InlineResponse20023 VariableCategoriesGet (string name, double? fillingValue, double? maximumAllowedValue, double? minimumAllowedValue, int? durationOfAction, int? onsetDelay, string combinationOperation, int? updated, bool? causeOnly, int? _public, bool? outcome, string createdAt, string updatedAt, string imageUrl, int? defaultUnitId, int? limit, int? offset, string sort); + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// Image URL + /// ID of the default unit for the category + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// InlineResponse20027 + InlineResponse20027 VariableCategoriesGet (string accessToken = null, string name = null, double? fillingValue = null, double? maximumAllowedValue = null, double? minimumAllowedValue = null, int? durationOfAction = null, int? onsetDelay = null, string combinationOperation = null, int? updated = null, bool? causeOnly = null, int? _public = null, bool? outcome = null, string createdAt = null, string updatedAt = null, string imageUrl = null, int? defaultUnitId = null, int? limit = null, int? offset = null, string sort = null); /// /// Get all VariableCategories /// /// + /// The variable categories include Activity, Causes of Illness, Cognitive Performance, Conditions, Environment, Foods, Location, Miscellaneous, Mood, Nutrition, Physical Activity, Physique, Sleep, Social Interactions, Symptoms, Treatments, Vital Signs, and Work. + /// + /// User's OAuth2 access token + /// Name of the category + /// Value for replacing null measurements + /// Maximum recorded value of this category + /// Minimum recorded value of this category + /// Estimated number of seconds following the onset delay in which a stimulus produces a perceivable effect + /// Estimated number of seconds that pass before a stimulus produces a perceivable effect + /// How to combine values of this variable (for instance, to see a summary of the values over a month) SUM or MEAN + /// updated + /// A value of 1 indicates that this category is generally a cause in a causal relationship. An example of a causeOnly category would be a category such as Work which would generally not be influenced by the behaviour of the user + /// Is category public + /// outcome + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// Image URL + /// ID of the default unit for the category + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// ApiResponse of InlineResponse20027 + ApiResponse VariableCategoriesGetWithHttpInfo (string accessToken = null, string name = null, double? fillingValue = null, double? maximumAllowedValue = null, double? minimumAllowedValue = null, int? durationOfAction = null, int? onsetDelay = null, string combinationOperation = null, int? updated = null, bool? causeOnly = null, int? _public = null, bool? outcome = null, string createdAt = null, string updatedAt = null, string imageUrl = null, int? defaultUnitId = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Get all VariableCategories + /// + /// + /// The variable categories include Activity, Causes of Illness, Cognitive Performance, Conditions, Environment, Foods, Location, Miscellaneous, Mood, Nutrition, Physical Activity, Physique, Sleep, Social Interactions, Symptoms, Treatments, Vital Signs, and Work. + /// + /// User's OAuth2 access token + /// Name of the category + /// Value for replacing null measurements + /// Maximum recorded value of this category + /// Minimum recorded value of this category + /// Estimated number of seconds following the onset delay in which a stimulus produces a perceivable effect + /// Estimated number of seconds that pass before a stimulus produces a perceivable effect + /// How to combine values of this variable (for instance, to see a summary of the values over a month) SUM or MEAN + /// updated + /// A value of 1 indicates that this category is generally a cause in a causal relationship. An example of a causeOnly category would be a category such as Work which would generally not be influenced by the behaviour of the user + /// Is category public + /// outcome + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// Image URL + /// ID of the default unit for the category + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of InlineResponse20027 + System.Threading.Tasks.Task VariableCategoriesGetAsync (string accessToken = null, string name = null, double? fillingValue = null, double? maximumAllowedValue = null, double? minimumAllowedValue = null, int? durationOfAction = null, int? onsetDelay = null, string combinationOperation = null, int? updated = null, bool? causeOnly = null, int? _public = null, bool? outcome = null, string createdAt = null, string updatedAt = null, string imageUrl = null, int? defaultUnitId = null, int? limit = null, int? offset = null, string sort = null); + + /// /// Get all VariableCategories + /// + /// + /// The variable categories include Activity, Causes of Illness, Cognitive Performance, Conditions, Environment, Foods, Location, Miscellaneous, Mood, Nutrition, Physical Activity, Physique, Sleep, Social Interactions, Symptoms, Treatments, Vital Signs, and Work. /// - /// name - /// filling_value - /// maximum_allowed_value - /// minimum_allowed_value - /// duration_of_action - /// onset_delay - /// combination_operation + /// User's OAuth2 access token + /// Name of the category + /// Value for replacing null measurements + /// Maximum recorded value of this category + /// Minimum recorded value of this category + /// Estimated number of seconds following the onset delay in which a stimulus produces a perceivable effect + /// Estimated number of seconds that pass before a stimulus produces a perceivable effect + /// How to combine values of this variable (for instance, to see a summary of the values over a month) SUM or MEAN /// updated - /// cause_only - /// public + /// A value of 1 indicates that this category is generally a cause in a causal relationship. An example of a causeOnly category would be a category such as Work which would generally not be influenced by the behaviour of the user + /// Is category public /// outcome - /// created_at - /// updated_at - /// image_url - /// default_unit_id - /// limit - /// offset - /// sort - /// InlineResponse20023 - System.Threading.Tasks.Task VariableCategoriesGetAsync (string name, double? fillingValue, double? maximumAllowedValue, double? minimumAllowedValue, int? durationOfAction, int? onsetDelay, string combinationOperation, int? updated, bool? causeOnly, int? _public, bool? outcome, string createdAt, string updatedAt, string imageUrl, int? defaultUnitId, int? limit, int? offset, string sort); + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// Image URL + /// ID of the default unit for the category + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of ApiResponse (InlineResponse20027) + System.Threading.Tasks.Task> VariableCategoriesGetAsyncWithHttpInfo (string accessToken = null, string name = null, double? fillingValue = null, double? maximumAllowedValue = null, double? minimumAllowedValue = null, int? durationOfAction = null, int? onsetDelay = null, string combinationOperation = null, int? updated = null, bool? causeOnly = null, int? _public = null, bool? outcome = null, string createdAt = null, string updatedAt = null, string imageUrl = null, int? defaultUnitId = null, int? limit = null, int? offset = null, string sort = null); /// /// Store VariableCategory @@ -74,9 +133,10 @@ public interface IVariableCategoryApi /// /// Store VariableCategory /// + /// User's OAuth2 access token /// VariableCategory that should be stored - /// InlineResponse20024 - InlineResponse20024 VariableCategoriesPost (VariableCategory body); + /// InlineResponse20028 + InlineResponse20028 VariableCategoriesPost (string accessToken = null, VariableCategory body = null); /// /// Store VariableCategory @@ -84,9 +144,32 @@ public interface IVariableCategoryApi /// /// Store VariableCategory /// + /// User's OAuth2 access token /// VariableCategory that should be stored - /// InlineResponse20024 - System.Threading.Tasks.Task VariableCategoriesPostAsync (VariableCategory body); + /// ApiResponse of InlineResponse20028 + ApiResponse VariableCategoriesPostWithHttpInfo (string accessToken = null, VariableCategory body = null); + + /// + /// Store VariableCategory + /// + /// + /// Store VariableCategory + /// + /// User's OAuth2 access token + /// VariableCategory that should be stored + /// Task of InlineResponse20028 + System.Threading.Tasks.Task VariableCategoriesPostAsync (string accessToken = null, VariableCategory body = null); + + /// + /// Store VariableCategory + /// + /// + /// Store VariableCategory + /// + /// User's OAuth2 access token + /// VariableCategory that should be stored + /// Task of ApiResponse (InlineResponse20028) + System.Threading.Tasks.Task> VariableCategoriesPostAsyncWithHttpInfo (string accessToken = null, VariableCategory body = null); /// /// Get VariableCategory @@ -95,8 +178,9 @@ public interface IVariableCategoryApi /// Get VariableCategory /// /// id of VariableCategory - /// InlineResponse20024 - InlineResponse20024 VariableCategoriesIdGet (int? id); + /// User's OAuth2 access token + /// InlineResponse20028 + InlineResponse20028 VariableCategoriesIdGet (int? id, string accessToken = null); /// /// Get VariableCategory @@ -105,8 +189,31 @@ public interface IVariableCategoryApi /// Get VariableCategory /// /// id of VariableCategory - /// InlineResponse20024 - System.Threading.Tasks.Task VariableCategoriesIdGetAsync (int? id); + /// User's OAuth2 access token + /// ApiResponse of InlineResponse20028 + ApiResponse VariableCategoriesIdGetWithHttpInfo (int? id, string accessToken = null); + + /// + /// Get VariableCategory + /// + /// + /// Get VariableCategory + /// + /// id of VariableCategory + /// User's OAuth2 access token + /// Task of InlineResponse20028 + System.Threading.Tasks.Task VariableCategoriesIdGetAsync (int? id, string accessToken = null); + + /// + /// Get VariableCategory + /// + /// + /// Get VariableCategory + /// + /// id of VariableCategory + /// User's OAuth2 access token + /// Task of ApiResponse (InlineResponse20028) + System.Threading.Tasks.Task> VariableCategoriesIdGetAsyncWithHttpInfo (int? id, string accessToken = null); /// /// Update VariableCategory @@ -115,9 +222,10 @@ public interface IVariableCategoryApi /// Update VariableCategory /// /// id of VariableCategory + /// User's OAuth2 access token /// VariableCategory that should be updated /// InlineResponse2002 - InlineResponse2002 VariableCategoriesIdPut (int? id, VariableCategory body); + InlineResponse2002 VariableCategoriesIdPut (int? id, string accessToken = null, VariableCategory body = null); /// /// Update VariableCategory @@ -126,9 +234,34 @@ public interface IVariableCategoryApi /// Update VariableCategory /// /// id of VariableCategory + /// User's OAuth2 access token /// VariableCategory that should be updated - /// InlineResponse2002 - System.Threading.Tasks.Task VariableCategoriesIdPutAsync (int? id, VariableCategory body); + /// ApiResponse of InlineResponse2002 + ApiResponse VariableCategoriesIdPutWithHttpInfo (int? id, string accessToken = null, VariableCategory body = null); + + /// + /// Update VariableCategory + /// + /// + /// Update VariableCategory + /// + /// id of VariableCategory + /// User's OAuth2 access token + /// VariableCategory that should be updated + /// Task of InlineResponse2002 + System.Threading.Tasks.Task VariableCategoriesIdPutAsync (int? id, string accessToken = null, VariableCategory body = null); + + /// + /// Update VariableCategory + /// + /// + /// Update VariableCategory + /// + /// id of VariableCategory + /// User's OAuth2 access token + /// VariableCategory that should be updated + /// Task of ApiResponse (InlineResponse2002) + System.Threading.Tasks.Task> VariableCategoriesIdPutAsyncWithHttpInfo (int? id, string accessToken = null, VariableCategory body = null); /// /// Delete VariableCategory @@ -137,8 +270,9 @@ public interface IVariableCategoryApi /// Delete VariableCategory /// /// id of VariableCategory + /// User's OAuth2 access token /// InlineResponse2002 - InlineResponse2002 VariableCategoriesIdDelete (int? id); + InlineResponse2002 VariableCategoriesIdDelete (int? id, string accessToken = null); /// /// Delete VariableCategory @@ -147,8 +281,31 @@ public interface IVariableCategoryApi /// Delete VariableCategory /// /// id of VariableCategory - /// InlineResponse2002 - System.Threading.Tasks.Task VariableCategoriesIdDeleteAsync (int? id); + /// User's OAuth2 access token + /// ApiResponse of InlineResponse2002 + ApiResponse VariableCategoriesIdDeleteWithHttpInfo (int? id, string accessToken = null); + + /// + /// Delete VariableCategory + /// + /// + /// Delete VariableCategory + /// + /// id of VariableCategory + /// User's OAuth2 access token + /// Task of InlineResponse2002 + System.Threading.Tasks.Task VariableCategoriesIdDeleteAsync (int? id, string accessToken = null); + + /// + /// Delete VariableCategory + /// + /// + /// Delete VariableCategory + /// + /// id of VariableCategory + /// User's OAuth2 access token + /// Task of ApiResponse (InlineResponse2002) + System.Threading.Tasks.Task> VariableCategoriesIdDeleteAsyncWithHttpInfo (int? id, string accessToken = null); } @@ -160,74 +317,127 @@ public class VariableCategoryApi : IVariableCategoryApi /// /// Initializes a new instance of the class. /// - /// an instance of ApiClient (optional) /// - public VariableCategoryApi(ApiClient apiClient = null) + public VariableCategoryApi(String basePath) { - if (apiClient == null) // use the default one in Configuration - this.ApiClient = Configuration.DefaultApiClient; - else - this.ApiClient = apiClient; + this.Configuration = new Configuration(new ApiClient(basePath)); } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class + /// using Configuration object /// + /// An instance of Configuration /// - public VariableCategoryApi(String basePath) + public VariableCategoryApi(Configuration configuration = null) { - this.ApiClient = new ApiClient(basePath); + if (configuration == null) // use the default one in Configuration + this.Configuration = Configuration.Default; + else + this.Configuration = configuration; } - + + /// + /// Gets the base path of the API client. + /// + /// The base path + public String GetBasePath() + { + return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); + } + /// /// Sets the base path of the API client. /// - /// The base path /// The base path + [Obsolete("SetBasePath is deprecated, please do 'Configuraiton.ApiClient = new ApiClient(\"http://new-path\")' instead.")] public void SetBasePath(String basePath) { - this.ApiClient.BasePath = basePath; + // do nothing } /// - /// Gets the base path of the API client. + /// Gets or sets the configuration object /// - /// The base path - public String GetBasePath() + /// An instance of the Configuration + public Configuration Configuration {get; set;} + + /// + /// Gets the default header. + /// + /// Dictionary of HTTP header + [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] + public Dictionary DefaultHeader() { - return this.ApiClient.BasePath; + return this.Configuration.DefaultHeader; } - + /// - /// Gets or sets the API client. + /// Add default header. /// - /// An instance of the ApiClient - public ApiClient ApiClient {get; set;} - + /// Header field name. + /// Header field value. + /// + [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] + public void AddDefaultHeader(string key, string value) + { + this.Configuration.AddDefaultHeader(key, value); + } + /// - /// Get all VariableCategories Get all VariableCategories + /// Get all VariableCategories The variable categories include Activity, Causes of Illness, Cognitive Performance, Conditions, Environment, Foods, Location, Miscellaneous, Mood, Nutrition, Physical Activity, Physique, Sleep, Social Interactions, Symptoms, Treatments, Vital Signs, and Work. /// - /// name - /// filling_value - /// maximum_allowed_value - /// minimum_allowed_value - /// duration_of_action - /// onset_delay - /// combination_operation + /// User's OAuth2 access token + /// Name of the category + /// Value for replacing null measurements + /// Maximum recorded value of this category + /// Minimum recorded value of this category + /// Estimated number of seconds following the onset delay in which a stimulus produces a perceivable effect + /// Estimated number of seconds that pass before a stimulus produces a perceivable effect + /// How to combine values of this variable (for instance, to see a summary of the values over a month) SUM or MEAN /// updated - /// cause_only - /// public + /// A value of 1 indicates that this category is generally a cause in a causal relationship. An example of a causeOnly category would be a category such as Work which would generally not be influenced by the behaviour of the user + /// Is category public /// outcome - /// created_at - /// updated_at - /// image_url - /// default_unit_id - /// limit - /// offset - /// sort - /// InlineResponse20023 - public InlineResponse20023 VariableCategoriesGet (string name, double? fillingValue, double? maximumAllowedValue, double? minimumAllowedValue, int? durationOfAction, int? onsetDelay, string combinationOperation, int? updated, bool? causeOnly, int? _public, bool? outcome, string createdAt, string updatedAt, string imageUrl, int? defaultUnitId, int? limit, int? offset, string sort) + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// Image URL + /// ID of the default unit for the category + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// InlineResponse20027 + public InlineResponse20027 VariableCategoriesGet (string accessToken = null, string name = null, double? fillingValue = null, double? maximumAllowedValue = null, double? minimumAllowedValue = null, int? durationOfAction = null, int? onsetDelay = null, string combinationOperation = null, int? updated = null, bool? causeOnly = null, int? _public = null, bool? outcome = null, string createdAt = null, string updatedAt = null, string imageUrl = null, int? defaultUnitId = null, int? limit = null, int? offset = null, string sort = null) + { + ApiResponse response = VariableCategoriesGetWithHttpInfo(accessToken, name, fillingValue, maximumAllowedValue, minimumAllowedValue, durationOfAction, onsetDelay, combinationOperation, updated, causeOnly, _public, outcome, createdAt, updatedAt, imageUrl, defaultUnitId, limit, offset, sort); + return response.Data; + } + + /// + /// Get all VariableCategories The variable categories include Activity, Causes of Illness, Cognitive Performance, Conditions, Environment, Foods, Location, Miscellaneous, Mood, Nutrition, Physical Activity, Physique, Sleep, Social Interactions, Symptoms, Treatments, Vital Signs, and Work. + /// + /// User's OAuth2 access token + /// Name of the category + /// Value for replacing null measurements + /// Maximum recorded value of this category + /// Minimum recorded value of this category + /// Estimated number of seconds following the onset delay in which a stimulus produces a perceivable effect + /// Estimated number of seconds that pass before a stimulus produces a perceivable effect + /// How to combine values of this variable (for instance, to see a summary of the values over a month) SUM or MEAN + /// updated + /// A value of 1 indicates that this category is generally a cause in a causal relationship. An example of a causeOnly category would be a category such as Work which would generally not be influenced by the behaviour of the user + /// Is category public + /// outcome + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// Image URL + /// ID of the default unit for the category + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// ApiResponse of InlineResponse20027 + public ApiResponse< InlineResponse20027 > VariableCategoriesGetWithHttpInfo (string accessToken = null, string name = null, double? fillingValue = null, double? maximumAllowedValue = null, double? minimumAllowedValue = null, int? durationOfAction = null, int? onsetDelay = null, string combinationOperation = null, int? updated = null, bool? causeOnly = null, int? _public = null, bool? outcome = null, string createdAt = null, string updatedAt = null, string imageUrl = null, int? defaultUnitId = null, int? limit = null, int? offset = null, string sort = null) { @@ -235,7 +445,7 @@ public InlineResponse20023 VariableCategoriesGet (string name, double? fillingVa var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -244,74 +454,118 @@ public InlineResponse20023 VariableCategoriesGet (string name, double? fillingVa String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (name != null) queryParams.Add("name", ApiClient.ParameterToString(name)); // query parameter - if (fillingValue != null) queryParams.Add("filling_value", ApiClient.ParameterToString(fillingValue)); // query parameter - if (maximumAllowedValue != null) queryParams.Add("maximum_allowed_value", ApiClient.ParameterToString(maximumAllowedValue)); // query parameter - if (minimumAllowedValue != null) queryParams.Add("minimum_allowed_value", ApiClient.ParameterToString(minimumAllowedValue)); // query parameter - if (durationOfAction != null) queryParams.Add("duration_of_action", ApiClient.ParameterToString(durationOfAction)); // query parameter - if (onsetDelay != null) queryParams.Add("onset_delay", ApiClient.ParameterToString(onsetDelay)); // query parameter - if (combinationOperation != null) queryParams.Add("combination_operation", ApiClient.ParameterToString(combinationOperation)); // query parameter - if (updated != null) queryParams.Add("updated", ApiClient.ParameterToString(updated)); // query parameter - if (causeOnly != null) queryParams.Add("cause_only", ApiClient.ParameterToString(causeOnly)); // query parameter - if (_public != null) queryParams.Add("public", ApiClient.ParameterToString(_public)); // query parameter - if (outcome != null) queryParams.Add("outcome", ApiClient.ParameterToString(outcome)); // query parameter - if (createdAt != null) queryParams.Add("created_at", ApiClient.ParameterToString(createdAt)); // query parameter - if (updatedAt != null) queryParams.Add("updated_at", ApiClient.ParameterToString(updatedAt)); // query parameter - if (imageUrl != null) queryParams.Add("image_url", ApiClient.ParameterToString(imageUrl)); // query parameter - if (defaultUnitId != null) queryParams.Add("default_unit_id", ApiClient.ParameterToString(defaultUnitId)); // query parameter - if (limit != null) queryParams.Add("limit", ApiClient.ParameterToString(limit)); // query parameter - if (offset != null) queryParams.Add("offset", ApiClient.ParameterToString(offset)); // query parameter - if (sort != null) queryParams.Add("sort", ApiClient.ParameterToString(sort)); // query parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + if (name != null) queryParams.Add("name", Configuration.ApiClient.ParameterToString(name)); // query parameter + if (fillingValue != null) queryParams.Add("filling_value", Configuration.ApiClient.ParameterToString(fillingValue)); // query parameter + if (maximumAllowedValue != null) queryParams.Add("maximum_allowed_value", Configuration.ApiClient.ParameterToString(maximumAllowedValue)); // query parameter + if (minimumAllowedValue != null) queryParams.Add("minimum_allowed_value", Configuration.ApiClient.ParameterToString(minimumAllowedValue)); // query parameter + if (durationOfAction != null) queryParams.Add("duration_of_action", Configuration.ApiClient.ParameterToString(durationOfAction)); // query parameter + if (onsetDelay != null) queryParams.Add("onset_delay", Configuration.ApiClient.ParameterToString(onsetDelay)); // query parameter + if (combinationOperation != null) queryParams.Add("combination_operation", Configuration.ApiClient.ParameterToString(combinationOperation)); // query parameter + if (updated != null) queryParams.Add("updated", Configuration.ApiClient.ParameterToString(updated)); // query parameter + if (causeOnly != null) queryParams.Add("cause_only", Configuration.ApiClient.ParameterToString(causeOnly)); // query parameter + if (_public != null) queryParams.Add("public", Configuration.ApiClient.ParameterToString(_public)); // query parameter + if (outcome != null) queryParams.Add("outcome", Configuration.ApiClient.ParameterToString(outcome)); // query parameter + if (createdAt != null) queryParams.Add("created_at", Configuration.ApiClient.ParameterToString(createdAt)); // query parameter + if (updatedAt != null) queryParams.Add("updated_at", Configuration.ApiClient.ParameterToString(updatedAt)); // query parameter + if (imageUrl != null) queryParams.Add("image_url", Configuration.ApiClient.ParameterToString(imageUrl)); // query parameter + if (defaultUnitId != null) queryParams.Add("default_unit_id", Configuration.ApiClient.ParameterToString(defaultUnitId)); // query parameter + if (limit != null) queryParams.Add("limit", Configuration.ApiClient.ParameterToString(limit)); // query parameter + if (offset != null) queryParams.Add("offset", Configuration.ApiClient.ParameterToString(offset)); // query parameter + if (sort != null) queryParams.Add("sort", Configuration.ApiClient.ParameterToString(sort)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling VariableCategoriesGet: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling VariableCategoriesGet: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling VariableCategoriesGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling VariableCategoriesGet: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse20023) ApiClient.Deserialize(response, typeof(InlineResponse20023)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20027) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20027))); + } /// - /// Get all VariableCategories Get all VariableCategories + /// Get all VariableCategories The variable categories include Activity, Causes of Illness, Cognitive Performance, Conditions, Environment, Foods, Location, Miscellaneous, Mood, Nutrition, Physical Activity, Physique, Sleep, Social Interactions, Symptoms, Treatments, Vital Signs, and Work. /// - /// name - /// filling_value - /// maximum_allowed_value - /// minimum_allowed_value - /// duration_of_action - /// onset_delay - /// combination_operation + /// User's OAuth2 access token + /// Name of the category + /// Value for replacing null measurements + /// Maximum recorded value of this category + /// Minimum recorded value of this category + /// Estimated number of seconds following the onset delay in which a stimulus produces a perceivable effect + /// Estimated number of seconds that pass before a stimulus produces a perceivable effect + /// How to combine values of this variable (for instance, to see a summary of the values over a month) SUM or MEAN /// updated - /// cause_only - /// public + /// A value of 1 indicates that this category is generally a cause in a causal relationship. An example of a causeOnly category would be a category such as Work which would generally not be influenced by the behaviour of the user + /// Is category public /// outcome - /// created_at - /// updated_at - /// image_url - /// default_unit_id - /// limit - /// offset - /// sort - /// InlineResponse20023 - public async System.Threading.Tasks.Task VariableCategoriesGetAsync (string name, double? fillingValue, double? maximumAllowedValue, double? minimumAllowedValue, int? durationOfAction, int? onsetDelay, string combinationOperation, int? updated, bool? causeOnly, int? _public, bool? outcome, string createdAt, string updatedAt, string imageUrl, int? defaultUnitId, int? limit, int? offset, string sort) + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// Image URL + /// ID of the default unit for the category + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of InlineResponse20027 + public async System.Threading.Tasks.Task VariableCategoriesGetAsync (string accessToken = null, string name = null, double? fillingValue = null, double? maximumAllowedValue = null, double? minimumAllowedValue = null, int? durationOfAction = null, int? onsetDelay = null, string combinationOperation = null, int? updated = null, bool? causeOnly = null, int? _public = null, bool? outcome = null, string createdAt = null, string updatedAt = null, string imageUrl = null, int? defaultUnitId = null, int? limit = null, int? offset = null, string sort = null) + { + ApiResponse response = await VariableCategoriesGetAsyncWithHttpInfo(accessToken, name, fillingValue, maximumAllowedValue, minimumAllowedValue, durationOfAction, onsetDelay, combinationOperation, updated, causeOnly, _public, outcome, createdAt, updatedAt, imageUrl, defaultUnitId, limit, offset, sort); + return response.Data; + + } + + /// + /// Get all VariableCategories The variable categories include Activity, Causes of Illness, Cognitive Performance, Conditions, Environment, Foods, Location, Miscellaneous, Mood, Nutrition, Physical Activity, Physique, Sleep, Social Interactions, Symptoms, Treatments, Vital Signs, and Work. + /// + /// User's OAuth2 access token + /// Name of the category + /// Value for replacing null measurements + /// Maximum recorded value of this category + /// Minimum recorded value of this category + /// Estimated number of seconds following the onset delay in which a stimulus produces a perceivable effect + /// Estimated number of seconds that pass before a stimulus produces a perceivable effect + /// How to combine values of this variable (for instance, to see a summary of the values over a month) SUM or MEAN + /// updated + /// A value of 1 indicates that this category is generally a cause in a causal relationship. An example of a causeOnly category would be a category such as Work which would generally not be influenced by the behaviour of the user + /// Is category public + /// outcome + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// Image URL + /// ID of the default unit for the category + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of ApiResponse (InlineResponse20027) + public async System.Threading.Tasks.Task> VariableCategoriesGetAsyncWithHttpInfo (string accessToken = null, string name = null, double? fillingValue = null, double? maximumAllowedValue = null, double? minimumAllowedValue = null, int? durationOfAction = null, int? onsetDelay = null, string combinationOperation = null, int? updated = null, bool? causeOnly = null, int? _public = null, bool? outcome = null, string createdAt = null, string updatedAt = null, string imageUrl = null, int? defaultUnitId = null, int? limit = null, int? offset = null, string sort = null) { @@ -328,54 +582,83 @@ public async System.Threading.Tasks.Task VariableCategories String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (name != null) queryParams.Add("name", ApiClient.ParameterToString(name)); // query parameter - if (fillingValue != null) queryParams.Add("filling_value", ApiClient.ParameterToString(fillingValue)); // query parameter - if (maximumAllowedValue != null) queryParams.Add("maximum_allowed_value", ApiClient.ParameterToString(maximumAllowedValue)); // query parameter - if (minimumAllowedValue != null) queryParams.Add("minimum_allowed_value", ApiClient.ParameterToString(minimumAllowedValue)); // query parameter - if (durationOfAction != null) queryParams.Add("duration_of_action", ApiClient.ParameterToString(durationOfAction)); // query parameter - if (onsetDelay != null) queryParams.Add("onset_delay", ApiClient.ParameterToString(onsetDelay)); // query parameter - if (combinationOperation != null) queryParams.Add("combination_operation", ApiClient.ParameterToString(combinationOperation)); // query parameter - if (updated != null) queryParams.Add("updated", ApiClient.ParameterToString(updated)); // query parameter - if (causeOnly != null) queryParams.Add("cause_only", ApiClient.ParameterToString(causeOnly)); // query parameter - if (_public != null) queryParams.Add("public", ApiClient.ParameterToString(_public)); // query parameter - if (outcome != null) queryParams.Add("outcome", ApiClient.ParameterToString(outcome)); // query parameter - if (createdAt != null) queryParams.Add("created_at", ApiClient.ParameterToString(createdAt)); // query parameter - if (updatedAt != null) queryParams.Add("updated_at", ApiClient.ParameterToString(updatedAt)); // query parameter - if (imageUrl != null) queryParams.Add("image_url", ApiClient.ParameterToString(imageUrl)); // query parameter - if (defaultUnitId != null) queryParams.Add("default_unit_id", ApiClient.ParameterToString(defaultUnitId)); // query parameter - if (limit != null) queryParams.Add("limit", ApiClient.ParameterToString(limit)); // query parameter - if (offset != null) queryParams.Add("offset", ApiClient.ParameterToString(offset)); // query parameter - if (sort != null) queryParams.Add("sort", ApiClient.ParameterToString(sort)); // query parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + if (name != null) queryParams.Add("name", Configuration.ApiClient.ParameterToString(name)); // query parameter + if (fillingValue != null) queryParams.Add("filling_value", Configuration.ApiClient.ParameterToString(fillingValue)); // query parameter + if (maximumAllowedValue != null) queryParams.Add("maximum_allowed_value", Configuration.ApiClient.ParameterToString(maximumAllowedValue)); // query parameter + if (minimumAllowedValue != null) queryParams.Add("minimum_allowed_value", Configuration.ApiClient.ParameterToString(minimumAllowedValue)); // query parameter + if (durationOfAction != null) queryParams.Add("duration_of_action", Configuration.ApiClient.ParameterToString(durationOfAction)); // query parameter + if (onsetDelay != null) queryParams.Add("onset_delay", Configuration.ApiClient.ParameterToString(onsetDelay)); // query parameter + if (combinationOperation != null) queryParams.Add("combination_operation", Configuration.ApiClient.ParameterToString(combinationOperation)); // query parameter + if (updated != null) queryParams.Add("updated", Configuration.ApiClient.ParameterToString(updated)); // query parameter + if (causeOnly != null) queryParams.Add("cause_only", Configuration.ApiClient.ParameterToString(causeOnly)); // query parameter + if (_public != null) queryParams.Add("public", Configuration.ApiClient.ParameterToString(_public)); // query parameter + if (outcome != null) queryParams.Add("outcome", Configuration.ApiClient.ParameterToString(outcome)); // query parameter + if (createdAt != null) queryParams.Add("created_at", Configuration.ApiClient.ParameterToString(createdAt)); // query parameter + if (updatedAt != null) queryParams.Add("updated_at", Configuration.ApiClient.ParameterToString(updatedAt)); // query parameter + if (imageUrl != null) queryParams.Add("image_url", Configuration.ApiClient.ParameterToString(imageUrl)); // query parameter + if (defaultUnitId != null) queryParams.Add("default_unit_id", Configuration.ApiClient.ParameterToString(defaultUnitId)); // query parameter + if (limit != null) queryParams.Add("limit", Configuration.ApiClient.ParameterToString(limit)); // query parameter + if (offset != null) queryParams.Add("offset", Configuration.ApiClient.ParameterToString(offset)); // query parameter + if (sort != null) queryParams.Add("sort", Configuration.ApiClient.ParameterToString(sort)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; - + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling VariableCategoriesGet: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling VariableCategoriesGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling VariableCategoriesGet: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse20023) ApiClient.Deserialize(response, typeof(InlineResponse20023)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20027) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20027))); + } /// /// Store VariableCategory Store VariableCategory /// + /// User's OAuth2 access token + /// VariableCategory that should be stored + /// InlineResponse20028 + public InlineResponse20028 VariableCategoriesPost (string accessToken = null, VariableCategory body = null) + { + ApiResponse response = VariableCategoriesPostWithHttpInfo(accessToken, body); + return response.Data; + } + + /// + /// Store VariableCategory Store VariableCategory + /// + /// User's OAuth2 access token /// VariableCategory that should be stored - /// InlineResponse20024 - public InlineResponse20024 VariableCategoriesPost (VariableCategory body) + /// ApiResponse of InlineResponse20028 + public ApiResponse< InlineResponse20028 > VariableCategoriesPostWithHttpInfo (string accessToken = null, VariableCategory body = null) { @@ -383,7 +666,7 @@ public InlineResponse20024 VariableCategoriesPost (VariableCategory body) var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -392,40 +675,67 @@ public InlineResponse20024 VariableCategoriesPost (VariableCategory body) String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - postBody = ApiClient.Serialize(body); // http body (model) parameter + postBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter + + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } - - // authentication setting, if any - String[] authSettings = new String[] { }; // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling VariableCategoriesPost: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling VariableCategoriesPost: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling VariableCategoriesPost: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling VariableCategoriesPost: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse20024) ApiClient.Deserialize(response, typeof(InlineResponse20024)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20028) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20028))); + } /// /// Store VariableCategory Store VariableCategory /// + /// User's OAuth2 access token + /// VariableCategory that should be stored + /// Task of InlineResponse20028 + public async System.Threading.Tasks.Task VariableCategoriesPostAsync (string accessToken = null, VariableCategory body = null) + { + ApiResponse response = await VariableCategoriesPostAsyncWithHttpInfo(accessToken, body); + return response.Data; + + } + + /// + /// Store VariableCategory Store VariableCategory + /// + /// User's OAuth2 access token /// VariableCategory that should be stored - /// InlineResponse20024 - public async System.Threading.Tasks.Task VariableCategoriesPostAsync (VariableCategory body) + /// Task of ApiResponse (InlineResponse20028) + public async System.Threading.Tasks.Task> VariableCategoriesPostAsyncWithHttpInfo (string accessToken = null, VariableCategory body = null) { @@ -442,37 +752,66 @@ public async System.Threading.Tasks.Task VariableCategories String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - postBody = ApiClient.Serialize(body); // http body (model) parameter + postBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; - + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling VariableCategoriesPost: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling VariableCategoriesPost: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling VariableCategoriesPost: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse20024) ApiClient.Deserialize(response, typeof(InlineResponse20024)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20028) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20028))); + } /// /// Get VariableCategory Get VariableCategory /// /// id of VariableCategory - /// InlineResponse20024 - public InlineResponse20024 VariableCategoriesIdGet (int? id) + /// User's OAuth2 access token + /// InlineResponse20028 + public InlineResponse20028 VariableCategoriesIdGet (int? id, string accessToken = null) + { + ApiResponse response = VariableCategoriesIdGetWithHttpInfo(id, accessToken); + return response.Data; + } + + /// + /// Get VariableCategory Get VariableCategory + /// + /// id of VariableCategory + /// User's OAuth2 access token + /// ApiResponse of InlineResponse20028 + public ApiResponse< InlineResponse20028 > VariableCategoriesIdGetWithHttpInfo (int? id, string accessToken = null) { // verify the required parameter 'id' is set @@ -483,7 +822,7 @@ public InlineResponse20024 VariableCategoriesIdGet (int? id) var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -492,40 +831,67 @@ public InlineResponse20024 VariableCategoriesIdGet (int? id) String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling VariableCategoriesIdGet: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling VariableCategoriesIdGet: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling VariableCategoriesIdGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling VariableCategoriesIdGet: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse20024) ApiClient.Deserialize(response, typeof(InlineResponse20024)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20028) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20028))); + } /// /// Get VariableCategory Get VariableCategory /// /// id of VariableCategory - /// InlineResponse20024 - public async System.Threading.Tasks.Task VariableCategoriesIdGetAsync (int? id) + /// User's OAuth2 access token + /// Task of InlineResponse20028 + public async System.Threading.Tasks.Task VariableCategoriesIdGetAsync (int? id, string accessToken = null) + { + ApiResponse response = await VariableCategoriesIdGetAsyncWithHttpInfo(id, accessToken); + return response.Data; + + } + + /// + /// Get VariableCategory Get VariableCategory + /// + /// id of VariableCategory + /// User's OAuth2 access token + /// Task of ApiResponse (InlineResponse20028) + public async System.Threading.Tasks.Task> VariableCategoriesIdGetAsyncWithHttpInfo (int? id, string accessToken = null) { // verify the required parameter 'id' is set if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling VariableCategoriesIdGet"); @@ -544,38 +910,68 @@ public async System.Threading.Tasks.Task VariableCategories String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; - + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling VariableCategoriesIdGet: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling VariableCategoriesIdGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling VariableCategoriesIdGet: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse20024) ApiClient.Deserialize(response, typeof(InlineResponse20024)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20028) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20028))); + } /// /// Update VariableCategory Update VariableCategory /// /// id of VariableCategory + /// User's OAuth2 access token + /// VariableCategory that should be updated + /// InlineResponse2002 + public InlineResponse2002 VariableCategoriesIdPut (int? id, string accessToken = null, VariableCategory body = null) + { + ApiResponse response = VariableCategoriesIdPutWithHttpInfo(id, accessToken, body); + return response.Data; + } + + /// + /// Update VariableCategory Update VariableCategory + /// + /// id of VariableCategory + /// User's OAuth2 access token /// VariableCategory that should be updated - /// InlineResponse2002 - public InlineResponse2002 VariableCategoriesIdPut (int? id, VariableCategory body) + /// ApiResponse of InlineResponse2002 + public ApiResponse< InlineResponse2002 > VariableCategoriesIdPutWithHttpInfo (int? id, string accessToken = null, VariableCategory body = null) { // verify the required parameter 'id' is set @@ -586,7 +982,7 @@ public InlineResponse2002 VariableCategoriesIdPut (int? id, VariableCategory bod var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -595,42 +991,70 @@ public InlineResponse2002 VariableCategoriesIdPut (int? id, VariableCategory bod String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - postBody = ApiClient.Serialize(body); // http body (model) parameter + postBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter + + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } - - // authentication setting, if any - String[] authSettings = new String[] { }; // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling VariableCategoriesIdPut: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling VariableCategoriesIdPut: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling VariableCategoriesIdPut: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling VariableCategoriesIdPut: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse2002) ApiClient.Deserialize(response, typeof(InlineResponse2002)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2002) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2002))); + } /// /// Update VariableCategory Update VariableCategory /// /// id of VariableCategory + /// User's OAuth2 access token /// VariableCategory that should be updated - /// InlineResponse2002 - public async System.Threading.Tasks.Task VariableCategoriesIdPutAsync (int? id, VariableCategory body) + /// Task of InlineResponse2002 + public async System.Threading.Tasks.Task VariableCategoriesIdPutAsync (int? id, string accessToken = null, VariableCategory body = null) + { + ApiResponse response = await VariableCategoriesIdPutAsyncWithHttpInfo(id, accessToken, body); + return response.Data; + + } + + /// + /// Update VariableCategory Update VariableCategory + /// + /// id of VariableCategory + /// User's OAuth2 access token + /// VariableCategory that should be updated + /// Task of ApiResponse (InlineResponse2002) + public async System.Threading.Tasks.Task> VariableCategoriesIdPutAsyncWithHttpInfo (int? id, string accessToken = null, VariableCategory body = null) { // verify the required parameter 'id' is set if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling VariableCategoriesIdPut"); @@ -649,38 +1073,67 @@ public async System.Threading.Tasks.Task VariableCategoriesI String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - postBody = ApiClient.Serialize(body); // http body (model) parameter + postBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; - + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling VariableCategoriesIdPut: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams); - return (InlineResponse2002) ApiClient.Deserialize(response, typeof(InlineResponse2002)); + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling VariableCategoriesIdPut: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling VariableCategoriesIdPut: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2002) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2002))); + } /// /// Delete VariableCategory Delete VariableCategory /// /// id of VariableCategory - /// InlineResponse2002 - public InlineResponse2002 VariableCategoriesIdDelete (int? id) + /// User's OAuth2 access token + /// InlineResponse2002 + public InlineResponse2002 VariableCategoriesIdDelete (int? id, string accessToken = null) + { + ApiResponse response = VariableCategoriesIdDeleteWithHttpInfo(id, accessToken); + return response.Data; + } + + /// + /// Delete VariableCategory Delete VariableCategory + /// + /// id of VariableCategory + /// User's OAuth2 access token + /// ApiResponse of InlineResponse2002 + public ApiResponse< InlineResponse2002 > VariableCategoriesIdDeleteWithHttpInfo (int? id, string accessToken = null) { // verify the required parameter 'id' is set @@ -691,7 +1144,7 @@ public InlineResponse2002 VariableCategoriesIdDelete (int? id) var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -700,40 +1153,67 @@ public InlineResponse2002 VariableCategoriesIdDelete (int? id) String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling VariableCategoriesIdDelete: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling VariableCategoriesIdDelete: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling VariableCategoriesIdDelete: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling VariableCategoriesIdDelete: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse2002) ApiClient.Deserialize(response, typeof(InlineResponse2002)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2002) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2002))); + } /// /// Delete VariableCategory Delete VariableCategory /// /// id of VariableCategory - /// InlineResponse2002 - public async System.Threading.Tasks.Task VariableCategoriesIdDeleteAsync (int? id) + /// User's OAuth2 access token + /// Task of InlineResponse2002 + public async System.Threading.Tasks.Task VariableCategoriesIdDeleteAsync (int? id, string accessToken = null) + { + ApiResponse response = await VariableCategoriesIdDeleteAsyncWithHttpInfo(id, accessToken); + return response.Data; + + } + + /// + /// Delete VariableCategory Delete VariableCategory + /// + /// id of VariableCategory + /// User's OAuth2 access token + /// Task of ApiResponse (InlineResponse2002) + public async System.Threading.Tasks.Task> VariableCategoriesIdDeleteAsyncWithHttpInfo (int? id, string accessToken = null) { // verify the required parameter 'id' is set if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling VariableCategoriesIdDelete"); @@ -752,29 +1232,45 @@ public async System.Threading.Tasks.Task VariableCategoriesI String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; - + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling VariableCategoriesIdDelete: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams); - return (InlineResponse2002) ApiClient.Deserialize(response, typeof(InlineResponse2002)); + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling VariableCategoriesIdDelete: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling VariableCategoriesIdDelete: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2002) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2002))); + } } diff --git a/src/main/csharp/io/swagger/Api/VariableUserSourceApi.cs b/src/main/csharp/io/swagger/Api/VariableUserSourceApi.cs index 8bada3c..a649ef2 100644 --- a/src/main/csharp/io/swagger/Api/VariableUserSourceApi.cs +++ b/src/main/csharp/io/swagger/Api/VariableUserSourceApi.cs @@ -1,6 +1,7 @@ using System; using System.IO; using System.Collections.Generic; +using System.Linq; using RestSharp; using IO.Swagger.Client; using IO.Swagger.Model; @@ -20,16 +21,19 @@ public interface IVariableUserSourceApi /// /// Get all VariableUserSources /// - /// variable_id - /// user_id - /// timestamp - /// created_at - /// updated_at - /// limit - /// offset - /// sort - /// InlineResponse20025 - InlineResponse20025 VariableUserSourcesGet (int? variableId, int? userId, int? timestamp, string createdAt, string updatedAt, int? limit, int? offset, string sort); + /// User's OAuth2 access token + /// ID of variable + /// ID of User + /// Time that this measurement occurred Uses epoch minute (epoch time divided by 60) + /// Earliest measurement time + /// Latest measurement time + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// InlineResponse20029 + InlineResponse20029 VariableUserSourcesGet (string accessToken = null, int? variableId = null, int? userId = null, int? timestamp = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); /// /// Get all VariableUserSources @@ -37,16 +41,59 @@ public interface IVariableUserSourceApi /// /// Get all VariableUserSources /// - /// variable_id - /// user_id - /// timestamp - /// created_at - /// updated_at - /// limit - /// offset - /// sort - /// InlineResponse20025 - System.Threading.Tasks.Task VariableUserSourcesGetAsync (int? variableId, int? userId, int? timestamp, string createdAt, string updatedAt, int? limit, int? offset, string sort); + /// User's OAuth2 access token + /// ID of variable + /// ID of User + /// Time that this measurement occurred Uses epoch minute (epoch time divided by 60) + /// Earliest measurement time + /// Latest measurement time + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// ApiResponse of InlineResponse20029 + ApiResponse VariableUserSourcesGetWithHttpInfo (string accessToken = null, int? variableId = null, int? userId = null, int? timestamp = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Get all VariableUserSources + /// + /// + /// Get all VariableUserSources + /// + /// User's OAuth2 access token + /// ID of variable + /// ID of User + /// Time that this measurement occurred Uses epoch minute (epoch time divided by 60) + /// Earliest measurement time + /// Latest measurement time + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of InlineResponse20029 + System.Threading.Tasks.Task VariableUserSourcesGetAsync (string accessToken = null, int? variableId = null, int? userId = null, int? timestamp = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Get all VariableUserSources + /// + /// + /// Get all VariableUserSources + /// + /// User's OAuth2 access token + /// ID of variable + /// ID of User + /// Time that this measurement occurred Uses epoch minute (epoch time divided by 60) + /// Earliest measurement time + /// Latest measurement time + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of ApiResponse (InlineResponse20029) + System.Threading.Tasks.Task> VariableUserSourcesGetAsyncWithHttpInfo (string accessToken = null, int? variableId = null, int? userId = null, int? timestamp = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); /// /// Store VariableUserSource @@ -54,9 +101,10 @@ public interface IVariableUserSourceApi /// /// Store VariableUserSource /// + /// User's OAuth2 access token /// VariableUserSource that should be stored - /// InlineResponse20026 - InlineResponse20026 VariableUserSourcesPost (VariableUserSource body); + /// InlineResponse20030 + InlineResponse20030 VariableUserSourcesPost (string accessToken = null, VariableUserSource body = null); /// /// Store VariableUserSource @@ -64,9 +112,32 @@ public interface IVariableUserSourceApi /// /// Store VariableUserSource /// + /// User's OAuth2 access token + /// VariableUserSource that should be stored + /// ApiResponse of InlineResponse20030 + ApiResponse VariableUserSourcesPostWithHttpInfo (string accessToken = null, VariableUserSource body = null); + + /// + /// Store VariableUserSource + /// + /// + /// Store VariableUserSource + /// + /// User's OAuth2 access token + /// VariableUserSource that should be stored + /// Task of InlineResponse20030 + System.Threading.Tasks.Task VariableUserSourcesPostAsync (string accessToken = null, VariableUserSource body = null); + + /// + /// Store VariableUserSource + /// + /// + /// Store VariableUserSource + /// + /// User's OAuth2 access token /// VariableUserSource that should be stored - /// InlineResponse20026 - System.Threading.Tasks.Task VariableUserSourcesPostAsync (VariableUserSource body); + /// Task of ApiResponse (InlineResponse20030) + System.Threading.Tasks.Task> VariableUserSourcesPostAsyncWithHttpInfo (string accessToken = null, VariableUserSource body = null); /// /// Get VariableUserSource @@ -76,8 +147,9 @@ public interface IVariableUserSourceApi /// /// id of VariableUserSource /// source id of VariableUserSource - /// InlineResponse20026 - InlineResponse20026 VariableUserSourcesIdGet (int? id, int? sourceId); + /// User's OAuth2 access token + /// InlineResponse20030 + InlineResponse20030 VariableUserSourcesIdGet (int? id, int? sourceId, string accessToken = null); /// /// Get VariableUserSource @@ -87,8 +159,33 @@ public interface IVariableUserSourceApi /// /// id of VariableUserSource /// source id of VariableUserSource - /// InlineResponse20026 - System.Threading.Tasks.Task VariableUserSourcesIdGetAsync (int? id, int? sourceId); + /// User's OAuth2 access token + /// ApiResponse of InlineResponse20030 + ApiResponse VariableUserSourcesIdGetWithHttpInfo (int? id, int? sourceId, string accessToken = null); + + /// + /// Get VariableUserSource + /// + /// + /// Get VariableUserSource + /// + /// id of VariableUserSource + /// source id of VariableUserSource + /// User's OAuth2 access token + /// Task of InlineResponse20030 + System.Threading.Tasks.Task VariableUserSourcesIdGetAsync (int? id, int? sourceId, string accessToken = null); + + /// + /// Get VariableUserSource + /// + /// + /// Get VariableUserSource + /// + /// id of VariableUserSource + /// source id of VariableUserSource + /// User's OAuth2 access token + /// Task of ApiResponse (InlineResponse20030) + System.Threading.Tasks.Task> VariableUserSourcesIdGetAsyncWithHttpInfo (int? id, int? sourceId, string accessToken = null); /// /// Update VariableUserSource @@ -98,9 +195,10 @@ public interface IVariableUserSourceApi /// /// variable_id of VariableUserSource /// source id of VariableUserSource + /// User's OAuth2 access token /// VariableUserSource that should be updated /// InlineResponse2002 - InlineResponse2002 VariableUserSourcesIdPut (int? id, int? sourceId, VariableUserSource body); + InlineResponse2002 VariableUserSourcesIdPut (int? id, int? sourceId, string accessToken = null, VariableUserSource body = null); /// /// Update VariableUserSource @@ -110,9 +208,36 @@ public interface IVariableUserSourceApi /// /// variable_id of VariableUserSource /// source id of VariableUserSource + /// User's OAuth2 access token /// VariableUserSource that should be updated - /// InlineResponse2002 - System.Threading.Tasks.Task VariableUserSourcesIdPutAsync (int? id, int? sourceId, VariableUserSource body); + /// ApiResponse of InlineResponse2002 + ApiResponse VariableUserSourcesIdPutWithHttpInfo (int? id, int? sourceId, string accessToken = null, VariableUserSource body = null); + + /// + /// Update VariableUserSource + /// + /// + /// Update VariableUserSource + /// + /// variable_id of VariableUserSource + /// source id of VariableUserSource + /// User's OAuth2 access token + /// VariableUserSource that should be updated + /// Task of InlineResponse2002 + System.Threading.Tasks.Task VariableUserSourcesIdPutAsync (int? id, int? sourceId, string accessToken = null, VariableUserSource body = null); + + /// + /// Update VariableUserSource + /// + /// + /// Update VariableUserSource + /// + /// variable_id of VariableUserSource + /// source id of VariableUserSource + /// User's OAuth2 access token + /// VariableUserSource that should be updated + /// Task of ApiResponse (InlineResponse2002) + System.Threading.Tasks.Task> VariableUserSourcesIdPutAsyncWithHttpInfo (int? id, int? sourceId, string accessToken = null, VariableUserSource body = null); /// /// Delete VariableUserSource @@ -122,8 +247,9 @@ public interface IVariableUserSourceApi /// /// variable_id of VariableUserSource /// source id of VariableUserSource + /// User's OAuth2 access token /// InlineResponse2002 - InlineResponse2002 VariableUserSourcesIdDelete (int? id, int? sourceId); + InlineResponse2002 VariableUserSourcesIdDelete (int? id, int? sourceId, string accessToken = null); /// /// Delete VariableUserSource @@ -133,8 +259,33 @@ public interface IVariableUserSourceApi /// /// variable_id of VariableUserSource /// source id of VariableUserSource - /// InlineResponse2002 - System.Threading.Tasks.Task VariableUserSourcesIdDeleteAsync (int? id, int? sourceId); + /// User's OAuth2 access token + /// ApiResponse of InlineResponse2002 + ApiResponse VariableUserSourcesIdDeleteWithHttpInfo (int? id, int? sourceId, string accessToken = null); + + /// + /// Delete VariableUserSource + /// + /// + /// Delete VariableUserSource + /// + /// variable_id of VariableUserSource + /// source id of VariableUserSource + /// User's OAuth2 access token + /// Task of InlineResponse2002 + System.Threading.Tasks.Task VariableUserSourcesIdDeleteAsync (int? id, int? sourceId, string accessToken = null); + + /// + /// Delete VariableUserSource + /// + /// + /// Delete VariableUserSource + /// + /// variable_id of VariableUserSource + /// source id of VariableUserSource + /// User's OAuth2 access token + /// Task of ApiResponse (InlineResponse2002) + System.Threading.Tasks.Task> VariableUserSourcesIdDeleteAsyncWithHttpInfo (int? id, int? sourceId, string accessToken = null); } @@ -146,64 +297,111 @@ public class VariableUserSourceApi : IVariableUserSourceApi /// /// Initializes a new instance of the class. /// - /// an instance of ApiClient (optional) /// - public VariableUserSourceApi(ApiClient apiClient = null) + public VariableUserSourceApi(String basePath) { - if (apiClient == null) // use the default one in Configuration - this.ApiClient = Configuration.DefaultApiClient; - else - this.ApiClient = apiClient; + this.Configuration = new Configuration(new ApiClient(basePath)); } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class + /// using Configuration object /// + /// An instance of Configuration /// - public VariableUserSourceApi(String basePath) + public VariableUserSourceApi(Configuration configuration = null) { - this.ApiClient = new ApiClient(basePath); + if (configuration == null) // use the default one in Configuration + this.Configuration = Configuration.Default; + else + this.Configuration = configuration; } - + + /// + /// Gets the base path of the API client. + /// + /// The base path + public String GetBasePath() + { + return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); + } + /// /// Sets the base path of the API client. /// - /// The base path /// The base path + [Obsolete("SetBasePath is deprecated, please do 'Configuraiton.ApiClient = new ApiClient(\"http://new-path\")' instead.")] public void SetBasePath(String basePath) { - this.ApiClient.BasePath = basePath; + // do nothing } /// - /// Gets the base path of the API client. + /// Gets or sets the configuration object /// - /// The base path - public String GetBasePath() + /// An instance of the Configuration + public Configuration Configuration {get; set;} + + /// + /// Gets the default header. + /// + /// Dictionary of HTTP header + [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] + public Dictionary DefaultHeader() { - return this.ApiClient.BasePath; + return this.Configuration.DefaultHeader; } - + /// - /// Gets or sets the API client. + /// Add default header. /// - /// An instance of the ApiClient - public ApiClient ApiClient {get; set;} - + /// Header field name. + /// Header field value. + /// + [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] + public void AddDefaultHeader(string key, string value) + { + this.Configuration.AddDefaultHeader(key, value); + } + /// /// Get all VariableUserSources Get all VariableUserSources /// - /// variable_id - /// user_id - /// timestamp - /// created_at - /// updated_at - /// limit - /// offset - /// sort - /// InlineResponse20025 - public InlineResponse20025 VariableUserSourcesGet (int? variableId, int? userId, int? timestamp, string createdAt, string updatedAt, int? limit, int? offset, string sort) + /// User's OAuth2 access token + /// ID of variable + /// ID of User + /// Time that this measurement occurred Uses epoch minute (epoch time divided by 60) + /// Earliest measurement time + /// Latest measurement time + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// InlineResponse20029 + public InlineResponse20029 VariableUserSourcesGet (string accessToken = null, int? variableId = null, int? userId = null, int? timestamp = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) + { + ApiResponse response = VariableUserSourcesGetWithHttpInfo(accessToken, variableId, userId, timestamp, earliestMeasurementTime, latestMeasurementTime, createdAt, updatedAt, limit, offset, sort); + return response.Data; + } + + /// + /// Get all VariableUserSources Get all VariableUserSources + /// + /// User's OAuth2 access token + /// ID of variable + /// ID of User + /// Time that this measurement occurred Uses epoch minute (epoch time divided by 60) + /// Earliest measurement time + /// Latest measurement time + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// ApiResponse of InlineResponse20029 + public ApiResponse< InlineResponse20029 > VariableUserSourcesGetWithHttpInfo (string accessToken = null, int? variableId = null, int? userId = null, int? timestamp = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) { @@ -211,7 +409,7 @@ public InlineResponse20025 VariableUserSourcesGet (int? variableId, int? userId, var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -220,54 +418,94 @@ public InlineResponse20025 VariableUserSourcesGet (int? variableId, int? userId, String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (variableId != null) queryParams.Add("variable_id", ApiClient.ParameterToString(variableId)); // query parameter - if (userId != null) queryParams.Add("user_id", ApiClient.ParameterToString(userId)); // query parameter - if (timestamp != null) queryParams.Add("timestamp", ApiClient.ParameterToString(timestamp)); // query parameter - if (createdAt != null) queryParams.Add("created_at", ApiClient.ParameterToString(createdAt)); // query parameter - if (updatedAt != null) queryParams.Add("updated_at", ApiClient.ParameterToString(updatedAt)); // query parameter - if (limit != null) queryParams.Add("limit", ApiClient.ParameterToString(limit)); // query parameter - if (offset != null) queryParams.Add("offset", ApiClient.ParameterToString(offset)); // query parameter - if (sort != null) queryParams.Add("sort", ApiClient.ParameterToString(sort)); // query parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + if (variableId != null) queryParams.Add("variable_id", Configuration.ApiClient.ParameterToString(variableId)); // query parameter + if (userId != null) queryParams.Add("user_id", Configuration.ApiClient.ParameterToString(userId)); // query parameter + if (timestamp != null) queryParams.Add("timestamp", Configuration.ApiClient.ParameterToString(timestamp)); // query parameter + if (earliestMeasurementTime != null) queryParams.Add("earliest_measurement_time", Configuration.ApiClient.ParameterToString(earliestMeasurementTime)); // query parameter + if (latestMeasurementTime != null) queryParams.Add("latest_measurement_time", Configuration.ApiClient.ParameterToString(latestMeasurementTime)); // query parameter + if (createdAt != null) queryParams.Add("created_at", Configuration.ApiClient.ParameterToString(createdAt)); // query parameter + if (updatedAt != null) queryParams.Add("updated_at", Configuration.ApiClient.ParameterToString(updatedAt)); // query parameter + if (limit != null) queryParams.Add("limit", Configuration.ApiClient.ParameterToString(limit)); // query parameter + if (offset != null) queryParams.Add("offset", Configuration.ApiClient.ParameterToString(offset)); // query parameter + if (sort != null) queryParams.Add("sort", Configuration.ApiClient.ParameterToString(sort)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling VariableUserSourcesGet: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling VariableUserSourcesGet: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling VariableUserSourcesGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling VariableUserSourcesGet: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse20025) ApiClient.Deserialize(response, typeof(InlineResponse20025)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20029) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20029))); + } /// /// Get all VariableUserSources Get all VariableUserSources /// - /// variable_id - /// user_id - /// timestamp - /// created_at - /// updated_at - /// limit - /// offset - /// sort - /// InlineResponse20025 - public async System.Threading.Tasks.Task VariableUserSourcesGetAsync (int? variableId, int? userId, int? timestamp, string createdAt, string updatedAt, int? limit, int? offset, string sort) + /// User's OAuth2 access token + /// ID of variable + /// ID of User + /// Time that this measurement occurred Uses epoch minute (epoch time divided by 60) + /// Earliest measurement time + /// Latest measurement time + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of InlineResponse20029 + public async System.Threading.Tasks.Task VariableUserSourcesGetAsync (string accessToken = null, int? variableId = null, int? userId = null, int? timestamp = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) + { + ApiResponse response = await VariableUserSourcesGetAsyncWithHttpInfo(accessToken, variableId, userId, timestamp, earliestMeasurementTime, latestMeasurementTime, createdAt, updatedAt, limit, offset, sort); + return response.Data; + + } + + /// + /// Get all VariableUserSources Get all VariableUserSources + /// + /// User's OAuth2 access token + /// ID of variable + /// ID of User + /// Time that this measurement occurred Uses epoch minute (epoch time divided by 60) + /// Earliest measurement time + /// Latest measurement time + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of ApiResponse (InlineResponse20029) + public async System.Threading.Tasks.Task> VariableUserSourcesGetAsyncWithHttpInfo (string accessToken = null, int? variableId = null, int? userId = null, int? timestamp = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) { @@ -284,44 +522,75 @@ public async System.Threading.Tasks.Task VariableUserSource String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (variableId != null) queryParams.Add("variable_id", ApiClient.ParameterToString(variableId)); // query parameter - if (userId != null) queryParams.Add("user_id", ApiClient.ParameterToString(userId)); // query parameter - if (timestamp != null) queryParams.Add("timestamp", ApiClient.ParameterToString(timestamp)); // query parameter - if (createdAt != null) queryParams.Add("created_at", ApiClient.ParameterToString(createdAt)); // query parameter - if (updatedAt != null) queryParams.Add("updated_at", ApiClient.ParameterToString(updatedAt)); // query parameter - if (limit != null) queryParams.Add("limit", ApiClient.ParameterToString(limit)); // query parameter - if (offset != null) queryParams.Add("offset", ApiClient.ParameterToString(offset)); // query parameter - if (sort != null) queryParams.Add("sort", ApiClient.ParameterToString(sort)); // query parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + if (variableId != null) queryParams.Add("variable_id", Configuration.ApiClient.ParameterToString(variableId)); // query parameter + if (userId != null) queryParams.Add("user_id", Configuration.ApiClient.ParameterToString(userId)); // query parameter + if (timestamp != null) queryParams.Add("timestamp", Configuration.ApiClient.ParameterToString(timestamp)); // query parameter + if (earliestMeasurementTime != null) queryParams.Add("earliest_measurement_time", Configuration.ApiClient.ParameterToString(earliestMeasurementTime)); // query parameter + if (latestMeasurementTime != null) queryParams.Add("latest_measurement_time", Configuration.ApiClient.ParameterToString(latestMeasurementTime)); // query parameter + if (createdAt != null) queryParams.Add("created_at", Configuration.ApiClient.ParameterToString(createdAt)); // query parameter + if (updatedAt != null) queryParams.Add("updated_at", Configuration.ApiClient.ParameterToString(updatedAt)); // query parameter + if (limit != null) queryParams.Add("limit", Configuration.ApiClient.ParameterToString(limit)); // query parameter + if (offset != null) queryParams.Add("offset", Configuration.ApiClient.ParameterToString(offset)); // query parameter + if (sort != null) queryParams.Add("sort", Configuration.ApiClient.ParameterToString(sort)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; - + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling VariableUserSourcesGet: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); - return (InlineResponse20025) ApiClient.Deserialize(response, typeof(InlineResponse20025)); + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling VariableUserSourcesGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling VariableUserSourcesGet: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20029) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20029))); + } /// /// Store VariableUserSource Store VariableUserSource /// + /// User's OAuth2 access token + /// VariableUserSource that should be stored + /// InlineResponse20030 + public InlineResponse20030 VariableUserSourcesPost (string accessToken = null, VariableUserSource body = null) + { + ApiResponse response = VariableUserSourcesPostWithHttpInfo(accessToken, body); + return response.Data; + } + + /// + /// Store VariableUserSource Store VariableUserSource + /// + /// User's OAuth2 access token /// VariableUserSource that should be stored - /// InlineResponse20026 - public InlineResponse20026 VariableUserSourcesPost (VariableUserSource body) + /// ApiResponse of InlineResponse20030 + public ApiResponse< InlineResponse20030 > VariableUserSourcesPostWithHttpInfo (string accessToken = null, VariableUserSource body = null) { @@ -329,7 +598,7 @@ public InlineResponse20026 VariableUserSourcesPost (VariableUserSource body) var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -338,40 +607,67 @@ public InlineResponse20026 VariableUserSourcesPost (VariableUserSource body) String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - postBody = ApiClient.Serialize(body); // http body (model) parameter + postBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter + + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } - - // authentication setting, if any - String[] authSettings = new String[] { }; // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling VariableUserSourcesPost: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling VariableUserSourcesPost: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling VariableUserSourcesPost: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling VariableUserSourcesPost: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse20026) ApiClient.Deserialize(response, typeof(InlineResponse20026)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20030) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20030))); + } /// /// Store VariableUserSource Store VariableUserSource /// + /// User's OAuth2 access token + /// VariableUserSource that should be stored + /// Task of InlineResponse20030 + public async System.Threading.Tasks.Task VariableUserSourcesPostAsync (string accessToken = null, VariableUserSource body = null) + { + ApiResponse response = await VariableUserSourcesPostAsyncWithHttpInfo(accessToken, body); + return response.Data; + + } + + /// + /// Store VariableUserSource Store VariableUserSource + /// + /// User's OAuth2 access token /// VariableUserSource that should be stored - /// InlineResponse20026 - public async System.Threading.Tasks.Task VariableUserSourcesPostAsync (VariableUserSource body) + /// Task of ApiResponse (InlineResponse20030) + public async System.Threading.Tasks.Task> VariableUserSourcesPostAsyncWithHttpInfo (string accessToken = null, VariableUserSource body = null) { @@ -388,29 +684,45 @@ public async System.Threading.Tasks.Task VariableUserSource String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - postBody = ApiClient.Serialize(body); // http body (model) parameter + postBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; - + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling VariableUserSourcesPost: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams); - return (InlineResponse20026) ApiClient.Deserialize(response, typeof(InlineResponse20026)); + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling VariableUserSourcesPost: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling VariableUserSourcesPost: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20030) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20030))); + } /// @@ -418,8 +730,22 @@ public async System.Threading.Tasks.Task VariableUserSource /// /// id of VariableUserSource /// source id of VariableUserSource - /// InlineResponse20026 - public InlineResponse20026 VariableUserSourcesIdGet (int? id, int? sourceId) + /// User's OAuth2 access token + /// InlineResponse20030 + public InlineResponse20030 VariableUserSourcesIdGet (int? id, int? sourceId, string accessToken = null) + { + ApiResponse response = VariableUserSourcesIdGetWithHttpInfo(id, sourceId, accessToken); + return response.Data; + } + + /// + /// Get VariableUserSource Get VariableUserSource + /// + /// id of VariableUserSource + /// source id of VariableUserSource + /// User's OAuth2 access token + /// ApiResponse of InlineResponse20030 + public ApiResponse< InlineResponse20030 > VariableUserSourcesIdGetWithHttpInfo (int? id, int? sourceId, string accessToken = null) { // verify the required parameter 'id' is set @@ -433,7 +759,7 @@ public InlineResponse20026 VariableUserSourcesIdGet (int? id, int? sourceId) var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -442,33 +768,46 @@ public InlineResponse20026 VariableUserSourcesIdGet (int? id, int? sourceId) String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter - if (sourceId != null) queryParams.Add("source_id", ApiClient.ParameterToString(sourceId)); // query parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + if (sourceId != null) queryParams.Add("source_id", Configuration.ApiClient.ParameterToString(sourceId)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling VariableUserSourcesIdGet: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling VariableUserSourcesIdGet: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling VariableUserSourcesIdGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling VariableUserSourcesIdGet: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse20026) ApiClient.Deserialize(response, typeof(InlineResponse20026)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20030) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20030))); + } /// @@ -476,8 +815,23 @@ public InlineResponse20026 VariableUserSourcesIdGet (int? id, int? sourceId) /// /// id of VariableUserSource /// source id of VariableUserSource - /// InlineResponse20026 - public async System.Threading.Tasks.Task VariableUserSourcesIdGetAsync (int? id, int? sourceId) + /// User's OAuth2 access token + /// Task of InlineResponse20030 + public async System.Threading.Tasks.Task VariableUserSourcesIdGetAsync (int? id, int? sourceId, string accessToken = null) + { + ApiResponse response = await VariableUserSourcesIdGetAsyncWithHttpInfo(id, sourceId, accessToken); + return response.Data; + + } + + /// + /// Get VariableUserSource Get VariableUserSource + /// + /// id of VariableUserSource + /// source id of VariableUserSource + /// User's OAuth2 access token + /// Task of ApiResponse (InlineResponse20030) + public async System.Threading.Tasks.Task> VariableUserSourcesIdGetAsyncWithHttpInfo (int? id, int? sourceId, string accessToken = null) { // verify the required parameter 'id' is set if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling VariableUserSourcesIdGet"); @@ -498,30 +852,46 @@ public async System.Threading.Tasks.Task VariableUserSource String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter - if (sourceId != null) queryParams.Add("source_id", ApiClient.ParameterToString(sourceId)); // query parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + if (sourceId != null) queryParams.Add("source_id", Configuration.ApiClient.ParameterToString(sourceId)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; - + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling VariableUserSourcesIdGet: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling VariableUserSourcesIdGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling VariableUserSourcesIdGet: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse20026) ApiClient.Deserialize(response, typeof(InlineResponse20026)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20030) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20030))); + } /// @@ -529,9 +899,24 @@ public async System.Threading.Tasks.Task VariableUserSource /// /// variable_id of VariableUserSource /// source id of VariableUserSource + /// User's OAuth2 access token + /// VariableUserSource that should be updated + /// InlineResponse2002 + public InlineResponse2002 VariableUserSourcesIdPut (int? id, int? sourceId, string accessToken = null, VariableUserSource body = null) + { + ApiResponse response = VariableUserSourcesIdPutWithHttpInfo(id, sourceId, accessToken, body); + return response.Data; + } + + /// + /// Update VariableUserSource Update VariableUserSource + /// + /// variable_id of VariableUserSource + /// source id of VariableUserSource + /// User's OAuth2 access token /// VariableUserSource that should be updated - /// InlineResponse2002 - public InlineResponse2002 VariableUserSourcesIdPut (int? id, int? sourceId, VariableUserSource body) + /// ApiResponse of InlineResponse2002 + public ApiResponse< InlineResponse2002 > VariableUserSourcesIdPutWithHttpInfo (int? id, int? sourceId, string accessToken = null, VariableUserSource body = null) { // verify the required parameter 'id' is set @@ -545,7 +930,7 @@ public InlineResponse2002 VariableUserSourcesIdPut (int? id, int? sourceId, Vari var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -554,34 +939,47 @@ public InlineResponse2002 VariableUserSourcesIdPut (int? id, int? sourceId, Vari String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter - if (sourceId != null) queryParams.Add("source_id", ApiClient.ParameterToString(sourceId)); // query parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + if (sourceId != null) queryParams.Add("source_id", Configuration.ApiClient.ParameterToString(sourceId)); // query parameter - postBody = ApiClient.Serialize(body); // http body (model) parameter + postBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter + + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } - - // authentication setting, if any - String[] authSettings = new String[] { }; // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling VariableUserSourcesIdPut: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling VariableUserSourcesIdPut: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling VariableUserSourcesIdPut: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling VariableUserSourcesIdPut: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse2002) ApiClient.Deserialize(response, typeof(InlineResponse2002)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2002) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2002))); + } /// @@ -589,9 +987,25 @@ public InlineResponse2002 VariableUserSourcesIdPut (int? id, int? sourceId, Vari /// /// variable_id of VariableUserSource /// source id of VariableUserSource + /// User's OAuth2 access token /// VariableUserSource that should be updated - /// InlineResponse2002 - public async System.Threading.Tasks.Task VariableUserSourcesIdPutAsync (int? id, int? sourceId, VariableUserSource body) + /// Task of InlineResponse2002 + public async System.Threading.Tasks.Task VariableUserSourcesIdPutAsync (int? id, int? sourceId, string accessToken = null, VariableUserSource body = null) + { + ApiResponse response = await VariableUserSourcesIdPutAsyncWithHttpInfo(id, sourceId, accessToken, body); + return response.Data; + + } + + /// + /// Update VariableUserSource Update VariableUserSource + /// + /// variable_id of VariableUserSource + /// source id of VariableUserSource + /// User's OAuth2 access token + /// VariableUserSource that should be updated + /// Task of ApiResponse (InlineResponse2002) + public async System.Threading.Tasks.Task> VariableUserSourcesIdPutAsyncWithHttpInfo (int? id, int? sourceId, string accessToken = null, VariableUserSource body = null) { // verify the required parameter 'id' is set if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling VariableUserSourcesIdPut"); @@ -612,31 +1026,47 @@ public async System.Threading.Tasks.Task VariableUserSources String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter - if (sourceId != null) queryParams.Add("source_id", ApiClient.ParameterToString(sourceId)); // query parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + if (sourceId != null) queryParams.Add("source_id", Configuration.ApiClient.ParameterToString(sourceId)); // query parameter - postBody = ApiClient.Serialize(body); // http body (model) parameter + postBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; - + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling VariableUserSourcesIdPut: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling VariableUserSourcesIdPut: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling VariableUserSourcesIdPut: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse2002) ApiClient.Deserialize(response, typeof(InlineResponse2002)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2002) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2002))); + } /// @@ -644,8 +1074,22 @@ public async System.Threading.Tasks.Task VariableUserSources /// /// variable_id of VariableUserSource /// source id of VariableUserSource - /// InlineResponse2002 - public InlineResponse2002 VariableUserSourcesIdDelete (int? id, int? sourceId) + /// User's OAuth2 access token + /// InlineResponse2002 + public InlineResponse2002 VariableUserSourcesIdDelete (int? id, int? sourceId, string accessToken = null) + { + ApiResponse response = VariableUserSourcesIdDeleteWithHttpInfo(id, sourceId, accessToken); + return response.Data; + } + + /// + /// Delete VariableUserSource Delete VariableUserSource + /// + /// variable_id of VariableUserSource + /// source id of VariableUserSource + /// User's OAuth2 access token + /// ApiResponse of InlineResponse2002 + public ApiResponse< InlineResponse2002 > VariableUserSourcesIdDeleteWithHttpInfo (int? id, int? sourceId, string accessToken = null) { // verify the required parameter 'id' is set @@ -659,7 +1103,7 @@ public InlineResponse2002 VariableUserSourcesIdDelete (int? id, int? sourceId) var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -668,33 +1112,46 @@ public InlineResponse2002 VariableUserSourcesIdDelete (int? id, int? sourceId) String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter - if (sourceId != null) queryParams.Add("source_id", ApiClient.ParameterToString(sourceId)); // query parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + if (sourceId != null) queryParams.Add("source_id", Configuration.ApiClient.ParameterToString(sourceId)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling VariableUserSourcesIdDelete: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling VariableUserSourcesIdDelete: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling VariableUserSourcesIdDelete: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling VariableUserSourcesIdDelete: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse2002) ApiClient.Deserialize(response, typeof(InlineResponse2002)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2002) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2002))); + } /// @@ -702,8 +1159,23 @@ public InlineResponse2002 VariableUserSourcesIdDelete (int? id, int? sourceId) /// /// variable_id of VariableUserSource /// source id of VariableUserSource - /// InlineResponse2002 - public async System.Threading.Tasks.Task VariableUserSourcesIdDeleteAsync (int? id, int? sourceId) + /// User's OAuth2 access token + /// Task of InlineResponse2002 + public async System.Threading.Tasks.Task VariableUserSourcesIdDeleteAsync (int? id, int? sourceId, string accessToken = null) + { + ApiResponse response = await VariableUserSourcesIdDeleteAsyncWithHttpInfo(id, sourceId, accessToken); + return response.Data; + + } + + /// + /// Delete VariableUserSource Delete VariableUserSource + /// + /// variable_id of VariableUserSource + /// source id of VariableUserSource + /// User's OAuth2 access token + /// Task of ApiResponse (InlineResponse2002) + public async System.Threading.Tasks.Task> VariableUserSourcesIdDeleteAsyncWithHttpInfo (int? id, int? sourceId, string accessToken = null) { // verify the required parameter 'id' is set if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling VariableUserSourcesIdDelete"); @@ -724,30 +1196,46 @@ public async System.Threading.Tasks.Task VariableUserSources String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter - if (sourceId != null) queryParams.Add("source_id", ApiClient.ParameterToString(sourceId)); // query parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + if (sourceId != null) queryParams.Add("source_id", Configuration.ApiClient.ParameterToString(sourceId)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; - + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling VariableUserSourcesIdDelete: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams); - return (InlineResponse2002) ApiClient.Deserialize(response, typeof(InlineResponse2002)); + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling VariableUserSourcesIdDelete: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling VariableUserSourcesIdDelete: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2002) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2002))); + } } diff --git a/src/main/csharp/io/swagger/Api/VoteApi.cs b/src/main/csharp/io/swagger/Api/VoteApi.cs index 5bac5bf..b091563 100644 --- a/src/main/csharp/io/swagger/Api/VoteApi.cs +++ b/src/main/csharp/io/swagger/Api/VoteApi.cs @@ -1,6 +1,7 @@ using System; using System.IO; using System.Collections.Generic; +using System.Linq; using RestSharp; using IO.Swagger.Client; using IO.Swagger.Model; @@ -20,18 +21,19 @@ public interface IVoteApi /// /// Get all Votes /// - /// client_id - /// user_id - /// cause_id - /// effect_id - /// value - /// created_at - /// updated_at - /// limit - /// offset - /// sort - /// InlineResponse20029 - InlineResponse20029 VotesGet (string clientId, int? userId, int? causeId, int? effectId, int? value, string createdAt, string updatedAt, int? limit, int? offset, string sort); + /// User's OAuth2 access token + /// The ID of the client application which last created or updated this vote + /// ID of the user who voted + /// ID of predictor variable + /// ID of outcome variable + /// Value of Vote. 1 is for upvote. 0 is for downvote. Otherwise, there is no vote. + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// InlineResponse20033 + InlineResponse20033 VotesGet (string accessToken = null, string clientId = null, int? userId = null, int? causeId = null, int? effectId = null, int? value = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); /// /// Get all Votes @@ -39,38 +41,103 @@ public interface IVoteApi /// /// Get all Votes /// - /// client_id - /// user_id - /// cause_id - /// effect_id - /// value - /// created_at - /// updated_at - /// limit - /// offset - /// sort - /// InlineResponse20029 - System.Threading.Tasks.Task VotesGetAsync (string clientId, int? userId, int? causeId, int? effectId, int? value, string createdAt, string updatedAt, int? limit, int? offset, string sort); + /// User's OAuth2 access token + /// The ID of the client application which last created or updated this vote + /// ID of the user who voted + /// ID of predictor variable + /// ID of outcome variable + /// Value of Vote. 1 is for upvote. 0 is for downvote. Otherwise, there is no vote. + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// ApiResponse of InlineResponse20033 + ApiResponse VotesGetWithHttpInfo (string accessToken = null, string clientId = null, int? userId = null, int? causeId = null, int? effectId = null, int? value = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Get all Votes + /// + /// + /// Get all Votes + /// + /// User's OAuth2 access token + /// The ID of the client application which last created or updated this vote + /// ID of the user who voted + /// ID of predictor variable + /// ID of outcome variable + /// Value of Vote. 1 is for upvote. 0 is for downvote. Otherwise, there is no vote. + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of InlineResponse20033 + System.Threading.Tasks.Task VotesGetAsync (string accessToken = null, string clientId = null, int? userId = null, int? causeId = null, int? effectId = null, int? value = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Get all Votes + /// + /// + /// Get all Votes + /// + /// User's OAuth2 access token + /// The ID of the client application which last created or updated this vote + /// ID of the user who voted + /// ID of predictor variable + /// ID of outcome variable + /// Value of Vote. 1 is for upvote. 0 is for downvote. Otherwise, there is no vote. + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of ApiResponse (InlineResponse20033) + System.Threading.Tasks.Task> VotesGetAsyncWithHttpInfo (string accessToken = null, string clientId = null, int? userId = null, int? causeId = null, int? effectId = null, int? value = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); /// /// Store Vote /// /// - /// Store Vote + /// This is to enable users to indicate their opinion on the plausibility of a causal relationship between a treatment and outcome. QuantiModo incorporates crowd-sourced plausibility estimations into their algorithm. This is done allowing user to indicate their view of the plausibility of each relationship with thumbs up/down buttons placed next to each prediction. /// + /// User's OAuth2 access token /// Vote that should be stored - /// InlineResponse20030 - InlineResponse20030 VotesPost (Vote body); + /// InlineResponse20034 + InlineResponse20034 VotesPost (string accessToken = null, Vote body = null); /// /// Store Vote /// /// + /// This is to enable users to indicate their opinion on the plausibility of a causal relationship between a treatment and outcome. QuantiModo incorporates crowd-sourced plausibility estimations into their algorithm. This is done allowing user to indicate their view of the plausibility of each relationship with thumbs up/down buttons placed next to each prediction. + /// + /// User's OAuth2 access token + /// Vote that should be stored + /// ApiResponse of InlineResponse20034 + ApiResponse VotesPostWithHttpInfo (string accessToken = null, Vote body = null); + + /// + /// Store Vote + /// + /// + /// This is to enable users to indicate their opinion on the plausibility of a causal relationship between a treatment and outcome. QuantiModo incorporates crowd-sourced plausibility estimations into their algorithm. This is done allowing user to indicate their view of the plausibility of each relationship with thumbs up/down buttons placed next to each prediction. + /// + /// User's OAuth2 access token + /// Vote that should be stored + /// Task of InlineResponse20034 + System.Threading.Tasks.Task VotesPostAsync (string accessToken = null, Vote body = null); + + /// /// Store Vote + /// + /// + /// This is to enable users to indicate their opinion on the plausibility of a causal relationship between a treatment and outcome. QuantiModo incorporates crowd-sourced plausibility estimations into their algorithm. This is done allowing user to indicate their view of the plausibility of each relationship with thumbs up/down buttons placed next to each prediction. /// + /// User's OAuth2 access token /// Vote that should be stored - /// InlineResponse20030 - System.Threading.Tasks.Task VotesPostAsync (Vote body); + /// Task of ApiResponse (InlineResponse20034) + System.Threading.Tasks.Task> VotesPostAsyncWithHttpInfo (string accessToken = null, Vote body = null); /// /// Get Vote @@ -79,8 +146,9 @@ public interface IVoteApi /// Get Vote /// /// id of Vote - /// InlineResponse20030 - InlineResponse20030 VotesIdGet (int? id); + /// User's OAuth2 access token + /// InlineResponse20034 + InlineResponse20034 VotesIdGet (int? id, string accessToken = null); /// /// Get Vote @@ -89,8 +157,31 @@ public interface IVoteApi /// Get Vote /// /// id of Vote - /// InlineResponse20030 - System.Threading.Tasks.Task VotesIdGetAsync (int? id); + /// User's OAuth2 access token + /// ApiResponse of InlineResponse20034 + ApiResponse VotesIdGetWithHttpInfo (int? id, string accessToken = null); + + /// + /// Get Vote + /// + /// + /// Get Vote + /// + /// id of Vote + /// User's OAuth2 access token + /// Task of InlineResponse20034 + System.Threading.Tasks.Task VotesIdGetAsync (int? id, string accessToken = null); + + /// + /// Get Vote + /// + /// + /// Get Vote + /// + /// id of Vote + /// User's OAuth2 access token + /// Task of ApiResponse (InlineResponse20034) + System.Threading.Tasks.Task> VotesIdGetAsyncWithHttpInfo (int? id, string accessToken = null); /// /// Update Vote @@ -99,9 +190,10 @@ public interface IVoteApi /// Update Vote /// /// id of Vote + /// User's OAuth2 access token /// Vote that should be updated /// InlineResponse2002 - InlineResponse2002 VotesIdPut (int? id, Vote body); + InlineResponse2002 VotesIdPut (int? id, string accessToken = null, Vote body = null); /// /// Update Vote @@ -110,29 +202,78 @@ public interface IVoteApi /// Update Vote /// /// id of Vote + /// User's OAuth2 access token /// Vote that should be updated - /// InlineResponse2002 - System.Threading.Tasks.Task VotesIdPutAsync (int? id, Vote body); + /// ApiResponse of InlineResponse2002 + ApiResponse VotesIdPutWithHttpInfo (int? id, string accessToken = null, Vote body = null); + + /// + /// Update Vote + /// + /// + /// Update Vote + /// + /// id of Vote + /// User's OAuth2 access token + /// Vote that should be updated + /// Task of InlineResponse2002 + System.Threading.Tasks.Task VotesIdPutAsync (int? id, string accessToken = null, Vote body = null); + + /// + /// Update Vote + /// + /// + /// Update Vote + /// + /// id of Vote + /// User's OAuth2 access token + /// Vote that should be updated + /// Task of ApiResponse (InlineResponse2002) + System.Threading.Tasks.Task> VotesIdPutAsyncWithHttpInfo (int? id, string accessToken = null, Vote body = null); /// /// Delete Vote /// /// - /// Delete Vote + /// Delete previously posted vote /// /// id of Vote + /// User's OAuth2 access token /// InlineResponse2002 - InlineResponse2002 VotesIdDelete (int? id); + InlineResponse2002 VotesIdDelete (int? id, string accessToken = null); /// /// Delete Vote /// /// + /// Delete previously posted vote + /// + /// id of Vote + /// User's OAuth2 access token + /// ApiResponse of InlineResponse2002 + ApiResponse VotesIdDeleteWithHttpInfo (int? id, string accessToken = null); + + /// /// Delete Vote + /// + /// + /// Delete previously posted vote /// /// id of Vote - /// InlineResponse2002 - System.Threading.Tasks.Task VotesIdDeleteAsync (int? id); + /// User's OAuth2 access token + /// Task of InlineResponse2002 + System.Threading.Tasks.Task VotesIdDeleteAsync (int? id, string accessToken = null); + + /// + /// Delete Vote + /// + /// + /// Delete previously posted vote + /// + /// id of Vote + /// User's OAuth2 access token + /// Task of ApiResponse (InlineResponse2002) + System.Threading.Tasks.Task> VotesIdDeleteAsyncWithHttpInfo (int? id, string accessToken = null); } @@ -144,66 +285,111 @@ public class VoteApi : IVoteApi /// /// Initializes a new instance of the class. /// - /// an instance of ApiClient (optional) /// - public VoteApi(ApiClient apiClient = null) + public VoteApi(String basePath) { - if (apiClient == null) // use the default one in Configuration - this.ApiClient = Configuration.DefaultApiClient; - else - this.ApiClient = apiClient; + this.Configuration = new Configuration(new ApiClient(basePath)); } /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class + /// using Configuration object /// + /// An instance of Configuration /// - public VoteApi(String basePath) + public VoteApi(Configuration configuration = null) { - this.ApiClient = new ApiClient(basePath); + if (configuration == null) // use the default one in Configuration + this.Configuration = Configuration.Default; + else + this.Configuration = configuration; } - + + /// + /// Gets the base path of the API client. + /// + /// The base path + public String GetBasePath() + { + return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); + } + /// /// Sets the base path of the API client. /// - /// The base path /// The base path + [Obsolete("SetBasePath is deprecated, please do 'Configuraiton.ApiClient = new ApiClient(\"http://new-path\")' instead.")] public void SetBasePath(String basePath) { - this.ApiClient.BasePath = basePath; + // do nothing } /// - /// Gets the base path of the API client. + /// Gets or sets the configuration object /// - /// The base path - public String GetBasePath() + /// An instance of the Configuration + public Configuration Configuration {get; set;} + + /// + /// Gets the default header. + /// + /// Dictionary of HTTP header + [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] + public Dictionary DefaultHeader() { - return this.ApiClient.BasePath; + return this.Configuration.DefaultHeader; } - + /// - /// Gets or sets the API client. + /// Add default header. /// - /// An instance of the ApiClient - public ApiClient ApiClient {get; set;} - + /// Header field name. + /// Header field value. + /// + [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] + public void AddDefaultHeader(string key, string value) + { + this.Configuration.AddDefaultHeader(key, value); + } + /// /// Get all Votes Get all Votes /// - /// client_id - /// user_id - /// cause_id - /// effect_id - /// value - /// created_at - /// updated_at - /// limit - /// offset - /// sort - /// InlineResponse20029 - public InlineResponse20029 VotesGet (string clientId, int? userId, int? causeId, int? effectId, int? value, string createdAt, string updatedAt, int? limit, int? offset, string sort) + /// User's OAuth2 access token + /// The ID of the client application which last created or updated this vote + /// ID of the user who voted + /// ID of predictor variable + /// ID of outcome variable + /// Value of Vote. 1 is for upvote. 0 is for downvote. Otherwise, there is no vote. + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// InlineResponse20033 + public InlineResponse20033 VotesGet (string accessToken = null, string clientId = null, int? userId = null, int? causeId = null, int? effectId = null, int? value = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) + { + ApiResponse response = VotesGetWithHttpInfo(accessToken, clientId, userId, causeId, effectId, value, createdAt, updatedAt, limit, offset, sort); + return response.Data; + } + + /// + /// Get all Votes Get all Votes + /// + /// User's OAuth2 access token + /// The ID of the client application which last created or updated this vote + /// ID of the user who voted + /// ID of predictor variable + /// ID of outcome variable + /// Value of Vote. 1 is for upvote. 0 is for downvote. Otherwise, there is no vote. + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// ApiResponse of InlineResponse20033 + public ApiResponse< InlineResponse20033 > VotesGetWithHttpInfo (string accessToken = null, string clientId = null, int? userId = null, int? causeId = null, int? effectId = null, int? value = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) { @@ -211,7 +397,7 @@ public InlineResponse20029 VotesGet (string clientId, int? userId, int? causeId, var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -220,58 +406,94 @@ public InlineResponse20029 VotesGet (string clientId, int? userId, int? causeId, String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (clientId != null) queryParams.Add("client_id", ApiClient.ParameterToString(clientId)); // query parameter - if (userId != null) queryParams.Add("user_id", ApiClient.ParameterToString(userId)); // query parameter - if (causeId != null) queryParams.Add("cause_id", ApiClient.ParameterToString(causeId)); // query parameter - if (effectId != null) queryParams.Add("effect_id", ApiClient.ParameterToString(effectId)); // query parameter - if (value != null) queryParams.Add("value", ApiClient.ParameterToString(value)); // query parameter - if (createdAt != null) queryParams.Add("created_at", ApiClient.ParameterToString(createdAt)); // query parameter - if (updatedAt != null) queryParams.Add("updated_at", ApiClient.ParameterToString(updatedAt)); // query parameter - if (limit != null) queryParams.Add("limit", ApiClient.ParameterToString(limit)); // query parameter - if (offset != null) queryParams.Add("offset", ApiClient.ParameterToString(offset)); // query parameter - if (sort != null) queryParams.Add("sort", ApiClient.ParameterToString(sort)); // query parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + if (clientId != null) queryParams.Add("client_id", Configuration.ApiClient.ParameterToString(clientId)); // query parameter + if (userId != null) queryParams.Add("user_id", Configuration.ApiClient.ParameterToString(userId)); // query parameter + if (causeId != null) queryParams.Add("cause_id", Configuration.ApiClient.ParameterToString(causeId)); // query parameter + if (effectId != null) queryParams.Add("effect_id", Configuration.ApiClient.ParameterToString(effectId)); // query parameter + if (value != null) queryParams.Add("value", Configuration.ApiClient.ParameterToString(value)); // query parameter + if (createdAt != null) queryParams.Add("created_at", Configuration.ApiClient.ParameterToString(createdAt)); // query parameter + if (updatedAt != null) queryParams.Add("updated_at", Configuration.ApiClient.ParameterToString(updatedAt)); // query parameter + if (limit != null) queryParams.Add("limit", Configuration.ApiClient.ParameterToString(limit)); // query parameter + if (offset != null) queryParams.Add("offset", Configuration.ApiClient.ParameterToString(offset)); // query parameter + if (sort != null) queryParams.Add("sort", Configuration.ApiClient.ParameterToString(sort)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling VotesGet: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling VotesGet: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling VotesGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling VotesGet: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse20029) ApiClient.Deserialize(response, typeof(InlineResponse20029)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20033) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20033))); + } /// /// Get all Votes Get all Votes /// - /// client_id - /// user_id - /// cause_id - /// effect_id - /// value - /// created_at - /// updated_at - /// limit - /// offset - /// sort - /// InlineResponse20029 - public async System.Threading.Tasks.Task VotesGetAsync (string clientId, int? userId, int? causeId, int? effectId, int? value, string createdAt, string updatedAt, int? limit, int? offset, string sort) + /// User's OAuth2 access token + /// The ID of the client application which last created or updated this vote + /// ID of the user who voted + /// ID of predictor variable + /// ID of outcome variable + /// Value of Vote. 1 is for upvote. 0 is for downvote. Otherwise, there is no vote. + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of InlineResponse20033 + public async System.Threading.Tasks.Task VotesGetAsync (string accessToken = null, string clientId = null, int? userId = null, int? causeId = null, int? effectId = null, int? value = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) + { + ApiResponse response = await VotesGetAsyncWithHttpInfo(accessToken, clientId, userId, causeId, effectId, value, createdAt, updatedAt, limit, offset, sort); + return response.Data; + + } + + /// + /// Get all Votes Get all Votes + /// + /// User's OAuth2 access token + /// The ID of the client application which last created or updated this vote + /// ID of the user who voted + /// ID of predictor variable + /// ID of outcome variable + /// Value of Vote. 1 is for upvote. 0 is for downvote. Otherwise, there is no vote. + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of ApiResponse (InlineResponse20033) + public async System.Threading.Tasks.Task> VotesGetAsyncWithHttpInfo (string accessToken = null, string clientId = null, int? userId = null, int? causeId = null, int? effectId = null, int? value = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) { @@ -288,46 +510,75 @@ public async System.Threading.Tasks.Task VotesGetAsync (str String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (clientId != null) queryParams.Add("client_id", ApiClient.ParameterToString(clientId)); // query parameter - if (userId != null) queryParams.Add("user_id", ApiClient.ParameterToString(userId)); // query parameter - if (causeId != null) queryParams.Add("cause_id", ApiClient.ParameterToString(causeId)); // query parameter - if (effectId != null) queryParams.Add("effect_id", ApiClient.ParameterToString(effectId)); // query parameter - if (value != null) queryParams.Add("value", ApiClient.ParameterToString(value)); // query parameter - if (createdAt != null) queryParams.Add("created_at", ApiClient.ParameterToString(createdAt)); // query parameter - if (updatedAt != null) queryParams.Add("updated_at", ApiClient.ParameterToString(updatedAt)); // query parameter - if (limit != null) queryParams.Add("limit", ApiClient.ParameterToString(limit)); // query parameter - if (offset != null) queryParams.Add("offset", ApiClient.ParameterToString(offset)); // query parameter - if (sort != null) queryParams.Add("sort", ApiClient.ParameterToString(sort)); // query parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + if (clientId != null) queryParams.Add("client_id", Configuration.ApiClient.ParameterToString(clientId)); // query parameter + if (userId != null) queryParams.Add("user_id", Configuration.ApiClient.ParameterToString(userId)); // query parameter + if (causeId != null) queryParams.Add("cause_id", Configuration.ApiClient.ParameterToString(causeId)); // query parameter + if (effectId != null) queryParams.Add("effect_id", Configuration.ApiClient.ParameterToString(effectId)); // query parameter + if (value != null) queryParams.Add("value", Configuration.ApiClient.ParameterToString(value)); // query parameter + if (createdAt != null) queryParams.Add("created_at", Configuration.ApiClient.ParameterToString(createdAt)); // query parameter + if (updatedAt != null) queryParams.Add("updated_at", Configuration.ApiClient.ParameterToString(updatedAt)); // query parameter + if (limit != null) queryParams.Add("limit", Configuration.ApiClient.ParameterToString(limit)); // query parameter + if (offset != null) queryParams.Add("offset", Configuration.ApiClient.ParameterToString(offset)); // query parameter + if (sort != null) queryParams.Add("sort", Configuration.ApiClient.ParameterToString(sort)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; - + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling VotesGet: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); - return (InlineResponse20029) ApiClient.Deserialize(response, typeof(InlineResponse20029)); + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling VotesGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling VotesGet: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20033) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20033))); + } /// - /// Store Vote Store Vote + /// Store Vote This is to enable users to indicate their opinion on the plausibility of a causal relationship between a treatment and outcome. QuantiModo incorporates crowd-sourced plausibility estimations into their algorithm. This is done allowing user to indicate their view of the plausibility of each relationship with thumbs up/down buttons placed next to each prediction. /// + /// User's OAuth2 access token /// Vote that should be stored - /// InlineResponse20030 - public InlineResponse20030 VotesPost (Vote body) + /// InlineResponse20034 + public InlineResponse20034 VotesPost (string accessToken = null, Vote body = null) + { + ApiResponse response = VotesPostWithHttpInfo(accessToken, body); + return response.Data; + } + + /// + /// Store Vote This is to enable users to indicate their opinion on the plausibility of a causal relationship between a treatment and outcome. QuantiModo incorporates crowd-sourced plausibility estimations into their algorithm. This is done allowing user to indicate their view of the plausibility of each relationship with thumbs up/down buttons placed next to each prediction. + /// + /// User's OAuth2 access token + /// Vote that should be stored + /// ApiResponse of InlineResponse20034 + public ApiResponse< InlineResponse20034 > VotesPostWithHttpInfo (string accessToken = null, Vote body = null) { @@ -335,7 +586,7 @@ public InlineResponse20030 VotesPost (Vote body) var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -344,40 +595,67 @@ public InlineResponse20030 VotesPost (Vote body) String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - postBody = ApiClient.Serialize(body); // http body (model) parameter + postBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter + + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } - - // authentication setting, if any - String[] authSettings = new String[] { }; // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling VotesPost: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling VotesPost: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling VotesPost: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling VotesPost: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse20030) ApiClient.Deserialize(response, typeof(InlineResponse20030)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20034) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20034))); + } /// - /// Store Vote Store Vote + /// Store Vote This is to enable users to indicate their opinion on the plausibility of a causal relationship between a treatment and outcome. QuantiModo incorporates crowd-sourced plausibility estimations into their algorithm. This is done allowing user to indicate their view of the plausibility of each relationship with thumbs up/down buttons placed next to each prediction. /// + /// User's OAuth2 access token /// Vote that should be stored - /// InlineResponse20030 - public async System.Threading.Tasks.Task VotesPostAsync (Vote body) + /// Task of InlineResponse20034 + public async System.Threading.Tasks.Task VotesPostAsync (string accessToken = null, Vote body = null) + { + ApiResponse response = await VotesPostAsyncWithHttpInfo(accessToken, body); + return response.Data; + + } + + /// + /// Store Vote This is to enable users to indicate their opinion on the plausibility of a causal relationship between a treatment and outcome. QuantiModo incorporates crowd-sourced plausibility estimations into their algorithm. This is done allowing user to indicate their view of the plausibility of each relationship with thumbs up/down buttons placed next to each prediction. + /// + /// User's OAuth2 access token + /// Vote that should be stored + /// Task of ApiResponse (InlineResponse20034) + public async System.Threading.Tasks.Task> VotesPostAsyncWithHttpInfo (string accessToken = null, Vote body = null) { @@ -394,37 +672,66 @@ public async System.Threading.Tasks.Task VotesPostAsync (Vo String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - postBody = ApiClient.Serialize(body); // http body (model) parameter + postBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; - + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling VotesPost: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling VotesPost: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling VotesPost: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse20030) ApiClient.Deserialize(response, typeof(InlineResponse20030)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20034) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20034))); + } /// /// Get Vote Get Vote /// /// id of Vote - /// InlineResponse20030 - public InlineResponse20030 VotesIdGet (int? id) + /// User's OAuth2 access token + /// InlineResponse20034 + public InlineResponse20034 VotesIdGet (int? id, string accessToken = null) + { + ApiResponse response = VotesIdGetWithHttpInfo(id, accessToken); + return response.Data; + } + + /// + /// Get Vote Get Vote + /// + /// id of Vote + /// User's OAuth2 access token + /// ApiResponse of InlineResponse20034 + public ApiResponse< InlineResponse20034 > VotesIdGetWithHttpInfo (int? id, string accessToken = null) { // verify the required parameter 'id' is set @@ -435,7 +742,7 @@ public InlineResponse20030 VotesIdGet (int? id) var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -444,40 +751,67 @@ public InlineResponse20030 VotesIdGet (int? id) String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling VotesIdGet: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling VotesIdGet: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling VotesIdGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling VotesIdGet: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse20030) ApiClient.Deserialize(response, typeof(InlineResponse20030)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20034) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20034))); + } /// /// Get Vote Get Vote /// /// id of Vote - /// InlineResponse20030 - public async System.Threading.Tasks.Task VotesIdGetAsync (int? id) + /// User's OAuth2 access token + /// Task of InlineResponse20034 + public async System.Threading.Tasks.Task VotesIdGetAsync (int? id, string accessToken = null) + { + ApiResponse response = await VotesIdGetAsyncWithHttpInfo(id, accessToken); + return response.Data; + + } + + /// + /// Get Vote Get Vote + /// + /// id of Vote + /// User's OAuth2 access token + /// Task of ApiResponse (InlineResponse20034) + public async System.Threading.Tasks.Task> VotesIdGetAsyncWithHttpInfo (int? id, string accessToken = null) { // verify the required parameter 'id' is set if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling VotesIdGet"); @@ -496,38 +830,68 @@ public async System.Threading.Tasks.Task VotesIdGetAsync (i String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; - + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling VotesIdGet: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); - return (InlineResponse20030) ApiClient.Deserialize(response, typeof(InlineResponse20030)); + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling VotesIdGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling VotesIdGet: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20034) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20034))); + } /// /// Update Vote Update Vote /// /// id of Vote + /// User's OAuth2 access token + /// Vote that should be updated + /// InlineResponse2002 + public InlineResponse2002 VotesIdPut (int? id, string accessToken = null, Vote body = null) + { + ApiResponse response = VotesIdPutWithHttpInfo(id, accessToken, body); + return response.Data; + } + + /// + /// Update Vote Update Vote + /// + /// id of Vote + /// User's OAuth2 access token /// Vote that should be updated - /// InlineResponse2002 - public InlineResponse2002 VotesIdPut (int? id, Vote body) + /// ApiResponse of InlineResponse2002 + public ApiResponse< InlineResponse2002 > VotesIdPutWithHttpInfo (int? id, string accessToken = null, Vote body = null) { // verify the required parameter 'id' is set @@ -538,7 +902,7 @@ public InlineResponse2002 VotesIdPut (int? id, Vote body) var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -547,42 +911,70 @@ public InlineResponse2002 VotesIdPut (int? id, Vote body) String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - postBody = ApiClient.Serialize(body); // http body (model) parameter + postBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter + + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } - - // authentication setting, if any - String[] authSettings = new String[] { }; // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling VotesIdPut: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling VotesIdPut: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling VotesIdPut: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling VotesIdPut: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse2002) ApiClient.Deserialize(response, typeof(InlineResponse2002)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2002) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2002))); + } /// /// Update Vote Update Vote /// /// id of Vote + /// User's OAuth2 access token /// Vote that should be updated - /// InlineResponse2002 - public async System.Threading.Tasks.Task VotesIdPutAsync (int? id, Vote body) + /// Task of InlineResponse2002 + public async System.Threading.Tasks.Task VotesIdPutAsync (int? id, string accessToken = null, Vote body = null) + { + ApiResponse response = await VotesIdPutAsyncWithHttpInfo(id, accessToken, body); + return response.Data; + + } + + /// + /// Update Vote Update Vote + /// + /// id of Vote + /// User's OAuth2 access token + /// Vote that should be updated + /// Task of ApiResponse (InlineResponse2002) + public async System.Threading.Tasks.Task> VotesIdPutAsyncWithHttpInfo (int? id, string accessToken = null, Vote body = null) { // verify the required parameter 'id' is set if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling VotesIdPut"); @@ -601,38 +993,67 @@ public async System.Threading.Tasks.Task VotesIdPutAsync (in String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - postBody = ApiClient.Serialize(body); // http body (model) parameter + postBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; - + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling VotesIdPut: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling VotesIdPut: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling VotesIdPut: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse2002) ApiClient.Deserialize(response, typeof(InlineResponse2002)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2002) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2002))); + } /// - /// Delete Vote Delete Vote + /// Delete Vote Delete previously posted vote /// /// id of Vote - /// InlineResponse2002 - public InlineResponse2002 VotesIdDelete (int? id) + /// User's OAuth2 access token + /// InlineResponse2002 + public InlineResponse2002 VotesIdDelete (int? id, string accessToken = null) + { + ApiResponse response = VotesIdDeleteWithHttpInfo(id, accessToken); + return response.Data; + } + + /// + /// Delete Vote Delete previously posted vote + /// + /// id of Vote + /// User's OAuth2 access token + /// ApiResponse of InlineResponse2002 + public ApiResponse< InlineResponse2002 > VotesIdDeleteWithHttpInfo (int? id, string accessToken = null) { // verify the required parameter 'id' is set @@ -643,7 +1064,7 @@ public InlineResponse2002 VotesIdDelete (int? id) var pathParams = new Dictionary(); var queryParams = new Dictionary(); - var headerParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); var formParams = new Dictionary(); var fileParams = new Dictionary(); String postBody = null; @@ -652,40 +1073,67 @@ public InlineResponse2002 VotesIdDelete (int? id) String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + // make the HTTP request - IRestResponse response = (IRestResponse) ApiClient.CallApi(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling VotesIdDelete: " + response.Content, response.Content); - else if (((int)response.StatusCode) == 0) - throw new ApiException ((int)response.StatusCode, "Error calling VotesIdDelete: " + response.ErrorMessage, response.ErrorMessage); + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling VotesIdDelete: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling VotesIdDelete: " + response.ErrorMessage, response.ErrorMessage); - return (InlineResponse2002) ApiClient.Deserialize(response, typeof(InlineResponse2002)); + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2002) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2002))); + } /// - /// Delete Vote Delete Vote + /// Delete Vote Delete previously posted vote /// /// id of Vote - /// InlineResponse2002 - public async System.Threading.Tasks.Task VotesIdDeleteAsync (int? id) + /// User's OAuth2 access token + /// Task of InlineResponse2002 + public async System.Threading.Tasks.Task VotesIdDeleteAsync (int? id, string accessToken = null) + { + ApiResponse response = await VotesIdDeleteAsyncWithHttpInfo(id, accessToken); + return response.Data; + + } + + /// + /// Delete Vote Delete previously posted vote + /// + /// id of Vote + /// User's OAuth2 access token + /// Task of ApiResponse (InlineResponse2002) + public async System.Threading.Tasks.Task> VotesIdDeleteAsyncWithHttpInfo (int? id, string accessToken = null) { // verify the required parameter 'id' is set if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling VotesIdDelete"); @@ -704,29 +1152,45 @@ public async System.Threading.Tasks.Task VotesIdDeleteAsync String[] http_header_accepts = new String[] { "application/json" }; - String http_header_accept = ApiClient.SelectHeaderAccept(http_header_accepts); + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); if (http_header_accept != null) - headerParams.Add("Accept", ApiClient.SelectHeaderAccept(http_header_accepts)); + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); // set "format" to json by default // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json pathParams.Add("format", "json"); - if (id != null) pathParams.Add("id", ApiClient.ParameterToString(id)); // path parameter + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - - // authentication setting, if any - String[] authSettings = new String[] { }; - + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + // make the HTTP request - IRestResponse response = (IRestResponse) await ApiClient.CallApiAsync(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); - if (((int)response.StatusCode) >= 400) - throw new ApiException ((int)response.StatusCode, "Error calling VotesIdDelete: " + response.Content, response.Content); + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams); - return (InlineResponse2002) ApiClient.Deserialize(response, typeof(InlineResponse2002)); + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling VotesIdDelete: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling VotesIdDelete: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2002) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2002))); + } } diff --git a/src/main/csharp/io/swagger/Model/AggregatedCorrelation.cs b/src/main/csharp/io/swagger/Model/AggregatedCorrelation.cs index 6e85317..9dfac06 100644 --- a/src/main/csharp/io/swagger/Model/AggregatedCorrelation.cs +++ b/src/main/csharp/io/swagger/Model/AggregatedCorrelation.cs @@ -1,298 +1,544 @@ using System; +using System.Linq; +using System.IO; using System.Text; using System.Collections; using System.Collections.Generic; using System.Runtime.Serialization; using Newtonsoft.Json; -namespace IO.Swagger.Model { +namespace IO.Swagger.Model +{ - /// - /// - /// - [DataContract] - public class AggregatedCorrelation { - /// - /// id + /// /// - /// id - [DataMember(Name="id", EmitDefaultValue=false)] - public int? Id { get; set; } + [DataContract] + public class AggregatedCorrelation : IEquatable + { + + /// + /// id + /// + /// id + [DataMember(Name="id", EmitDefaultValue=false)] + public int? Id { get; set; } + + + /// + /// Pearson correlation coefficient between cause and effect measurements + /// + /// Pearson correlation coefficient between cause and effect measurements + [DataMember(Name="correlation", EmitDefaultValue=false)] + public float? Correlation { get; set; } + + + /// + /// variable ID of the cause variable for which the user desires correlations + /// + /// variable ID of the cause variable for which the user desires correlations + [DataMember(Name="cause_id", EmitDefaultValue=false)] + public int? CauseId { get; set; } + + + /// + /// variable ID of the effect variable for which the user desires correlations + /// + /// variable ID of the effect variable for which the user desires correlations + [DataMember(Name="effect_id", EmitDefaultValue=false)] + public int? EffectId { get; set; } + + + /// + /// User estimated or default time after cause measurement before a perceivable effect is observed + /// + /// User estimated or default time after cause measurement before a perceivable effect is observed + [DataMember(Name="onset_delay", EmitDefaultValue=false)] + public int? OnsetDelay { get; set; } + + + /// + /// Time over which the cause is expected to produce a perceivable effect following the onset delay + /// + /// Time over which the cause is expected to produce a perceivable effect following the onset delay + [DataMember(Name="duration_of_action", EmitDefaultValue=false)] + public int? DurationOfAction { get; set; } + + + /// + /// Number of points that went into the correlation calculation + /// + /// Number of points that went into the correlation calculation + [DataMember(Name="number_of_pairs", EmitDefaultValue=false)] + public int? NumberOfPairs { get; set; } + + + /// + /// cause value that predicts an above average effect value (in default unit for cause variable) + /// + /// cause value that predicts an above average effect value (in default unit for cause variable) + [DataMember(Name="value_predicting_high_outcome", EmitDefaultValue=false)] + public float? ValuePredictingHighOutcome { get; set; } + + + /// + /// cause value that predicts a below average effect value (in default unit for cause variable) + /// + /// cause value that predicts a below average effect value (in default unit for cause variable) + [DataMember(Name="value_predicting_low_outcome", EmitDefaultValue=false)] + public float? ValuePredictingLowOutcome { get; set; } + + + /// + /// Optimal Pearson Product + /// + /// Optimal Pearson Product + [DataMember(Name="optimal_pearson_product", EmitDefaultValue=false)] + public float? OptimalPearsonProduct { get; set; } + + + /// + /// Vote + /// + /// Vote + [DataMember(Name="vote", EmitDefaultValue=false)] + public float? Vote { get; set; } + + + /// + /// Number of Users by which correlation is aggregated + /// + /// Number of Users by which correlation is aggregated + [DataMember(Name="number_of_users", EmitDefaultValue=false)] + public int? NumberOfUsers { get; set; } + + + /// + /// Number of Correlations by which correlation is aggregated + /// + /// Number of Correlations by which correlation is aggregated + [DataMember(Name="number_of_correlations", EmitDefaultValue=false)] + public int? NumberOfCorrelations { get; set; } + + + /// + /// A function of the effect size and sample size + /// + /// A function of the effect size and sample size + [DataMember(Name="statistical_significance", EmitDefaultValue=false)] + public float? StatisticalSignificance { get; set; } + + + /// + /// Unit of the predictor variable + /// + /// Unit of the predictor variable + [DataMember(Name="cause_unit", EmitDefaultValue=false)] + public string CauseUnit { get; set; } + + + /// + /// Unit ID of the predictor variable + /// + /// Unit ID of the predictor variable + [DataMember(Name="cause_unit_id", EmitDefaultValue=false)] + public int? CauseUnitId { get; set; } + + + /// + /// Cause changes + /// + /// Cause changes + [DataMember(Name="cause_changes", EmitDefaultValue=false)] + public int? CauseChanges { get; set; } + + + /// + /// Effect changes + /// + /// Effect changes + [DataMember(Name="effect_changes", EmitDefaultValue=false)] + public int? EffectChanges { get; set; } + + + /// + /// Aggregated QM Score + /// + /// Aggregated QM Score + [DataMember(Name="aggregate_qm_score", EmitDefaultValue=false)] + public float? AggregateQmScore { get; set; } + + + /// + /// When the record was first created. Use ISO 8601 datetime format + /// + /// When the record was first created. Use ISO 8601 datetime format + [DataMember(Name="created_at", EmitDefaultValue=false)] + public DateTime? CreatedAt { get; set; } + + + /// + /// When the record in the database was last updated. Use ISO 8601 datetime format + /// + /// When the record in the database was last updated. Use ISO 8601 datetime format + [DataMember(Name="updated_at", EmitDefaultValue=false)] + public DateTime? UpdatedAt { get; set; } + + + /// + /// Status + /// + /// Status + [DataMember(Name="status", EmitDefaultValue=false)] + public string Status { get; set; } + + + /// + /// Error Message + /// + /// Error Message + [DataMember(Name="error_message", EmitDefaultValue=false)] + public string ErrorMessage { get; set; } + + + /// + /// Last Successful update time + /// + /// Last Successful update time + [DataMember(Name="last_successful_update_time", EmitDefaultValue=false)] + public DateTime? LastSuccessfulUpdateTime { get; set; } + + + /// + /// Correlation when cause and effect are reversed. For any causal relationship, the forward correlation should exceed the reverse correlation + /// + /// Correlation when cause and effect are reversed. For any causal relationship, the forward correlation should exceed the reverse correlation + [DataMember(Name="reverse_pearson_correlation_coefficient", EmitDefaultValue=false)] + public float? ReversePearsonCorrelationCoefficient { get; set; } + + + /// + /// Predictive Pearson Correlation Coefficient + /// + /// Predictive Pearson Correlation Coefficient + [DataMember(Name="predictive_pearson_correlation_coefficient", EmitDefaultValue=false)] + public float? PredictivePearsonCorrelationCoefficient { get; set; } + + + /// + /// Source of data for this correlation + /// + /// Source of data for this correlation + [DataMember(Name="data_source", EmitDefaultValue=false)] + public string DataSource { get; set; } + + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class AggregatedCorrelation {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Correlation: ").Append(Correlation).Append("\n"); + sb.Append(" CauseId: ").Append(CauseId).Append("\n"); + sb.Append(" EffectId: ").Append(EffectId).Append("\n"); + sb.Append(" OnsetDelay: ").Append(OnsetDelay).Append("\n"); + sb.Append(" DurationOfAction: ").Append(DurationOfAction).Append("\n"); + sb.Append(" NumberOfPairs: ").Append(NumberOfPairs).Append("\n"); + sb.Append(" ValuePredictingHighOutcome: ").Append(ValuePredictingHighOutcome).Append("\n"); + sb.Append(" ValuePredictingLowOutcome: ").Append(ValuePredictingLowOutcome).Append("\n"); + sb.Append(" OptimalPearsonProduct: ").Append(OptimalPearsonProduct).Append("\n"); + sb.Append(" Vote: ").Append(Vote).Append("\n"); + sb.Append(" NumberOfUsers: ").Append(NumberOfUsers).Append("\n"); + sb.Append(" NumberOfCorrelations: ").Append(NumberOfCorrelations).Append("\n"); + sb.Append(" StatisticalSignificance: ").Append(StatisticalSignificance).Append("\n"); + sb.Append(" CauseUnit: ").Append(CauseUnit).Append("\n"); + sb.Append(" CauseUnitId: ").Append(CauseUnitId).Append("\n"); + sb.Append(" CauseChanges: ").Append(CauseChanges).Append("\n"); + sb.Append(" EffectChanges: ").Append(EffectChanges).Append("\n"); + sb.Append(" AggregateQmScore: ").Append(AggregateQmScore).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" ErrorMessage: ").Append(ErrorMessage).Append("\n"); + sb.Append(" LastSuccessfulUpdateTime: ").Append(LastSuccessfulUpdateTime).Append("\n"); + sb.Append(" ReversePearsonCorrelationCoefficient: ").Append(ReversePearsonCorrelationCoefficient).Append("\n"); + sb.Append(" PredictivePearsonCorrelationCoefficient: ").Append(PredictivePearsonCorrelationCoefficient).Append("\n"); + sb.Append(" DataSource: ").Append(DataSource).Append("\n"); + + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } - - /// - /// correlation - /// - /// correlation - [DataMember(Name="correlation", EmitDefaultValue=false)] - public float? Correlation { get; set; } - - - /// - /// cause_id - /// - /// cause_id - [DataMember(Name="cause_id", EmitDefaultValue=false)] - public int? CauseId { get; set; } - - - /// - /// effect_id - /// - /// effect_id - [DataMember(Name="effect_id", EmitDefaultValue=false)] - public int? EffectId { get; set; } - - - /// - /// onset_delay - /// - /// onset_delay - [DataMember(Name="onset_delay", EmitDefaultValue=false)] - public int? OnsetDelay { get; set; } - - - /// - /// duration_of_action - /// - /// duration_of_action - [DataMember(Name="duration_of_action", EmitDefaultValue=false)] - public int? DurationOfAction { get; set; } - - - /// - /// number_of_pairs - /// - /// number_of_pairs - [DataMember(Name="number_of_pairs", EmitDefaultValue=false)] - public int? NumberOfPairs { get; set; } - - - /// - /// value_predicting_high_outcome - /// - /// value_predicting_high_outcome - [DataMember(Name="value_predicting_high_outcome", EmitDefaultValue=false)] - public float? ValuePredictingHighOutcome { get; set; } - - - /// - /// value_predicting_low_outcome - /// - /// value_predicting_low_outcome - [DataMember(Name="value_predicting_low_outcome", EmitDefaultValue=false)] - public float? ValuePredictingLowOutcome { get; set; } - - - /// - /// optimal_pearson_product - /// - /// optimal_pearson_product - [DataMember(Name="optimal_pearson_product", EmitDefaultValue=false)] - public float? OptimalPearsonProduct { get; set; } - - - /// - /// vote - /// - /// vote - [DataMember(Name="vote", EmitDefaultValue=false)] - public float? Vote { get; set; } - - - /// - /// number_of_users - /// - /// number_of_users - [DataMember(Name="number_of_users", EmitDefaultValue=false)] - public int? NumberOfUsers { get; set; } - - - /// - /// number_of_correlations - /// - /// number_of_correlations - [DataMember(Name="number_of_correlations", EmitDefaultValue=false)] - public int? NumberOfCorrelations { get; set; } - - - /// - /// statistical_significance - /// - /// statistical_significance - [DataMember(Name="statistical_significance", EmitDefaultValue=false)] - public float? StatisticalSignificance { get; set; } - - - /// - /// cause_unit - /// - /// cause_unit - [DataMember(Name="cause_unit", EmitDefaultValue=false)] - public string CauseUnit { get; set; } - - - /// - /// cause_unit_id - /// - /// cause_unit_id - [DataMember(Name="cause_unit_id", EmitDefaultValue=false)] - public int? CauseUnitId { get; set; } - - - /// - /// cause_changes - /// - /// cause_changes - [DataMember(Name="cause_changes", EmitDefaultValue=false)] - public int? CauseChanges { get; set; } - - - /// - /// effect_changes - /// - /// effect_changes - [DataMember(Name="effect_changes", EmitDefaultValue=false)] - public int? EffectChanges { get; set; } - - - /// - /// aggregate_qm_score - /// - /// aggregate_qm_score - [DataMember(Name="aggregate_qm_score", EmitDefaultValue=false)] - public float? AggregateQmScore { get; set; } - - - /// - /// created_at - /// - /// created_at - [DataMember(Name="created_at", EmitDefaultValue=false)] - public DateTime? CreatedAt { get; set; } - - - /// - /// updated_at - /// - /// updated_at - [DataMember(Name="updated_at", EmitDefaultValue=false)] - public DateTime? UpdatedAt { get; set; } - - - /// - /// status - /// - /// status - [DataMember(Name="status", EmitDefaultValue=false)] - public string Status { get; set; } - - - /// - /// error_message - /// - /// error_message - [DataMember(Name="error_message", EmitDefaultValue=false)] - public string ErrorMessage { get; set; } - - - /// - /// last_successful_update_time - /// - /// last_successful_update_time - [DataMember(Name="last_successful_update_time", EmitDefaultValue=false)] - public DateTime? LastSuccessfulUpdateTime { get; set; } - - - /// - /// reverse_pearson_correlation_coefficient - /// - /// reverse_pearson_correlation_coefficient - [DataMember(Name="reverse_pearson_correlation_coefficient", EmitDefaultValue=false)] - public float? ReversePearsonCorrelationCoefficient { get; set; } + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as AggregatedCorrelation); + } - - /// - /// predictive_pearson_correlation_coefficient - /// - /// predictive_pearson_correlation_coefficient - [DataMember(Name="predictive_pearson_correlation_coefficient", EmitDefaultValue=false)] - public float? PredictivePearsonCorrelationCoefficient { get; set; } + /// + /// Returns true if AggregatedCorrelation instances are equal + /// + /// Instance of AggregatedCorrelation to be compared + /// Boolean + public bool Equals(AggregatedCorrelation other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; - + return + ( + this.Id == other.Id || + this.Id != null && + this.Id.Equals(other.Id) + ) && + ( + this.Correlation == other.Correlation || + this.Correlation != null && + this.Correlation.Equals(other.Correlation) + ) && + ( + this.CauseId == other.CauseId || + this.CauseId != null && + this.CauseId.Equals(other.CauseId) + ) && + ( + this.EffectId == other.EffectId || + this.EffectId != null && + this.EffectId.Equals(other.EffectId) + ) && + ( + this.OnsetDelay == other.OnsetDelay || + this.OnsetDelay != null && + this.OnsetDelay.Equals(other.OnsetDelay) + ) && + ( + this.DurationOfAction == other.DurationOfAction || + this.DurationOfAction != null && + this.DurationOfAction.Equals(other.DurationOfAction) + ) && + ( + this.NumberOfPairs == other.NumberOfPairs || + this.NumberOfPairs != null && + this.NumberOfPairs.Equals(other.NumberOfPairs) + ) && + ( + this.ValuePredictingHighOutcome == other.ValuePredictingHighOutcome || + this.ValuePredictingHighOutcome != null && + this.ValuePredictingHighOutcome.Equals(other.ValuePredictingHighOutcome) + ) && + ( + this.ValuePredictingLowOutcome == other.ValuePredictingLowOutcome || + this.ValuePredictingLowOutcome != null && + this.ValuePredictingLowOutcome.Equals(other.ValuePredictingLowOutcome) + ) && + ( + this.OptimalPearsonProduct == other.OptimalPearsonProduct || + this.OptimalPearsonProduct != null && + this.OptimalPearsonProduct.Equals(other.OptimalPearsonProduct) + ) && + ( + this.Vote == other.Vote || + this.Vote != null && + this.Vote.Equals(other.Vote) + ) && + ( + this.NumberOfUsers == other.NumberOfUsers || + this.NumberOfUsers != null && + this.NumberOfUsers.Equals(other.NumberOfUsers) + ) && + ( + this.NumberOfCorrelations == other.NumberOfCorrelations || + this.NumberOfCorrelations != null && + this.NumberOfCorrelations.Equals(other.NumberOfCorrelations) + ) && + ( + this.StatisticalSignificance == other.StatisticalSignificance || + this.StatisticalSignificance != null && + this.StatisticalSignificance.Equals(other.StatisticalSignificance) + ) && + ( + this.CauseUnit == other.CauseUnit || + this.CauseUnit != null && + this.CauseUnit.Equals(other.CauseUnit) + ) && + ( + this.CauseUnitId == other.CauseUnitId || + this.CauseUnitId != null && + this.CauseUnitId.Equals(other.CauseUnitId) + ) && + ( + this.CauseChanges == other.CauseChanges || + this.CauseChanges != null && + this.CauseChanges.Equals(other.CauseChanges) + ) && + ( + this.EffectChanges == other.EffectChanges || + this.EffectChanges != null && + this.EffectChanges.Equals(other.EffectChanges) + ) && + ( + this.AggregateQmScore == other.AggregateQmScore || + this.AggregateQmScore != null && + this.AggregateQmScore.Equals(other.AggregateQmScore) + ) && + ( + this.CreatedAt == other.CreatedAt || + this.CreatedAt != null && + this.CreatedAt.Equals(other.CreatedAt) + ) && + ( + this.UpdatedAt == other.UpdatedAt || + this.UpdatedAt != null && + this.UpdatedAt.Equals(other.UpdatedAt) + ) && + ( + this.Status == other.Status || + this.Status != null && + this.Status.Equals(other.Status) + ) && + ( + this.ErrorMessage == other.ErrorMessage || + this.ErrorMessage != null && + this.ErrorMessage.Equals(other.ErrorMessage) + ) && + ( + this.LastSuccessfulUpdateTime == other.LastSuccessfulUpdateTime || + this.LastSuccessfulUpdateTime != null && + this.LastSuccessfulUpdateTime.Equals(other.LastSuccessfulUpdateTime) + ) && + ( + this.ReversePearsonCorrelationCoefficient == other.ReversePearsonCorrelationCoefficient || + this.ReversePearsonCorrelationCoefficient != null && + this.ReversePearsonCorrelationCoefficient.Equals(other.ReversePearsonCorrelationCoefficient) + ) && + ( + this.PredictivePearsonCorrelationCoefficient == other.PredictivePearsonCorrelationCoefficient || + this.PredictivePearsonCorrelationCoefficient != null && + this.PredictivePearsonCorrelationCoefficient.Equals(other.PredictivePearsonCorrelationCoefficient) + ) && + ( + this.DataSource == other.DataSource || + this.DataSource != null && + this.DataSource.Equals(other.DataSource) + ); + } - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class AggregatedCorrelation {\n"); - - sb.Append(" Id: ").Append(Id).Append("\n"); - - sb.Append(" Correlation: ").Append(Correlation).Append("\n"); - - sb.Append(" CauseId: ").Append(CauseId).Append("\n"); - - sb.Append(" EffectId: ").Append(EffectId).Append("\n"); - - sb.Append(" OnsetDelay: ").Append(OnsetDelay).Append("\n"); - - sb.Append(" DurationOfAction: ").Append(DurationOfAction).Append("\n"); - - sb.Append(" NumberOfPairs: ").Append(NumberOfPairs).Append("\n"); - - sb.Append(" ValuePredictingHighOutcome: ").Append(ValuePredictingHighOutcome).Append("\n"); - - sb.Append(" ValuePredictingLowOutcome: ").Append(ValuePredictingLowOutcome).Append("\n"); - - sb.Append(" OptimalPearsonProduct: ").Append(OptimalPearsonProduct).Append("\n"); - - sb.Append(" Vote: ").Append(Vote).Append("\n"); - - sb.Append(" NumberOfUsers: ").Append(NumberOfUsers).Append("\n"); - - sb.Append(" NumberOfCorrelations: ").Append(NumberOfCorrelations).Append("\n"); - - sb.Append(" StatisticalSignificance: ").Append(StatisticalSignificance).Append("\n"); - - sb.Append(" CauseUnit: ").Append(CauseUnit).Append("\n"); - - sb.Append(" CauseUnitId: ").Append(CauseUnitId).Append("\n"); - - sb.Append(" CauseChanges: ").Append(CauseChanges).Append("\n"); - - sb.Append(" EffectChanges: ").Append(EffectChanges).Append("\n"); - - sb.Append(" AggregateQmScore: ").Append(AggregateQmScore).Append("\n"); - - sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); - - sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); - - sb.Append(" Status: ").Append(Status).Append("\n"); - - sb.Append(" ErrorMessage: ").Append(ErrorMessage).Append("\n"); - - sb.Append(" LastSuccessfulUpdateTime: ").Append(LastSuccessfulUpdateTime).Append("\n"); - - sb.Append(" ReversePearsonCorrelationCoefficient: ").Append(ReversePearsonCorrelationCoefficient).Append("\n"); - - sb.Append(" PredictivePearsonCorrelationCoefficient: ").Append(PredictivePearsonCorrelationCoefficient).Append("\n"); - - sb.Append("}\n"); - return sb.ToString(); - } + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + + if (this.Id != null) + hash = hash * 57 + this.Id.GetHashCode(); + + if (this.Correlation != null) + hash = hash * 57 + this.Correlation.GetHashCode(); + + if (this.CauseId != null) + hash = hash * 57 + this.CauseId.GetHashCode(); + + if (this.EffectId != null) + hash = hash * 57 + this.EffectId.GetHashCode(); + + if (this.OnsetDelay != null) + hash = hash * 57 + this.OnsetDelay.GetHashCode(); + + if (this.DurationOfAction != null) + hash = hash * 57 + this.DurationOfAction.GetHashCode(); + + if (this.NumberOfPairs != null) + hash = hash * 57 + this.NumberOfPairs.GetHashCode(); + + if (this.ValuePredictingHighOutcome != null) + hash = hash * 57 + this.ValuePredictingHighOutcome.GetHashCode(); + + if (this.ValuePredictingLowOutcome != null) + hash = hash * 57 + this.ValuePredictingLowOutcome.GetHashCode(); + + if (this.OptimalPearsonProduct != null) + hash = hash * 57 + this.OptimalPearsonProduct.GetHashCode(); + + if (this.Vote != null) + hash = hash * 57 + this.Vote.GetHashCode(); + + if (this.NumberOfUsers != null) + hash = hash * 57 + this.NumberOfUsers.GetHashCode(); + + if (this.NumberOfCorrelations != null) + hash = hash * 57 + this.NumberOfCorrelations.GetHashCode(); + + if (this.StatisticalSignificance != null) + hash = hash * 57 + this.StatisticalSignificance.GetHashCode(); + + if (this.CauseUnit != null) + hash = hash * 57 + this.CauseUnit.GetHashCode(); + + if (this.CauseUnitId != null) + hash = hash * 57 + this.CauseUnitId.GetHashCode(); + + if (this.CauseChanges != null) + hash = hash * 57 + this.CauseChanges.GetHashCode(); + + if (this.EffectChanges != null) + hash = hash * 57 + this.EffectChanges.GetHashCode(); + + if (this.AggregateQmScore != null) + hash = hash * 57 + this.AggregateQmScore.GetHashCode(); + + if (this.CreatedAt != null) + hash = hash * 57 + this.CreatedAt.GetHashCode(); + + if (this.UpdatedAt != null) + hash = hash * 57 + this.UpdatedAt.GetHashCode(); + + if (this.Status != null) + hash = hash * 57 + this.Status.GetHashCode(); + + if (this.ErrorMessage != null) + hash = hash * 57 + this.ErrorMessage.GetHashCode(); + + if (this.LastSuccessfulUpdateTime != null) + hash = hash * 57 + this.LastSuccessfulUpdateTime.GetHashCode(); + + if (this.ReversePearsonCorrelationCoefficient != null) + hash = hash * 57 + this.ReversePearsonCorrelationCoefficient.GetHashCode(); + + if (this.PredictivePearsonCorrelationCoefficient != null) + hash = hash * 57 + this.PredictivePearsonCorrelationCoefficient.GetHashCode(); + + if (this.DataSource != null) + hash = hash * 57 + this.DataSource.GetHashCode(); + + return hash; + } + } - /// - /// Get the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() { - return JsonConvert.SerializeObject(this, Formatting.Indented); } - -} } diff --git a/src/main/csharp/io/swagger/Model/CommonVariableRelationship.cs b/src/main/csharp/io/swagger/Model/CommonVariableRelationship.cs new file mode 100644 index 0000000..ea70688 --- /dev/null +++ b/src/main/csharp/io/swagger/Model/CommonVariableRelationship.cs @@ -0,0 +1,408 @@ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Collections; +using System.Collections.Generic; +using System.Runtime.Serialization; +using Newtonsoft.Json; + +namespace IO.Swagger.Model +{ + + /// + /// + /// + [DataContract] + public class CommonVariableRelationship : IEquatable + { + + /// + /// id + /// + /// id + [DataMember(Name="id", EmitDefaultValue=false)] + public int? Id { get; set; } + + + /// + /// Our confidence that a consistent predictive relationship exists based on the amount of evidence, reproducibility, and other factors + /// + /// Our confidence that a consistent predictive relationship exists based on the amount of evidence, reproducibility, and other factors + [DataMember(Name="confidence_level", EmitDefaultValue=false)] + public string ConfidenceLevel { get; set; } + + + /// + /// A quantitative representation of our confidence that a consistent predictive relationship exists based on the amount of evidence, reproducibility, and other factors + /// + /// A quantitative representation of our confidence that a consistent predictive relationship exists based on the amount of evidence, reproducibility, and other factors + [DataMember(Name="confidence_score", EmitDefaultValue=false)] + public float? ConfidenceScore { get; set; } + + + /// + /// Direction is positive if higher predictor values generally precede higher outcome values. Direction is negative if higher predictor values generally precede lower outcome values. + /// + /// Direction is positive if higher predictor values generally precede higher outcome values. Direction is negative if higher predictor values generally precede lower outcome values. + [DataMember(Name="direction", EmitDefaultValue=false)] + public string Direction { get; set; } + + + /// + /// duration_of_action + /// + /// duration_of_action + [DataMember(Name="duration_of_action", EmitDefaultValue=false)] + public int? DurationOfAction { get; set; } + + + /// + /// error_message + /// + /// error_message + [DataMember(Name="error_message", EmitDefaultValue=false)] + public string ErrorMessage { get; set; } + + + /// + /// User estimated (or default number of seconds) after cause measurement before a perceivable effect is observed + /// + /// User estimated (or default number of seconds) after cause measurement before a perceivable effect is observed + [DataMember(Name="onset_delay", EmitDefaultValue=false)] + public int? OnsetDelay { get; set; } + + + /// + /// Variable ID for the outcome variable + /// + /// Variable ID for the outcome variable + [DataMember(Name="outcome_variable_id", EmitDefaultValue=false)] + public int? OutcomeVariableId { get; set; } + + + /// + /// Variable ID for the predictor variable + /// + /// Variable ID for the predictor variable + [DataMember(Name="predictor_variable_id", EmitDefaultValue=false)] + public int? PredictorVariableId { get; set; } + + + /// + /// ID for default unit of the predictor variable + /// + /// ID for default unit of the predictor variable + [DataMember(Name="predictor_unit_id", EmitDefaultValue=false)] + public int? PredictorUnitId { get; set; } + + + /// + /// A value representative of the relevance of this predictor relative to other predictors of this outcome. Usually used for relevancy sorting. + /// + /// A value representative of the relevance of this predictor relative to other predictors of this outcome. Usually used for relevancy sorting. + [DataMember(Name="sinn_rank", EmitDefaultValue=false)] + public float? SinnRank { get; set; } + + + /// + /// A value represented to the size of the effect which the predictor appears to have on the outcome. + /// + /// A value represented to the size of the effect which the predictor appears to have on the outcome. + [DataMember(Name="strength_score", EmitDefaultValue=false)] + public float? StrengthScore { get; set; } + + + /// + /// Can be weak, medium, or strong based on the size of the effect which the predictor appears to have on the outcome relative to other variable relationship strength scores. + /// + /// Can be weak, medium, or strong based on the size of the effect which the predictor appears to have on the outcome relative to other variable relationship strength scores. + [DataMember(Name="strength_level", EmitDefaultValue=false)] + public string StrengthLevel { get; set; } + + + /// + /// Number of users who feel that there is a plausible causal relationship between the predictor and outcome variables. + /// + /// Number of users who feel that there is a plausible causal relationship between the predictor and outcome variables. + [DataMember(Name="up_votes", EmitDefaultValue=false)] + public int? UpVotes { get; set; } + + + /// + /// Number of users who do not feel that there is a plausible causal relationship between the predictor and outcome variables. + /// + /// Number of users who do not feel that there is a plausible causal relationship between the predictor and outcome variables. + [DataMember(Name="down_votes", EmitDefaultValue=false)] + public int? DownVotes { get; set; } + + + /// + /// Value for the predictor variable (in it's default unit) which typically precedes an above average outcome value + /// + /// Value for the predictor variable (in it's default unit) which typically precedes an above average outcome value + [DataMember(Name="value_predicting_high_outcome", EmitDefaultValue=false)] + public float? ValuePredictingHighOutcome { get; set; } + + + /// + /// Value for the predictor variable (in it's default unit) which typically precedes a below average outcome value + /// + /// Value for the predictor variable (in it's default unit) which typically precedes a below average outcome value + [DataMember(Name="value_predicting_low_outcome", EmitDefaultValue=false)] + public float? ValuePredictingLowOutcome { get; set; } + + + /// + /// Number of users whose data was aggregated to obtain this relationship + /// + /// Number of users whose data was aggregated to obtain this relationship + [DataMember(Name="number_of_users", EmitDefaultValue=false)] + public int? NumberOfUsers { get; set; } + + + /// + /// Source of data for this common variable relationship + /// + /// Source of data for this common variable relationship + [DataMember(Name="data_source", EmitDefaultValue=false)] + public string DataSource { get; set; } + + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class CommonVariableRelationship {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" ConfidenceLevel: ").Append(ConfidenceLevel).Append("\n"); + sb.Append(" ConfidenceScore: ").Append(ConfidenceScore).Append("\n"); + sb.Append(" Direction: ").Append(Direction).Append("\n"); + sb.Append(" DurationOfAction: ").Append(DurationOfAction).Append("\n"); + sb.Append(" ErrorMessage: ").Append(ErrorMessage).Append("\n"); + sb.Append(" OnsetDelay: ").Append(OnsetDelay).Append("\n"); + sb.Append(" OutcomeVariableId: ").Append(OutcomeVariableId).Append("\n"); + sb.Append(" PredictorVariableId: ").Append(PredictorVariableId).Append("\n"); + sb.Append(" PredictorUnitId: ").Append(PredictorUnitId).Append("\n"); + sb.Append(" SinnRank: ").Append(SinnRank).Append("\n"); + sb.Append(" StrengthScore: ").Append(StrengthScore).Append("\n"); + sb.Append(" StrengthLevel: ").Append(StrengthLevel).Append("\n"); + sb.Append(" UpVotes: ").Append(UpVotes).Append("\n"); + sb.Append(" DownVotes: ").Append(DownVotes).Append("\n"); + sb.Append(" ValuePredictingHighOutcome: ").Append(ValuePredictingHighOutcome).Append("\n"); + sb.Append(" ValuePredictingLowOutcome: ").Append(ValuePredictingLowOutcome).Append("\n"); + sb.Append(" NumberOfUsers: ").Append(NumberOfUsers).Append("\n"); + sb.Append(" DataSource: ").Append(DataSource).Append("\n"); + + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as CommonVariableRelationship); + } + + /// + /// Returns true if CommonVariableRelationship instances are equal + /// + /// Instance of CommonVariableRelationship to be compared + /// Boolean + public bool Equals(CommonVariableRelationship other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; + + return + ( + this.Id == other.Id || + this.Id != null && + this.Id.Equals(other.Id) + ) && + ( + this.ConfidenceLevel == other.ConfidenceLevel || + this.ConfidenceLevel != null && + this.ConfidenceLevel.Equals(other.ConfidenceLevel) + ) && + ( + this.ConfidenceScore == other.ConfidenceScore || + this.ConfidenceScore != null && + this.ConfidenceScore.Equals(other.ConfidenceScore) + ) && + ( + this.Direction == other.Direction || + this.Direction != null && + this.Direction.Equals(other.Direction) + ) && + ( + this.DurationOfAction == other.DurationOfAction || + this.DurationOfAction != null && + this.DurationOfAction.Equals(other.DurationOfAction) + ) && + ( + this.ErrorMessage == other.ErrorMessage || + this.ErrorMessage != null && + this.ErrorMessage.Equals(other.ErrorMessage) + ) && + ( + this.OnsetDelay == other.OnsetDelay || + this.OnsetDelay != null && + this.OnsetDelay.Equals(other.OnsetDelay) + ) && + ( + this.OutcomeVariableId == other.OutcomeVariableId || + this.OutcomeVariableId != null && + this.OutcomeVariableId.Equals(other.OutcomeVariableId) + ) && + ( + this.PredictorVariableId == other.PredictorVariableId || + this.PredictorVariableId != null && + this.PredictorVariableId.Equals(other.PredictorVariableId) + ) && + ( + this.PredictorUnitId == other.PredictorUnitId || + this.PredictorUnitId != null && + this.PredictorUnitId.Equals(other.PredictorUnitId) + ) && + ( + this.SinnRank == other.SinnRank || + this.SinnRank != null && + this.SinnRank.Equals(other.SinnRank) + ) && + ( + this.StrengthScore == other.StrengthScore || + this.StrengthScore != null && + this.StrengthScore.Equals(other.StrengthScore) + ) && + ( + this.StrengthLevel == other.StrengthLevel || + this.StrengthLevel != null && + this.StrengthLevel.Equals(other.StrengthLevel) + ) && + ( + this.UpVotes == other.UpVotes || + this.UpVotes != null && + this.UpVotes.Equals(other.UpVotes) + ) && + ( + this.DownVotes == other.DownVotes || + this.DownVotes != null && + this.DownVotes.Equals(other.DownVotes) + ) && + ( + this.ValuePredictingHighOutcome == other.ValuePredictingHighOutcome || + this.ValuePredictingHighOutcome != null && + this.ValuePredictingHighOutcome.Equals(other.ValuePredictingHighOutcome) + ) && + ( + this.ValuePredictingLowOutcome == other.ValuePredictingLowOutcome || + this.ValuePredictingLowOutcome != null && + this.ValuePredictingLowOutcome.Equals(other.ValuePredictingLowOutcome) + ) && + ( + this.NumberOfUsers == other.NumberOfUsers || + this.NumberOfUsers != null && + this.NumberOfUsers.Equals(other.NumberOfUsers) + ) && + ( + this.DataSource == other.DataSource || + this.DataSource != null && + this.DataSource.Equals(other.DataSource) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + + if (this.Id != null) + hash = hash * 57 + this.Id.GetHashCode(); + + if (this.ConfidenceLevel != null) + hash = hash * 57 + this.ConfidenceLevel.GetHashCode(); + + if (this.ConfidenceScore != null) + hash = hash * 57 + this.ConfidenceScore.GetHashCode(); + + if (this.Direction != null) + hash = hash * 57 + this.Direction.GetHashCode(); + + if (this.DurationOfAction != null) + hash = hash * 57 + this.DurationOfAction.GetHashCode(); + + if (this.ErrorMessage != null) + hash = hash * 57 + this.ErrorMessage.GetHashCode(); + + if (this.OnsetDelay != null) + hash = hash * 57 + this.OnsetDelay.GetHashCode(); + + if (this.OutcomeVariableId != null) + hash = hash * 57 + this.OutcomeVariableId.GetHashCode(); + + if (this.PredictorVariableId != null) + hash = hash * 57 + this.PredictorVariableId.GetHashCode(); + + if (this.PredictorUnitId != null) + hash = hash * 57 + this.PredictorUnitId.GetHashCode(); + + if (this.SinnRank != null) + hash = hash * 57 + this.SinnRank.GetHashCode(); + + if (this.StrengthScore != null) + hash = hash * 57 + this.StrengthScore.GetHashCode(); + + if (this.StrengthLevel != null) + hash = hash * 57 + this.StrengthLevel.GetHashCode(); + + if (this.UpVotes != null) + hash = hash * 57 + this.UpVotes.GetHashCode(); + + if (this.DownVotes != null) + hash = hash * 57 + this.DownVotes.GetHashCode(); + + if (this.ValuePredictingHighOutcome != null) + hash = hash * 57 + this.ValuePredictingHighOutcome.GetHashCode(); + + if (this.ValuePredictingLowOutcome != null) + hash = hash * 57 + this.ValuePredictingLowOutcome.GetHashCode(); + + if (this.NumberOfUsers != null) + hash = hash * 57 + this.NumberOfUsers.GetHashCode(); + + if (this.DataSource != null) + hash = hash * 57 + this.DataSource.GetHashCode(); + + return hash; + } + } + + } +} diff --git a/src/main/csharp/io/swagger/Model/Connection.cs b/src/main/csharp/io/swagger/Model/Connection.cs index c12a1c5..ad24078 100644 --- a/src/main/csharp/io/swagger/Model/Connection.cs +++ b/src/main/csharp/io/swagger/Model/Connection.cs @@ -1,148 +1,272 @@ using System; +using System.Linq; +using System.IO; using System.Text; using System.Collections; using System.Collections.Generic; using System.Runtime.Serialization; using Newtonsoft.Json; -namespace IO.Swagger.Model { +namespace IO.Swagger.Model +{ - /// - /// - /// - [DataContract] - public class Connection { - /// - /// id + /// /// - /// id - [DataMember(Name="id", EmitDefaultValue=false)] - public int? Id { get; set; } + [DataContract] + public class Connection : IEquatable + { + + /// + /// id + /// + /// id + [DataMember(Name="id", EmitDefaultValue=false)] + public int? Id { get; set; } + + + /// + /// ID of user that owns this correlation + /// + /// ID of user that owns this correlation + [DataMember(Name="user_id", EmitDefaultValue=false)] + public int? UserId { get; set; } + + + /// + /// The id for the connector data source for which the connection is connected + /// + /// The id for the connector data source for which the connection is connected + [DataMember(Name="connector_id", EmitDefaultValue=false)] + public int? ConnectorId { get; set; } + + + /// + /// Indicates whether a connector is currently connected to a service for a user. + /// + /// Indicates whether a connector is currently connected to a service for a user. + [DataMember(Name="connect_status", EmitDefaultValue=false)] + public string ConnectStatus { get; set; } + + + /// + /// Error message if there is a problem with authorizing this connection. + /// + /// Error message if there is a problem with authorizing this connection. + [DataMember(Name="connect_error", EmitDefaultValue=false)] + public string ConnectError { get; set; } + + + /// + /// Time at which an update was requested by a user. + /// + /// Time at which an update was requested by a user. + [DataMember(Name="update_requested_at", EmitDefaultValue=false)] + public DateTime? UpdateRequestedAt { get; set; } + + + /// + /// Indicates whether a connector is currently updated. + /// + /// Indicates whether a connector is currently updated. + [DataMember(Name="update_status", EmitDefaultValue=false)] + public string UpdateStatus { get; set; } + + + /// + /// Indicates if there was an error during the update. + /// + /// Indicates if there was an error during the update. + [DataMember(Name="update_error", EmitDefaultValue=false)] + public string UpdateError { get; set; } + + + /// + /// The time at which the connector was last successfully updated. + /// + /// The time at which the connector was last successfully updated. + [DataMember(Name="last_successful_updated_at", EmitDefaultValue=false)] + public DateTime? LastSuccessfulUpdatedAt { get; set; } + + + /// + /// When the record was first created. Use ISO 8601 datetime format + /// + /// When the record was first created. Use ISO 8601 datetime format + [DataMember(Name="created_at", EmitDefaultValue=false)] + public DateTime? CreatedAt { get; set; } + + + /// + /// When the record in the database was last updated. Use ISO 8601 datetime format + /// + /// When the record in the database was last updated. Use ISO 8601 datetime format + [DataMember(Name="updated_at", EmitDefaultValue=false)] + public DateTime? UpdatedAt { get; set; } + + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Connection {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" UserId: ").Append(UserId).Append("\n"); + sb.Append(" ConnectorId: ").Append(ConnectorId).Append("\n"); + sb.Append(" ConnectStatus: ").Append(ConnectStatus).Append("\n"); + sb.Append(" ConnectError: ").Append(ConnectError).Append("\n"); + sb.Append(" UpdateRequestedAt: ").Append(UpdateRequestedAt).Append("\n"); + sb.Append(" UpdateStatus: ").Append(UpdateStatus).Append("\n"); + sb.Append(" UpdateError: ").Append(UpdateError).Append("\n"); + sb.Append(" LastSuccessfulUpdatedAt: ").Append(LastSuccessfulUpdatedAt).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); + + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } - - /// - /// user_id - /// - /// user_id - [DataMember(Name="user_id", EmitDefaultValue=false)] - public int? UserId { get; set; } - - - /// - /// connector_id - /// - /// connector_id - [DataMember(Name="connector_id", EmitDefaultValue=false)] - public int? ConnectorId { get; set; } - - - /// - /// connect_status - /// - /// connect_status - [DataMember(Name="connect_status", EmitDefaultValue=false)] - public string ConnectStatus { get; set; } - - - /// - /// connect_error - /// - /// connect_error - [DataMember(Name="connect_error", EmitDefaultValue=false)] - public string ConnectError { get; set; } + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as Connection); + } - - /// - /// update_requested_at - /// - /// update_requested_at - [DataMember(Name="update_requested_at", EmitDefaultValue=false)] - public DateTime? UpdateRequestedAt { get; set; } + /// + /// Returns true if Connection instances are equal + /// + /// Instance of Connection to be compared + /// Boolean + public bool Equals(Connection other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; - - /// - /// update_status - /// - /// update_status - [DataMember(Name="update_status", EmitDefaultValue=false)] - public string UpdateStatus { get; set; } + return + ( + this.Id == other.Id || + this.Id != null && + this.Id.Equals(other.Id) + ) && + ( + this.UserId == other.UserId || + this.UserId != null && + this.UserId.Equals(other.UserId) + ) && + ( + this.ConnectorId == other.ConnectorId || + this.ConnectorId != null && + this.ConnectorId.Equals(other.ConnectorId) + ) && + ( + this.ConnectStatus == other.ConnectStatus || + this.ConnectStatus != null && + this.ConnectStatus.Equals(other.ConnectStatus) + ) && + ( + this.ConnectError == other.ConnectError || + this.ConnectError != null && + this.ConnectError.Equals(other.ConnectError) + ) && + ( + this.UpdateRequestedAt == other.UpdateRequestedAt || + this.UpdateRequestedAt != null && + this.UpdateRequestedAt.Equals(other.UpdateRequestedAt) + ) && + ( + this.UpdateStatus == other.UpdateStatus || + this.UpdateStatus != null && + this.UpdateStatus.Equals(other.UpdateStatus) + ) && + ( + this.UpdateError == other.UpdateError || + this.UpdateError != null && + this.UpdateError.Equals(other.UpdateError) + ) && + ( + this.LastSuccessfulUpdatedAt == other.LastSuccessfulUpdatedAt || + this.LastSuccessfulUpdatedAt != null && + this.LastSuccessfulUpdatedAt.Equals(other.LastSuccessfulUpdatedAt) + ) && + ( + this.CreatedAt == other.CreatedAt || + this.CreatedAt != null && + this.CreatedAt.Equals(other.CreatedAt) + ) && + ( + this.UpdatedAt == other.UpdatedAt || + this.UpdatedAt != null && + this.UpdatedAt.Equals(other.UpdatedAt) + ); + } - - /// - /// update_error - /// - /// update_error - [DataMember(Name="update_error", EmitDefaultValue=false)] - public string UpdateError { get; set; } + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + + if (this.Id != null) + hash = hash * 57 + this.Id.GetHashCode(); + + if (this.UserId != null) + hash = hash * 57 + this.UserId.GetHashCode(); + + if (this.ConnectorId != null) + hash = hash * 57 + this.ConnectorId.GetHashCode(); + + if (this.ConnectStatus != null) + hash = hash * 57 + this.ConnectStatus.GetHashCode(); + + if (this.ConnectError != null) + hash = hash * 57 + this.ConnectError.GetHashCode(); + + if (this.UpdateRequestedAt != null) + hash = hash * 57 + this.UpdateRequestedAt.GetHashCode(); + + if (this.UpdateStatus != null) + hash = hash * 57 + this.UpdateStatus.GetHashCode(); + + if (this.UpdateError != null) + hash = hash * 57 + this.UpdateError.GetHashCode(); + + if (this.LastSuccessfulUpdatedAt != null) + hash = hash * 57 + this.LastSuccessfulUpdatedAt.GetHashCode(); + + if (this.CreatedAt != null) + hash = hash * 57 + this.CreatedAt.GetHashCode(); + + if (this.UpdatedAt != null) + hash = hash * 57 + this.UpdatedAt.GetHashCode(); + + return hash; + } + } - - /// - /// last_successful_updated_at - /// - /// last_successful_updated_at - [DataMember(Name="last_successful_updated_at", EmitDefaultValue=false)] - public DateTime? LastSuccessfulUpdatedAt { get; set; } - - - /// - /// created_at - /// - /// created_at - [DataMember(Name="created_at", EmitDefaultValue=false)] - public DateTime? CreatedAt { get; set; } - - - /// - /// updated_at - /// - /// updated_at - [DataMember(Name="updated_at", EmitDefaultValue=false)] - public DateTime? UpdatedAt { get; set; } - - - - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class Connection {\n"); - - sb.Append(" Id: ").Append(Id).Append("\n"); - - sb.Append(" UserId: ").Append(UserId).Append("\n"); - - sb.Append(" ConnectorId: ").Append(ConnectorId).Append("\n"); - - sb.Append(" ConnectStatus: ").Append(ConnectStatus).Append("\n"); - - sb.Append(" ConnectError: ").Append(ConnectError).Append("\n"); - - sb.Append(" UpdateRequestedAt: ").Append(UpdateRequestedAt).Append("\n"); - - sb.Append(" UpdateStatus: ").Append(UpdateStatus).Append("\n"); - - sb.Append(" UpdateError: ").Append(UpdateError).Append("\n"); - - sb.Append(" LastSuccessfulUpdatedAt: ").Append(LastSuccessfulUpdatedAt).Append("\n"); - - sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); - - sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); - - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Get the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() { - return JsonConvert.SerializeObject(this, Formatting.Indented); } - -} } diff --git a/src/main/csharp/io/swagger/Model/Connector.cs b/src/main/csharp/io/swagger/Model/Connector.cs index 7b51bf8..d0f0407 100644 --- a/src/main/csharp/io/swagger/Model/Connector.cs +++ b/src/main/csharp/io/swagger/Model/Connector.cs @@ -1,128 +1,272 @@ using System; +using System.Linq; +using System.IO; using System.Text; using System.Collections; using System.Collections.Generic; using System.Runtime.Serialization; using Newtonsoft.Json; -namespace IO.Swagger.Model { +namespace IO.Swagger.Model +{ - /// - /// - /// - [DataContract] - public class Connector { - /// - /// Connector ID number + /// /// - /// Connector ID number - [DataMember(Name="id", EmitDefaultValue=false)] - public int? Id { get; set; } + [DataContract] + public class Connector : IEquatable + { + + /// + /// Connector ID number + /// + /// Connector ID number + [DataMember(Name="id", EmitDefaultValue=false)] + public int? Id { get; set; } + + + /// + /// Lowercase system name for the data source + /// + /// Lowercase system name for the data source + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + + /// + /// Pretty display name for the data source + /// + /// Pretty display name for the data source + [DataMember(Name="display_name", EmitDefaultValue=false)] + public string DisplayName { get; set; } + + + /// + /// URL to the image of the connector logo + /// + /// URL to the image of the connector logo + [DataMember(Name="image", EmitDefaultValue=false)] + public string Image { get; set; } + + + /// + /// URL to a site where one can get this device or application + /// + /// URL to a site where one can get this device or application + [DataMember(Name="get_it_url", EmitDefaultValue=false)] + public string GetItUrl { get; set; } + + + /// + /// Short description of the service (such as the categories it tracks) + /// + /// Short description of the service (such as the categories it tracks) + [DataMember(Name="short_description", EmitDefaultValue=false)] + public string ShortDescription { get; set; } + + + /// + /// Longer paragraph description of the data provider + /// + /// Longer paragraph description of the data provider + [DataMember(Name="long_description", EmitDefaultValue=false)] + public string LongDescription { get; set; } + + + /// + /// Set to 1 if the connector should be returned when listing connectors + /// + /// Set to 1 if the connector should be returned when listing connectors + [DataMember(Name="enabled", EmitDefaultValue=false)] + public bool? Enabled { get; set; } + + + /// + /// Set to 1 if the connector uses OAuth authentication as opposed to username/password + /// + /// Set to 1 if the connector uses OAuth authentication as opposed to username/password + [DataMember(Name="oauth", EmitDefaultValue=false)] + public bool? Oauth { get; set; } + + + /// + /// When the record was first created. Use ISO 8601 datetime format + /// + /// When the record was first created. Use ISO 8601 datetime format + [DataMember(Name="created_at", EmitDefaultValue=false)] + public DateTime? CreatedAt { get; set; } + + + /// + /// When the record in the database was last updated. Use ISO 8601 datetime format + /// + /// When the record in the database was last updated. Use ISO 8601 datetime format + [DataMember(Name="updated_at", EmitDefaultValue=false)] + public DateTime? UpdatedAt { get; set; } + + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Connector {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" DisplayName: ").Append(DisplayName).Append("\n"); + sb.Append(" Image: ").Append(Image).Append("\n"); + sb.Append(" GetItUrl: ").Append(GetItUrl).Append("\n"); + sb.Append(" ShortDescription: ").Append(ShortDescription).Append("\n"); + sb.Append(" LongDescription: ").Append(LongDescription).Append("\n"); + sb.Append(" Enabled: ").Append(Enabled).Append("\n"); + sb.Append(" Oauth: ").Append(Oauth).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); + + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } - - /// - /// Connector lowercase system name - /// - /// Connector lowercase system name - [DataMember(Name="name", EmitDefaultValue=false)] - public string Name { get; set; } + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as Connector); + } - - /// - /// Connector pretty display name - /// - /// Connector pretty display name - [DataMember(Name="display_name", EmitDefaultValue=false)] - public string DisplayName { get; set; } + /// + /// Returns true if Connector instances are equal + /// + /// Instance of Connector to be compared + /// Boolean + public bool Equals(Connector other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; - - /// - /// URL to the image of the connector logo - /// - /// URL to the image of the connector logo - [DataMember(Name="image", EmitDefaultValue=false)] - public string Image { get; set; } + return + ( + this.Id == other.Id || + this.Id != null && + this.Id.Equals(other.Id) + ) && + ( + this.Name == other.Name || + this.Name != null && + this.Name.Equals(other.Name) + ) && + ( + this.DisplayName == other.DisplayName || + this.DisplayName != null && + this.DisplayName.Equals(other.DisplayName) + ) && + ( + this.Image == other.Image || + this.Image != null && + this.Image.Equals(other.Image) + ) && + ( + this.GetItUrl == other.GetItUrl || + this.GetItUrl != null && + this.GetItUrl.Equals(other.GetItUrl) + ) && + ( + this.ShortDescription == other.ShortDescription || + this.ShortDescription != null && + this.ShortDescription.Equals(other.ShortDescription) + ) && + ( + this.LongDescription == other.LongDescription || + this.LongDescription != null && + this.LongDescription.Equals(other.LongDescription) + ) && + ( + this.Enabled == other.Enabled || + this.Enabled != null && + this.Enabled.Equals(other.Enabled) + ) && + ( + this.Oauth == other.Oauth || + this.Oauth != null && + this.Oauth.Equals(other.Oauth) + ) && + ( + this.CreatedAt == other.CreatedAt || + this.CreatedAt != null && + this.CreatedAt.Equals(other.CreatedAt) + ) && + ( + this.UpdatedAt == other.UpdatedAt || + this.UpdatedAt != null && + this.UpdatedAt.Equals(other.UpdatedAt) + ); + } - - /// - /// URL to a site where one can get this device or application - /// - /// URL to a site where one can get this device or application - [DataMember(Name="get_it_url", EmitDefaultValue=false)] - public string GetItUrl { get; set; } + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + + if (this.Id != null) + hash = hash * 57 + this.Id.GetHashCode(); + + if (this.Name != null) + hash = hash * 57 + this.Name.GetHashCode(); + + if (this.DisplayName != null) + hash = hash * 57 + this.DisplayName.GetHashCode(); + + if (this.Image != null) + hash = hash * 57 + this.Image.GetHashCode(); + + if (this.GetItUrl != null) + hash = hash * 57 + this.GetItUrl.GetHashCode(); + + if (this.ShortDescription != null) + hash = hash * 57 + this.ShortDescription.GetHashCode(); + + if (this.LongDescription != null) + hash = hash * 57 + this.LongDescription.GetHashCode(); + + if (this.Enabled != null) + hash = hash * 57 + this.Enabled.GetHashCode(); + + if (this.Oauth != null) + hash = hash * 57 + this.Oauth.GetHashCode(); + + if (this.CreatedAt != null) + hash = hash * 57 + this.CreatedAt.GetHashCode(); + + if (this.UpdatedAt != null) + hash = hash * 57 + this.UpdatedAt.GetHashCode(); + + return hash; + } + } - - /// - /// Short description - /// - /// Short description - [DataMember(Name="short_description", EmitDefaultValue=false)] - public string ShortDescription { get; set; } - - - /// - /// Long description - /// - /// Long description - [DataMember(Name="long_description", EmitDefaultValue=false)] - public string LongDescription { get; set; } - - - /// - /// enabled - /// - /// enabled - [DataMember(Name="enabled", EmitDefaultValue=false)] - public bool? Enabled { get; set; } - - - /// - /// oauth - /// - /// oauth - [DataMember(Name="oauth", EmitDefaultValue=false)] - public bool? Oauth { get; set; } - - - - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class Connector {\n"); - - sb.Append(" Id: ").Append(Id).Append("\n"); - - sb.Append(" Name: ").Append(Name).Append("\n"); - - sb.Append(" DisplayName: ").Append(DisplayName).Append("\n"); - - sb.Append(" Image: ").Append(Image).Append("\n"); - - sb.Append(" GetItUrl: ").Append(GetItUrl).Append("\n"); - - sb.Append(" ShortDescription: ").Append(ShortDescription).Append("\n"); - - sb.Append(" LongDescription: ").Append(LongDescription).Append("\n"); - - sb.Append(" Enabled: ").Append(Enabled).Append("\n"); - - sb.Append(" Oauth: ").Append(Oauth).Append("\n"); - - sb.Append("}\n"); - return sb.ToString(); } - - /// - /// Get the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - -} } diff --git a/src/main/csharp/io/swagger/Model/Correlation.cs b/src/main/csharp/io/swagger/Model/Correlation.cs index 3aaee75..021f6ea 100644 --- a/src/main/csharp/io/swagger/Model/Correlation.cs +++ b/src/main/csharp/io/swagger/Model/Correlation.cs @@ -1,278 +1,493 @@ using System; +using System.Linq; +using System.IO; using System.Text; using System.Collections; using System.Collections.Generic; using System.Runtime.Serialization; using Newtonsoft.Json; -namespace IO.Swagger.Model { +namespace IO.Swagger.Model +{ - /// - /// - /// - [DataContract] - public class Correlation { - /// - /// id + /// /// - /// id - [DataMember(Name="id", EmitDefaultValue=false)] - public int? Id { get; set; } + [DataContract] + public class Correlation : IEquatable + { + + /// + /// id + /// + /// id + [DataMember(Name="id", EmitDefaultValue=false)] + public int? Id { get; set; } + + + /// + /// Time at which correlation was calculated + /// + /// Time at which correlation was calculated + [DataMember(Name="timestamp", EmitDefaultValue=false)] + public int? Timestamp { get; set; } + + + /// + /// ID of user that owns this correlation + /// + /// ID of user that owns this correlation + [DataMember(Name="user_id", EmitDefaultValue=false)] + public int? UserId { get; set; } + + + /// + /// Pearson correlation coefficient between cause and effect measurements + /// + /// Pearson correlation coefficient between cause and effect measurements + [DataMember(Name="correlation", EmitDefaultValue=false)] + public float? _Correlation { get; set; } + + + /// + /// variable ID of the cause variable for which the user desires correlations + /// + /// variable ID of the cause variable for which the user desires correlations + [DataMember(Name="cause_id", EmitDefaultValue=false)] + public int? CauseId { get; set; } + + + /// + /// variable ID of the effect variable for which the user desires correlations + /// + /// variable ID of the effect variable for which the user desires correlations + [DataMember(Name="effect_id", EmitDefaultValue=false)] + public int? EffectId { get; set; } + + + /// + /// User estimated or default time after cause measurement before a perceivable effect is observed + /// + /// User estimated or default time after cause measurement before a perceivable effect is observed + [DataMember(Name="onset_delay", EmitDefaultValue=false)] + public int? OnsetDelay { get; set; } + + + /// + /// Time over which the cause is expected to produce a perceivable effect following the onset delay + /// + /// Time over which the cause is expected to produce a perceivable effect following the onset delay + [DataMember(Name="duration_of_action", EmitDefaultValue=false)] + public int? DurationOfAction { get; set; } + + + /// + /// Number of points that went into the correlation calculation + /// + /// Number of points that went into the correlation calculation + [DataMember(Name="number_of_pairs", EmitDefaultValue=false)] + public int? NumberOfPairs { get; set; } + + + /// + /// cause value that predicts an above average effect value (in default unit for cause variable) + /// + /// cause value that predicts an above average effect value (in default unit for cause variable) + [DataMember(Name="value_predicting_high_outcome", EmitDefaultValue=false)] + public float? ValuePredictingHighOutcome { get; set; } + + + /// + /// cause value that predicts a below average effect value (in default unit for cause variable) + /// + /// cause value that predicts a below average effect value (in default unit for cause variable) + [DataMember(Name="value_predicting_low_outcome", EmitDefaultValue=false)] + public float? ValuePredictingLowOutcome { get; set; } + + + /// + /// Optimal Pearson Product + /// + /// Optimal Pearson Product + [DataMember(Name="optimal_pearson_product", EmitDefaultValue=false)] + public float? OptimalPearsonProduct { get; set; } + + + /// + /// Vote + /// + /// Vote + [DataMember(Name="vote", EmitDefaultValue=false)] + public float? Vote { get; set; } + + + /// + /// A function of the effect size and sample size + /// + /// A function of the effect size and sample size + [DataMember(Name="statistical_significance", EmitDefaultValue=false)] + public float? StatisticalSignificance { get; set; } + + + /// + /// Unit of the predictor variable + /// + /// Unit of the predictor variable + [DataMember(Name="cause_unit", EmitDefaultValue=false)] + public string CauseUnit { get; set; } + + + /// + /// Unit ID of the predictor variable + /// + /// Unit ID of the predictor variable + [DataMember(Name="cause_unit_id", EmitDefaultValue=false)] + public int? CauseUnitId { get; set; } + + + /// + /// Cause changes + /// + /// Cause changes + [DataMember(Name="cause_changes", EmitDefaultValue=false)] + public int? CauseChanges { get; set; } + + + /// + /// Effect changes + /// + /// Effect changes + [DataMember(Name="effect_changes", EmitDefaultValue=false)] + public int? EffectChanges { get; set; } + + + /// + /// QM Score + /// + /// QM Score + [DataMember(Name="qm_score", EmitDefaultValue=false)] + public float? QmScore { get; set; } + + + /// + /// error + /// + /// error + [DataMember(Name="error", EmitDefaultValue=false)] + public string Error { get; set; } + + + /// + /// When the record was first created. Use ISO 8601 datetime format + /// + /// When the record was first created. Use ISO 8601 datetime format + [DataMember(Name="created_at", EmitDefaultValue=false)] + public DateTime? CreatedAt { get; set; } + + + /// + /// When the record in the database was last updated. Use ISO 8601 datetime format + /// + /// When the record in the database was last updated. Use ISO 8601 datetime format + [DataMember(Name="updated_at", EmitDefaultValue=false)] + public DateTime? UpdatedAt { get; set; } + + + /// + /// Correlation when cause and effect are reversed. For any causal relationship, the forward correlation should exceed the reverse correlation + /// + /// Correlation when cause and effect are reversed. For any causal relationship, the forward correlation should exceed the reverse correlation + [DataMember(Name="reverse_pearson_correlation_coefficient", EmitDefaultValue=false)] + public float? ReversePearsonCorrelationCoefficient { get; set; } + + + /// + /// Predictive Pearson Correlation Coefficient + /// + /// Predictive Pearson Correlation Coefficient + [DataMember(Name="predictive_pearson_correlation_coefficient", EmitDefaultValue=false)] + public float? PredictivePearsonCorrelationCoefficient { get; set; } + + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Correlation {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Timestamp: ").Append(Timestamp).Append("\n"); + sb.Append(" UserId: ").Append(UserId).Append("\n"); + sb.Append(" _Correlation: ").Append(_Correlation).Append("\n"); + sb.Append(" CauseId: ").Append(CauseId).Append("\n"); + sb.Append(" EffectId: ").Append(EffectId).Append("\n"); + sb.Append(" OnsetDelay: ").Append(OnsetDelay).Append("\n"); + sb.Append(" DurationOfAction: ").Append(DurationOfAction).Append("\n"); + sb.Append(" NumberOfPairs: ").Append(NumberOfPairs).Append("\n"); + sb.Append(" ValuePredictingHighOutcome: ").Append(ValuePredictingHighOutcome).Append("\n"); + sb.Append(" ValuePredictingLowOutcome: ").Append(ValuePredictingLowOutcome).Append("\n"); + sb.Append(" OptimalPearsonProduct: ").Append(OptimalPearsonProduct).Append("\n"); + sb.Append(" Vote: ").Append(Vote).Append("\n"); + sb.Append(" StatisticalSignificance: ").Append(StatisticalSignificance).Append("\n"); + sb.Append(" CauseUnit: ").Append(CauseUnit).Append("\n"); + sb.Append(" CauseUnitId: ").Append(CauseUnitId).Append("\n"); + sb.Append(" CauseChanges: ").Append(CauseChanges).Append("\n"); + sb.Append(" EffectChanges: ").Append(EffectChanges).Append("\n"); + sb.Append(" QmScore: ").Append(QmScore).Append("\n"); + sb.Append(" Error: ").Append(Error).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); + sb.Append(" ReversePearsonCorrelationCoefficient: ").Append(ReversePearsonCorrelationCoefficient).Append("\n"); + sb.Append(" PredictivePearsonCorrelationCoefficient: ").Append(PredictivePearsonCorrelationCoefficient).Append("\n"); + + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } - - /// - /// Time at which correlation was calculated - /// - /// Time at which correlation was calculated - [DataMember(Name="timestamp", EmitDefaultValue=false)] - public int? Timestamp { get; set; } - - - /// - /// ID of user that owns this correlation - /// - /// ID of user that owns this correlation - [DataMember(Name="user_id", EmitDefaultValue=false)] - public int? UserId { get; set; } - - - /// - /// Pearson correlation coefficient between cause and effect measurements - /// - /// Pearson correlation coefficient between cause and effect measurements - [DataMember(Name="correlation", EmitDefaultValue=false)] - public float? Correlation { get; set; } - - - /// - /// variable ID of the cause variable for which the user desires correlations - /// - /// variable ID of the cause variable for which the user desires correlations - [DataMember(Name="cause_id", EmitDefaultValue=false)] - public int? CauseId { get; set; } - - - /// - /// variable ID of the effect variable for which the user desires correlations - /// - /// variable ID of the effect variable for which the user desires correlations - [DataMember(Name="effect_id", EmitDefaultValue=false)] - public int? EffectId { get; set; } - - - /// - /// User estimated or default time after cause measurement before a perceivable effect is observed - /// - /// User estimated or default time after cause measurement before a perceivable effect is observed - [DataMember(Name="onset_delay", EmitDefaultValue=false)] - public int? OnsetDelay { get; set; } - - - /// - /// Time over which the cause is expected to produce a perceivable effect following the onset delay - /// - /// Time over which the cause is expected to produce a perceivable effect following the onset delay - [DataMember(Name="duration_of_action", EmitDefaultValue=false)] - public int? DurationOfAction { get; set; } - - - /// - /// Number of points that went into the correlation calculation - /// - /// Number of points that went into the correlation calculation - [DataMember(Name="number_of_pairs", EmitDefaultValue=false)] - public int? NumberOfPairs { get; set; } - - - /// - /// cause value that predicts an above average effect value (in default unit for cause variable) - /// - /// cause value that predicts an above average effect value (in default unit for cause variable) - [DataMember(Name="value_predicting_high_outcome", EmitDefaultValue=false)] - public float? ValuePredictingHighOutcome { get; set; } - - - /// - /// cause value that predicts a below average effect value (in default unit for cause variable) - /// - /// cause value that predicts a below average effect value (in default unit for cause variable) - [DataMember(Name="value_predicting_low_outcome", EmitDefaultValue=false)] - public float? ValuePredictingLowOutcome { get; set; } - - - /// - /// Optimal Pearson Product - /// - /// Optimal Pearson Product - [DataMember(Name="optimal_pearson_product", EmitDefaultValue=false)] - public float? OptimalPearsonProduct { get; set; } - - - /// - /// Vote - /// - /// Vote - [DataMember(Name="vote", EmitDefaultValue=false)] - public float? Vote { get; set; } - - - /// - /// A function of the effect size and sample size - /// - /// A function of the effect size and sample size - [DataMember(Name="statistical_significance", EmitDefaultValue=false)] - public float? StatisticalSignificance { get; set; } + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as Correlation); + } - - /// - /// Unit of Cause - /// - /// Unit of Cause - [DataMember(Name="cause_unit", EmitDefaultValue=false)] - public string CauseUnit { get; set; } - - - /// - /// Unit ID of Cause - /// - /// Unit ID of Cause - [DataMember(Name="cause_unit_id", EmitDefaultValue=false)] - public int? CauseUnitId { get; set; } + /// + /// Returns true if Correlation instances are equal + /// + /// Instance of Correlation to be compared + /// Boolean + public bool Equals(Correlation other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; - - /// - /// Cause changes - /// - /// Cause changes - [DataMember(Name="cause_changes", EmitDefaultValue=false)] - public int? CauseChanges { get; set; } + return + ( + this.Id == other.Id || + this.Id != null && + this.Id.Equals(other.Id) + ) && + ( + this.Timestamp == other.Timestamp || + this.Timestamp != null && + this.Timestamp.Equals(other.Timestamp) + ) && + ( + this.UserId == other.UserId || + this.UserId != null && + this.UserId.Equals(other.UserId) + ) && + ( + this._Correlation == other._Correlation || + this._Correlation != null && + this._Correlation.Equals(other._Correlation) + ) && + ( + this.CauseId == other.CauseId || + this.CauseId != null && + this.CauseId.Equals(other.CauseId) + ) && + ( + this.EffectId == other.EffectId || + this.EffectId != null && + this.EffectId.Equals(other.EffectId) + ) && + ( + this.OnsetDelay == other.OnsetDelay || + this.OnsetDelay != null && + this.OnsetDelay.Equals(other.OnsetDelay) + ) && + ( + this.DurationOfAction == other.DurationOfAction || + this.DurationOfAction != null && + this.DurationOfAction.Equals(other.DurationOfAction) + ) && + ( + this.NumberOfPairs == other.NumberOfPairs || + this.NumberOfPairs != null && + this.NumberOfPairs.Equals(other.NumberOfPairs) + ) && + ( + this.ValuePredictingHighOutcome == other.ValuePredictingHighOutcome || + this.ValuePredictingHighOutcome != null && + this.ValuePredictingHighOutcome.Equals(other.ValuePredictingHighOutcome) + ) && + ( + this.ValuePredictingLowOutcome == other.ValuePredictingLowOutcome || + this.ValuePredictingLowOutcome != null && + this.ValuePredictingLowOutcome.Equals(other.ValuePredictingLowOutcome) + ) && + ( + this.OptimalPearsonProduct == other.OptimalPearsonProduct || + this.OptimalPearsonProduct != null && + this.OptimalPearsonProduct.Equals(other.OptimalPearsonProduct) + ) && + ( + this.Vote == other.Vote || + this.Vote != null && + this.Vote.Equals(other.Vote) + ) && + ( + this.StatisticalSignificance == other.StatisticalSignificance || + this.StatisticalSignificance != null && + this.StatisticalSignificance.Equals(other.StatisticalSignificance) + ) && + ( + this.CauseUnit == other.CauseUnit || + this.CauseUnit != null && + this.CauseUnit.Equals(other.CauseUnit) + ) && + ( + this.CauseUnitId == other.CauseUnitId || + this.CauseUnitId != null && + this.CauseUnitId.Equals(other.CauseUnitId) + ) && + ( + this.CauseChanges == other.CauseChanges || + this.CauseChanges != null && + this.CauseChanges.Equals(other.CauseChanges) + ) && + ( + this.EffectChanges == other.EffectChanges || + this.EffectChanges != null && + this.EffectChanges.Equals(other.EffectChanges) + ) && + ( + this.QmScore == other.QmScore || + this.QmScore != null && + this.QmScore.Equals(other.QmScore) + ) && + ( + this.Error == other.Error || + this.Error != null && + this.Error.Equals(other.Error) + ) && + ( + this.CreatedAt == other.CreatedAt || + this.CreatedAt != null && + this.CreatedAt.Equals(other.CreatedAt) + ) && + ( + this.UpdatedAt == other.UpdatedAt || + this.UpdatedAt != null && + this.UpdatedAt.Equals(other.UpdatedAt) + ) && + ( + this.ReversePearsonCorrelationCoefficient == other.ReversePearsonCorrelationCoefficient || + this.ReversePearsonCorrelationCoefficient != null && + this.ReversePearsonCorrelationCoefficient.Equals(other.ReversePearsonCorrelationCoefficient) + ) && + ( + this.PredictivePearsonCorrelationCoefficient == other.PredictivePearsonCorrelationCoefficient || + this.PredictivePearsonCorrelationCoefficient != null && + this.PredictivePearsonCorrelationCoefficient.Equals(other.PredictivePearsonCorrelationCoefficient) + ); + } - - /// - /// Effect changes - /// - /// Effect changes - [DataMember(Name="effect_changes", EmitDefaultValue=false)] - public int? EffectChanges { get; set; } - - - /// - /// QM Score - /// - /// QM Score - [DataMember(Name="qm_score", EmitDefaultValue=false)] - public float? QmScore { get; set; } - - - /// - /// error - /// - /// error - [DataMember(Name="error", EmitDefaultValue=false)] - public string Error { get; set; } - - - /// - /// created_at - /// - /// created_at - [DataMember(Name="created_at", EmitDefaultValue=false)] - public DateTime? CreatedAt { get; set; } + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + + if (this.Id != null) + hash = hash * 57 + this.Id.GetHashCode(); + + if (this.Timestamp != null) + hash = hash * 57 + this.Timestamp.GetHashCode(); + + if (this.UserId != null) + hash = hash * 57 + this.UserId.GetHashCode(); + + if (this._Correlation != null) + hash = hash * 57 + this._Correlation.GetHashCode(); + + if (this.CauseId != null) + hash = hash * 57 + this.CauseId.GetHashCode(); + + if (this.EffectId != null) + hash = hash * 57 + this.EffectId.GetHashCode(); + + if (this.OnsetDelay != null) + hash = hash * 57 + this.OnsetDelay.GetHashCode(); + + if (this.DurationOfAction != null) + hash = hash * 57 + this.DurationOfAction.GetHashCode(); + + if (this.NumberOfPairs != null) + hash = hash * 57 + this.NumberOfPairs.GetHashCode(); + + if (this.ValuePredictingHighOutcome != null) + hash = hash * 57 + this.ValuePredictingHighOutcome.GetHashCode(); + + if (this.ValuePredictingLowOutcome != null) + hash = hash * 57 + this.ValuePredictingLowOutcome.GetHashCode(); + + if (this.OptimalPearsonProduct != null) + hash = hash * 57 + this.OptimalPearsonProduct.GetHashCode(); + + if (this.Vote != null) + hash = hash * 57 + this.Vote.GetHashCode(); + + if (this.StatisticalSignificance != null) + hash = hash * 57 + this.StatisticalSignificance.GetHashCode(); + + if (this.CauseUnit != null) + hash = hash * 57 + this.CauseUnit.GetHashCode(); + + if (this.CauseUnitId != null) + hash = hash * 57 + this.CauseUnitId.GetHashCode(); + + if (this.CauseChanges != null) + hash = hash * 57 + this.CauseChanges.GetHashCode(); + + if (this.EffectChanges != null) + hash = hash * 57 + this.EffectChanges.GetHashCode(); + + if (this.QmScore != null) + hash = hash * 57 + this.QmScore.GetHashCode(); + + if (this.Error != null) + hash = hash * 57 + this.Error.GetHashCode(); + + if (this.CreatedAt != null) + hash = hash * 57 + this.CreatedAt.GetHashCode(); + + if (this.UpdatedAt != null) + hash = hash * 57 + this.UpdatedAt.GetHashCode(); + + if (this.ReversePearsonCorrelationCoefficient != null) + hash = hash * 57 + this.ReversePearsonCorrelationCoefficient.GetHashCode(); + + if (this.PredictivePearsonCorrelationCoefficient != null) + hash = hash * 57 + this.PredictivePearsonCorrelationCoefficient.GetHashCode(); + + return hash; + } + } - - /// - /// updated_at - /// - /// updated_at - [DataMember(Name="updated_at", EmitDefaultValue=false)] - public DateTime? UpdatedAt { get; set; } - - - /// - /// Correlation when cause and effect are reversed. For any causal relationship, the forward correlation should exceed the reverse correlation - /// - /// Correlation when cause and effect are reversed. For any causal relationship, the forward correlation should exceed the reverse correlation - [DataMember(Name="reverse_pearson_correlation_coefficient", EmitDefaultValue=false)] - public float? ReversePearsonCorrelationCoefficient { get; set; } - - - /// - /// Predictive Pearson Correlation Coefficient - /// - /// Predictive Pearson Correlation Coefficient - [DataMember(Name="predictive_pearson_correlation_coefficient", EmitDefaultValue=false)] - public float? PredictivePearsonCorrelationCoefficient { get; set; } - - - - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class Correlation {\n"); - - sb.Append(" Id: ").Append(Id).Append("\n"); - - sb.Append(" Timestamp: ").Append(Timestamp).Append("\n"); - - sb.Append(" UserId: ").Append(UserId).Append("\n"); - - sb.Append(" Correlation: ").Append(Correlation).Append("\n"); - - sb.Append(" CauseId: ").Append(CauseId).Append("\n"); - - sb.Append(" EffectId: ").Append(EffectId).Append("\n"); - - sb.Append(" OnsetDelay: ").Append(OnsetDelay).Append("\n"); - - sb.Append(" DurationOfAction: ").Append(DurationOfAction).Append("\n"); - - sb.Append(" NumberOfPairs: ").Append(NumberOfPairs).Append("\n"); - - sb.Append(" ValuePredictingHighOutcome: ").Append(ValuePredictingHighOutcome).Append("\n"); - - sb.Append(" ValuePredictingLowOutcome: ").Append(ValuePredictingLowOutcome).Append("\n"); - - sb.Append(" OptimalPearsonProduct: ").Append(OptimalPearsonProduct).Append("\n"); - - sb.Append(" Vote: ").Append(Vote).Append("\n"); - - sb.Append(" StatisticalSignificance: ").Append(StatisticalSignificance).Append("\n"); - - sb.Append(" CauseUnit: ").Append(CauseUnit).Append("\n"); - - sb.Append(" CauseUnitId: ").Append(CauseUnitId).Append("\n"); - - sb.Append(" CauseChanges: ").Append(CauseChanges).Append("\n"); - - sb.Append(" EffectChanges: ").Append(EffectChanges).Append("\n"); - - sb.Append(" QmScore: ").Append(QmScore).Append("\n"); - - sb.Append(" Error: ").Append(Error).Append("\n"); - - sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); - - sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); - - sb.Append(" ReversePearsonCorrelationCoefficient: ").Append(ReversePearsonCorrelationCoefficient).Append("\n"); - - sb.Append(" PredictivePearsonCorrelationCoefficient: ").Append(PredictivePearsonCorrelationCoefficient).Append("\n"); - - sb.Append("}\n"); - return sb.ToString(); } - - /// - /// Get the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - -} } diff --git a/src/main/csharp/io/swagger/Model/Credential.cs b/src/main/csharp/io/swagger/Model/Credential.cs index c12d083..80a9afb 100644 --- a/src/main/csharp/io/swagger/Model/Credential.cs +++ b/src/main/csharp/io/swagger/Model/Credential.cs @@ -1,88 +1,187 @@ using System; +using System.Linq; +using System.IO; using System.Text; using System.Collections; using System.Collections.Generic; using System.Runtime.Serialization; using Newtonsoft.Json; -namespace IO.Swagger.Model { +namespace IO.Swagger.Model +{ - /// - /// - /// - [DataContract] - public class Credential { - /// - /// connector_id + /// /// - /// connector_id - [DataMember(Name="connector_id", EmitDefaultValue=false)] - public int? ConnectorId { get; set; } + [DataContract] + public class Credential : IEquatable + { + + /// + /// ID of user that owns this credential + /// + /// ID of user that owns this credential + [DataMember(Name="user_id", EmitDefaultValue=false)] + public int? UserId { get; set; } + + + /// + /// The id for the connector data source from which the credential was obtained + /// + /// The id for the connector data source from which the credential was obtained + [DataMember(Name="connector_id", EmitDefaultValue=false)] + public int? ConnectorId { get; set; } + + + /// + /// Attribute name such as token, userid, username, or password + /// + /// Attribute name such as token, userid, username, or password + [DataMember(Name="attr_key", EmitDefaultValue=false)] + public string AttrKey { get; set; } + + + /// + /// Encrypted value for the attribute specified + /// + /// Encrypted value for the attribute specified + [DataMember(Name="attr_value", EmitDefaultValue=false)] + public string AttrValue { get; set; } + + + /// + /// When the record was first created. Use ISO 8601 datetime format + /// + /// When the record was first created. Use ISO 8601 datetime format + [DataMember(Name="created_at", EmitDefaultValue=false)] + public DateTime? CreatedAt { get; set; } + + + /// + /// When the record in the database was last updated. Use ISO 8601 datetime format + /// + /// When the record in the database was last updated. Use ISO 8601 datetime format + [DataMember(Name="updated_at", EmitDefaultValue=false)] + public DateTime? UpdatedAt { get; set; } + + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Credential {\n"); + sb.Append(" UserId: ").Append(UserId).Append("\n"); + sb.Append(" ConnectorId: ").Append(ConnectorId).Append("\n"); + sb.Append(" AttrKey: ").Append(AttrKey).Append("\n"); + sb.Append(" AttrValue: ").Append(AttrValue).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); + + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } - - /// - /// attr_key - /// - /// attr_key - [DataMember(Name="attr_key", EmitDefaultValue=false)] - public string AttrKey { get; set; } + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as Credential); + } - - /// - /// attr_value - /// - /// attr_value - [DataMember(Name="attr_value", EmitDefaultValue=false)] - public string AttrValue { get; set; } + /// + /// Returns true if Credential instances are equal + /// + /// Instance of Credential to be compared + /// Boolean + public bool Equals(Credential other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; - - /// - /// created_at - /// - /// created_at - [DataMember(Name="created_at", EmitDefaultValue=false)] - public DateTime? CreatedAt { get; set; } - - - /// - /// updated_at - /// - /// updated_at - [DataMember(Name="updated_at", EmitDefaultValue=false)] - public DateTime? UpdatedAt { get; set; } + return + ( + this.UserId == other.UserId || + this.UserId != null && + this.UserId.Equals(other.UserId) + ) && + ( + this.ConnectorId == other.ConnectorId || + this.ConnectorId != null && + this.ConnectorId.Equals(other.ConnectorId) + ) && + ( + this.AttrKey == other.AttrKey || + this.AttrKey != null && + this.AttrKey.Equals(other.AttrKey) + ) && + ( + this.AttrValue == other.AttrValue || + this.AttrValue != null && + this.AttrValue.Equals(other.AttrValue) + ) && + ( + this.CreatedAt == other.CreatedAt || + this.CreatedAt != null && + this.CreatedAt.Equals(other.CreatedAt) + ) && + ( + this.UpdatedAt == other.UpdatedAt || + this.UpdatedAt != null && + this.UpdatedAt.Equals(other.UpdatedAt) + ); + } - + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + + if (this.UserId != null) + hash = hash * 57 + this.UserId.GetHashCode(); + + if (this.ConnectorId != null) + hash = hash * 57 + this.ConnectorId.GetHashCode(); + + if (this.AttrKey != null) + hash = hash * 57 + this.AttrKey.GetHashCode(); + + if (this.AttrValue != null) + hash = hash * 57 + this.AttrValue.GetHashCode(); + + if (this.CreatedAt != null) + hash = hash * 57 + this.CreatedAt.GetHashCode(); + + if (this.UpdatedAt != null) + hash = hash * 57 + this.UpdatedAt.GetHashCode(); + + return hash; + } + } - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class Credential {\n"); - - sb.Append(" ConnectorId: ").Append(ConnectorId).Append("\n"); - - sb.Append(" AttrKey: ").Append(AttrKey).Append("\n"); - - sb.Append(" AttrValue: ").Append(AttrValue).Append("\n"); - - sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); - - sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); - - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Get the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() { - return JsonConvert.SerializeObject(this, Formatting.Indented); } - -} } diff --git a/src/main/csharp/io/swagger/Model/InlineResponse200.cs b/src/main/csharp/io/swagger/Model/InlineResponse200.cs index 8f6e4e9..3bf54fb 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse200.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse200.cs @@ -1,56 +1,117 @@ using System; +using System.Linq; +using System.IO; using System.Text; using System.Collections; using System.Collections.Generic; using System.Runtime.Serialization; using Newtonsoft.Json; -namespace IO.Swagger.Model { +namespace IO.Swagger.Model +{ - /// - /// - /// - [DataContract] - public class InlineResponse200 { - /// - /// Gets or Sets Data + /// /// - [DataMember(Name="data", EmitDefaultValue=false)] - public List Data { get; set; } + [DataContract] + public class InlineResponse200 : IEquatable + { + + /// + /// Gets or Sets Data + /// + [DataMember(Name="data", EmitDefaultValue=false)] + public List Data { get; set; } + + + /// + /// Gets or Sets Success + /// + [DataMember(Name="success", EmitDefaultValue=false)] + public bool? Success { get; set; } + + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class InlineResponse200 {\n"); + sb.Append(" Data: ").Append(Data).Append("\n"); + sb.Append(" Success: ").Append(Success).Append("\n"); + + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } - - /// - /// Gets or Sets Success - /// - [DataMember(Name="success", EmitDefaultValue=false)] - public bool? Success { get; set; } + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as InlineResponse200); + } - + /// + /// Returns true if InlineResponse200 instances are equal + /// + /// Instance of InlineResponse200 to be compared + /// Boolean + public bool Equals(InlineResponse200 other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class InlineResponse200 {\n"); - - sb.Append(" Data: ").Append(Data).Append("\n"); - - sb.Append(" Success: ").Append(Success).Append("\n"); - - sb.Append("}\n"); - return sb.ToString(); - } + return + ( + this.Data == other.Data || + this.Data != null && + this.Data.SequenceEqual(other.Data) + ) && + ( + this.Success == other.Success || + this.Success != null && + this.Success.Equals(other.Success) + ); + } - /// - /// Get the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + + if (this.Data != null) + hash = hash * 57 + this.Data.GetHashCode(); + + if (this.Success != null) + hash = hash * 57 + this.Success.GetHashCode(); + + return hash; + } + } -} + } } diff --git a/src/main/csharp/io/swagger/Model/InlineResponse2001.cs b/src/main/csharp/io/swagger/Model/InlineResponse2001.cs index b279a81..0355520 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse2001.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse2001.cs @@ -1,56 +1,117 @@ using System; +using System.Linq; +using System.IO; using System.Text; using System.Collections; using System.Collections.Generic; using System.Runtime.Serialization; using Newtonsoft.Json; -namespace IO.Swagger.Model { +namespace IO.Swagger.Model +{ - /// - /// - /// - [DataContract] - public class InlineResponse2001 { - /// - /// Gets or Sets Data + /// /// - [DataMember(Name="data", EmitDefaultValue=false)] - public AggregatedCorrelation Data { get; set; } + [DataContract] + public class InlineResponse2001 : IEquatable + { + + /// + /// Gets or Sets Data + /// + [DataMember(Name="data", EmitDefaultValue=false)] + public AggregatedCorrelation Data { get; set; } + + + /// + /// Gets or Sets Success + /// + [DataMember(Name="success", EmitDefaultValue=false)] + public bool? Success { get; set; } + + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class InlineResponse2001 {\n"); + sb.Append(" Data: ").Append(Data).Append("\n"); + sb.Append(" Success: ").Append(Success).Append("\n"); + + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } - - /// - /// Gets or Sets Success - /// - [DataMember(Name="success", EmitDefaultValue=false)] - public bool? Success { get; set; } + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as InlineResponse2001); + } - + /// + /// Returns true if InlineResponse2001 instances are equal + /// + /// Instance of InlineResponse2001 to be compared + /// Boolean + public bool Equals(InlineResponse2001 other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class InlineResponse2001 {\n"); - - sb.Append(" Data: ").Append(Data).Append("\n"); - - sb.Append(" Success: ").Append(Success).Append("\n"); - - sb.Append("}\n"); - return sb.ToString(); - } + return + ( + this.Data == other.Data || + this.Data != null && + this.Data.Equals(other.Data) + ) && + ( + this.Success == other.Success || + this.Success != null && + this.Success.Equals(other.Success) + ); + } - /// - /// Get the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + + if (this.Data != null) + hash = hash * 57 + this.Data.GetHashCode(); + + if (this.Success != null) + hash = hash * 57 + this.Success.GetHashCode(); + + return hash; + } + } -} + } } diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20010.cs b/src/main/csharp/io/swagger/Model/InlineResponse20010.cs index 156b3a5..32fea1a 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse20010.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse20010.cs @@ -1,56 +1,117 @@ using System; +using System.Linq; +using System.IO; using System.Text; using System.Collections; using System.Collections.Generic; using System.Runtime.Serialization; using Newtonsoft.Json; -namespace IO.Swagger.Model { +namespace IO.Swagger.Model +{ - /// - /// - /// - [DataContract] - public class InlineResponse20010 { - /// - /// Gets or Sets Data + /// /// - [DataMember(Name="data", EmitDefaultValue=false)] - public Credential Data { get; set; } + [DataContract] + public class InlineResponse20010 : IEquatable + { + + /// + /// Gets or Sets Data + /// + [DataMember(Name="data", EmitDefaultValue=false)] + public Correlation Data { get; set; } + + + /// + /// Gets or Sets Success + /// + [DataMember(Name="success", EmitDefaultValue=false)] + public bool? Success { get; set; } + + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class InlineResponse20010 {\n"); + sb.Append(" Data: ").Append(Data).Append("\n"); + sb.Append(" Success: ").Append(Success).Append("\n"); + + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } - - /// - /// Gets or Sets Success - /// - [DataMember(Name="success", EmitDefaultValue=false)] - public bool? Success { get; set; } + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as InlineResponse20010); + } - + /// + /// Returns true if InlineResponse20010 instances are equal + /// + /// Instance of InlineResponse20010 to be compared + /// Boolean + public bool Equals(InlineResponse20010 other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class InlineResponse20010 {\n"); - - sb.Append(" Data: ").Append(Data).Append("\n"); - - sb.Append(" Success: ").Append(Success).Append("\n"); - - sb.Append("}\n"); - return sb.ToString(); - } + return + ( + this.Data == other.Data || + this.Data != null && + this.Data.Equals(other.Data) + ) && + ( + this.Success == other.Success || + this.Success != null && + this.Success.Equals(other.Success) + ); + } - /// - /// Get the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + + if (this.Data != null) + hash = hash * 57 + this.Data.GetHashCode(); + + if (this.Success != null) + hash = hash * 57 + this.Success.GetHashCode(); + + return hash; + } + } -} + } } diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20011.cs b/src/main/csharp/io/swagger/Model/InlineResponse20011.cs index c6dd4a1..843652d 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse20011.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse20011.cs @@ -1,56 +1,117 @@ using System; +using System.Linq; +using System.IO; using System.Text; using System.Collections; using System.Collections.Generic; using System.Runtime.Serialization; using Newtonsoft.Json; -namespace IO.Swagger.Model { +namespace IO.Swagger.Model +{ - /// - /// - /// - [DataContract] - public class InlineResponse20011 { - /// - /// Gets or Sets Data + /// /// - [DataMember(Name="data", EmitDefaultValue=false)] - public List Data { get; set; } + [DataContract] + public class InlineResponse20011 : IEquatable + { + + /// + /// Gets or Sets Data + /// + [DataMember(Name="data", EmitDefaultValue=false)] + public List Data { get; set; } + + + /// + /// Gets or Sets Success + /// + [DataMember(Name="success", EmitDefaultValue=false)] + public bool? Success { get; set; } + + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class InlineResponse20011 {\n"); + sb.Append(" Data: ").Append(Data).Append("\n"); + sb.Append(" Success: ").Append(Success).Append("\n"); + + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } - - /// - /// Gets or Sets Success - /// - [DataMember(Name="success", EmitDefaultValue=false)] - public bool? Success { get; set; } + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as InlineResponse20011); + } - + /// + /// Returns true if InlineResponse20011 instances are equal + /// + /// Instance of InlineResponse20011 to be compared + /// Boolean + public bool Equals(InlineResponse20011 other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class InlineResponse20011 {\n"); - - sb.Append(" Data: ").Append(Data).Append("\n"); - - sb.Append(" Success: ").Append(Success).Append("\n"); - - sb.Append("}\n"); - return sb.ToString(); - } + return + ( + this.Data == other.Data || + this.Data != null && + this.Data.SequenceEqual(other.Data) + ) && + ( + this.Success == other.Success || + this.Success != null && + this.Success.Equals(other.Success) + ); + } - /// - /// Get the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + + if (this.Data != null) + hash = hash * 57 + this.Data.GetHashCode(); + + if (this.Success != null) + hash = hash * 57 + this.Success.GetHashCode(); + + return hash; + } + } -} + } } diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20012.cs b/src/main/csharp/io/swagger/Model/InlineResponse20012.cs index 07c2ec9..883d44b 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse20012.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse20012.cs @@ -1,56 +1,117 @@ using System; +using System.Linq; +using System.IO; using System.Text; using System.Collections; using System.Collections.Generic; using System.Runtime.Serialization; using Newtonsoft.Json; -namespace IO.Swagger.Model { +namespace IO.Swagger.Model +{ - /// - /// - /// - [DataContract] - public class InlineResponse20012 { - /// - /// Gets or Sets Data + /// /// - [DataMember(Name="data", EmitDefaultValue=false)] - public Measurement Data { get; set; } + [DataContract] + public class InlineResponse20012 : IEquatable + { + + /// + /// Gets or Sets Data + /// + [DataMember(Name="data", EmitDefaultValue=false)] + public Credential Data { get; set; } + + + /// + /// Gets or Sets Success + /// + [DataMember(Name="success", EmitDefaultValue=false)] + public bool? Success { get; set; } + + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class InlineResponse20012 {\n"); + sb.Append(" Data: ").Append(Data).Append("\n"); + sb.Append(" Success: ").Append(Success).Append("\n"); + + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } - - /// - /// Gets or Sets Success - /// - [DataMember(Name="success", EmitDefaultValue=false)] - public bool? Success { get; set; } + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as InlineResponse20012); + } - + /// + /// Returns true if InlineResponse20012 instances are equal + /// + /// Instance of InlineResponse20012 to be compared + /// Boolean + public bool Equals(InlineResponse20012 other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class InlineResponse20012 {\n"); - - sb.Append(" Data: ").Append(Data).Append("\n"); - - sb.Append(" Success: ").Append(Success).Append("\n"); - - sb.Append("}\n"); - return sb.ToString(); - } + return + ( + this.Data == other.Data || + this.Data != null && + this.Data.Equals(other.Data) + ) && + ( + this.Success == other.Success || + this.Success != null && + this.Success.Equals(other.Success) + ); + } - /// - /// Get the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + + if (this.Data != null) + hash = hash * 57 + this.Data.GetHashCode(); + + if (this.Success != null) + hash = hash * 57 + this.Success.GetHashCode(); + + return hash; + } + } -} + } } diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20013.cs b/src/main/csharp/io/swagger/Model/InlineResponse20013.cs index 437ce7b..27d8cb4 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse20013.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse20013.cs @@ -1,56 +1,117 @@ using System; +using System.Linq; +using System.IO; using System.Text; using System.Collections; using System.Collections.Generic; using System.Runtime.Serialization; using Newtonsoft.Json; -namespace IO.Swagger.Model { +namespace IO.Swagger.Model +{ - /// - /// - /// - [DataContract] - public class InlineResponse20013 { - /// - /// Gets or Sets Data + /// /// - [DataMember(Name="data", EmitDefaultValue=false)] - public List Data { get; set; } + [DataContract] + public class InlineResponse20013 : IEquatable + { + + /// + /// Gets or Sets Data + /// + [DataMember(Name="data", EmitDefaultValue=false)] + public List Data { get; set; } + + + /// + /// Gets or Sets Success + /// + [DataMember(Name="success", EmitDefaultValue=false)] + public bool? Success { get; set; } + + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class InlineResponse20013 {\n"); + sb.Append(" Data: ").Append(Data).Append("\n"); + sb.Append(" Success: ").Append(Success).Append("\n"); + + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } - - /// - /// Gets or Sets Success - /// - [DataMember(Name="success", EmitDefaultValue=false)] - public bool? Success { get; set; } + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as InlineResponse20013); + } - + /// + /// Returns true if InlineResponse20013 instances are equal + /// + /// Instance of InlineResponse20013 to be compared + /// Boolean + public bool Equals(InlineResponse20013 other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class InlineResponse20013 {\n"); - - sb.Append(" Data: ").Append(Data).Append("\n"); - - sb.Append(" Success: ").Append(Success).Append("\n"); - - sb.Append("}\n"); - return sb.ToString(); - } + return + ( + this.Data == other.Data || + this.Data != null && + this.Data.SequenceEqual(other.Data) + ) && + ( + this.Success == other.Success || + this.Success != null && + this.Success.Equals(other.Success) + ); + } - /// - /// Get the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + + if (this.Data != null) + hash = hash * 57 + this.Data.GetHashCode(); + + if (this.Success != null) + hash = hash * 57 + this.Success.GetHashCode(); + + return hash; + } + } -} + } } diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20014.cs b/src/main/csharp/io/swagger/Model/InlineResponse20014.cs index eef833e..3d782fc 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse20014.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse20014.cs @@ -1,56 +1,117 @@ using System; +using System.Linq; +using System.IO; using System.Text; using System.Collections; using System.Collections.Generic; using System.Runtime.Serialization; using Newtonsoft.Json; -namespace IO.Swagger.Model { +namespace IO.Swagger.Model +{ - /// - /// - /// - [DataContract] - public class InlineResponse20014 { - /// - /// Gets or Sets Data + /// /// - [DataMember(Name="data", EmitDefaultValue=false)] - public Source Data { get; set; } + [DataContract] + public class InlineResponse20014 : IEquatable + { + + /// + /// Gets or Sets Data + /// + [DataMember(Name="data", EmitDefaultValue=false)] + public Measurement Data { get; set; } + + + /// + /// Gets or Sets Success + /// + [DataMember(Name="success", EmitDefaultValue=false)] + public bool? Success { get; set; } + + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class InlineResponse20014 {\n"); + sb.Append(" Data: ").Append(Data).Append("\n"); + sb.Append(" Success: ").Append(Success).Append("\n"); + + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } - - /// - /// Gets or Sets Success - /// - [DataMember(Name="success", EmitDefaultValue=false)] - public bool? Success { get; set; } + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as InlineResponse20014); + } - + /// + /// Returns true if InlineResponse20014 instances are equal + /// + /// Instance of InlineResponse20014 to be compared + /// Boolean + public bool Equals(InlineResponse20014 other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class InlineResponse20014 {\n"); - - sb.Append(" Data: ").Append(Data).Append("\n"); - - sb.Append(" Success: ").Append(Success).Append("\n"); - - sb.Append("}\n"); - return sb.ToString(); - } + return + ( + this.Data == other.Data || + this.Data != null && + this.Data.Equals(other.Data) + ) && + ( + this.Success == other.Success || + this.Success != null && + this.Success.Equals(other.Success) + ); + } - /// - /// Get the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + + if (this.Data != null) + hash = hash * 57 + this.Data.GetHashCode(); + + if (this.Success != null) + hash = hash * 57 + this.Success.GetHashCode(); + + return hash; + } + } -} + } } diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20015.cs b/src/main/csharp/io/swagger/Model/InlineResponse20015.cs index 344acd9..1690912 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse20015.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse20015.cs @@ -1,56 +1,117 @@ using System; +using System.Linq; +using System.IO; using System.Text; using System.Collections; using System.Collections.Generic; using System.Runtime.Serialization; using Newtonsoft.Json; -namespace IO.Swagger.Model { +namespace IO.Swagger.Model +{ - /// - /// - /// - [DataContract] - public class InlineResponse20015 { - /// - /// Gets or Sets Data + /// /// - [DataMember(Name="data", EmitDefaultValue=false)] - public List Data { get; set; } + [DataContract] + public class InlineResponse20015 : IEquatable + { + + /// + /// Gets or Sets Data + /// + [DataMember(Name="data", EmitDefaultValue=false)] + public List Data { get; set; } + + + /// + /// Gets or Sets Success + /// + [DataMember(Name="success", EmitDefaultValue=false)] + public bool? Success { get; set; } + + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class InlineResponse20015 {\n"); + sb.Append(" Data: ").Append(Data).Append("\n"); + sb.Append(" Success: ").Append(Success).Append("\n"); + + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } - - /// - /// Gets or Sets Success - /// - [DataMember(Name="success", EmitDefaultValue=false)] - public bool? Success { get; set; } + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as InlineResponse20015); + } - + /// + /// Returns true if InlineResponse20015 instances are equal + /// + /// Instance of InlineResponse20015 to be compared + /// Boolean + public bool Equals(InlineResponse20015 other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class InlineResponse20015 {\n"); - - sb.Append(" Data: ").Append(Data).Append("\n"); - - sb.Append(" Success: ").Append(Success).Append("\n"); - - sb.Append("}\n"); - return sb.ToString(); - } + return + ( + this.Data == other.Data || + this.Data != null && + this.Data.SequenceEqual(other.Data) + ) && + ( + this.Success == other.Success || + this.Success != null && + this.Success.Equals(other.Success) + ); + } - /// - /// Get the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + + if (this.Data != null) + hash = hash * 57 + this.Data.GetHashCode(); + + if (this.Success != null) + hash = hash * 57 + this.Success.GetHashCode(); + + return hash; + } + } -} + } } diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20016.cs b/src/main/csharp/io/swagger/Model/InlineResponse20016.cs index 27cc0fb..fa38acc 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse20016.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse20016.cs @@ -1,56 +1,117 @@ using System; +using System.Linq; +using System.IO; using System.Text; using System.Collections; using System.Collections.Generic; using System.Runtime.Serialization; using Newtonsoft.Json; -namespace IO.Swagger.Model { +namespace IO.Swagger.Model +{ - /// - /// - /// - [DataContract] - public class InlineResponse20016 { - /// - /// Gets or Sets Data + /// /// - [DataMember(Name="data", EmitDefaultValue=false)] - public UnitCategory Data { get; set; } + [DataContract] + public class InlineResponse20016 : IEquatable + { + + /// + /// Gets or Sets Data + /// + [DataMember(Name="data", EmitDefaultValue=false)] + public List Data { get; set; } + + + /// + /// Gets or Sets Success + /// + [DataMember(Name="success", EmitDefaultValue=false)] + public bool? Success { get; set; } + + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class InlineResponse20016 {\n"); + sb.Append(" Data: ").Append(Data).Append("\n"); + sb.Append(" Success: ").Append(Success).Append("\n"); + + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } - - /// - /// Gets or Sets Success - /// - [DataMember(Name="success", EmitDefaultValue=false)] - public bool? Success { get; set; } + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as InlineResponse20016); + } - + /// + /// Returns true if InlineResponse20016 instances are equal + /// + /// Instance of InlineResponse20016 to be compared + /// Boolean + public bool Equals(InlineResponse20016 other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class InlineResponse20016 {\n"); - - sb.Append(" Data: ").Append(Data).Append("\n"); - - sb.Append(" Success: ").Append(Success).Append("\n"); - - sb.Append("}\n"); - return sb.ToString(); - } + return + ( + this.Data == other.Data || + this.Data != null && + this.Data.SequenceEqual(other.Data) + ) && + ( + this.Success == other.Success || + this.Success != null && + this.Success.Equals(other.Success) + ); + } - /// - /// Get the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + + if (this.Data != null) + hash = hash * 57 + this.Data.GetHashCode(); + + if (this.Success != null) + hash = hash * 57 + this.Success.GetHashCode(); + + return hash; + } + } -} + } } diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20017.cs b/src/main/csharp/io/swagger/Model/InlineResponse20017.cs index e105599..b6114d1 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse20017.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse20017.cs @@ -1,56 +1,117 @@ using System; +using System.Linq; +using System.IO; using System.Text; using System.Collections; using System.Collections.Generic; using System.Runtime.Serialization; using Newtonsoft.Json; -namespace IO.Swagger.Model { +namespace IO.Swagger.Model +{ - /// - /// - /// - [DataContract] - public class InlineResponse20017 { - /// - /// Gets or Sets Data + /// /// - [DataMember(Name="data", EmitDefaultValue=false)] - public List Data { get; set; } + [DataContract] + public class InlineResponse20017 : IEquatable + { + + /// + /// Gets or Sets Data + /// + [DataMember(Name="data", EmitDefaultValue=false)] + public List Data { get; set; } + + + /// + /// Gets or Sets Success + /// + [DataMember(Name="success", EmitDefaultValue=false)] + public bool? Success { get; set; } + + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class InlineResponse20017 {\n"); + sb.Append(" Data: ").Append(Data).Append("\n"); + sb.Append(" Success: ").Append(Success).Append("\n"); + + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } - - /// - /// Gets or Sets Success - /// - [DataMember(Name="success", EmitDefaultValue=false)] - public bool? Success { get; set; } + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as InlineResponse20017); + } - + /// + /// Returns true if InlineResponse20017 instances are equal + /// + /// Instance of InlineResponse20017 to be compared + /// Boolean + public bool Equals(InlineResponse20017 other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class InlineResponse20017 {\n"); - - sb.Append(" Data: ").Append(Data).Append("\n"); - - sb.Append(" Success: ").Append(Success).Append("\n"); - - sb.Append("}\n"); - return sb.ToString(); - } + return + ( + this.Data == other.Data || + this.Data != null && + this.Data.SequenceEqual(other.Data) + ) && + ( + this.Success == other.Success || + this.Success != null && + this.Success.Equals(other.Success) + ); + } - /// - /// Get the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + + if (this.Data != null) + hash = hash * 57 + this.Data.GetHashCode(); + + if (this.Success != null) + hash = hash * 57 + this.Success.GetHashCode(); + + return hash; + } + } -} + } } diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20018.cs b/src/main/csharp/io/swagger/Model/InlineResponse20018.cs index 145ff47..b492e59 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse20018.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse20018.cs @@ -1,56 +1,117 @@ using System; +using System.Linq; +using System.IO; using System.Text; using System.Collections; using System.Collections.Generic; using System.Runtime.Serialization; using Newtonsoft.Json; -namespace IO.Swagger.Model { +namespace IO.Swagger.Model +{ - /// - /// - /// - [DataContract] - public class InlineResponse20018 { - /// - /// Gets or Sets Data + /// /// - [DataMember(Name="data", EmitDefaultValue=false)] - public Unit Data { get; set; } + [DataContract] + public class InlineResponse20018 : IEquatable + { + + /// + /// Gets or Sets Data + /// + [DataMember(Name="data", EmitDefaultValue=false)] + public Source Data { get; set; } + + + /// + /// Gets or Sets Success + /// + [DataMember(Name="success", EmitDefaultValue=false)] + public bool? Success { get; set; } + + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class InlineResponse20018 {\n"); + sb.Append(" Data: ").Append(Data).Append("\n"); + sb.Append(" Success: ").Append(Success).Append("\n"); + + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } - - /// - /// Gets or Sets Success - /// - [DataMember(Name="success", EmitDefaultValue=false)] - public bool? Success { get; set; } + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as InlineResponse20018); + } - + /// + /// Returns true if InlineResponse20018 instances are equal + /// + /// Instance of InlineResponse20018 to be compared + /// Boolean + public bool Equals(InlineResponse20018 other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class InlineResponse20018 {\n"); - - sb.Append(" Data: ").Append(Data).Append("\n"); - - sb.Append(" Success: ").Append(Success).Append("\n"); - - sb.Append("}\n"); - return sb.ToString(); - } + return + ( + this.Data == other.Data || + this.Data != null && + this.Data.Equals(other.Data) + ) && + ( + this.Success == other.Success || + this.Success != null && + this.Success.Equals(other.Success) + ); + } - /// - /// Get the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + + if (this.Data != null) + hash = hash * 57 + this.Data.GetHashCode(); + + if (this.Success != null) + hash = hash * 57 + this.Success.GetHashCode(); + + return hash; + } + } -} + } } diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20019.cs b/src/main/csharp/io/swagger/Model/InlineResponse20019.cs index e851264..28e0976 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse20019.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse20019.cs @@ -1,56 +1,117 @@ using System; +using System.Linq; +using System.IO; using System.Text; using System.Collections; using System.Collections.Generic; using System.Runtime.Serialization; using Newtonsoft.Json; -namespace IO.Swagger.Model { +namespace IO.Swagger.Model +{ - /// - /// - /// - [DataContract] - public class InlineResponse20019 { - /// - /// Gets or Sets Data + /// /// - [DataMember(Name="data", EmitDefaultValue=false)] - public List Data { get; set; } + [DataContract] + public class InlineResponse20019 : IEquatable + { + + /// + /// Gets or Sets Data + /// + [DataMember(Name="data", EmitDefaultValue=false)] + public List Data { get; set; } + + + /// + /// Gets or Sets Success + /// + [DataMember(Name="success", EmitDefaultValue=false)] + public bool? Success { get; set; } + + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class InlineResponse20019 {\n"); + sb.Append(" Data: ").Append(Data).Append("\n"); + sb.Append(" Success: ").Append(Success).Append("\n"); + + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } - - /// - /// Gets or Sets Success - /// - [DataMember(Name="success", EmitDefaultValue=false)] - public bool? Success { get; set; } + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as InlineResponse20019); + } - + /// + /// Returns true if InlineResponse20019 instances are equal + /// + /// Instance of InlineResponse20019 to be compared + /// Boolean + public bool Equals(InlineResponse20019 other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class InlineResponse20019 {\n"); - - sb.Append(" Data: ").Append(Data).Append("\n"); - - sb.Append(" Success: ").Append(Success).Append("\n"); - - sb.Append("}\n"); - return sb.ToString(); - } + return + ( + this.Data == other.Data || + this.Data != null && + this.Data.SequenceEqual(other.Data) + ) && + ( + this.Success == other.Success || + this.Success != null && + this.Success.Equals(other.Success) + ); + } - /// - /// Get the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + + if (this.Data != null) + hash = hash * 57 + this.Data.GetHashCode(); + + if (this.Success != null) + hash = hash * 57 + this.Success.GetHashCode(); + + return hash; + } + } -} + } } diff --git a/src/main/csharp/io/swagger/Model/InlineResponse2002.cs b/src/main/csharp/io/swagger/Model/InlineResponse2002.cs index 55d6f59..a0ae0b8 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse2002.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse2002.cs @@ -1,56 +1,117 @@ using System; +using System.Linq; +using System.IO; using System.Text; using System.Collections; using System.Collections.Generic; using System.Runtime.Serialization; using Newtonsoft.Json; -namespace IO.Swagger.Model { +namespace IO.Swagger.Model +{ - /// - /// - /// - [DataContract] - public class InlineResponse2002 { - /// - /// Gets or Sets Data + /// /// - [DataMember(Name="data", EmitDefaultValue=false)] - public string Data { get; set; } + [DataContract] + public class InlineResponse2002 : IEquatable + { + + /// + /// Gets or Sets Data + /// + [DataMember(Name="data", EmitDefaultValue=false)] + public string Data { get; set; } + + + /// + /// Gets or Sets Success + /// + [DataMember(Name="success", EmitDefaultValue=false)] + public bool? Success { get; set; } + + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class InlineResponse2002 {\n"); + sb.Append(" Data: ").Append(Data).Append("\n"); + sb.Append(" Success: ").Append(Success).Append("\n"); + + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } - - /// - /// Gets or Sets Success - /// - [DataMember(Name="success", EmitDefaultValue=false)] - public bool? Success { get; set; } + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as InlineResponse2002); + } - + /// + /// Returns true if InlineResponse2002 instances are equal + /// + /// Instance of InlineResponse2002 to be compared + /// Boolean + public bool Equals(InlineResponse2002 other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class InlineResponse2002 {\n"); - - sb.Append(" Data: ").Append(Data).Append("\n"); - - sb.Append(" Success: ").Append(Success).Append("\n"); - - sb.Append("}\n"); - return sb.ToString(); - } + return + ( + this.Data == other.Data || + this.Data != null && + this.Data.Equals(other.Data) + ) && + ( + this.Success == other.Success || + this.Success != null && + this.Success.Equals(other.Success) + ); + } - /// - /// Get the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + + if (this.Data != null) + hash = hash * 57 + this.Data.GetHashCode(); + + if (this.Success != null) + hash = hash * 57 + this.Success.GetHashCode(); + + return hash; + } + } -} + } } diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20020.cs b/src/main/csharp/io/swagger/Model/InlineResponse20020.cs index 9c08cdc..519b0ae 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse20020.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse20020.cs @@ -1,56 +1,117 @@ using System; +using System.Linq; +using System.IO; using System.Text; using System.Collections; using System.Collections.Generic; using System.Runtime.Serialization; using Newtonsoft.Json; -namespace IO.Swagger.Model { +namespace IO.Swagger.Model +{ - /// - /// - /// - [DataContract] - public class InlineResponse20020 { - /// - /// Gets or Sets Data + /// /// - [DataMember(Name="data", EmitDefaultValue=false)] - public Update Data { get; set; } + [DataContract] + public class InlineResponse20020 : IEquatable + { + + /// + /// Gets or Sets Data + /// + [DataMember(Name="data", EmitDefaultValue=false)] + public UnitCategory Data { get; set; } + + + /// + /// Gets or Sets Success + /// + [DataMember(Name="success", EmitDefaultValue=false)] + public bool? Success { get; set; } + + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class InlineResponse20020 {\n"); + sb.Append(" Data: ").Append(Data).Append("\n"); + sb.Append(" Success: ").Append(Success).Append("\n"); + + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } - - /// - /// Gets or Sets Success - /// - [DataMember(Name="success", EmitDefaultValue=false)] - public bool? Success { get; set; } + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as InlineResponse20020); + } - + /// + /// Returns true if InlineResponse20020 instances are equal + /// + /// Instance of InlineResponse20020 to be compared + /// Boolean + public bool Equals(InlineResponse20020 other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class InlineResponse20020 {\n"); - - sb.Append(" Data: ").Append(Data).Append("\n"); - - sb.Append(" Success: ").Append(Success).Append("\n"); - - sb.Append("}\n"); - return sb.ToString(); - } + return + ( + this.Data == other.Data || + this.Data != null && + this.Data.Equals(other.Data) + ) && + ( + this.Success == other.Success || + this.Success != null && + this.Success.Equals(other.Success) + ); + } - /// - /// Get the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + + if (this.Data != null) + hash = hash * 57 + this.Data.GetHashCode(); + + if (this.Success != null) + hash = hash * 57 + this.Success.GetHashCode(); + + return hash; + } + } -} + } } diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20021.cs b/src/main/csharp/io/swagger/Model/InlineResponse20021.cs index 358616b..8257ed7 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse20021.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse20021.cs @@ -1,56 +1,117 @@ using System; +using System.Linq; +using System.IO; using System.Text; using System.Collections; using System.Collections.Generic; using System.Runtime.Serialization; using Newtonsoft.Json; -namespace IO.Swagger.Model { +namespace IO.Swagger.Model +{ - /// - /// - /// - [DataContract] - public class InlineResponse20021 { - /// - /// Gets or Sets Data + /// /// - [DataMember(Name="data", EmitDefaultValue=false)] - public List Data { get; set; } + [DataContract] + public class InlineResponse20021 : IEquatable + { + + /// + /// Gets or Sets Data + /// + [DataMember(Name="data", EmitDefaultValue=false)] + public List Data { get; set; } + + + /// + /// Gets or Sets Success + /// + [DataMember(Name="success", EmitDefaultValue=false)] + public bool? Success { get; set; } + + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class InlineResponse20021 {\n"); + sb.Append(" Data: ").Append(Data).Append("\n"); + sb.Append(" Success: ").Append(Success).Append("\n"); + + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } - - /// - /// Gets or Sets Success - /// - [DataMember(Name="success", EmitDefaultValue=false)] - public bool? Success { get; set; } + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as InlineResponse20021); + } - + /// + /// Returns true if InlineResponse20021 instances are equal + /// + /// Instance of InlineResponse20021 to be compared + /// Boolean + public bool Equals(InlineResponse20021 other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class InlineResponse20021 {\n"); - - sb.Append(" Data: ").Append(Data).Append("\n"); - - sb.Append(" Success: ").Append(Success).Append("\n"); - - sb.Append("}\n"); - return sb.ToString(); - } + return + ( + this.Data == other.Data || + this.Data != null && + this.Data.SequenceEqual(other.Data) + ) && + ( + this.Success == other.Success || + this.Success != null && + this.Success.Equals(other.Success) + ); + } - /// - /// Get the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + + if (this.Data != null) + hash = hash * 57 + this.Data.GetHashCode(); + + if (this.Success != null) + hash = hash * 57 + this.Success.GetHashCode(); + + return hash; + } + } -} + } } diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20022.cs b/src/main/csharp/io/swagger/Model/InlineResponse20022.cs index 157a961..5d791ff 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse20022.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse20022.cs @@ -1,56 +1,117 @@ using System; +using System.Linq; +using System.IO; using System.Text; using System.Collections; using System.Collections.Generic; using System.Runtime.Serialization; using Newtonsoft.Json; -namespace IO.Swagger.Model { +namespace IO.Swagger.Model +{ - /// - /// - /// - [DataContract] - public class InlineResponse20022 { - /// - /// Gets or Sets Data + /// /// - [DataMember(Name="data", EmitDefaultValue=false)] - public UserVariable Data { get; set; } + [DataContract] + public class InlineResponse20022 : IEquatable + { + + /// + /// Gets or Sets Data + /// + [DataMember(Name="data", EmitDefaultValue=false)] + public Unit Data { get; set; } + + + /// + /// Gets or Sets Success + /// + [DataMember(Name="success", EmitDefaultValue=false)] + public bool? Success { get; set; } + + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class InlineResponse20022 {\n"); + sb.Append(" Data: ").Append(Data).Append("\n"); + sb.Append(" Success: ").Append(Success).Append("\n"); + + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } - - /// - /// Gets or Sets Success - /// - [DataMember(Name="success", EmitDefaultValue=false)] - public bool? Success { get; set; } + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as InlineResponse20022); + } - + /// + /// Returns true if InlineResponse20022 instances are equal + /// + /// Instance of InlineResponse20022 to be compared + /// Boolean + public bool Equals(InlineResponse20022 other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class InlineResponse20022 {\n"); - - sb.Append(" Data: ").Append(Data).Append("\n"); - - sb.Append(" Success: ").Append(Success).Append("\n"); - - sb.Append("}\n"); - return sb.ToString(); - } + return + ( + this.Data == other.Data || + this.Data != null && + this.Data.Equals(other.Data) + ) && + ( + this.Success == other.Success || + this.Success != null && + this.Success.Equals(other.Success) + ); + } - /// - /// Get the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + + if (this.Data != null) + hash = hash * 57 + this.Data.GetHashCode(); + + if (this.Success != null) + hash = hash * 57 + this.Success.GetHashCode(); + + return hash; + } + } -} + } } diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20023.cs b/src/main/csharp/io/swagger/Model/InlineResponse20023.cs index 5c05ba6..36f796c 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse20023.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse20023.cs @@ -1,56 +1,117 @@ using System; +using System.Linq; +using System.IO; using System.Text; using System.Collections; using System.Collections.Generic; using System.Runtime.Serialization; using Newtonsoft.Json; -namespace IO.Swagger.Model { +namespace IO.Swagger.Model +{ - /// - /// - /// - [DataContract] - public class InlineResponse20023 { - /// - /// Gets or Sets Data + /// /// - [DataMember(Name="data", EmitDefaultValue=false)] - public List Data { get; set; } + [DataContract] + public class InlineResponse20023 : IEquatable + { + + /// + /// Gets or Sets Data + /// + [DataMember(Name="data", EmitDefaultValue=false)] + public Update Data { get; set; } + + + /// + /// Gets or Sets Success + /// + [DataMember(Name="success", EmitDefaultValue=false)] + public bool? Success { get; set; } + + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class InlineResponse20023 {\n"); + sb.Append(" Data: ").Append(Data).Append("\n"); + sb.Append(" Success: ").Append(Success).Append("\n"); + + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } - - /// - /// Gets or Sets Success - /// - [DataMember(Name="success", EmitDefaultValue=false)] - public bool? Success { get; set; } + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as InlineResponse20023); + } - + /// + /// Returns true if InlineResponse20023 instances are equal + /// + /// Instance of InlineResponse20023 to be compared + /// Boolean + public bool Equals(InlineResponse20023 other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class InlineResponse20023 {\n"); - - sb.Append(" Data: ").Append(Data).Append("\n"); - - sb.Append(" Success: ").Append(Success).Append("\n"); - - sb.Append("}\n"); - return sb.ToString(); - } + return + ( + this.Data == other.Data || + this.Data != null && + this.Data.Equals(other.Data) + ) && + ( + this.Success == other.Success || + this.Success != null && + this.Success.Equals(other.Success) + ); + } - /// - /// Get the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + + if (this.Data != null) + hash = hash * 57 + this.Data.GetHashCode(); + + if (this.Success != null) + hash = hash * 57 + this.Success.GetHashCode(); + + return hash; + } + } -} + } } diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20024.cs b/src/main/csharp/io/swagger/Model/InlineResponse20024.cs index c51d7e7..85c12e0 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse20024.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse20024.cs @@ -1,56 +1,117 @@ using System; +using System.Linq; +using System.IO; using System.Text; using System.Collections; using System.Collections.Generic; using System.Runtime.Serialization; using Newtonsoft.Json; -namespace IO.Swagger.Model { +namespace IO.Swagger.Model +{ - /// - /// - /// - [DataContract] - public class InlineResponse20024 { - /// - /// Gets or Sets Data + /// /// - [DataMember(Name="data", EmitDefaultValue=false)] - public VariableCategory Data { get; set; } + [DataContract] + public class InlineResponse20024 : IEquatable + { + + /// + /// Gets or Sets Data + /// + [DataMember(Name="data", EmitDefaultValue=false)] + public List Data { get; set; } + + + /// + /// Gets or Sets Success + /// + [DataMember(Name="success", EmitDefaultValue=false)] + public bool? Success { get; set; } + + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class InlineResponse20024 {\n"); + sb.Append(" Data: ").Append(Data).Append("\n"); + sb.Append(" Success: ").Append(Success).Append("\n"); + + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } - - /// - /// Gets or Sets Success - /// - [DataMember(Name="success", EmitDefaultValue=false)] - public bool? Success { get; set; } + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as InlineResponse20024); + } - + /// + /// Returns true if InlineResponse20024 instances are equal + /// + /// Instance of InlineResponse20024 to be compared + /// Boolean + public bool Equals(InlineResponse20024 other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class InlineResponse20024 {\n"); - - sb.Append(" Data: ").Append(Data).Append("\n"); - - sb.Append(" Success: ").Append(Success).Append("\n"); - - sb.Append("}\n"); - return sb.ToString(); - } + return + ( + this.Data == other.Data || + this.Data != null && + this.Data.SequenceEqual(other.Data) + ) && + ( + this.Success == other.Success || + this.Success != null && + this.Success.Equals(other.Success) + ); + } - /// - /// Get the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + + if (this.Data != null) + hash = hash * 57 + this.Data.GetHashCode(); + + if (this.Success != null) + hash = hash * 57 + this.Success.GetHashCode(); + + return hash; + } + } -} + } } diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20025.cs b/src/main/csharp/io/swagger/Model/InlineResponse20025.cs index 676d1f5..6e20a20 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse20025.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse20025.cs @@ -1,56 +1,117 @@ using System; +using System.Linq; +using System.IO; using System.Text; using System.Collections; using System.Collections.Generic; using System.Runtime.Serialization; using Newtonsoft.Json; -namespace IO.Swagger.Model { +namespace IO.Swagger.Model +{ - /// - /// - /// - [DataContract] - public class InlineResponse20025 { - /// - /// Gets or Sets Data + /// /// - [DataMember(Name="data", EmitDefaultValue=false)] - public List Data { get; set; } + [DataContract] + public class InlineResponse20025 : IEquatable + { + + /// + /// Gets or Sets Data + /// + [DataMember(Name="data", EmitDefaultValue=false)] + public UserVariableRelationship Data { get; set; } + + + /// + /// Gets or Sets Success + /// + [DataMember(Name="success", EmitDefaultValue=false)] + public bool? Success { get; set; } + + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class InlineResponse20025 {\n"); + sb.Append(" Data: ").Append(Data).Append("\n"); + sb.Append(" Success: ").Append(Success).Append("\n"); + + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } - - /// - /// Gets or Sets Success - /// - [DataMember(Name="success", EmitDefaultValue=false)] - public bool? Success { get; set; } + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as InlineResponse20025); + } - + /// + /// Returns true if InlineResponse20025 instances are equal + /// + /// Instance of InlineResponse20025 to be compared + /// Boolean + public bool Equals(InlineResponse20025 other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class InlineResponse20025 {\n"); - - sb.Append(" Data: ").Append(Data).Append("\n"); - - sb.Append(" Success: ").Append(Success).Append("\n"); - - sb.Append("}\n"); - return sb.ToString(); - } + return + ( + this.Data == other.Data || + this.Data != null && + this.Data.Equals(other.Data) + ) && + ( + this.Success == other.Success || + this.Success != null && + this.Success.Equals(other.Success) + ); + } - /// - /// Get the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + + if (this.Data != null) + hash = hash * 57 + this.Data.GetHashCode(); + + if (this.Success != null) + hash = hash * 57 + this.Success.GetHashCode(); + + return hash; + } + } -} + } } diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20026.cs b/src/main/csharp/io/swagger/Model/InlineResponse20026.cs index b4bd238..59a33f5 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse20026.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse20026.cs @@ -1,56 +1,117 @@ using System; +using System.Linq; +using System.IO; using System.Text; using System.Collections; using System.Collections.Generic; using System.Runtime.Serialization; using Newtonsoft.Json; -namespace IO.Swagger.Model { +namespace IO.Swagger.Model +{ - /// - /// - /// - [DataContract] - public class InlineResponse20026 { - /// - /// Gets or Sets Data + /// /// - [DataMember(Name="data", EmitDefaultValue=false)] - public VariableUserSource Data { get; set; } + [DataContract] + public class InlineResponse20026 : IEquatable + { + + /// + /// Gets or Sets Data + /// + [DataMember(Name="data", EmitDefaultValue=false)] + public UserVariable Data { get; set; } + + + /// + /// Gets or Sets Success + /// + [DataMember(Name="success", EmitDefaultValue=false)] + public bool? Success { get; set; } + + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class InlineResponse20026 {\n"); + sb.Append(" Data: ").Append(Data).Append("\n"); + sb.Append(" Success: ").Append(Success).Append("\n"); + + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } - - /// - /// Gets or Sets Success - /// - [DataMember(Name="success", EmitDefaultValue=false)] - public bool? Success { get; set; } + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as InlineResponse20026); + } - + /// + /// Returns true if InlineResponse20026 instances are equal + /// + /// Instance of InlineResponse20026 to be compared + /// Boolean + public bool Equals(InlineResponse20026 other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class InlineResponse20026 {\n"); - - sb.Append(" Data: ").Append(Data).Append("\n"); - - sb.Append(" Success: ").Append(Success).Append("\n"); - - sb.Append("}\n"); - return sb.ToString(); - } + return + ( + this.Data == other.Data || + this.Data != null && + this.Data.Equals(other.Data) + ) && + ( + this.Success == other.Success || + this.Success != null && + this.Success.Equals(other.Success) + ); + } - /// - /// Get the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + + if (this.Data != null) + hash = hash * 57 + this.Data.GetHashCode(); + + if (this.Success != null) + hash = hash * 57 + this.Success.GetHashCode(); + + return hash; + } + } -} + } } diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20027.cs b/src/main/csharp/io/swagger/Model/InlineResponse20027.cs index c10f3c0..abf6ebb 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse20027.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse20027.cs @@ -1,56 +1,117 @@ using System; +using System.Linq; +using System.IO; using System.Text; using System.Collections; using System.Collections.Generic; using System.Runtime.Serialization; using Newtonsoft.Json; -namespace IO.Swagger.Model { +namespace IO.Swagger.Model +{ - /// - /// - /// - [DataContract] - public class InlineResponse20027 { - /// - /// Gets or Sets Data + /// /// - [DataMember(Name="data", EmitDefaultValue=false)] - public List Data { get; set; } + [DataContract] + public class InlineResponse20027 : IEquatable + { + + /// + /// Gets or Sets Data + /// + [DataMember(Name="data", EmitDefaultValue=false)] + public List Data { get; set; } + + + /// + /// Gets or Sets Success + /// + [DataMember(Name="success", EmitDefaultValue=false)] + public bool? Success { get; set; } + + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class InlineResponse20027 {\n"); + sb.Append(" Data: ").Append(Data).Append("\n"); + sb.Append(" Success: ").Append(Success).Append("\n"); + + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } - - /// - /// Gets or Sets Success - /// - [DataMember(Name="success", EmitDefaultValue=false)] - public bool? Success { get; set; } + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as InlineResponse20027); + } - + /// + /// Returns true if InlineResponse20027 instances are equal + /// + /// Instance of InlineResponse20027 to be compared + /// Boolean + public bool Equals(InlineResponse20027 other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class InlineResponse20027 {\n"); - - sb.Append(" Data: ").Append(Data).Append("\n"); - - sb.Append(" Success: ").Append(Success).Append("\n"); - - sb.Append("}\n"); - return sb.ToString(); - } + return + ( + this.Data == other.Data || + this.Data != null && + this.Data.SequenceEqual(other.Data) + ) && + ( + this.Success == other.Success || + this.Success != null && + this.Success.Equals(other.Success) + ); + } - /// - /// Get the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + + if (this.Data != null) + hash = hash * 57 + this.Data.GetHashCode(); + + if (this.Success != null) + hash = hash * 57 + this.Success.GetHashCode(); + + return hash; + } + } -} + } } diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20028.cs b/src/main/csharp/io/swagger/Model/InlineResponse20028.cs index 64f1bfb..65f9004 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse20028.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse20028.cs @@ -1,56 +1,117 @@ using System; +using System.Linq; +using System.IO; using System.Text; using System.Collections; using System.Collections.Generic; using System.Runtime.Serialization; using Newtonsoft.Json; -namespace IO.Swagger.Model { +namespace IO.Swagger.Model +{ - /// - /// - /// - [DataContract] - public class InlineResponse20028 { - /// - /// Gets or Sets Data + /// /// - [DataMember(Name="data", EmitDefaultValue=false)] - public Variable Data { get; set; } + [DataContract] + public class InlineResponse20028 : IEquatable + { + + /// + /// Gets or Sets Data + /// + [DataMember(Name="data", EmitDefaultValue=false)] + public VariableCategory Data { get; set; } + + + /// + /// Gets or Sets Success + /// + [DataMember(Name="success", EmitDefaultValue=false)] + public bool? Success { get; set; } + + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class InlineResponse20028 {\n"); + sb.Append(" Data: ").Append(Data).Append("\n"); + sb.Append(" Success: ").Append(Success).Append("\n"); + + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } - - /// - /// Gets or Sets Success - /// - [DataMember(Name="success", EmitDefaultValue=false)] - public bool? Success { get; set; } + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as InlineResponse20028); + } - + /// + /// Returns true if InlineResponse20028 instances are equal + /// + /// Instance of InlineResponse20028 to be compared + /// Boolean + public bool Equals(InlineResponse20028 other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class InlineResponse20028 {\n"); - - sb.Append(" Data: ").Append(Data).Append("\n"); - - sb.Append(" Success: ").Append(Success).Append("\n"); - - sb.Append("}\n"); - return sb.ToString(); - } + return + ( + this.Data == other.Data || + this.Data != null && + this.Data.Equals(other.Data) + ) && + ( + this.Success == other.Success || + this.Success != null && + this.Success.Equals(other.Success) + ); + } - /// - /// Get the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + + if (this.Data != null) + hash = hash * 57 + this.Data.GetHashCode(); + + if (this.Success != null) + hash = hash * 57 + this.Success.GetHashCode(); + + return hash; + } + } -} + } } diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20029.cs b/src/main/csharp/io/swagger/Model/InlineResponse20029.cs index bcfcc39..224de64 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse20029.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse20029.cs @@ -1,56 +1,117 @@ using System; +using System.Linq; +using System.IO; using System.Text; using System.Collections; using System.Collections.Generic; using System.Runtime.Serialization; using Newtonsoft.Json; -namespace IO.Swagger.Model { +namespace IO.Swagger.Model +{ - /// - /// - /// - [DataContract] - public class InlineResponse20029 { - /// - /// Gets or Sets Data + /// /// - [DataMember(Name="data", EmitDefaultValue=false)] - public List Data { get; set; } + [DataContract] + public class InlineResponse20029 : IEquatable + { + + /// + /// Gets or Sets Data + /// + [DataMember(Name="data", EmitDefaultValue=false)] + public List Data { get; set; } + + + /// + /// Gets or Sets Success + /// + [DataMember(Name="success", EmitDefaultValue=false)] + public bool? Success { get; set; } + + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class InlineResponse20029 {\n"); + sb.Append(" Data: ").Append(Data).Append("\n"); + sb.Append(" Success: ").Append(Success).Append("\n"); + + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } - - /// - /// Gets or Sets Success - /// - [DataMember(Name="success", EmitDefaultValue=false)] - public bool? Success { get; set; } + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as InlineResponse20029); + } - + /// + /// Returns true if InlineResponse20029 instances are equal + /// + /// Instance of InlineResponse20029 to be compared + /// Boolean + public bool Equals(InlineResponse20029 other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class InlineResponse20029 {\n"); - - sb.Append(" Data: ").Append(Data).Append("\n"); - - sb.Append(" Success: ").Append(Success).Append("\n"); - - sb.Append("}\n"); - return sb.ToString(); - } + return + ( + this.Data == other.Data || + this.Data != null && + this.Data.SequenceEqual(other.Data) + ) && + ( + this.Success == other.Success || + this.Success != null && + this.Success.Equals(other.Success) + ); + } - /// - /// Get the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + + if (this.Data != null) + hash = hash * 57 + this.Data.GetHashCode(); + + if (this.Success != null) + hash = hash * 57 + this.Success.GetHashCode(); + + return hash; + } + } -} + } } diff --git a/src/main/csharp/io/swagger/Model/InlineResponse2003.cs b/src/main/csharp/io/swagger/Model/InlineResponse2003.cs index bb8ac58..cc03bee 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse2003.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse2003.cs @@ -1,56 +1,117 @@ using System; +using System.Linq; +using System.IO; using System.Text; using System.Collections; using System.Collections.Generic; using System.Runtime.Serialization; using Newtonsoft.Json; -namespace IO.Swagger.Model { +namespace IO.Swagger.Model +{ - /// - /// - /// - [DataContract] - public class InlineResponse2003 { - /// - /// Gets or Sets Data + /// /// - [DataMember(Name="data", EmitDefaultValue=false)] - public List Data { get; set; } + [DataContract] + public class InlineResponse2003 : IEquatable + { + + /// + /// Gets or Sets Data + /// + [DataMember(Name="data", EmitDefaultValue=false)] + public List Data { get; set; } + + + /// + /// Gets or Sets Success + /// + [DataMember(Name="success", EmitDefaultValue=false)] + public bool? Success { get; set; } + + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class InlineResponse2003 {\n"); + sb.Append(" Data: ").Append(Data).Append("\n"); + sb.Append(" Success: ").Append(Success).Append("\n"); + + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } - - /// - /// Gets or Sets Success - /// - [DataMember(Name="success", EmitDefaultValue=false)] - public bool? Success { get; set; } + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as InlineResponse2003); + } - + /// + /// Returns true if InlineResponse2003 instances are equal + /// + /// Instance of InlineResponse2003 to be compared + /// Boolean + public bool Equals(InlineResponse2003 other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class InlineResponse2003 {\n"); - - sb.Append(" Data: ").Append(Data).Append("\n"); - - sb.Append(" Success: ").Append(Success).Append("\n"); - - sb.Append("}\n"); - return sb.ToString(); - } + return + ( + this.Data == other.Data || + this.Data != null && + this.Data.SequenceEqual(other.Data) + ) && + ( + this.Success == other.Success || + this.Success != null && + this.Success.Equals(other.Success) + ); + } - /// - /// Get the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + + if (this.Data != null) + hash = hash * 57 + this.Data.GetHashCode(); + + if (this.Success != null) + hash = hash * 57 + this.Success.GetHashCode(); + + return hash; + } + } -} + } } diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20030.cs b/src/main/csharp/io/swagger/Model/InlineResponse20030.cs index 3b2648f..f407501 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse20030.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse20030.cs @@ -1,56 +1,117 @@ using System; +using System.Linq; +using System.IO; using System.Text; using System.Collections; using System.Collections.Generic; using System.Runtime.Serialization; using Newtonsoft.Json; -namespace IO.Swagger.Model { +namespace IO.Swagger.Model +{ - /// - /// - /// - [DataContract] - public class InlineResponse20030 { - /// - /// Gets or Sets Data + /// /// - [DataMember(Name="data", EmitDefaultValue=false)] - public Vote Data { get; set; } + [DataContract] + public class InlineResponse20030 : IEquatable + { + + /// + /// Gets or Sets Data + /// + [DataMember(Name="data", EmitDefaultValue=false)] + public VariableUserSource Data { get; set; } + + + /// + /// Gets or Sets Success + /// + [DataMember(Name="success", EmitDefaultValue=false)] + public bool? Success { get; set; } + + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class InlineResponse20030 {\n"); + sb.Append(" Data: ").Append(Data).Append("\n"); + sb.Append(" Success: ").Append(Success).Append("\n"); + + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } - - /// - /// Gets or Sets Success - /// - [DataMember(Name="success", EmitDefaultValue=false)] - public bool? Success { get; set; } + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as InlineResponse20030); + } - + /// + /// Returns true if InlineResponse20030 instances are equal + /// + /// Instance of InlineResponse20030 to be compared + /// Boolean + public bool Equals(InlineResponse20030 other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class InlineResponse20030 {\n"); - - sb.Append(" Data: ").Append(Data).Append("\n"); - - sb.Append(" Success: ").Append(Success).Append("\n"); - - sb.Append("}\n"); - return sb.ToString(); - } + return + ( + this.Data == other.Data || + this.Data != null && + this.Data.Equals(other.Data) + ) && + ( + this.Success == other.Success || + this.Success != null && + this.Success.Equals(other.Success) + ); + } - /// - /// Get the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + + if (this.Data != null) + hash = hash * 57 + this.Data.GetHashCode(); + + if (this.Success != null) + hash = hash * 57 + this.Success.GetHashCode(); + + return hash; + } + } -} + } } diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20031.cs b/src/main/csharp/io/swagger/Model/InlineResponse20031.cs new file mode 100644 index 0000000..4fda1b5 --- /dev/null +++ b/src/main/csharp/io/swagger/Model/InlineResponse20031.cs @@ -0,0 +1,117 @@ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Collections; +using System.Collections.Generic; +using System.Runtime.Serialization; +using Newtonsoft.Json; + +namespace IO.Swagger.Model +{ + + /// + /// + /// + [DataContract] + public class InlineResponse20031 : IEquatable + { + + /// + /// Gets or Sets Data + /// + [DataMember(Name="data", EmitDefaultValue=false)] + public List Data { get; set; } + + + /// + /// Gets or Sets Success + /// + [DataMember(Name="success", EmitDefaultValue=false)] + public bool? Success { get; set; } + + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class InlineResponse20031 {\n"); + sb.Append(" Data: ").Append(Data).Append("\n"); + sb.Append(" Success: ").Append(Success).Append("\n"); + + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as InlineResponse20031); + } + + /// + /// Returns true if InlineResponse20031 instances are equal + /// + /// Instance of InlineResponse20031 to be compared + /// Boolean + public bool Equals(InlineResponse20031 other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; + + return + ( + this.Data == other.Data || + this.Data != null && + this.Data.SequenceEqual(other.Data) + ) && + ( + this.Success == other.Success || + this.Success != null && + this.Success.Equals(other.Success) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + + if (this.Data != null) + hash = hash * 57 + this.Data.GetHashCode(); + + if (this.Success != null) + hash = hash * 57 + this.Success.GetHashCode(); + + return hash; + } + } + + } +} diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20032.cs b/src/main/csharp/io/swagger/Model/InlineResponse20032.cs new file mode 100644 index 0000000..10d72af --- /dev/null +++ b/src/main/csharp/io/swagger/Model/InlineResponse20032.cs @@ -0,0 +1,117 @@ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Collections; +using System.Collections.Generic; +using System.Runtime.Serialization; +using Newtonsoft.Json; + +namespace IO.Swagger.Model +{ + + /// + /// + /// + [DataContract] + public class InlineResponse20032 : IEquatable + { + + /// + /// Gets or Sets Data + /// + [DataMember(Name="data", EmitDefaultValue=false)] + public Variable Data { get; set; } + + + /// + /// Gets or Sets Success + /// + [DataMember(Name="success", EmitDefaultValue=false)] + public bool? Success { get; set; } + + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class InlineResponse20032 {\n"); + sb.Append(" Data: ").Append(Data).Append("\n"); + sb.Append(" Success: ").Append(Success).Append("\n"); + + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as InlineResponse20032); + } + + /// + /// Returns true if InlineResponse20032 instances are equal + /// + /// Instance of InlineResponse20032 to be compared + /// Boolean + public bool Equals(InlineResponse20032 other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; + + return + ( + this.Data == other.Data || + this.Data != null && + this.Data.Equals(other.Data) + ) && + ( + this.Success == other.Success || + this.Success != null && + this.Success.Equals(other.Success) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + + if (this.Data != null) + hash = hash * 57 + this.Data.GetHashCode(); + + if (this.Success != null) + hash = hash * 57 + this.Success.GetHashCode(); + + return hash; + } + } + + } +} diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20033.cs b/src/main/csharp/io/swagger/Model/InlineResponse20033.cs new file mode 100644 index 0000000..23e6cae --- /dev/null +++ b/src/main/csharp/io/swagger/Model/InlineResponse20033.cs @@ -0,0 +1,117 @@ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Collections; +using System.Collections.Generic; +using System.Runtime.Serialization; +using Newtonsoft.Json; + +namespace IO.Swagger.Model +{ + + /// + /// + /// + [DataContract] + public class InlineResponse20033 : IEquatable + { + + /// + /// Gets or Sets Data + /// + [DataMember(Name="data", EmitDefaultValue=false)] + public List Data { get; set; } + + + /// + /// Gets or Sets Success + /// + [DataMember(Name="success", EmitDefaultValue=false)] + public bool? Success { get; set; } + + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class InlineResponse20033 {\n"); + sb.Append(" Data: ").Append(Data).Append("\n"); + sb.Append(" Success: ").Append(Success).Append("\n"); + + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as InlineResponse20033); + } + + /// + /// Returns true if InlineResponse20033 instances are equal + /// + /// Instance of InlineResponse20033 to be compared + /// Boolean + public bool Equals(InlineResponse20033 other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; + + return + ( + this.Data == other.Data || + this.Data != null && + this.Data.SequenceEqual(other.Data) + ) && + ( + this.Success == other.Success || + this.Success != null && + this.Success.Equals(other.Success) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + + if (this.Data != null) + hash = hash * 57 + this.Data.GetHashCode(); + + if (this.Success != null) + hash = hash * 57 + this.Success.GetHashCode(); + + return hash; + } + } + + } +} diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20034.cs b/src/main/csharp/io/swagger/Model/InlineResponse20034.cs new file mode 100644 index 0000000..8e0382d --- /dev/null +++ b/src/main/csharp/io/swagger/Model/InlineResponse20034.cs @@ -0,0 +1,117 @@ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Collections; +using System.Collections.Generic; +using System.Runtime.Serialization; +using Newtonsoft.Json; + +namespace IO.Swagger.Model +{ + + /// + /// + /// + [DataContract] + public class InlineResponse20034 : IEquatable + { + + /// + /// Gets or Sets Data + /// + [DataMember(Name="data", EmitDefaultValue=false)] + public Vote Data { get; set; } + + + /// + /// Gets or Sets Success + /// + [DataMember(Name="success", EmitDefaultValue=false)] + public bool? Success { get; set; } + + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class InlineResponse20034 {\n"); + sb.Append(" Data: ").Append(Data).Append("\n"); + sb.Append(" Success: ").Append(Success).Append("\n"); + + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as InlineResponse20034); + } + + /// + /// Returns true if InlineResponse20034 instances are equal + /// + /// Instance of InlineResponse20034 to be compared + /// Boolean + public bool Equals(InlineResponse20034 other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; + + return + ( + this.Data == other.Data || + this.Data != null && + this.Data.Equals(other.Data) + ) && + ( + this.Success == other.Success || + this.Success != null && + this.Success.Equals(other.Success) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + + if (this.Data != null) + hash = hash * 57 + this.Data.GetHashCode(); + + if (this.Success != null) + hash = hash * 57 + this.Success.GetHashCode(); + + return hash; + } + } + + } +} diff --git a/src/main/csharp/io/swagger/Model/InlineResponse2004.cs b/src/main/csharp/io/swagger/Model/InlineResponse2004.cs index d7da098..c450ac9 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse2004.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse2004.cs @@ -1,56 +1,117 @@ using System; +using System.Linq; +using System.IO; using System.Text; using System.Collections; using System.Collections.Generic; using System.Runtime.Serialization; using Newtonsoft.Json; -namespace IO.Swagger.Model { +namespace IO.Swagger.Model +{ - /// - /// - /// - [DataContract] - public class InlineResponse2004 { - /// - /// Gets or Sets Data + /// /// - [DataMember(Name="data", EmitDefaultValue=false)] - public Connection Data { get; set; } + [DataContract] + public class InlineResponse2004 : IEquatable + { + + /// + /// Gets or Sets Data + /// + [DataMember(Name="data", EmitDefaultValue=false)] + public CommonVariableRelationship Data { get; set; } + + + /// + /// Gets or Sets Success + /// + [DataMember(Name="success", EmitDefaultValue=false)] + public bool? Success { get; set; } + + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class InlineResponse2004 {\n"); + sb.Append(" Data: ").Append(Data).Append("\n"); + sb.Append(" Success: ").Append(Success).Append("\n"); + + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } - - /// - /// Gets or Sets Success - /// - [DataMember(Name="success", EmitDefaultValue=false)] - public bool? Success { get; set; } + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as InlineResponse2004); + } - + /// + /// Returns true if InlineResponse2004 instances are equal + /// + /// Instance of InlineResponse2004 to be compared + /// Boolean + public bool Equals(InlineResponse2004 other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class InlineResponse2004 {\n"); - - sb.Append(" Data: ").Append(Data).Append("\n"); - - sb.Append(" Success: ").Append(Success).Append("\n"); - - sb.Append("}\n"); - return sb.ToString(); - } + return + ( + this.Data == other.Data || + this.Data != null && + this.Data.Equals(other.Data) + ) && + ( + this.Success == other.Success || + this.Success != null && + this.Success.Equals(other.Success) + ); + } - /// - /// Get the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + + if (this.Data != null) + hash = hash * 57 + this.Data.GetHashCode(); + + if (this.Success != null) + hash = hash * 57 + this.Success.GetHashCode(); + + return hash; + } + } -} + } } diff --git a/src/main/csharp/io/swagger/Model/InlineResponse2005.cs b/src/main/csharp/io/swagger/Model/InlineResponse2005.cs index c33db4e..9221a14 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse2005.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse2005.cs @@ -1,56 +1,117 @@ using System; +using System.Linq; +using System.IO; using System.Text; using System.Collections; using System.Collections.Generic; using System.Runtime.Serialization; using Newtonsoft.Json; -namespace IO.Swagger.Model { +namespace IO.Swagger.Model +{ - /// - /// - /// - [DataContract] - public class InlineResponse2005 { - /// - /// Gets or Sets Data + /// /// - [DataMember(Name="data", EmitDefaultValue=false)] - public List Data { get; set; } + [DataContract] + public class InlineResponse2005 : IEquatable + { + + /// + /// Gets or Sets Data + /// + [DataMember(Name="data", EmitDefaultValue=false)] + public List Data { get; set; } + + + /// + /// Gets or Sets Success + /// + [DataMember(Name="success", EmitDefaultValue=false)] + public bool? Success { get; set; } + + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class InlineResponse2005 {\n"); + sb.Append(" Data: ").Append(Data).Append("\n"); + sb.Append(" Success: ").Append(Success).Append("\n"); + + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } - - /// - /// Gets or Sets Success - /// - [DataMember(Name="success", EmitDefaultValue=false)] - public bool? Success { get; set; } + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as InlineResponse2005); + } - + /// + /// Returns true if InlineResponse2005 instances are equal + /// + /// Instance of InlineResponse2005 to be compared + /// Boolean + public bool Equals(InlineResponse2005 other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class InlineResponse2005 {\n"); - - sb.Append(" Data: ").Append(Data).Append("\n"); - - sb.Append(" Success: ").Append(Success).Append("\n"); - - sb.Append("}\n"); - return sb.ToString(); - } + return + ( + this.Data == other.Data || + this.Data != null && + this.Data.SequenceEqual(other.Data) + ) && + ( + this.Success == other.Success || + this.Success != null && + this.Success.Equals(other.Success) + ); + } - /// - /// Get the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + + if (this.Data != null) + hash = hash * 57 + this.Data.GetHashCode(); + + if (this.Success != null) + hash = hash * 57 + this.Success.GetHashCode(); + + return hash; + } + } -} + } } diff --git a/src/main/csharp/io/swagger/Model/InlineResponse2006.cs b/src/main/csharp/io/swagger/Model/InlineResponse2006.cs index 615a1ff..2cf3154 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse2006.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse2006.cs @@ -1,56 +1,117 @@ using System; +using System.Linq; +using System.IO; using System.Text; using System.Collections; using System.Collections.Generic; using System.Runtime.Serialization; using Newtonsoft.Json; -namespace IO.Swagger.Model { +namespace IO.Swagger.Model +{ - /// - /// - /// - [DataContract] - public class InlineResponse2006 { - /// - /// Gets or Sets Data + /// /// - [DataMember(Name="data", EmitDefaultValue=false)] - public Connector Data { get; set; } + [DataContract] + public class InlineResponse2006 : IEquatable + { + + /// + /// Gets or Sets Data + /// + [DataMember(Name="data", EmitDefaultValue=false)] + public Connection Data { get; set; } + + + /// + /// Gets or Sets Success + /// + [DataMember(Name="success", EmitDefaultValue=false)] + public bool? Success { get; set; } + + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class InlineResponse2006 {\n"); + sb.Append(" Data: ").Append(Data).Append("\n"); + sb.Append(" Success: ").Append(Success).Append("\n"); + + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } - - /// - /// Gets or Sets Success - /// - [DataMember(Name="success", EmitDefaultValue=false)] - public bool? Success { get; set; } + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as InlineResponse2006); + } - + /// + /// Returns true if InlineResponse2006 instances are equal + /// + /// Instance of InlineResponse2006 to be compared + /// Boolean + public bool Equals(InlineResponse2006 other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class InlineResponse2006 {\n"); - - sb.Append(" Data: ").Append(Data).Append("\n"); - - sb.Append(" Success: ").Append(Success).Append("\n"); - - sb.Append("}\n"); - return sb.ToString(); - } + return + ( + this.Data == other.Data || + this.Data != null && + this.Data.Equals(other.Data) + ) && + ( + this.Success == other.Success || + this.Success != null && + this.Success.Equals(other.Success) + ); + } - /// - /// Get the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + + if (this.Data != null) + hash = hash * 57 + this.Data.GetHashCode(); + + if (this.Success != null) + hash = hash * 57 + this.Success.GetHashCode(); + + return hash; + } + } -} + } } diff --git a/src/main/csharp/io/swagger/Model/InlineResponse2007.cs b/src/main/csharp/io/swagger/Model/InlineResponse2007.cs index c69473e..d19799d 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse2007.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse2007.cs @@ -1,56 +1,117 @@ using System; +using System.Linq; +using System.IO; using System.Text; using System.Collections; using System.Collections.Generic; using System.Runtime.Serialization; using Newtonsoft.Json; -namespace IO.Swagger.Model { +namespace IO.Swagger.Model +{ - /// - /// - /// - [DataContract] - public class InlineResponse2007 { - /// - /// Gets or Sets Data + /// /// - [DataMember(Name="data", EmitDefaultValue=false)] - public List Data { get; set; } + [DataContract] + public class InlineResponse2007 : IEquatable + { + + /// + /// Gets or Sets Data + /// + [DataMember(Name="data", EmitDefaultValue=false)] + public List Data { get; set; } + + + /// + /// Gets or Sets Success + /// + [DataMember(Name="success", EmitDefaultValue=false)] + public bool? Success { get; set; } + + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class InlineResponse2007 {\n"); + sb.Append(" Data: ").Append(Data).Append("\n"); + sb.Append(" Success: ").Append(Success).Append("\n"); + + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } - - /// - /// Gets or Sets Success - /// - [DataMember(Name="success", EmitDefaultValue=false)] - public bool? Success { get; set; } + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as InlineResponse2007); + } - + /// + /// Returns true if InlineResponse2007 instances are equal + /// + /// Instance of InlineResponse2007 to be compared + /// Boolean + public bool Equals(InlineResponse2007 other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class InlineResponse2007 {\n"); - - sb.Append(" Data: ").Append(Data).Append("\n"); - - sb.Append(" Success: ").Append(Success).Append("\n"); - - sb.Append("}\n"); - return sb.ToString(); - } + return + ( + this.Data == other.Data || + this.Data != null && + this.Data.SequenceEqual(other.Data) + ) && + ( + this.Success == other.Success || + this.Success != null && + this.Success.Equals(other.Success) + ); + } - /// - /// Get the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + + if (this.Data != null) + hash = hash * 57 + this.Data.GetHashCode(); + + if (this.Success != null) + hash = hash * 57 + this.Success.GetHashCode(); + + return hash; + } + } -} + } } diff --git a/src/main/csharp/io/swagger/Model/InlineResponse2008.cs b/src/main/csharp/io/swagger/Model/InlineResponse2008.cs index fe182a7..28775cb 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse2008.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse2008.cs @@ -1,56 +1,117 @@ using System; +using System.Linq; +using System.IO; using System.Text; using System.Collections; using System.Collections.Generic; using System.Runtime.Serialization; using Newtonsoft.Json; -namespace IO.Swagger.Model { +namespace IO.Swagger.Model +{ - /// - /// - /// - [DataContract] - public class InlineResponse2008 { - /// - /// Gets or Sets Data + /// /// - [DataMember(Name="data", EmitDefaultValue=false)] - public Correlation Data { get; set; } + [DataContract] + public class InlineResponse2008 : IEquatable + { + + /// + /// Gets or Sets Data + /// + [DataMember(Name="data", EmitDefaultValue=false)] + public Connector Data { get; set; } + + + /// + /// Gets or Sets Success + /// + [DataMember(Name="success", EmitDefaultValue=false)] + public bool? Success { get; set; } + + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class InlineResponse2008 {\n"); + sb.Append(" Data: ").Append(Data).Append("\n"); + sb.Append(" Success: ").Append(Success).Append("\n"); + + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } - - /// - /// Gets or Sets Success - /// - [DataMember(Name="success", EmitDefaultValue=false)] - public bool? Success { get; set; } + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as InlineResponse2008); + } - + /// + /// Returns true if InlineResponse2008 instances are equal + /// + /// Instance of InlineResponse2008 to be compared + /// Boolean + public bool Equals(InlineResponse2008 other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class InlineResponse2008 {\n"); - - sb.Append(" Data: ").Append(Data).Append("\n"); - - sb.Append(" Success: ").Append(Success).Append("\n"); - - sb.Append("}\n"); - return sb.ToString(); - } + return + ( + this.Data == other.Data || + this.Data != null && + this.Data.Equals(other.Data) + ) && + ( + this.Success == other.Success || + this.Success != null && + this.Success.Equals(other.Success) + ); + } - /// - /// Get the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + + if (this.Data != null) + hash = hash * 57 + this.Data.GetHashCode(); + + if (this.Success != null) + hash = hash * 57 + this.Success.GetHashCode(); + + return hash; + } + } -} + } } diff --git a/src/main/csharp/io/swagger/Model/InlineResponse2009.cs b/src/main/csharp/io/swagger/Model/InlineResponse2009.cs index 6175a1c..ce3c4c7 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse2009.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse2009.cs @@ -1,56 +1,117 @@ using System; +using System.Linq; +using System.IO; using System.Text; using System.Collections; using System.Collections.Generic; using System.Runtime.Serialization; using Newtonsoft.Json; -namespace IO.Swagger.Model { +namespace IO.Swagger.Model +{ - /// - /// - /// - [DataContract] - public class InlineResponse2009 { - /// - /// Gets or Sets Data + /// /// - [DataMember(Name="data", EmitDefaultValue=false)] - public List Data { get; set; } + [DataContract] + public class InlineResponse2009 : IEquatable + { + + /// + /// Gets or Sets Data + /// + [DataMember(Name="data", EmitDefaultValue=false)] + public List Data { get; set; } + + + /// + /// Gets or Sets Success + /// + [DataMember(Name="success", EmitDefaultValue=false)] + public bool? Success { get; set; } + + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class InlineResponse2009 {\n"); + sb.Append(" Data: ").Append(Data).Append("\n"); + sb.Append(" Success: ").Append(Success).Append("\n"); + + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } - - /// - /// Gets or Sets Success - /// - [DataMember(Name="success", EmitDefaultValue=false)] - public bool? Success { get; set; } + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as InlineResponse2009); + } - + /// + /// Returns true if InlineResponse2009 instances are equal + /// + /// Instance of InlineResponse2009 to be compared + /// Boolean + public bool Equals(InlineResponse2009 other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class InlineResponse2009 {\n"); - - sb.Append(" Data: ").Append(Data).Append("\n"); - - sb.Append(" Success: ").Append(Success).Append("\n"); - - sb.Append("}\n"); - return sb.ToString(); - } + return + ( + this.Data == other.Data || + this.Data != null && + this.Data.SequenceEqual(other.Data) + ) && + ( + this.Success == other.Success || + this.Success != null && + this.Success.Equals(other.Success) + ); + } - /// - /// Get the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + + if (this.Data != null) + hash = hash * 57 + this.Data.GetHashCode(); + + if (this.Success != null) + hash = hash * 57 + this.Success.GetHashCode(); + + return hash; + } + } -} + } } diff --git a/src/main/csharp/io/swagger/Model/Measurement.cs b/src/main/csharp/io/swagger/Model/Measurement.cs index eee7d33..ed35bfb 100644 --- a/src/main/csharp/io/swagger/Model/Measurement.cs +++ b/src/main/csharp/io/swagger/Model/Measurement.cs @@ -1,228 +1,408 @@ using System; +using System.Linq; +using System.IO; using System.Text; using System.Collections; using System.Collections.Generic; using System.Runtime.Serialization; using Newtonsoft.Json; -namespace IO.Swagger.Model { +namespace IO.Swagger.Model +{ - /// - /// - /// - [DataContract] - public class Measurement { - /// - /// id + /// /// - /// id - [DataMember(Name="id", EmitDefaultValue=false)] - public int? Id { get; set; } + [DataContract] + public class Measurement : IEquatable + { + + /// + /// id + /// + /// id + [DataMember(Name="id", EmitDefaultValue=false)] + public int? Id { get; set; } + + + /// + /// ID of user that owns this measurement + /// + /// ID of user that owns this measurement + [DataMember(Name="user_id", EmitDefaultValue=false)] + public int? UserId { get; set; } + + + /// + /// client_id + /// + /// client_id + [DataMember(Name="client_id", EmitDefaultValue=false)] + public string ClientId { get; set; } + + + /// + /// The id for the connector data source from which the measurement was obtained + /// + /// The id for the connector data source from which the measurement was obtained + [DataMember(Name="connector_id", EmitDefaultValue=false)] + public int? ConnectorId { get; set; } + + + /// + /// ID of the variable for which we are creating the measurement records + /// + /// ID of the variable for which we are creating the measurement records + [DataMember(Name="variable_id", EmitDefaultValue=false)] + public int? VariableId { get; set; } + + + /// + /// Application or device used to record the measurement values + /// + /// Application or device used to record the measurement values + [DataMember(Name="source_id", EmitDefaultValue=false)] + public int? SourceId { get; set; } + + + /// + /// Start Time for the measurement event. Use ISO 8601 + /// + /// Start Time for the measurement event. Use ISO 8601 + [DataMember(Name="start_time", EmitDefaultValue=false)] + public string StartTime { get; set; } + + + /// + /// The value of the measurement after conversion to the default unit for that variable + /// + /// The value of the measurement after conversion to the default unit for that variable + [DataMember(Name="value", EmitDefaultValue=false)] + public float? Value { get; set; } + + + /// + /// The default unit for the variable + /// + /// The default unit for the variable + [DataMember(Name="unit_id", EmitDefaultValue=false)] + public int? UnitId { get; set; } + + + /// + /// Value of measurement as originally posted (before conversion to default unit) + /// + /// Value of measurement as originally posted (before conversion to default unit) + [DataMember(Name="original_value", EmitDefaultValue=false)] + public float? OriginalValue { get; set; } + + + /// + /// Unit ID of measurement as originally submitted + /// + /// Unit ID of measurement as originally submitted + [DataMember(Name="original_unit_id", EmitDefaultValue=false)] + public int? OriginalUnitId { get; set; } + + + /// + /// Duration of the event being measurement in seconds + /// + /// Duration of the event being measurement in seconds + [DataMember(Name="duration", EmitDefaultValue=false)] + public int? Duration { get; set; } + + + /// + /// An optional note the user may include with their measurement + /// + /// An optional note the user may include with their measurement + [DataMember(Name="note", EmitDefaultValue=false)] + public string Note { get; set; } + + + /// + /// Latitude at which the measurement was taken + /// + /// Latitude at which the measurement was taken + [DataMember(Name="latitude", EmitDefaultValue=false)] + public float? Latitude { get; set; } + + + /// + /// Longitude at which the measurement was taken + /// + /// Longitude at which the measurement was taken + [DataMember(Name="longitude", EmitDefaultValue=false)] + public float? Longitude { get; set; } + + + /// + /// location + /// + /// location + [DataMember(Name="location", EmitDefaultValue=false)] + public string Location { get; set; } + + + /// + /// When the record was first created. Use ISO 8601 datetime format + /// + /// When the record was first created. Use ISO 8601 datetime format + [DataMember(Name="created_at", EmitDefaultValue=false)] + public DateTime? CreatedAt { get; set; } + + + /// + /// When the record in the database was last updated. Use ISO 8601 datetime format + /// + /// When the record in the database was last updated. Use ISO 8601 datetime format + [DataMember(Name="updated_at", EmitDefaultValue=false)] + public DateTime? UpdatedAt { get; set; } + + + /// + /// error + /// + /// error + [DataMember(Name="error", EmitDefaultValue=false)] + public string Error { get; set; } + + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Measurement {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" UserId: ").Append(UserId).Append("\n"); + sb.Append(" ClientId: ").Append(ClientId).Append("\n"); + sb.Append(" ConnectorId: ").Append(ConnectorId).Append("\n"); + sb.Append(" VariableId: ").Append(VariableId).Append("\n"); + sb.Append(" SourceId: ").Append(SourceId).Append("\n"); + sb.Append(" StartTime: ").Append(StartTime).Append("\n"); + sb.Append(" Value: ").Append(Value).Append("\n"); + sb.Append(" UnitId: ").Append(UnitId).Append("\n"); + sb.Append(" OriginalValue: ").Append(OriginalValue).Append("\n"); + sb.Append(" OriginalUnitId: ").Append(OriginalUnitId).Append("\n"); + sb.Append(" Duration: ").Append(Duration).Append("\n"); + sb.Append(" Note: ").Append(Note).Append("\n"); + sb.Append(" Latitude: ").Append(Latitude).Append("\n"); + sb.Append(" Longitude: ").Append(Longitude).Append("\n"); + sb.Append(" Location: ").Append(Location).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); + sb.Append(" Error: ").Append(Error).Append("\n"); + + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } - - /// - /// ID of user that owns this measurement - /// - /// ID of user that owns this measurement - [DataMember(Name="user_id", EmitDefaultValue=false)] - public int? UserId { get; set; } - - - /// - /// client_id - /// - /// client_id - [DataMember(Name="client_id", EmitDefaultValue=false)] - public string ClientId { get; set; } - - - /// - /// Connector ID - /// - /// Connector ID - [DataMember(Name="connector_id", EmitDefaultValue=false)] - public int? ConnectorId { get; set; } - - - /// - /// ID of the variable for which we are creating the measurement records - /// - /// ID of the variable for which we are creating the measurement records - [DataMember(Name="variable_id", EmitDefaultValue=false)] - public int? VariableId { get; set; } - - - /// - /// Application or device used to record the measurement values - /// - /// Application or device used to record the measurement values - [DataMember(Name="source_id", EmitDefaultValue=false)] - public int? SourceId { get; set; } - - - /// - /// Start Time for the measurement event in ISO 8601 - /// - /// Start Time for the measurement event in ISO 8601 - [DataMember(Name="start_time", EmitDefaultValue=false)] - public int? StartTime { get; set; } + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as Measurement); + } - - /// - /// Converted measurement value in requested unit - /// - /// Converted measurement value in requested unit - [DataMember(Name="value", EmitDefaultValue=false)] - public float? Value { get; set; } + /// + /// Returns true if Measurement instances are equal + /// + /// Instance of Measurement to be compared + /// Boolean + public bool Equals(Measurement other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; - - /// - /// Unit ID of measurement as requested in GET request - /// - /// Unit ID of measurement as requested in GET request - [DataMember(Name="unit_id", EmitDefaultValue=false)] - public int? UnitId { get; set; } + return + ( + this.Id == other.Id || + this.Id != null && + this.Id.Equals(other.Id) + ) && + ( + this.UserId == other.UserId || + this.UserId != null && + this.UserId.Equals(other.UserId) + ) && + ( + this.ClientId == other.ClientId || + this.ClientId != null && + this.ClientId.Equals(other.ClientId) + ) && + ( + this.ConnectorId == other.ConnectorId || + this.ConnectorId != null && + this.ConnectorId.Equals(other.ConnectorId) + ) && + ( + this.VariableId == other.VariableId || + this.VariableId != null && + this.VariableId.Equals(other.VariableId) + ) && + ( + this.SourceId == other.SourceId || + this.SourceId != null && + this.SourceId.Equals(other.SourceId) + ) && + ( + this.StartTime == other.StartTime || + this.StartTime != null && + this.StartTime.Equals(other.StartTime) + ) && + ( + this.Value == other.Value || + this.Value != null && + this.Value.Equals(other.Value) + ) && + ( + this.UnitId == other.UnitId || + this.UnitId != null && + this.UnitId.Equals(other.UnitId) + ) && + ( + this.OriginalValue == other.OriginalValue || + this.OriginalValue != null && + this.OriginalValue.Equals(other.OriginalValue) + ) && + ( + this.OriginalUnitId == other.OriginalUnitId || + this.OriginalUnitId != null && + this.OriginalUnitId.Equals(other.OriginalUnitId) + ) && + ( + this.Duration == other.Duration || + this.Duration != null && + this.Duration.Equals(other.Duration) + ) && + ( + this.Note == other.Note || + this.Note != null && + this.Note.Equals(other.Note) + ) && + ( + this.Latitude == other.Latitude || + this.Latitude != null && + this.Latitude.Equals(other.Latitude) + ) && + ( + this.Longitude == other.Longitude || + this.Longitude != null && + this.Longitude.Equals(other.Longitude) + ) && + ( + this.Location == other.Location || + this.Location != null && + this.Location.Equals(other.Location) + ) && + ( + this.CreatedAt == other.CreatedAt || + this.CreatedAt != null && + this.CreatedAt.Equals(other.CreatedAt) + ) && + ( + this.UpdatedAt == other.UpdatedAt || + this.UpdatedAt != null && + this.UpdatedAt.Equals(other.UpdatedAt) + ) && + ( + this.Error == other.Error || + this.Error != null && + this.Error.Equals(other.Error) + ); + } - - /// - /// Original value - /// - /// Original value - [DataMember(Name="original_value", EmitDefaultValue=false)] - public float? OriginalValue { get; set; } + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + + if (this.Id != null) + hash = hash * 57 + this.Id.GetHashCode(); + + if (this.UserId != null) + hash = hash * 57 + this.UserId.GetHashCode(); + + if (this.ClientId != null) + hash = hash * 57 + this.ClientId.GetHashCode(); + + if (this.ConnectorId != null) + hash = hash * 57 + this.ConnectorId.GetHashCode(); + + if (this.VariableId != null) + hash = hash * 57 + this.VariableId.GetHashCode(); + + if (this.SourceId != null) + hash = hash * 57 + this.SourceId.GetHashCode(); + + if (this.StartTime != null) + hash = hash * 57 + this.StartTime.GetHashCode(); + + if (this.Value != null) + hash = hash * 57 + this.Value.GetHashCode(); + + if (this.UnitId != null) + hash = hash * 57 + this.UnitId.GetHashCode(); + + if (this.OriginalValue != null) + hash = hash * 57 + this.OriginalValue.GetHashCode(); + + if (this.OriginalUnitId != null) + hash = hash * 57 + this.OriginalUnitId.GetHashCode(); + + if (this.Duration != null) + hash = hash * 57 + this.Duration.GetHashCode(); + + if (this.Note != null) + hash = hash * 57 + this.Note.GetHashCode(); + + if (this.Latitude != null) + hash = hash * 57 + this.Latitude.GetHashCode(); + + if (this.Longitude != null) + hash = hash * 57 + this.Longitude.GetHashCode(); + + if (this.Location != null) + hash = hash * 57 + this.Location.GetHashCode(); + + if (this.CreatedAt != null) + hash = hash * 57 + this.CreatedAt.GetHashCode(); + + if (this.UpdatedAt != null) + hash = hash * 57 + this.UpdatedAt.GetHashCode(); + + if (this.Error != null) + hash = hash * 57 + this.Error.GetHashCode(); + + return hash; + } + } - - /// - /// Unit ID of measurement as originally submitted - /// - /// Unit ID of measurement as originally submitted - [DataMember(Name="original_unit_id", EmitDefaultValue=false)] - public int? OriginalUnitId { get; set; } - - - /// - /// duration of measurement in seconds - /// - /// duration of measurement in seconds - [DataMember(Name="duration", EmitDefaultValue=false)] - public int? Duration { get; set; } - - - /// - /// Note of measurement - /// - /// Note of measurement - [DataMember(Name="note", EmitDefaultValue=false)] - public string Note { get; set; } - - - /// - /// latitude - /// - /// latitude - [DataMember(Name="latitude", EmitDefaultValue=false)] - public float? Latitude { get; set; } - - - /// - /// longitude - /// - /// longitude - [DataMember(Name="longitude", EmitDefaultValue=false)] - public float? Longitude { get; set; } - - - /// - /// location - /// - /// location - [DataMember(Name="location", EmitDefaultValue=false)] - public string Location { get; set; } - - - /// - /// created_at - /// - /// created_at - [DataMember(Name="created_at", EmitDefaultValue=false)] - public DateTime? CreatedAt { get; set; } - - - /// - /// updated_at - /// - /// updated_at - [DataMember(Name="updated_at", EmitDefaultValue=false)] - public DateTime? UpdatedAt { get; set; } - - - /// - /// error - /// - /// error - [DataMember(Name="error", EmitDefaultValue=false)] - public string Error { get; set; } - - - - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class Measurement {\n"); - - sb.Append(" Id: ").Append(Id).Append("\n"); - - sb.Append(" UserId: ").Append(UserId).Append("\n"); - - sb.Append(" ClientId: ").Append(ClientId).Append("\n"); - - sb.Append(" ConnectorId: ").Append(ConnectorId).Append("\n"); - - sb.Append(" VariableId: ").Append(VariableId).Append("\n"); - - sb.Append(" SourceId: ").Append(SourceId).Append("\n"); - - sb.Append(" StartTime: ").Append(StartTime).Append("\n"); - - sb.Append(" Value: ").Append(Value).Append("\n"); - - sb.Append(" UnitId: ").Append(UnitId).Append("\n"); - - sb.Append(" OriginalValue: ").Append(OriginalValue).Append("\n"); - - sb.Append(" OriginalUnitId: ").Append(OriginalUnitId).Append("\n"); - - sb.Append(" Duration: ").Append(Duration).Append("\n"); - - sb.Append(" Note: ").Append(Note).Append("\n"); - - sb.Append(" Latitude: ").Append(Latitude).Append("\n"); - - sb.Append(" Longitude: ").Append(Longitude).Append("\n"); - - sb.Append(" Location: ").Append(Location).Append("\n"); - - sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); - - sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); - - sb.Append(" Error: ").Append(Error).Append("\n"); - - sb.Append("}\n"); - return sb.ToString(); } - - /// - /// Get the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - -} } diff --git a/src/main/csharp/io/swagger/Model/MeasurementExport.cs b/src/main/csharp/io/swagger/Model/MeasurementExport.cs index 5f4d332..ccdb8e4 100644 --- a/src/main/csharp/io/swagger/Model/MeasurementExport.cs +++ b/src/main/csharp/io/swagger/Model/MeasurementExport.cs @@ -1,98 +1,187 @@ using System; +using System.Linq; +using System.IO; using System.Text; using System.Collections; using System.Collections.Generic; using System.Runtime.Serialization; using Newtonsoft.Json; -namespace IO.Swagger.Model { +namespace IO.Swagger.Model +{ - /// - /// - /// - [DataContract] - public class MeasurementExport { - /// - /// id + /// /// - /// id - [DataMember(Name="id", EmitDefaultValue=false)] - public int? Id { get; set; } + [DataContract] + public class MeasurementExport : IEquatable + { + + /// + /// id + /// + /// id + [DataMember(Name="id", EmitDefaultValue=false)] + public int? Id { get; set; } + + + /// + /// ID of User + /// + /// ID of User + [DataMember(Name="user_id", EmitDefaultValue=false)] + public int? UserId { get; set; } + + + /// + /// Status of Measurement Export + /// + /// Status of Measurement Export + [DataMember(Name="status", EmitDefaultValue=false)] + public string Status { get; set; } + + + /// + /// Error message + /// + /// Error message + [DataMember(Name="error_message", EmitDefaultValue=false)] + public string ErrorMessage { get; set; } + + + /// + /// When the record was first created. Use ISO 8601 datetime format + /// + /// When the record was first created. Use ISO 8601 datetime format + [DataMember(Name="created_at", EmitDefaultValue=false)] + public DateTime? CreatedAt { get; set; } + + + /// + /// When the record in the database was last updated. Use ISO 8601 datetime format + /// + /// When the record in the database was last updated. Use ISO 8601 datetime format + [DataMember(Name="updated_at", EmitDefaultValue=false)] + public DateTime? UpdatedAt { get; set; } + + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class MeasurementExport {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" UserId: ").Append(UserId).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" ErrorMessage: ").Append(ErrorMessage).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); + + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } - - /// - /// ID of User - /// - /// ID of User - [DataMember(Name="user_id", EmitDefaultValue=false)] - public int? UserId { get; set; } - - - /// - /// Status of Measurement Export - /// - /// Status of Measurement Export - [DataMember(Name="status", EmitDefaultValue=false)] - public string Status { get; set; } - - - /// - /// Error message - /// - /// Error message - [DataMember(Name="error_message", EmitDefaultValue=false)] - public string ErrorMessage { get; set; } - - - /// - /// created_at - /// - /// created_at - [DataMember(Name="created_at", EmitDefaultValue=false)] - public DateTime? CreatedAt { get; set; } + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as MeasurementExport); + } - - /// - /// updated_at - /// - /// updated_at - [DataMember(Name="updated_at", EmitDefaultValue=false)] - public DateTime? UpdatedAt { get; set; } + /// + /// Returns true if MeasurementExport instances are equal + /// + /// Instance of MeasurementExport to be compared + /// Boolean + public bool Equals(MeasurementExport other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; - + return + ( + this.Id == other.Id || + this.Id != null && + this.Id.Equals(other.Id) + ) && + ( + this.UserId == other.UserId || + this.UserId != null && + this.UserId.Equals(other.UserId) + ) && + ( + this.Status == other.Status || + this.Status != null && + this.Status.Equals(other.Status) + ) && + ( + this.ErrorMessage == other.ErrorMessage || + this.ErrorMessage != null && + this.ErrorMessage.Equals(other.ErrorMessage) + ) && + ( + this.CreatedAt == other.CreatedAt || + this.CreatedAt != null && + this.CreatedAt.Equals(other.CreatedAt) + ) && + ( + this.UpdatedAt == other.UpdatedAt || + this.UpdatedAt != null && + this.UpdatedAt.Equals(other.UpdatedAt) + ); + } - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class MeasurementExport {\n"); - - sb.Append(" Id: ").Append(Id).Append("\n"); - - sb.Append(" UserId: ").Append(UserId).Append("\n"); - - sb.Append(" Status: ").Append(Status).Append("\n"); - - sb.Append(" ErrorMessage: ").Append(ErrorMessage).Append("\n"); - - sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); - - sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); - - sb.Append("}\n"); - return sb.ToString(); - } + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + + if (this.Id != null) + hash = hash * 57 + this.Id.GetHashCode(); + + if (this.UserId != null) + hash = hash * 57 + this.UserId.GetHashCode(); + + if (this.Status != null) + hash = hash * 57 + this.Status.GetHashCode(); + + if (this.ErrorMessage != null) + hash = hash * 57 + this.ErrorMessage.GetHashCode(); + + if (this.CreatedAt != null) + hash = hash * 57 + this.CreatedAt.GetHashCode(); + + if (this.UpdatedAt != null) + hash = hash * 57 + this.UpdatedAt.GetHashCode(); + + return hash; + } + } - /// - /// Get the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() { - return JsonConvert.SerializeObject(this, Formatting.Indented); } - -} } diff --git a/src/main/csharp/io/swagger/Model/MeasurementPost.cs b/src/main/csharp/io/swagger/Model/MeasurementPost.cs index ec17e3e..08436e7 100644 --- a/src/main/csharp/io/swagger/Model/MeasurementPost.cs +++ b/src/main/csharp/io/swagger/Model/MeasurementPost.cs @@ -1,78 +1,153 @@ using System; +using System.Linq; +using System.IO; using System.Text; using System.Collections; using System.Collections.Generic; using System.Runtime.Serialization; using Newtonsoft.Json; -namespace IO.Swagger.Model { +namespace IO.Swagger.Model +{ - /// - /// - /// - [DataContract] - public class MeasurementPost { - /// - /// variable_id + /// /// - /// variable_id - [DataMember(Name="variable_id", EmitDefaultValue=false)] - public int? VariableId { get; set; } + [DataContract] + public class MeasurementPost : IEquatable + { + + /// + /// ID of the variable for the measurement as obtained from the GET variables endpoint + /// + /// ID of the variable for the measurement as obtained from the GET variables endpoint + [DataMember(Name="variable_id", EmitDefaultValue=false)] + public int? VariableId { get; set; } + + + /// + /// Source ID of the app or device as obtained from the GET sources endpoint + /// + /// Source ID of the app or device as obtained from the GET sources endpoint + [DataMember(Name="source_id", EmitDefaultValue=false)] + public int? SourceId { get; set; } + + + /// + /// Unit id for the measurement value as obtained from the GET units endpoint + /// + /// Unit id for the measurement value as obtained from the GET units endpoint + [DataMember(Name="unit_id", EmitDefaultValue=false)] + public int? UnitId { get; set; } + + + /// + /// measurements + /// + /// measurements + [DataMember(Name="measurements", EmitDefaultValue=false)] + public List Measurements { get; set; } + + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class MeasurementPost {\n"); + sb.Append(" VariableId: ").Append(VariableId).Append("\n"); + sb.Append(" SourceId: ").Append(SourceId).Append("\n"); + sb.Append(" UnitId: ").Append(UnitId).Append("\n"); + sb.Append(" Measurements: ").Append(Measurements).Append("\n"); + + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } - - /// - /// source_id - /// - /// source_id - [DataMember(Name="source_id", EmitDefaultValue=false)] - public int? SourceId { get; set; } + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as MeasurementPost); + } - - /// - /// unit_id - /// - /// unit_id - [DataMember(Name="unit_id", EmitDefaultValue=false)] - public int? UnitId { get; set; } - - - /// - /// measurements - /// - /// measurements - [DataMember(Name="measurements", EmitDefaultValue=false)] - public List Measurements { get; set; } + /// + /// Returns true if MeasurementPost instances are equal + /// + /// Instance of MeasurementPost to be compared + /// Boolean + public bool Equals(MeasurementPost other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; - + return + ( + this.VariableId == other.VariableId || + this.VariableId != null && + this.VariableId.Equals(other.VariableId) + ) && + ( + this.SourceId == other.SourceId || + this.SourceId != null && + this.SourceId.Equals(other.SourceId) + ) && + ( + this.UnitId == other.UnitId || + this.UnitId != null && + this.UnitId.Equals(other.UnitId) + ) && + ( + this.Measurements == other.Measurements || + this.Measurements != null && + this.Measurements.SequenceEqual(other.Measurements) + ); + } - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class MeasurementPost {\n"); - - sb.Append(" VariableId: ").Append(VariableId).Append("\n"); - - sb.Append(" SourceId: ").Append(SourceId).Append("\n"); - - sb.Append(" UnitId: ").Append(UnitId).Append("\n"); - - sb.Append(" Measurements: ").Append(Measurements).Append("\n"); - - sb.Append("}\n"); - return sb.ToString(); - } + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + + if (this.VariableId != null) + hash = hash * 57 + this.VariableId.GetHashCode(); + + if (this.SourceId != null) + hash = hash * 57 + this.SourceId.GetHashCode(); + + if (this.UnitId != null) + hash = hash * 57 + this.UnitId.GetHashCode(); + + if (this.Measurements != null) + hash = hash * 57 + this.Measurements.GetHashCode(); + + return hash; + } + } - /// - /// Get the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() { - return JsonConvert.SerializeObject(this, Formatting.Indented); } - -} } diff --git a/src/main/csharp/io/swagger/Model/MeasurementValue.cs b/src/main/csharp/io/swagger/Model/MeasurementValue.cs index a02270e..da2e50d 100644 --- a/src/main/csharp/io/swagger/Model/MeasurementValue.cs +++ b/src/main/csharp/io/swagger/Model/MeasurementValue.cs @@ -1,58 +1,136 @@ using System; +using System.Linq; +using System.IO; using System.Text; using System.Collections; using System.Collections.Generic; using System.Runtime.Serialization; using Newtonsoft.Json; -namespace IO.Swagger.Model { +namespace IO.Swagger.Model +{ - /// - /// - /// - [DataContract] - public class MeasurementValue { - /// - /// start_time + /// /// - /// start_time - [DataMember(Name="start_time", EmitDefaultValue=false)] - public long? StartTime { get; set; } + [DataContract] + public class MeasurementValue : IEquatable + { + + /// + /// When the measurement event occurred . Use ISO 8601 datetime format + /// + /// When the measurement event occurred . Use ISO 8601 datetime format + [DataMember(Name="start_time", EmitDefaultValue=false)] + public string StartTime { get; set; } + + + /// + /// Value for the measurement + /// + /// Value for the measurement + [DataMember(Name="value", EmitDefaultValue=false)] + public float? Value { get; set; } + + + /// + /// An optional note the user may include with their measurement + /// + /// An optional note the user may include with their measurement + [DataMember(Name="note", EmitDefaultValue=false)] + public string Note { get; set; } + + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class MeasurementValue {\n"); + sb.Append(" StartTime: ").Append(StartTime).Append("\n"); + sb.Append(" Value: ").Append(Value).Append("\n"); + sb.Append(" Note: ").Append(Note).Append("\n"); + + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } - - /// - /// value - /// - /// value - [DataMember(Name="value", EmitDefaultValue=false)] - public float? Value { get; set; } + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as MeasurementValue); + } - + /// + /// Returns true if MeasurementValue instances are equal + /// + /// Instance of MeasurementValue to be compared + /// Boolean + public bool Equals(MeasurementValue other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class MeasurementValue {\n"); - - sb.Append(" StartTime: ").Append(StartTime).Append("\n"); - - sb.Append(" Value: ").Append(Value).Append("\n"); - - sb.Append("}\n"); - return sb.ToString(); - } + return + ( + this.StartTime == other.StartTime || + this.StartTime != null && + this.StartTime.Equals(other.StartTime) + ) && + ( + this.Value == other.Value || + this.Value != null && + this.Value.Equals(other.Value) + ) && + ( + this.Note == other.Note || + this.Note != null && + this.Note.Equals(other.Note) + ); + } - /// - /// Get the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + + if (this.StartTime != null) + hash = hash * 57 + this.StartTime.GetHashCode(); + + if (this.Value != null) + hash = hash * 57 + this.Value.GetHashCode(); + + if (this.Note != null) + hash = hash * 57 + this.Note.GetHashCode(); + + return hash; + } + } -} + } } diff --git a/src/main/csharp/io/swagger/Model/Source.cs b/src/main/csharp/io/swagger/Model/Source.cs index bfb661f..54f86b5 100644 --- a/src/main/csharp/io/swagger/Model/Source.cs +++ b/src/main/csharp/io/swagger/Model/Source.cs @@ -1,88 +1,170 @@ using System; +using System.Linq; +using System.IO; using System.Text; using System.Collections; using System.Collections.Generic; using System.Runtime.Serialization; using Newtonsoft.Json; -namespace IO.Swagger.Model { +namespace IO.Swagger.Model +{ - /// - /// - /// - [DataContract] - public class Source { - /// - /// id + /// /// - /// id - [DataMember(Name="id", EmitDefaultValue=false)] - public int? Id { get; set; } + [DataContract] + public class Source : IEquatable + { + + /// + /// id + /// + /// id + [DataMember(Name="id", EmitDefaultValue=false)] + public int? Id { get; set; } + + + /// + /// client_id + /// + /// client_id + [DataMember(Name="client_id", EmitDefaultValue=false)] + public string ClientId { get; set; } + + + /// + /// Name of the application or device + /// + /// Name of the application or device + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + + /// + /// When the record was first created. Use ISO 8601 datetime format + /// + /// When the record was first created. Use ISO 8601 datetime format + [DataMember(Name="created_at", EmitDefaultValue=false)] + public DateTime? CreatedAt { get; set; } + + + /// + /// When the record in the database was last updated. Use ISO 8601 datetime format + /// + /// When the record in the database was last updated. Use ISO 8601 datetime format + [DataMember(Name="updated_at", EmitDefaultValue=false)] + public DateTime? UpdatedAt { get; set; } + + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Source {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" ClientId: ").Append(ClientId).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); + + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } - - /// - /// client_id - /// - /// client_id - [DataMember(Name="client_id", EmitDefaultValue=false)] - public string ClientId { get; set; } + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as Source); + } - - /// - /// Name of the application or device - /// - /// Name of the application or device - [DataMember(Name="name", EmitDefaultValue=false)] - public string Name { get; set; } + /// + /// Returns true if Source instances are equal + /// + /// Instance of Source to be compared + /// Boolean + public bool Equals(Source other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; - - /// - /// created_at - /// - /// created_at - [DataMember(Name="created_at", EmitDefaultValue=false)] - public DateTime? CreatedAt { get; set; } - - - /// - /// updated_at - /// - /// updated_at - [DataMember(Name="updated_at", EmitDefaultValue=false)] - public DateTime? UpdatedAt { get; set; } + return + ( + this.Id == other.Id || + this.Id != null && + this.Id.Equals(other.Id) + ) && + ( + this.ClientId == other.ClientId || + this.ClientId != null && + this.ClientId.Equals(other.ClientId) + ) && + ( + this.Name == other.Name || + this.Name != null && + this.Name.Equals(other.Name) + ) && + ( + this.CreatedAt == other.CreatedAt || + this.CreatedAt != null && + this.CreatedAt.Equals(other.CreatedAt) + ) && + ( + this.UpdatedAt == other.UpdatedAt || + this.UpdatedAt != null && + this.UpdatedAt.Equals(other.UpdatedAt) + ); + } - + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + + if (this.Id != null) + hash = hash * 57 + this.Id.GetHashCode(); + + if (this.ClientId != null) + hash = hash * 57 + this.ClientId.GetHashCode(); + + if (this.Name != null) + hash = hash * 57 + this.Name.GetHashCode(); + + if (this.CreatedAt != null) + hash = hash * 57 + this.CreatedAt.GetHashCode(); + + if (this.UpdatedAt != null) + hash = hash * 57 + this.UpdatedAt.GetHashCode(); + + return hash; + } + } - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class Source {\n"); - - sb.Append(" Id: ").Append(Id).Append("\n"); - - sb.Append(" ClientId: ").Append(ClientId).Append("\n"); - - sb.Append(" Name: ").Append(Name).Append("\n"); - - sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); - - sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); - - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Get the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() { - return JsonConvert.SerializeObject(this, Formatting.Indented); } - -} } diff --git a/src/main/csharp/io/swagger/Model/Unit.cs b/src/main/csharp/io/swagger/Model/Unit.cs index c0c1658..294ed45 100644 --- a/src/main/csharp/io/swagger/Model/Unit.cs +++ b/src/main/csharp/io/swagger/Model/Unit.cs @@ -1,168 +1,306 @@ using System; +using System.Linq; +using System.IO; using System.Text; using System.Collections; using System.Collections.Generic; using System.Runtime.Serialization; using Newtonsoft.Json; -namespace IO.Swagger.Model { +namespace IO.Swagger.Model +{ - /// - /// - /// - [DataContract] - public class Unit { - /// - /// id + /// /// - /// id - [DataMember(Name="id", EmitDefaultValue=false)] - public int? Id { get; set; } + [DataContract] + public class Unit : IEquatable + { + + /// + /// id + /// + /// id + [DataMember(Name="id", EmitDefaultValue=false)] + public int? Id { get; set; } + + + /// + /// client_id + /// + /// client_id + [DataMember(Name="client_id", EmitDefaultValue=false)] + public string ClientId { get; set; } + + + /// + /// Unit name + /// + /// Unit name + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + + /// + /// Unit abbreviation + /// + /// Unit abbreviation + [DataMember(Name="abbreviated_name", EmitDefaultValue=false)] + public string AbbreviatedName { get; set; } + + + /// + /// Unit category ID + /// + /// Unit category ID + [DataMember(Name="category_id", EmitDefaultValue=false)] + public int? CategoryId { get; set; } + + + /// + /// Minimum value permitted for this unit + /// + /// Minimum value permitted for this unit + [DataMember(Name="minimum_value", EmitDefaultValue=false)] + public float? MinimumValue { get; set; } + + + /// + /// Maximum value permitted for this unit + /// + /// Maximum value permitted for this unit + [DataMember(Name="maximum_value", EmitDefaultValue=false)] + public float? MaximumValue { get; set; } + + + /// + /// updated + /// + /// updated + [DataMember(Name="updated", EmitDefaultValue=false)] + public int? Updated { get; set; } + + + /// + /// ID of default unit for this units category + /// + /// ID of default unit for this units category + [DataMember(Name="default_unit_id", EmitDefaultValue=false)] + public int? DefaultUnitId { get; set; } + + + /// + /// Value multiplied to convert to default unit in this unit category + /// + /// Value multiplied to convert to default unit in this unit category + [DataMember(Name="multiply", EmitDefaultValue=false)] + public float? Multiply { get; set; } + + + /// + /// Value which should be added to convert to default unit + /// + /// Value which should be added to convert to default unit + [DataMember(Name="add", EmitDefaultValue=false)] + public float? Add { get; set; } + + + /// + /// When the record was first created. Use ISO 8601 datetime format + /// + /// When the record was first created. Use ISO 8601 datetime format + [DataMember(Name="created_at", EmitDefaultValue=false)] + public DateTime? CreatedAt { get; set; } + + + /// + /// When the record in the database was last updated. Use ISO 8601 datetime format + /// + /// When the record in the database was last updated. Use ISO 8601 datetime format + [DataMember(Name="updated_at", EmitDefaultValue=false)] + public DateTime? UpdatedAt { get; set; } + + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Unit {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" ClientId: ").Append(ClientId).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" AbbreviatedName: ").Append(AbbreviatedName).Append("\n"); + sb.Append(" CategoryId: ").Append(CategoryId).Append("\n"); + sb.Append(" MinimumValue: ").Append(MinimumValue).Append("\n"); + sb.Append(" MaximumValue: ").Append(MaximumValue).Append("\n"); + sb.Append(" Updated: ").Append(Updated).Append("\n"); + sb.Append(" DefaultUnitId: ").Append(DefaultUnitId).Append("\n"); + sb.Append(" Multiply: ").Append(Multiply).Append("\n"); + sb.Append(" Add: ").Append(Add).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); + + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } - - /// - /// client_id - /// - /// client_id - [DataMember(Name="client_id", EmitDefaultValue=false)] - public string ClientId { get; set; } + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as Unit); + } - - /// - /// Unit name - /// - /// Unit name - [DataMember(Name="name", EmitDefaultValue=false)] - public string Name { get; set; } + /// + /// Returns true if Unit instances are equal + /// + /// Instance of Unit to be compared + /// Boolean + public bool Equals(Unit other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; - - /// - /// Unit abbreviation - /// - /// Unit abbreviation - [DataMember(Name="abbreviated_name", EmitDefaultValue=false)] - public string AbbreviatedName { get; set; } + return + ( + this.Id == other.Id || + this.Id != null && + this.Id.Equals(other.Id) + ) && + ( + this.ClientId == other.ClientId || + this.ClientId != null && + this.ClientId.Equals(other.ClientId) + ) && + ( + this.Name == other.Name || + this.Name != null && + this.Name.Equals(other.Name) + ) && + ( + this.AbbreviatedName == other.AbbreviatedName || + this.AbbreviatedName != null && + this.AbbreviatedName.Equals(other.AbbreviatedName) + ) && + ( + this.CategoryId == other.CategoryId || + this.CategoryId != null && + this.CategoryId.Equals(other.CategoryId) + ) && + ( + this.MinimumValue == other.MinimumValue || + this.MinimumValue != null && + this.MinimumValue.Equals(other.MinimumValue) + ) && + ( + this.MaximumValue == other.MaximumValue || + this.MaximumValue != null && + this.MaximumValue.Equals(other.MaximumValue) + ) && + ( + this.Updated == other.Updated || + this.Updated != null && + this.Updated.Equals(other.Updated) + ) && + ( + this.DefaultUnitId == other.DefaultUnitId || + this.DefaultUnitId != null && + this.DefaultUnitId.Equals(other.DefaultUnitId) + ) && + ( + this.Multiply == other.Multiply || + this.Multiply != null && + this.Multiply.Equals(other.Multiply) + ) && + ( + this.Add == other.Add || + this.Add != null && + this.Add.Equals(other.Add) + ) && + ( + this.CreatedAt == other.CreatedAt || + this.CreatedAt != null && + this.CreatedAt.Equals(other.CreatedAt) + ) && + ( + this.UpdatedAt == other.UpdatedAt || + this.UpdatedAt != null && + this.UpdatedAt.Equals(other.UpdatedAt) + ); + } - - /// - /// Unit category ID - /// - /// Unit category ID - [DataMember(Name="category_id", EmitDefaultValue=false)] - public int? CategoryId { get; set; } - - - /// - /// Unit minimum value - /// - /// Unit minimum value - [DataMember(Name="minimum_value", EmitDefaultValue=false)] - public float? MinimumValue { get; set; } + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + + if (this.Id != null) + hash = hash * 57 + this.Id.GetHashCode(); + + if (this.ClientId != null) + hash = hash * 57 + this.ClientId.GetHashCode(); + + if (this.Name != null) + hash = hash * 57 + this.Name.GetHashCode(); + + if (this.AbbreviatedName != null) + hash = hash * 57 + this.AbbreviatedName.GetHashCode(); + + if (this.CategoryId != null) + hash = hash * 57 + this.CategoryId.GetHashCode(); + + if (this.MinimumValue != null) + hash = hash * 57 + this.MinimumValue.GetHashCode(); + + if (this.MaximumValue != null) + hash = hash * 57 + this.MaximumValue.GetHashCode(); + + if (this.Updated != null) + hash = hash * 57 + this.Updated.GetHashCode(); + + if (this.DefaultUnitId != null) + hash = hash * 57 + this.DefaultUnitId.GetHashCode(); + + if (this.Multiply != null) + hash = hash * 57 + this.Multiply.GetHashCode(); + + if (this.Add != null) + hash = hash * 57 + this.Add.GetHashCode(); + + if (this.CreatedAt != null) + hash = hash * 57 + this.CreatedAt.GetHashCode(); + + if (this.UpdatedAt != null) + hash = hash * 57 + this.UpdatedAt.GetHashCode(); + + return hash; + } + } - - /// - /// Unit maximum value - /// - /// Unit maximum value - [DataMember(Name="maximum_value", EmitDefaultValue=false)] - public float? MaximumValue { get; set; } - - - /// - /// updated - /// - /// updated - [DataMember(Name="updated", EmitDefaultValue=false)] - public int? Updated { get; set; } - - - /// - /// ID of default unit - /// - /// ID of default unit - [DataMember(Name="default_unit_id", EmitDefaultValue=false)] - public int? DefaultUnitId { get; set; } - - - /// - /// Value multiplied to - /// - /// Value multiplied to - [DataMember(Name="multiply", EmitDefaultValue=false)] - public float? Multiply { get; set; } - - - /// - /// Value which should be added to convert to default unit - /// - /// Value which should be added to convert to default unit - [DataMember(Name="add", EmitDefaultValue=false)] - public float? Add { get; set; } - - - /// - /// created_at - /// - /// created_at - [DataMember(Name="created_at", EmitDefaultValue=false)] - public DateTime? CreatedAt { get; set; } - - - /// - /// updated_at - /// - /// updated_at - [DataMember(Name="updated_at", EmitDefaultValue=false)] - public DateTime? UpdatedAt { get; set; } - - - - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class Unit {\n"); - - sb.Append(" Id: ").Append(Id).Append("\n"); - - sb.Append(" ClientId: ").Append(ClientId).Append("\n"); - - sb.Append(" Name: ").Append(Name).Append("\n"); - - sb.Append(" AbbreviatedName: ").Append(AbbreviatedName).Append("\n"); - - sb.Append(" CategoryId: ").Append(CategoryId).Append("\n"); - - sb.Append(" MinimumValue: ").Append(MinimumValue).Append("\n"); - - sb.Append(" MaximumValue: ").Append(MaximumValue).Append("\n"); - - sb.Append(" Updated: ").Append(Updated).Append("\n"); - - sb.Append(" DefaultUnitId: ").Append(DefaultUnitId).Append("\n"); - - sb.Append(" Multiply: ").Append(Multiply).Append("\n"); - - sb.Append(" Add: ").Append(Add).Append("\n"); - - sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); - - sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); - - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Get the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() { - return JsonConvert.SerializeObject(this, Formatting.Indented); } - -} } diff --git a/src/main/csharp/io/swagger/Model/UnitCategory.cs b/src/main/csharp/io/swagger/Model/UnitCategory.cs index 25b9111..7904519 100644 --- a/src/main/csharp/io/swagger/Model/UnitCategory.cs +++ b/src/main/csharp/io/swagger/Model/UnitCategory.cs @@ -1,78 +1,153 @@ using System; +using System.Linq; +using System.IO; using System.Text; using System.Collections; using System.Collections.Generic; using System.Runtime.Serialization; using Newtonsoft.Json; -namespace IO.Swagger.Model { +namespace IO.Swagger.Model +{ - /// - /// - /// - [DataContract] - public class UnitCategory { - /// - /// id + /// /// - /// id - [DataMember(Name="id", EmitDefaultValue=false)] - public int? Id { get; set; } + [DataContract] + public class UnitCategory : IEquatable + { + + /// + /// id + /// + /// id + [DataMember(Name="id", EmitDefaultValue=false)] + public int? Id { get; set; } + + + /// + /// Unit category name + /// + /// Unit category name + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + + /// + /// When the record was first created. Use ISO 8601 datetime format + /// + /// When the record was first created. Use ISO 8601 datetime format + [DataMember(Name="created_at", EmitDefaultValue=false)] + public DateTime? CreatedAt { get; set; } + + + /// + /// When the record in the database was last updated. Use ISO 8601 datetime format + /// + /// When the record in the database was last updated. Use ISO 8601 datetime format + [DataMember(Name="updated_at", EmitDefaultValue=false)] + public DateTime? UpdatedAt { get; set; } + + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class UnitCategory {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); + + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } - - /// - /// Unit category name - /// - /// Unit category name - [DataMember(Name="name", EmitDefaultValue=false)] - public string Name { get; set; } + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as UnitCategory); + } - - /// - /// created_at - /// - /// created_at - [DataMember(Name="created_at", EmitDefaultValue=false)] - public DateTime? CreatedAt { get; set; } - - - /// - /// updated_at - /// - /// updated_at - [DataMember(Name="updated_at", EmitDefaultValue=false)] - public DateTime? UpdatedAt { get; set; } + /// + /// Returns true if UnitCategory instances are equal + /// + /// Instance of UnitCategory to be compared + /// Boolean + public bool Equals(UnitCategory other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; - + return + ( + this.Id == other.Id || + this.Id != null && + this.Id.Equals(other.Id) + ) && + ( + this.Name == other.Name || + this.Name != null && + this.Name.Equals(other.Name) + ) && + ( + this.CreatedAt == other.CreatedAt || + this.CreatedAt != null && + this.CreatedAt.Equals(other.CreatedAt) + ) && + ( + this.UpdatedAt == other.UpdatedAt || + this.UpdatedAt != null && + this.UpdatedAt.Equals(other.UpdatedAt) + ); + } - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class UnitCategory {\n"); - - sb.Append(" Id: ").Append(Id).Append("\n"); - - sb.Append(" Name: ").Append(Name).Append("\n"); - - sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); - - sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); - - sb.Append("}\n"); - return sb.ToString(); - } + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + + if (this.Id != null) + hash = hash * 57 + this.Id.GetHashCode(); + + if (this.Name != null) + hash = hash * 57 + this.Name.GetHashCode(); + + if (this.CreatedAt != null) + hash = hash * 57 + this.CreatedAt.GetHashCode(); + + if (this.UpdatedAt != null) + hash = hash * 57 + this.UpdatedAt.GetHashCode(); + + return hash; + } + } - /// - /// Get the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() { - return JsonConvert.SerializeObject(this, Formatting.Indented); } - -} } diff --git a/src/main/csharp/io/swagger/Model/UnitConversion.cs b/src/main/csharp/io/swagger/Model/UnitConversion.cs index 650b907..741e478 100644 --- a/src/main/csharp/io/swagger/Model/UnitConversion.cs +++ b/src/main/csharp/io/swagger/Model/UnitConversion.cs @@ -1,98 +1,187 @@ using System; +using System.Linq; +using System.IO; using System.Text; using System.Collections; using System.Collections.Generic; using System.Runtime.Serialization; using Newtonsoft.Json; -namespace IO.Swagger.Model { +namespace IO.Swagger.Model +{ - /// - /// - /// - [DataContract] - public class UnitConversion { - /// - /// unit_id + /// /// - /// unit_id - [DataMember(Name="unit_id", EmitDefaultValue=false)] - public int? UnitId { get; set; } + [DataContract] + public class UnitConversion : IEquatable + { + + /// + /// unit_id + /// + /// unit_id + [DataMember(Name="unit_id", EmitDefaultValue=false)] + public int? UnitId { get; set; } + + + /// + /// step in the conversion process + /// + /// step in the conversion process + [DataMember(Name="step_number", EmitDefaultValue=false)] + public bool? StepNumber { get; set; } + + + /// + /// 0 is add and 1 is multiply + /// + /// 0 is add and 1 is multiply + [DataMember(Name="operation", EmitDefaultValue=false)] + public bool? Operation { get; set; } + + + /// + /// number used in the operation + /// + /// number used in the operation + [DataMember(Name="value", EmitDefaultValue=false)] + public float? Value { get; set; } + + + /// + /// When the record was first created. Use ISO 8601 datetime format + /// + /// When the record was first created. Use ISO 8601 datetime format + [DataMember(Name="created_at", EmitDefaultValue=false)] + public DateTime? CreatedAt { get; set; } + + + /// + /// When the record in the database was last updated. Use ISO 8601 datetime format + /// + /// When the record in the database was last updated. Use ISO 8601 datetime format + [DataMember(Name="updated_at", EmitDefaultValue=false)] + public DateTime? UpdatedAt { get; set; } + + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class UnitConversion {\n"); + sb.Append(" UnitId: ").Append(UnitId).Append("\n"); + sb.Append(" StepNumber: ").Append(StepNumber).Append("\n"); + sb.Append(" Operation: ").Append(Operation).Append("\n"); + sb.Append(" Value: ").Append(Value).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); + + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } - - /// - /// step in the conversion process - /// - /// step in the conversion process - [DataMember(Name="step_number", EmitDefaultValue=false)] - public bool? StepNumber { get; set; } - - - /// - /// 0 is add and 1 is multiply - /// - /// 0 is add and 1 is multiply - [DataMember(Name="operation", EmitDefaultValue=false)] - public bool? Operation { get; set; } - - - /// - /// number used in the operation - /// - /// number used in the operation - [DataMember(Name="value", EmitDefaultValue=false)] - public float? Value { get; set; } - - - /// - /// created_at - /// - /// created_at - [DataMember(Name="created_at", EmitDefaultValue=false)] - public DateTime? CreatedAt { get; set; } + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as UnitConversion); + } - - /// - /// updated_at - /// - /// updated_at - [DataMember(Name="updated_at", EmitDefaultValue=false)] - public DateTime? UpdatedAt { get; set; } + /// + /// Returns true if UnitConversion instances are equal + /// + /// Instance of UnitConversion to be compared + /// Boolean + public bool Equals(UnitConversion other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; - + return + ( + this.UnitId == other.UnitId || + this.UnitId != null && + this.UnitId.Equals(other.UnitId) + ) && + ( + this.StepNumber == other.StepNumber || + this.StepNumber != null && + this.StepNumber.Equals(other.StepNumber) + ) && + ( + this.Operation == other.Operation || + this.Operation != null && + this.Operation.Equals(other.Operation) + ) && + ( + this.Value == other.Value || + this.Value != null && + this.Value.Equals(other.Value) + ) && + ( + this.CreatedAt == other.CreatedAt || + this.CreatedAt != null && + this.CreatedAt.Equals(other.CreatedAt) + ) && + ( + this.UpdatedAt == other.UpdatedAt || + this.UpdatedAt != null && + this.UpdatedAt.Equals(other.UpdatedAt) + ); + } - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class UnitConversion {\n"); - - sb.Append(" UnitId: ").Append(UnitId).Append("\n"); - - sb.Append(" StepNumber: ").Append(StepNumber).Append("\n"); - - sb.Append(" Operation: ").Append(Operation).Append("\n"); - - sb.Append(" Value: ").Append(Value).Append("\n"); - - sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); - - sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); - - sb.Append("}\n"); - return sb.ToString(); - } + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + + if (this.UnitId != null) + hash = hash * 57 + this.UnitId.GetHashCode(); + + if (this.StepNumber != null) + hash = hash * 57 + this.StepNumber.GetHashCode(); + + if (this.Operation != null) + hash = hash * 57 + this.Operation.GetHashCode(); + + if (this.Value != null) + hash = hash * 57 + this.Value.GetHashCode(); + + if (this.CreatedAt != null) + hash = hash * 57 + this.CreatedAt.GetHashCode(); + + if (this.UpdatedAt != null) + hash = hash * 57 + this.UpdatedAt.GetHashCode(); + + return hash; + } + } - /// - /// Get the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() { - return JsonConvert.SerializeObject(this, Formatting.Indented); } - -} } diff --git a/src/main/csharp/io/swagger/Model/Update.cs b/src/main/csharp/io/swagger/Model/Update.cs index d85a47c..aafff46 100644 --- a/src/main/csharp/io/swagger/Model/Update.cs +++ b/src/main/csharp/io/swagger/Model/Update.cs @@ -1,118 +1,221 @@ using System; +using System.Linq; +using System.IO; using System.Text; using System.Collections; using System.Collections.Generic; using System.Runtime.Serialization; using Newtonsoft.Json; -namespace IO.Swagger.Model { +namespace IO.Swagger.Model +{ - /// - /// - /// - [DataContract] - public class Update { - /// - /// id + /// /// - /// id - [DataMember(Name="id", EmitDefaultValue=false)] - public int? Id { get; set; } + [DataContract] + public class Update : IEquatable + { + + /// + /// id + /// + /// id + [DataMember(Name="id", EmitDefaultValue=false)] + public int? Id { get; set; } + + + /// + /// user_id + /// + /// user_id + [DataMember(Name="user_id", EmitDefaultValue=false)] + public int? UserId { get; set; } + + + /// + /// connector_id + /// + /// connector_id + [DataMember(Name="connector_id", EmitDefaultValue=false)] + public int? ConnectorId { get; set; } + + + /// + /// number_of_measurements + /// + /// number_of_measurements + [DataMember(Name="number_of_measurements", EmitDefaultValue=false)] + public int? NumberOfMeasurements { get; set; } + + + /// + /// success + /// + /// success + [DataMember(Name="success", EmitDefaultValue=false)] + public bool? Success { get; set; } + + + /// + /// message + /// + /// message + [DataMember(Name="message", EmitDefaultValue=false)] + public string Message { get; set; } + + + /// + /// When the record was first created. Use ISO 8601 datetime format + /// + /// When the record was first created. Use ISO 8601 datetime format + [DataMember(Name="created_at", EmitDefaultValue=false)] + public DateTime? CreatedAt { get; set; } + + + /// + /// When the record in the database was last updated. Use ISO 8601 datetime format + /// + /// When the record in the database was last updated. Use ISO 8601 datetime format + [DataMember(Name="updated_at", EmitDefaultValue=false)] + public DateTime? UpdatedAt { get; set; } + + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Update {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" UserId: ").Append(UserId).Append("\n"); + sb.Append(" ConnectorId: ").Append(ConnectorId).Append("\n"); + sb.Append(" NumberOfMeasurements: ").Append(NumberOfMeasurements).Append("\n"); + sb.Append(" Success: ").Append(Success).Append("\n"); + sb.Append(" Message: ").Append(Message).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); + + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } - - /// - /// user_id - /// - /// user_id - [DataMember(Name="user_id", EmitDefaultValue=false)] - public int? UserId { get; set; } - - - /// - /// connector_id - /// - /// connector_id - [DataMember(Name="connector_id", EmitDefaultValue=false)] - public int? ConnectorId { get; set; } - - - /// - /// number_of_measurements - /// - /// number_of_measurements - [DataMember(Name="number_of_measurements", EmitDefaultValue=false)] - public int? NumberOfMeasurements { get; set; } - - - /// - /// success - /// - /// success - [DataMember(Name="success", EmitDefaultValue=false)] - public bool? Success { get; set; } - - - /// - /// message - /// - /// message - [DataMember(Name="message", EmitDefaultValue=false)] - public string Message { get; set; } + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as Update); + } - - /// - /// created_at - /// - /// created_at - [DataMember(Name="created_at", EmitDefaultValue=false)] - public DateTime? CreatedAt { get; set; } + /// + /// Returns true if Update instances are equal + /// + /// Instance of Update to be compared + /// Boolean + public bool Equals(Update other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; - - /// - /// updated_at - /// - /// updated_at - [DataMember(Name="updated_at", EmitDefaultValue=false)] - public DateTime? UpdatedAt { get; set; } + return + ( + this.Id == other.Id || + this.Id != null && + this.Id.Equals(other.Id) + ) && + ( + this.UserId == other.UserId || + this.UserId != null && + this.UserId.Equals(other.UserId) + ) && + ( + this.ConnectorId == other.ConnectorId || + this.ConnectorId != null && + this.ConnectorId.Equals(other.ConnectorId) + ) && + ( + this.NumberOfMeasurements == other.NumberOfMeasurements || + this.NumberOfMeasurements != null && + this.NumberOfMeasurements.Equals(other.NumberOfMeasurements) + ) && + ( + this.Success == other.Success || + this.Success != null && + this.Success.Equals(other.Success) + ) && + ( + this.Message == other.Message || + this.Message != null && + this.Message.Equals(other.Message) + ) && + ( + this.CreatedAt == other.CreatedAt || + this.CreatedAt != null && + this.CreatedAt.Equals(other.CreatedAt) + ) && + ( + this.UpdatedAt == other.UpdatedAt || + this.UpdatedAt != null && + this.UpdatedAt.Equals(other.UpdatedAt) + ); + } - + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + + if (this.Id != null) + hash = hash * 57 + this.Id.GetHashCode(); + + if (this.UserId != null) + hash = hash * 57 + this.UserId.GetHashCode(); + + if (this.ConnectorId != null) + hash = hash * 57 + this.ConnectorId.GetHashCode(); + + if (this.NumberOfMeasurements != null) + hash = hash * 57 + this.NumberOfMeasurements.GetHashCode(); + + if (this.Success != null) + hash = hash * 57 + this.Success.GetHashCode(); + + if (this.Message != null) + hash = hash * 57 + this.Message.GetHashCode(); + + if (this.CreatedAt != null) + hash = hash * 57 + this.CreatedAt.GetHashCode(); + + if (this.UpdatedAt != null) + hash = hash * 57 + this.UpdatedAt.GetHashCode(); + + return hash; + } + } - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class Update {\n"); - - sb.Append(" Id: ").Append(Id).Append("\n"); - - sb.Append(" UserId: ").Append(UserId).Append("\n"); - - sb.Append(" ConnectorId: ").Append(ConnectorId).Append("\n"); - - sb.Append(" NumberOfMeasurements: ").Append(NumberOfMeasurements).Append("\n"); - - sb.Append(" Success: ").Append(Success).Append("\n"); - - sb.Append(" Message: ").Append(Message).Append("\n"); - - sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); - - sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); - - sb.Append("}\n"); - return sb.ToString(); } - - /// - /// Get the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - -} } diff --git a/src/main/csharp/io/swagger/Model/UserVariable.cs b/src/main/csharp/io/swagger/Model/UserVariable.cs index b80e9d7..6e38764 100644 --- a/src/main/csharp/io/swagger/Model/UserVariable.cs +++ b/src/main/csharp/io/swagger/Model/UserVariable.cs @@ -1,558 +1,986 @@ using System; +using System.Linq; +using System.IO; using System.Text; using System.Collections; using System.Collections.Generic; using System.Runtime.Serialization; using Newtonsoft.Json; -namespace IO.Swagger.Model { +namespace IO.Swagger.Model +{ + + /// + /// + /// + [DataContract] + public class UserVariable : IEquatable + { + + /// + /// ID of the parent variable if this variable has any parent + /// + /// ID of the parent variable if this variable has any parent + [DataMember(Name="parent_id", EmitDefaultValue=false)] + public int? ParentId { get; set; } + + + /// + /// User ID + /// + /// User ID + [DataMember(Name="user_id", EmitDefaultValue=false)] + public int? UserId { get; set; } + + + /// + /// client_id + /// + /// client_id + [DataMember(Name="client_id", EmitDefaultValue=false)] + public string ClientId { get; set; } + + + /// + /// ID of variable + /// + /// ID of variable + [DataMember(Name="variable_id", EmitDefaultValue=false)] + public int? VariableId { get; set; } + + + /// + /// ID of unit to use for this variable + /// + /// ID of unit to use for this variable + [DataMember(Name="default_unit_id", EmitDefaultValue=false)] + public int? DefaultUnitId { get; set; } + + + /// + /// Minimum reasonable value for this variable (uses default unit) + /// + /// Minimum reasonable value for this variable (uses default unit) + [DataMember(Name="minimum_allowed_value", EmitDefaultValue=false)] + public float? MinimumAllowedValue { get; set; } + + + /// + /// Maximum reasonable value for this variable (uses default unit) + /// + /// Maximum reasonable value for this variable (uses default unit) + [DataMember(Name="maximum_allowed_value", EmitDefaultValue=false)] + public float? MaximumAllowedValue { get; set; } + + + /// + /// Value for replacing null measurements + /// + /// Value for replacing null measurements + [DataMember(Name="filling_value", EmitDefaultValue=false)] + public float? FillingValue { get; set; } + + + /// + /// The Variable this Variable should be joined with. If the variable is joined with some other variable then it is not shown to user in the list of variables + /// + /// The Variable this Variable should be joined with. If the variable is joined with some other variable then it is not shown to user in the list of variables + [DataMember(Name="join_with", EmitDefaultValue=false)] + public int? JoinWith { get; set; } + + + /// + /// How long it takes for a measurement in this variable to take effect + /// + /// How long it takes for a measurement in this variable to take effect + [DataMember(Name="onset_delay", EmitDefaultValue=false)] + public int? OnsetDelay { get; set; } + + + /// + /// Estimated duration of time following the onset delay in which a stimulus produces a perceivable effect + /// + /// Estimated duration of time following the onset delay in which a stimulus produces a perceivable effect + [DataMember(Name="duration_of_action", EmitDefaultValue=false)] + public int? DurationOfAction { get; set; } + + + /// + /// ID of variable category + /// + /// ID of variable category + [DataMember(Name="variable_category_id", EmitDefaultValue=false)] + public int? VariableCategoryId { get; set; } + + + /// + /// updated + /// + /// updated + [DataMember(Name="updated", EmitDefaultValue=false)] + public int? Updated { get; set; } + + + /// + /// Is variable public + /// + /// Is variable public + [DataMember(Name="public", EmitDefaultValue=false)] + public int? Public { get; set; } + + + /// + /// A value of 1 indicates that this variable is generally a cause in a causal relationship. An example of a causeOnly variable would be a variable such as Cloud Cover which would generally not be influenced by the behaviour of the user + /// + /// A value of 1 indicates that this variable is generally a cause in a causal relationship. An example of a causeOnly variable would be a variable such as Cloud Cover which would generally not be influenced by the behaviour of the user + [DataMember(Name="cause_only", EmitDefaultValue=false)] + public bool? CauseOnly { get; set; } + + + /// + /// 0 -> No filling, 1 -> Use filling-value + /// + /// 0 -> No filling, 1 -> Use filling-value + [DataMember(Name="filling_type", EmitDefaultValue=false)] + public string FillingType { get; set; } + + + /// + /// Number of measurements + /// + /// Number of measurements + [DataMember(Name="number_of_measurements", EmitDefaultValue=false)] + public int? NumberOfMeasurements { get; set; } + + + /// + /// Number of processed measurements + /// + /// Number of processed measurements + [DataMember(Name="number_of_processed_measurements", EmitDefaultValue=false)] + public int? NumberOfProcessedMeasurements { get; set; } + + + /// + /// Number of measurements at last analysis + /// + /// Number of measurements at last analysis + [DataMember(Name="measurements_at_last_analysis", EmitDefaultValue=false)] + public int? MeasurementsAtLastAnalysis { get; set; } + + + /// + /// ID of last Unit + /// + /// ID of last Unit + [DataMember(Name="last_unit_id", EmitDefaultValue=false)] + public int? LastUnitId { get; set; } + + + /// + /// ID of last original Unit + /// + /// ID of last original Unit + [DataMember(Name="last_original_unit_id", EmitDefaultValue=false)] + public int? LastOriginalUnitId { get; set; } + + + /// + /// Last Value + /// + /// Last Value + [DataMember(Name="last_value", EmitDefaultValue=false)] + public float? LastValue { get; set; } + + + /// + /// Last original value which is stored + /// + /// Last original value which is stored + [DataMember(Name="last_original_value", EmitDefaultValue=false)] + public int? LastOriginalValue { get; set; } + + + /// + /// ID of last source + /// + /// ID of last source + [DataMember(Name="last_source_id", EmitDefaultValue=false)] + public int? LastSourceId { get; set; } + + + /// + /// Number of correlations for this variable + /// + /// Number of correlations for this variable + [DataMember(Name="number_of_correlations", EmitDefaultValue=false)] + public int? NumberOfCorrelations { get; set; } + + + /// + /// status + /// + /// status + [DataMember(Name="status", EmitDefaultValue=false)] + public string Status { get; set; } + + + /// + /// error_message + /// + /// error_message + [DataMember(Name="error_message", EmitDefaultValue=false)] + public string ErrorMessage { get; set; } + + + /// + /// When this variable or its settings were last updated + /// + /// When this variable or its settings were last updated + [DataMember(Name="last_successful_update_time", EmitDefaultValue=false)] + public DateTime? LastSuccessfulUpdateTime { get; set; } + + + /// + /// Standard deviation + /// + /// Standard deviation + [DataMember(Name="standard_deviation", EmitDefaultValue=false)] + public float? StandardDeviation { get; set; } + + + /// + /// Variance + /// + /// Variance + [DataMember(Name="variance", EmitDefaultValue=false)] + public float? Variance { get; set; } + + + /// + /// Minimum recorded value of this variable + /// + /// Minimum recorded value of this variable + [DataMember(Name="minimum_recorded_value", EmitDefaultValue=false)] + public float? MinimumRecordedValue { get; set; } + + + /// + /// Maximum recorded daily value of this variable + /// + /// Maximum recorded daily value of this variable + [DataMember(Name="maximum_recorded_daily_value", EmitDefaultValue=false)] + public float? MaximumRecordedDailyValue { get; set; } + + + /// + /// Mean + /// + /// Mean + [DataMember(Name="mean", EmitDefaultValue=false)] + public float? Mean { get; set; } + + + /// + /// Median + /// + /// Median + [DataMember(Name="median", EmitDefaultValue=false)] + public float? Median { get; set; } + + + /// + /// Most common Unit ID + /// + /// Most common Unit ID + [DataMember(Name="most_common_unit_id", EmitDefaultValue=false)] + public int? MostCommonUnitId { get; set; } + + + /// + /// Most common value + /// + /// Most common value + [DataMember(Name="most_common_value", EmitDefaultValue=false)] + public float? MostCommonValue { get; set; } + + + /// + /// Number of unique daily values + /// + /// Number of unique daily values + [DataMember(Name="number_of_unique_daily_values", EmitDefaultValue=false)] + public float? NumberOfUniqueDailyValues { get; set; } + + + /// + /// Number of changes + /// + /// Number of changes + [DataMember(Name="number_of_changes", EmitDefaultValue=false)] + public int? NumberOfChanges { get; set; } + + + /// + /// Skewness + /// + /// Skewness + [DataMember(Name="skewness", EmitDefaultValue=false)] + public float? Skewness { get; set; } + + + /// + /// Kurtosis + /// + /// Kurtosis + [DataMember(Name="kurtosis", EmitDefaultValue=false)] + public float? Kurtosis { get; set; } + + + /// + /// Latitude + /// + /// Latitude + [DataMember(Name="latitude", EmitDefaultValue=false)] + public float? Latitude { get; set; } + + + /// + /// Longitude + /// + /// Longitude + [DataMember(Name="longitude", EmitDefaultValue=false)] + public float? Longitude { get; set; } + + + /// + /// Location + /// + /// Location + [DataMember(Name="location", EmitDefaultValue=false)] + public string Location { get; set; } + + + /// + /// When the record was first created. Use ISO 8601 datetime format + /// + /// When the record was first created. Use ISO 8601 datetime format + [DataMember(Name="created_at", EmitDefaultValue=false)] + public DateTime? CreatedAt { get; set; } + + + /// + /// When the record in the database was last updated. Use ISO 8601 datetime format + /// + /// When the record in the database was last updated. Use ISO 8601 datetime format + [DataMember(Name="updated_at", EmitDefaultValue=false)] + public DateTime? UpdatedAt { get; set; } + + + /// + /// Outcome variables (those with `outcome` == 1) are variables for which a human would generally want to identify the influencing factors. These include symptoms of illness, physique, mood, cognitive performance, etc. Generally correlation calculations are only performed on outcome variables + /// + /// Outcome variables (those with `outcome` == 1) are variables for which a human would generally want to identify the influencing factors. These include symptoms of illness, physique, mood, cognitive performance, etc. Generally correlation calculations are only performed on outcome variables + [DataMember(Name="outcome", EmitDefaultValue=false)] + public bool? Outcome { get; set; } + + + /// + /// Comma-separated list of source names to limit variables to those sources + /// + /// Comma-separated list of source names to limit variables to those sources + [DataMember(Name="sources", EmitDefaultValue=false)] + public string Sources { get; set; } + + + /// + /// Earliest source time + /// + /// Earliest source time + [DataMember(Name="earliest_source_time", EmitDefaultValue=false)] + public int? EarliestSourceTime { get; set; } + + + /// + /// Latest source time + /// + /// Latest source time + [DataMember(Name="latest_source_time", EmitDefaultValue=false)] + public int? LatestSourceTime { get; set; } + + + /// + /// Earliest measurement time + /// + /// Earliest measurement time + [DataMember(Name="earliest_measurement_time", EmitDefaultValue=false)] + public int? EarliestMeasurementTime { get; set; } + + + /// + /// Latest measurement time + /// + /// Latest measurement time + [DataMember(Name="latest_measurement_time", EmitDefaultValue=false)] + public int? LatestMeasurementTime { get; set; } + + + /// + /// Earliest filling time + /// + /// Earliest filling time + [DataMember(Name="earliest_filling_time", EmitDefaultValue=false)] + public int? EarliestFillingTime { get; set; } + + + /// + /// Latest filling time + /// + /// Latest filling time + [DataMember(Name="latest_filling_time", EmitDefaultValue=false)] + public int? LatestFillingTime { get; set; } + + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class UserVariable {\n"); + sb.Append(" ParentId: ").Append(ParentId).Append("\n"); + sb.Append(" UserId: ").Append(UserId).Append("\n"); + sb.Append(" ClientId: ").Append(ClientId).Append("\n"); + sb.Append(" VariableId: ").Append(VariableId).Append("\n"); + sb.Append(" DefaultUnitId: ").Append(DefaultUnitId).Append("\n"); + sb.Append(" MinimumAllowedValue: ").Append(MinimumAllowedValue).Append("\n"); + sb.Append(" MaximumAllowedValue: ").Append(MaximumAllowedValue).Append("\n"); + sb.Append(" FillingValue: ").Append(FillingValue).Append("\n"); + sb.Append(" JoinWith: ").Append(JoinWith).Append("\n"); + sb.Append(" OnsetDelay: ").Append(OnsetDelay).Append("\n"); + sb.Append(" DurationOfAction: ").Append(DurationOfAction).Append("\n"); + sb.Append(" VariableCategoryId: ").Append(VariableCategoryId).Append("\n"); + sb.Append(" Updated: ").Append(Updated).Append("\n"); + sb.Append(" Public: ").Append(Public).Append("\n"); + sb.Append(" CauseOnly: ").Append(CauseOnly).Append("\n"); + sb.Append(" FillingType: ").Append(FillingType).Append("\n"); + sb.Append(" NumberOfMeasurements: ").Append(NumberOfMeasurements).Append("\n"); + sb.Append(" NumberOfProcessedMeasurements: ").Append(NumberOfProcessedMeasurements).Append("\n"); + sb.Append(" MeasurementsAtLastAnalysis: ").Append(MeasurementsAtLastAnalysis).Append("\n"); + sb.Append(" LastUnitId: ").Append(LastUnitId).Append("\n"); + sb.Append(" LastOriginalUnitId: ").Append(LastOriginalUnitId).Append("\n"); + sb.Append(" LastValue: ").Append(LastValue).Append("\n"); + sb.Append(" LastOriginalValue: ").Append(LastOriginalValue).Append("\n"); + sb.Append(" LastSourceId: ").Append(LastSourceId).Append("\n"); + sb.Append(" NumberOfCorrelations: ").Append(NumberOfCorrelations).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" ErrorMessage: ").Append(ErrorMessage).Append("\n"); + sb.Append(" LastSuccessfulUpdateTime: ").Append(LastSuccessfulUpdateTime).Append("\n"); + sb.Append(" StandardDeviation: ").Append(StandardDeviation).Append("\n"); + sb.Append(" Variance: ").Append(Variance).Append("\n"); + sb.Append(" MinimumRecordedValue: ").Append(MinimumRecordedValue).Append("\n"); + sb.Append(" MaximumRecordedDailyValue: ").Append(MaximumRecordedDailyValue).Append("\n"); + sb.Append(" Mean: ").Append(Mean).Append("\n"); + sb.Append(" Median: ").Append(Median).Append("\n"); + sb.Append(" MostCommonUnitId: ").Append(MostCommonUnitId).Append("\n"); + sb.Append(" MostCommonValue: ").Append(MostCommonValue).Append("\n"); + sb.Append(" NumberOfUniqueDailyValues: ").Append(NumberOfUniqueDailyValues).Append("\n"); + sb.Append(" NumberOfChanges: ").Append(NumberOfChanges).Append("\n"); + sb.Append(" Skewness: ").Append(Skewness).Append("\n"); + sb.Append(" Kurtosis: ").Append(Kurtosis).Append("\n"); + sb.Append(" Latitude: ").Append(Latitude).Append("\n"); + sb.Append(" Longitude: ").Append(Longitude).Append("\n"); + sb.Append(" Location: ").Append(Location).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); + sb.Append(" Outcome: ").Append(Outcome).Append("\n"); + sb.Append(" Sources: ").Append(Sources).Append("\n"); + sb.Append(" EarliestSourceTime: ").Append(EarliestSourceTime).Append("\n"); + sb.Append(" LatestSourceTime: ").Append(LatestSourceTime).Append("\n"); + sb.Append(" EarliestMeasurementTime: ").Append(EarliestMeasurementTime).Append("\n"); + sb.Append(" LatestMeasurementTime: ").Append(LatestMeasurementTime).Append("\n"); + sb.Append(" EarliestFillingTime: ").Append(EarliestFillingTime).Append("\n"); + sb.Append(" LatestFillingTime: ").Append(LatestFillingTime).Append("\n"); + + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as UserVariable); + } + + /// + /// Returns true if UserVariable instances are equal + /// + /// Instance of UserVariable to be compared + /// Boolean + public bool Equals(UserVariable other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; + + return + ( + this.ParentId == other.ParentId || + this.ParentId != null && + this.ParentId.Equals(other.ParentId) + ) && + ( + this.UserId == other.UserId || + this.UserId != null && + this.UserId.Equals(other.UserId) + ) && + ( + this.ClientId == other.ClientId || + this.ClientId != null && + this.ClientId.Equals(other.ClientId) + ) && + ( + this.VariableId == other.VariableId || + this.VariableId != null && + this.VariableId.Equals(other.VariableId) + ) && + ( + this.DefaultUnitId == other.DefaultUnitId || + this.DefaultUnitId != null && + this.DefaultUnitId.Equals(other.DefaultUnitId) + ) && + ( + this.MinimumAllowedValue == other.MinimumAllowedValue || + this.MinimumAllowedValue != null && + this.MinimumAllowedValue.Equals(other.MinimumAllowedValue) + ) && + ( + this.MaximumAllowedValue == other.MaximumAllowedValue || + this.MaximumAllowedValue != null && + this.MaximumAllowedValue.Equals(other.MaximumAllowedValue) + ) && + ( + this.FillingValue == other.FillingValue || + this.FillingValue != null && + this.FillingValue.Equals(other.FillingValue) + ) && + ( + this.JoinWith == other.JoinWith || + this.JoinWith != null && + this.JoinWith.Equals(other.JoinWith) + ) && + ( + this.OnsetDelay == other.OnsetDelay || + this.OnsetDelay != null && + this.OnsetDelay.Equals(other.OnsetDelay) + ) && + ( + this.DurationOfAction == other.DurationOfAction || + this.DurationOfAction != null && + this.DurationOfAction.Equals(other.DurationOfAction) + ) && + ( + this.VariableCategoryId == other.VariableCategoryId || + this.VariableCategoryId != null && + this.VariableCategoryId.Equals(other.VariableCategoryId) + ) && + ( + this.Updated == other.Updated || + this.Updated != null && + this.Updated.Equals(other.Updated) + ) && + ( + this.Public == other.Public || + this.Public != null && + this.Public.Equals(other.Public) + ) && + ( + this.CauseOnly == other.CauseOnly || + this.CauseOnly != null && + this.CauseOnly.Equals(other.CauseOnly) + ) && + ( + this.FillingType == other.FillingType || + this.FillingType != null && + this.FillingType.Equals(other.FillingType) + ) && + ( + this.NumberOfMeasurements == other.NumberOfMeasurements || + this.NumberOfMeasurements != null && + this.NumberOfMeasurements.Equals(other.NumberOfMeasurements) + ) && + ( + this.NumberOfProcessedMeasurements == other.NumberOfProcessedMeasurements || + this.NumberOfProcessedMeasurements != null && + this.NumberOfProcessedMeasurements.Equals(other.NumberOfProcessedMeasurements) + ) && + ( + this.MeasurementsAtLastAnalysis == other.MeasurementsAtLastAnalysis || + this.MeasurementsAtLastAnalysis != null && + this.MeasurementsAtLastAnalysis.Equals(other.MeasurementsAtLastAnalysis) + ) && + ( + this.LastUnitId == other.LastUnitId || + this.LastUnitId != null && + this.LastUnitId.Equals(other.LastUnitId) + ) && + ( + this.LastOriginalUnitId == other.LastOriginalUnitId || + this.LastOriginalUnitId != null && + this.LastOriginalUnitId.Equals(other.LastOriginalUnitId) + ) && + ( + this.LastValue == other.LastValue || + this.LastValue != null && + this.LastValue.Equals(other.LastValue) + ) && + ( + this.LastOriginalValue == other.LastOriginalValue || + this.LastOriginalValue != null && + this.LastOriginalValue.Equals(other.LastOriginalValue) + ) && + ( + this.LastSourceId == other.LastSourceId || + this.LastSourceId != null && + this.LastSourceId.Equals(other.LastSourceId) + ) && + ( + this.NumberOfCorrelations == other.NumberOfCorrelations || + this.NumberOfCorrelations != null && + this.NumberOfCorrelations.Equals(other.NumberOfCorrelations) + ) && + ( + this.Status == other.Status || + this.Status != null && + this.Status.Equals(other.Status) + ) && + ( + this.ErrorMessage == other.ErrorMessage || + this.ErrorMessage != null && + this.ErrorMessage.Equals(other.ErrorMessage) + ) && + ( + this.LastSuccessfulUpdateTime == other.LastSuccessfulUpdateTime || + this.LastSuccessfulUpdateTime != null && + this.LastSuccessfulUpdateTime.Equals(other.LastSuccessfulUpdateTime) + ) && + ( + this.StandardDeviation == other.StandardDeviation || + this.StandardDeviation != null && + this.StandardDeviation.Equals(other.StandardDeviation) + ) && + ( + this.Variance == other.Variance || + this.Variance != null && + this.Variance.Equals(other.Variance) + ) && + ( + this.MinimumRecordedValue == other.MinimumRecordedValue || + this.MinimumRecordedValue != null && + this.MinimumRecordedValue.Equals(other.MinimumRecordedValue) + ) && + ( + this.MaximumRecordedDailyValue == other.MaximumRecordedDailyValue || + this.MaximumRecordedDailyValue != null && + this.MaximumRecordedDailyValue.Equals(other.MaximumRecordedDailyValue) + ) && + ( + this.Mean == other.Mean || + this.Mean != null && + this.Mean.Equals(other.Mean) + ) && + ( + this.Median == other.Median || + this.Median != null && + this.Median.Equals(other.Median) + ) && + ( + this.MostCommonUnitId == other.MostCommonUnitId || + this.MostCommonUnitId != null && + this.MostCommonUnitId.Equals(other.MostCommonUnitId) + ) && + ( + this.MostCommonValue == other.MostCommonValue || + this.MostCommonValue != null && + this.MostCommonValue.Equals(other.MostCommonValue) + ) && + ( + this.NumberOfUniqueDailyValues == other.NumberOfUniqueDailyValues || + this.NumberOfUniqueDailyValues != null && + this.NumberOfUniqueDailyValues.Equals(other.NumberOfUniqueDailyValues) + ) && + ( + this.NumberOfChanges == other.NumberOfChanges || + this.NumberOfChanges != null && + this.NumberOfChanges.Equals(other.NumberOfChanges) + ) && + ( + this.Skewness == other.Skewness || + this.Skewness != null && + this.Skewness.Equals(other.Skewness) + ) && + ( + this.Kurtosis == other.Kurtosis || + this.Kurtosis != null && + this.Kurtosis.Equals(other.Kurtosis) + ) && + ( + this.Latitude == other.Latitude || + this.Latitude != null && + this.Latitude.Equals(other.Latitude) + ) && + ( + this.Longitude == other.Longitude || + this.Longitude != null && + this.Longitude.Equals(other.Longitude) + ) && + ( + this.Location == other.Location || + this.Location != null && + this.Location.Equals(other.Location) + ) && + ( + this.CreatedAt == other.CreatedAt || + this.CreatedAt != null && + this.CreatedAt.Equals(other.CreatedAt) + ) && + ( + this.UpdatedAt == other.UpdatedAt || + this.UpdatedAt != null && + this.UpdatedAt.Equals(other.UpdatedAt) + ) && + ( + this.Outcome == other.Outcome || + this.Outcome != null && + this.Outcome.Equals(other.Outcome) + ) && + ( + this.Sources == other.Sources || + this.Sources != null && + this.Sources.Equals(other.Sources) + ) && + ( + this.EarliestSourceTime == other.EarliestSourceTime || + this.EarliestSourceTime != null && + this.EarliestSourceTime.Equals(other.EarliestSourceTime) + ) && + ( + this.LatestSourceTime == other.LatestSourceTime || + this.LatestSourceTime != null && + this.LatestSourceTime.Equals(other.LatestSourceTime) + ) && + ( + this.EarliestMeasurementTime == other.EarliestMeasurementTime || + this.EarliestMeasurementTime != null && + this.EarliestMeasurementTime.Equals(other.EarliestMeasurementTime) + ) && + ( + this.LatestMeasurementTime == other.LatestMeasurementTime || + this.LatestMeasurementTime != null && + this.LatestMeasurementTime.Equals(other.LatestMeasurementTime) + ) && + ( + this.EarliestFillingTime == other.EarliestFillingTime || + this.EarliestFillingTime != null && + this.EarliestFillingTime.Equals(other.EarliestFillingTime) + ) && + ( + this.LatestFillingTime == other.LatestFillingTime || + this.LatestFillingTime != null && + this.LatestFillingTime.Equals(other.LatestFillingTime) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + + if (this.ParentId != null) + hash = hash * 57 + this.ParentId.GetHashCode(); + + if (this.UserId != null) + hash = hash * 57 + this.UserId.GetHashCode(); + + if (this.ClientId != null) + hash = hash * 57 + this.ClientId.GetHashCode(); + + if (this.VariableId != null) + hash = hash * 57 + this.VariableId.GetHashCode(); + + if (this.DefaultUnitId != null) + hash = hash * 57 + this.DefaultUnitId.GetHashCode(); + + if (this.MinimumAllowedValue != null) + hash = hash * 57 + this.MinimumAllowedValue.GetHashCode(); + + if (this.MaximumAllowedValue != null) + hash = hash * 57 + this.MaximumAllowedValue.GetHashCode(); + + if (this.FillingValue != null) + hash = hash * 57 + this.FillingValue.GetHashCode(); + + if (this.JoinWith != null) + hash = hash * 57 + this.JoinWith.GetHashCode(); + + if (this.OnsetDelay != null) + hash = hash * 57 + this.OnsetDelay.GetHashCode(); + + if (this.DurationOfAction != null) + hash = hash * 57 + this.DurationOfAction.GetHashCode(); + + if (this.VariableCategoryId != null) + hash = hash * 57 + this.VariableCategoryId.GetHashCode(); + + if (this.Updated != null) + hash = hash * 57 + this.Updated.GetHashCode(); + + if (this.Public != null) + hash = hash * 57 + this.Public.GetHashCode(); + + if (this.CauseOnly != null) + hash = hash * 57 + this.CauseOnly.GetHashCode(); + + if (this.FillingType != null) + hash = hash * 57 + this.FillingType.GetHashCode(); + + if (this.NumberOfMeasurements != null) + hash = hash * 57 + this.NumberOfMeasurements.GetHashCode(); + + if (this.NumberOfProcessedMeasurements != null) + hash = hash * 57 + this.NumberOfProcessedMeasurements.GetHashCode(); + + if (this.MeasurementsAtLastAnalysis != null) + hash = hash * 57 + this.MeasurementsAtLastAnalysis.GetHashCode(); + + if (this.LastUnitId != null) + hash = hash * 57 + this.LastUnitId.GetHashCode(); + + if (this.LastOriginalUnitId != null) + hash = hash * 57 + this.LastOriginalUnitId.GetHashCode(); + + if (this.LastValue != null) + hash = hash * 57 + this.LastValue.GetHashCode(); + + if (this.LastOriginalValue != null) + hash = hash * 57 + this.LastOriginalValue.GetHashCode(); + + if (this.LastSourceId != null) + hash = hash * 57 + this.LastSourceId.GetHashCode(); + + if (this.NumberOfCorrelations != null) + hash = hash * 57 + this.NumberOfCorrelations.GetHashCode(); + + if (this.Status != null) + hash = hash * 57 + this.Status.GetHashCode(); + + if (this.ErrorMessage != null) + hash = hash * 57 + this.ErrorMessage.GetHashCode(); + + if (this.LastSuccessfulUpdateTime != null) + hash = hash * 57 + this.LastSuccessfulUpdateTime.GetHashCode(); + + if (this.StandardDeviation != null) + hash = hash * 57 + this.StandardDeviation.GetHashCode(); + + if (this.Variance != null) + hash = hash * 57 + this.Variance.GetHashCode(); + + if (this.MinimumRecordedValue != null) + hash = hash * 57 + this.MinimumRecordedValue.GetHashCode(); + + if (this.MaximumRecordedDailyValue != null) + hash = hash * 57 + this.MaximumRecordedDailyValue.GetHashCode(); + + if (this.Mean != null) + hash = hash * 57 + this.Mean.GetHashCode(); + + if (this.Median != null) + hash = hash * 57 + this.Median.GetHashCode(); + + if (this.MostCommonUnitId != null) + hash = hash * 57 + this.MostCommonUnitId.GetHashCode(); + + if (this.MostCommonValue != null) + hash = hash * 57 + this.MostCommonValue.GetHashCode(); + + if (this.NumberOfUniqueDailyValues != null) + hash = hash * 57 + this.NumberOfUniqueDailyValues.GetHashCode(); + + if (this.NumberOfChanges != null) + hash = hash * 57 + this.NumberOfChanges.GetHashCode(); + + if (this.Skewness != null) + hash = hash * 57 + this.Skewness.GetHashCode(); + + if (this.Kurtosis != null) + hash = hash * 57 + this.Kurtosis.GetHashCode(); + + if (this.Latitude != null) + hash = hash * 57 + this.Latitude.GetHashCode(); + + if (this.Longitude != null) + hash = hash * 57 + this.Longitude.GetHashCode(); + + if (this.Location != null) + hash = hash * 57 + this.Location.GetHashCode(); + + if (this.CreatedAt != null) + hash = hash * 57 + this.CreatedAt.GetHashCode(); + + if (this.UpdatedAt != null) + hash = hash * 57 + this.UpdatedAt.GetHashCode(); + + if (this.Outcome != null) + hash = hash * 57 + this.Outcome.GetHashCode(); + + if (this.Sources != null) + hash = hash * 57 + this.Sources.GetHashCode(); + + if (this.EarliestSourceTime != null) + hash = hash * 57 + this.EarliestSourceTime.GetHashCode(); + + if (this.LatestSourceTime != null) + hash = hash * 57 + this.LatestSourceTime.GetHashCode(); + + if (this.EarliestMeasurementTime != null) + hash = hash * 57 + this.EarliestMeasurementTime.GetHashCode(); + + if (this.LatestMeasurementTime != null) + hash = hash * 57 + this.LatestMeasurementTime.GetHashCode(); + + if (this.EarliestFillingTime != null) + hash = hash * 57 + this.EarliestFillingTime.GetHashCode(); + + if (this.LatestFillingTime != null) + hash = hash * 57 + this.LatestFillingTime.GetHashCode(); + + return hash; + } + } - /// - /// - /// - [DataContract] - public class UserVariable { - - /// - /// ID of the parent variable if this variable has any parent - /// - /// ID of the parent variable if this variable has any parent - [DataMember(Name="parent_id", EmitDefaultValue=false)] - public int? ParentId { get; set; } - - - /// - /// client_id - /// - /// client_id - [DataMember(Name="client_id", EmitDefaultValue=false)] - public string ClientId { get; set; } - - - /// - /// ID of variable - /// - /// ID of variable - [DataMember(Name="variable_id", EmitDefaultValue=false)] - public int? VariableId { get; set; } - - - /// - /// ID of unit to use for this variable - /// - /// ID of unit to use for this variable - [DataMember(Name="default_unit_id", EmitDefaultValue=false)] - public int? DefaultUnitId { get; set; } - - - /// - /// Minimum reasonable value for this variable (uses default unit) - /// - /// Minimum reasonable value for this variable (uses default unit) - [DataMember(Name="minimum_allowed_value", EmitDefaultValue=false)] - public float? MinimumAllowedValue { get; set; } - - - /// - /// Maximum reasonable value for this variable (uses default unit) - /// - /// Maximum reasonable value for this variable (uses default unit) - [DataMember(Name="maximum_allowed_value", EmitDefaultValue=false)] - public float? MaximumAllowedValue { get; set; } - - - /// - /// Value for replacing null measurements - /// - /// Value for replacing null measurements - [DataMember(Name="filling_value", EmitDefaultValue=false)] - public float? FillingValue { get; set; } - - - /// - /// The Variable this Variable should be joined with. If the variable is joined with some other variable then it is not shown to user in the list of variables - /// - /// The Variable this Variable should be joined with. If the variable is joined with some other variable then it is not shown to user in the list of variables - [DataMember(Name="join_with", EmitDefaultValue=false)] - public int? JoinWith { get; set; } - - - /// - /// How long it takes for a measurement in this variable to take effect - /// - /// How long it takes for a measurement in this variable to take effect - [DataMember(Name="onset_delay", EmitDefaultValue=false)] - public int? OnsetDelay { get; set; } - - - /// - /// Estimated duration of time following the onset delay in which a stimulus produces a perceivable effect - /// - /// Estimated duration of time following the onset delay in which a stimulus produces a perceivable effect - [DataMember(Name="duration_of_action", EmitDefaultValue=false)] - public int? DurationOfAction { get; set; } - - - /// - /// ID of variable category - /// - /// ID of variable category - [DataMember(Name="variable_category_id", EmitDefaultValue=false)] - public int? VariableCategoryId { get; set; } - - - /// - /// updated - /// - /// updated - [DataMember(Name="updated", EmitDefaultValue=false)] - public int? Updated { get; set; } - - - /// - /// Is variable public - /// - /// Is variable public - [DataMember(Name="public", EmitDefaultValue=false)] - public int? Public { get; set; } - - - /// - /// A value of 1 indicates that this variable is generally a cause in a causal relationship. An example of a causeOnly variable would be a variable such as Cloud Cover which would generally not be influenced by the behaviour of the user - /// - /// A value of 1 indicates that this variable is generally a cause in a causal relationship. An example of a causeOnly variable would be a variable such as Cloud Cover which would generally not be influenced by the behaviour of the user - [DataMember(Name="cause_only", EmitDefaultValue=false)] - public bool? CauseOnly { get; set; } - - - /// - /// 0 -> No filling, 1 -> Use filling-value - /// - /// 0 -> No filling, 1 -> Use filling-value - [DataMember(Name="filling_type", EmitDefaultValue=false)] - public string FillingType { get; set; } - - - /// - /// Number of measurements - /// - /// Number of measurements - [DataMember(Name="number_of_measurements", EmitDefaultValue=false)] - public int? NumberOfMeasurements { get; set; } - - - /// - /// Number of processed measurements - /// - /// Number of processed measurements - [DataMember(Name="number_of_processed_measurements", EmitDefaultValue=false)] - public int? NumberOfProcessedMeasurements { get; set; } - - - /// - /// Number of measurements at last analysis - /// - /// Number of measurements at last analysis - [DataMember(Name="measurements_at_last_analysis", EmitDefaultValue=false)] - public int? MeasurementsAtLastAnalysis { get; set; } - - - /// - /// ID of last Unit - /// - /// ID of last Unit - [DataMember(Name="last_unit_id", EmitDefaultValue=false)] - public int? LastUnitId { get; set; } - - - /// - /// ID of last original Unit - /// - /// ID of last original Unit - [DataMember(Name="last_original_unit_id", EmitDefaultValue=false)] - public int? LastOriginalUnitId { get; set; } - - - /// - /// Last Value - /// - /// Last Value - [DataMember(Name="last_value", EmitDefaultValue=false)] - public float? LastValue { get; set; } - - - /// - /// Last original value which is stored - /// - /// Last original value which is stored - [DataMember(Name="last_original_value", EmitDefaultValue=false)] - public int? LastOriginalValue { get; set; } - - - /// - /// ID of last source - /// - /// ID of last source - [DataMember(Name="last_source_id", EmitDefaultValue=false)] - public int? LastSourceId { get; set; } - - - /// - /// Number of correlations for this variable - /// - /// Number of correlations for this variable - [DataMember(Name="number_of_correlations", EmitDefaultValue=false)] - public int? NumberOfCorrelations { get; set; } - - - /// - /// status - /// - /// status - [DataMember(Name="status", EmitDefaultValue=false)] - public string Status { get; set; } - - - /// - /// error_message - /// - /// error_message - [DataMember(Name="error_message", EmitDefaultValue=false)] - public string ErrorMessage { get; set; } - - - /// - /// When this variable or its settings were last updated - /// - /// When this variable or its settings were last updated - [DataMember(Name="last_successful_update_time", EmitDefaultValue=false)] - public DateTime? LastSuccessfulUpdateTime { get; set; } - - - /// - /// Standard deviation - /// - /// Standard deviation - [DataMember(Name="standard_deviation", EmitDefaultValue=false)] - public float? StandardDeviation { get; set; } - - - /// - /// Variance - /// - /// Variance - [DataMember(Name="variance", EmitDefaultValue=false)] - public float? Variance { get; set; } - - - /// - /// Minimum recorded daily value of this variable - /// - /// Minimum recorded daily value of this variable - [DataMember(Name="minimum_recorded_daily_value", EmitDefaultValue=false)] - public float? MinimumRecordedDailyValue { get; set; } - - - /// - /// Maximum recorded daily value of this variable - /// - /// Maximum recorded daily value of this variable - [DataMember(Name="maximum_recorded_daily_value", EmitDefaultValue=false)] - public float? MaximumRecordedDailyValue { get; set; } - - - /// - /// Mean - /// - /// Mean - [DataMember(Name="mean", EmitDefaultValue=false)] - public float? Mean { get; set; } - - - /// - /// Median - /// - /// Median - [DataMember(Name="median", EmitDefaultValue=false)] - public float? Median { get; set; } - - - /// - /// Most common Unit ID - /// - /// Most common Unit ID - [DataMember(Name="most_common_unit_id", EmitDefaultValue=false)] - public int? MostCommonUnitId { get; set; } - - - /// - /// Most common value - /// - /// Most common value - [DataMember(Name="most_common_value", EmitDefaultValue=false)] - public float? MostCommonValue { get; set; } - - - /// - /// Number of unique daily values - /// - /// Number of unique daily values - [DataMember(Name="number_of_unique_daily_values", EmitDefaultValue=false)] - public float? NumberOfUniqueDailyValues { get; set; } - - - /// - /// Number of changes - /// - /// Number of changes - [DataMember(Name="number_of_changes", EmitDefaultValue=false)] - public int? NumberOfChanges { get; set; } - - - /// - /// Skewness - /// - /// Skewness - [DataMember(Name="skewness", EmitDefaultValue=false)] - public float? Skewness { get; set; } - - - /// - /// Kurtosis - /// - /// Kurtosis - [DataMember(Name="kurtosis", EmitDefaultValue=false)] - public float? Kurtosis { get; set; } - - - /// - /// Latitude - /// - /// Latitude - [DataMember(Name="latitude", EmitDefaultValue=false)] - public float? Latitude { get; set; } - - - /// - /// Longitude - /// - /// Longitude - [DataMember(Name="longitude", EmitDefaultValue=false)] - public float? Longitude { get; set; } - - - /// - /// Location - /// - /// Location - [DataMember(Name="location", EmitDefaultValue=false)] - public string Location { get; set; } - - - /// - /// created_at - /// - /// created_at - [DataMember(Name="created_at", EmitDefaultValue=false)] - public DateTime? CreatedAt { get; set; } - - - /// - /// updated_at - /// - /// updated_at - [DataMember(Name="updated_at", EmitDefaultValue=false)] - public DateTime? UpdatedAt { get; set; } - - - /// - /// Outcome variables (those with `outcome` == 1) are variables for which a human would generally want to identify the influencing factors. These include symptoms of illness, physique, mood, cognitive performance, etc. Generally correlation calculations are only performed on outcome variables - /// - /// Outcome variables (those with `outcome` == 1) are variables for which a human would generally want to identify the influencing factors. These include symptoms of illness, physique, mood, cognitive performance, etc. Generally correlation calculations are only performed on outcome variables - [DataMember(Name="outcome", EmitDefaultValue=false)] - public bool? Outcome { get; set; } - - - /// - /// Comma-separated list of source names to limit variables to those sources - /// - /// Comma-separated list of source names to limit variables to those sources - [DataMember(Name="sources", EmitDefaultValue=false)] - public string Sources { get; set; } - - - /// - /// Earliest source time - /// - /// Earliest source time - [DataMember(Name="earliest_source_time", EmitDefaultValue=false)] - public int? EarliestSourceTime { get; set; } - - - /// - /// Latest source time - /// - /// Latest source time - [DataMember(Name="latest_source_time", EmitDefaultValue=false)] - public int? LatestSourceTime { get; set; } - - - /// - /// Earliest measurement time - /// - /// Earliest measurement time - [DataMember(Name="earliest_measurement_time", EmitDefaultValue=false)] - public int? EarliestMeasurementTime { get; set; } - - - /// - /// Latest measurement time - /// - /// Latest measurement time - [DataMember(Name="latest_measurement_time", EmitDefaultValue=false)] - public int? LatestMeasurementTime { get; set; } - - - /// - /// Earliest filling time - /// - /// Earliest filling time - [DataMember(Name="earliest_filling_time", EmitDefaultValue=false)] - public int? EarliestFillingTime { get; set; } - - - /// - /// Latest filling time - /// - /// Latest filling time - [DataMember(Name="latest_filling_time", EmitDefaultValue=false)] - public int? LatestFillingTime { get; set; } - - - - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class UserVariable {\n"); - - sb.Append(" ParentId: ").Append(ParentId).Append("\n"); - - sb.Append(" ClientId: ").Append(ClientId).Append("\n"); - - sb.Append(" VariableId: ").Append(VariableId).Append("\n"); - - sb.Append(" DefaultUnitId: ").Append(DefaultUnitId).Append("\n"); - - sb.Append(" MinimumAllowedValue: ").Append(MinimumAllowedValue).Append("\n"); - - sb.Append(" MaximumAllowedValue: ").Append(MaximumAllowedValue).Append("\n"); - - sb.Append(" FillingValue: ").Append(FillingValue).Append("\n"); - - sb.Append(" JoinWith: ").Append(JoinWith).Append("\n"); - - sb.Append(" OnsetDelay: ").Append(OnsetDelay).Append("\n"); - - sb.Append(" DurationOfAction: ").Append(DurationOfAction).Append("\n"); - - sb.Append(" VariableCategoryId: ").Append(VariableCategoryId).Append("\n"); - - sb.Append(" Updated: ").Append(Updated).Append("\n"); - - sb.Append(" Public: ").Append(Public).Append("\n"); - - sb.Append(" CauseOnly: ").Append(CauseOnly).Append("\n"); - - sb.Append(" FillingType: ").Append(FillingType).Append("\n"); - - sb.Append(" NumberOfMeasurements: ").Append(NumberOfMeasurements).Append("\n"); - - sb.Append(" NumberOfProcessedMeasurements: ").Append(NumberOfProcessedMeasurements).Append("\n"); - - sb.Append(" MeasurementsAtLastAnalysis: ").Append(MeasurementsAtLastAnalysis).Append("\n"); - - sb.Append(" LastUnitId: ").Append(LastUnitId).Append("\n"); - - sb.Append(" LastOriginalUnitId: ").Append(LastOriginalUnitId).Append("\n"); - - sb.Append(" LastValue: ").Append(LastValue).Append("\n"); - - sb.Append(" LastOriginalValue: ").Append(LastOriginalValue).Append("\n"); - - sb.Append(" LastSourceId: ").Append(LastSourceId).Append("\n"); - - sb.Append(" NumberOfCorrelations: ").Append(NumberOfCorrelations).Append("\n"); - - sb.Append(" Status: ").Append(Status).Append("\n"); - - sb.Append(" ErrorMessage: ").Append(ErrorMessage).Append("\n"); - - sb.Append(" LastSuccessfulUpdateTime: ").Append(LastSuccessfulUpdateTime).Append("\n"); - - sb.Append(" StandardDeviation: ").Append(StandardDeviation).Append("\n"); - - sb.Append(" Variance: ").Append(Variance).Append("\n"); - - sb.Append(" MinimumRecordedDailyValue: ").Append(MinimumRecordedDailyValue).Append("\n"); - - sb.Append(" MaximumRecordedDailyValue: ").Append(MaximumRecordedDailyValue).Append("\n"); - - sb.Append(" Mean: ").Append(Mean).Append("\n"); - - sb.Append(" Median: ").Append(Median).Append("\n"); - - sb.Append(" MostCommonUnitId: ").Append(MostCommonUnitId).Append("\n"); - - sb.Append(" MostCommonValue: ").Append(MostCommonValue).Append("\n"); - - sb.Append(" NumberOfUniqueDailyValues: ").Append(NumberOfUniqueDailyValues).Append("\n"); - - sb.Append(" NumberOfChanges: ").Append(NumberOfChanges).Append("\n"); - - sb.Append(" Skewness: ").Append(Skewness).Append("\n"); - - sb.Append(" Kurtosis: ").Append(Kurtosis).Append("\n"); - - sb.Append(" Latitude: ").Append(Latitude).Append("\n"); - - sb.Append(" Longitude: ").Append(Longitude).Append("\n"); - - sb.Append(" Location: ").Append(Location).Append("\n"); - - sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); - - sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); - - sb.Append(" Outcome: ").Append(Outcome).Append("\n"); - - sb.Append(" Sources: ").Append(Sources).Append("\n"); - - sb.Append(" EarliestSourceTime: ").Append(EarliestSourceTime).Append("\n"); - - sb.Append(" LatestSourceTime: ").Append(LatestSourceTime).Append("\n"); - - sb.Append(" EarliestMeasurementTime: ").Append(EarliestMeasurementTime).Append("\n"); - - sb.Append(" LatestMeasurementTime: ").Append(LatestMeasurementTime).Append("\n"); - - sb.Append(" EarliestFillingTime: ").Append(EarliestFillingTime).Append("\n"); - - sb.Append(" LatestFillingTime: ").Append(LatestFillingTime).Append("\n"); - - sb.Append("}\n"); - return sb.ToString(); - } - - /// - /// Get the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() { - return JsonConvert.SerializeObject(this, Formatting.Indented); } - -} } diff --git a/src/main/csharp/io/swagger/Model/UserVariableRelationship.cs b/src/main/csharp/io/swagger/Model/UserVariableRelationship.cs new file mode 100644 index 0000000..81731c3 --- /dev/null +++ b/src/main/csharp/io/swagger/Model/UserVariableRelationship.cs @@ -0,0 +1,374 @@ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Collections; +using System.Collections.Generic; +using System.Runtime.Serialization; +using Newtonsoft.Json; + +namespace IO.Swagger.Model +{ + + /// + /// + /// + [DataContract] + public class UserVariableRelationship : IEquatable + { + + /// + /// id + /// + /// id + [DataMember(Name="id", EmitDefaultValue=false)] + public int? Id { get; set; } + + + /// + /// Our confidence that a consistent predictive relationship exists based on the amount of evidence, reproducibility, and other factors + /// + /// Our confidence that a consistent predictive relationship exists based on the amount of evidence, reproducibility, and other factors + [DataMember(Name="confidence_level", EmitDefaultValue=false)] + public string ConfidenceLevel { get; set; } + + + /// + /// A quantitative representation of our confidence that a consistent predictive relationship exists based on the amount of evidence, reproducibility, and other factors + /// + /// A quantitative representation of our confidence that a consistent predictive relationship exists based on the amount of evidence, reproducibility, and other factors + [DataMember(Name="confidence_score", EmitDefaultValue=false)] + public float? ConfidenceScore { get; set; } + + + /// + /// Direction is positive if higher predictor values generally precede higher outcome values. Direction is negative if higher predictor values generally precede lower outcome values. + /// + /// Direction is positive if higher predictor values generally precede higher outcome values. Direction is negative if higher predictor values generally precede lower outcome values. + [DataMember(Name="direction", EmitDefaultValue=false)] + public string Direction { get; set; } + + + /// + /// Number of seconds over which the predictor variable event is expected to produce a perceivable effect following the onset delay + /// + /// Number of seconds over which the predictor variable event is expected to produce a perceivable effect following the onset delay + [DataMember(Name="duration_of_action", EmitDefaultValue=false)] + public int? DurationOfAction { get; set; } + + + /// + /// error_message + /// + /// error_message + [DataMember(Name="error_message", EmitDefaultValue=false)] + public string ErrorMessage { get; set; } + + + /// + /// User estimated (or default number of seconds) after cause measurement before a perceivable effect is observed + /// + /// User estimated (or default number of seconds) after cause measurement before a perceivable effect is observed + [DataMember(Name="onset_delay", EmitDefaultValue=false)] + public int? OnsetDelay { get; set; } + + + /// + /// Variable ID for the outcome variable + /// + /// Variable ID for the outcome variable + [DataMember(Name="outcome_variable_id", EmitDefaultValue=false)] + public int? OutcomeVariableId { get; set; } + + + /// + /// Variable ID for the predictor variable + /// + /// Variable ID for the predictor variable + [DataMember(Name="predictor_variable_id", EmitDefaultValue=false)] + public int? PredictorVariableId { get; set; } + + + /// + /// ID for default unit of the predictor variable + /// + /// ID for default unit of the predictor variable + [DataMember(Name="predictor_unit_id", EmitDefaultValue=false)] + public int? PredictorUnitId { get; set; } + + + /// + /// A value representative of the relevance of this predictor relative to other predictors of this outcome. Usually used for relevancy sorting. + /// + /// A value representative of the relevance of this predictor relative to other predictors of this outcome. Usually used for relevancy sorting. + [DataMember(Name="sinn_rank", EmitDefaultValue=false)] + public float? SinnRank { get; set; } + + + /// + /// Can be weak, medium, or strong based on the size of the effect which the predictor appears to have on the outcome relative to other variable relationship strength scores. + /// + /// Can be weak, medium, or strong based on the size of the effect which the predictor appears to have on the outcome relative to other variable relationship strength scores. + [DataMember(Name="strength_level", EmitDefaultValue=false)] + public string StrengthLevel { get; set; } + + + /// + /// A value represented to the size of the effect which the predictor appears to have on the outcome. + /// + /// A value represented to the size of the effect which the predictor appears to have on the outcome. + [DataMember(Name="strength_score", EmitDefaultValue=false)] + public float? StrengthScore { get; set; } + + + /// + /// user_id + /// + /// user_id + [DataMember(Name="user_id", EmitDefaultValue=false)] + public int? UserId { get; set; } + + + /// + /// vote + /// + /// vote + [DataMember(Name="vote", EmitDefaultValue=false)] + public string Vote { get; set; } + + + /// + /// Value for the predictor variable (in it's default unit) which typically precedes an above average outcome value + /// + /// Value for the predictor variable (in it's default unit) which typically precedes an above average outcome value + [DataMember(Name="value_predicting_high_outcome", EmitDefaultValue=false)] + public float? ValuePredictingHighOutcome { get; set; } + + + /// + /// Value for the predictor variable (in it's default unit) which typically precedes a below average outcome value + /// + /// Value for the predictor variable (in it's default unit) which typically precedes a below average outcome value + [DataMember(Name="value_predicting_low_outcome", EmitDefaultValue=false)] + public float? ValuePredictingLowOutcome { get; set; } + + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class UserVariableRelationship {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" ConfidenceLevel: ").Append(ConfidenceLevel).Append("\n"); + sb.Append(" ConfidenceScore: ").Append(ConfidenceScore).Append("\n"); + sb.Append(" Direction: ").Append(Direction).Append("\n"); + sb.Append(" DurationOfAction: ").Append(DurationOfAction).Append("\n"); + sb.Append(" ErrorMessage: ").Append(ErrorMessage).Append("\n"); + sb.Append(" OnsetDelay: ").Append(OnsetDelay).Append("\n"); + sb.Append(" OutcomeVariableId: ").Append(OutcomeVariableId).Append("\n"); + sb.Append(" PredictorVariableId: ").Append(PredictorVariableId).Append("\n"); + sb.Append(" PredictorUnitId: ").Append(PredictorUnitId).Append("\n"); + sb.Append(" SinnRank: ").Append(SinnRank).Append("\n"); + sb.Append(" StrengthLevel: ").Append(StrengthLevel).Append("\n"); + sb.Append(" StrengthScore: ").Append(StrengthScore).Append("\n"); + sb.Append(" UserId: ").Append(UserId).Append("\n"); + sb.Append(" Vote: ").Append(Vote).Append("\n"); + sb.Append(" ValuePredictingHighOutcome: ").Append(ValuePredictingHighOutcome).Append("\n"); + sb.Append(" ValuePredictingLowOutcome: ").Append(ValuePredictingLowOutcome).Append("\n"); + + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as UserVariableRelationship); + } + + /// + /// Returns true if UserVariableRelationship instances are equal + /// + /// Instance of UserVariableRelationship to be compared + /// Boolean + public bool Equals(UserVariableRelationship other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; + + return + ( + this.Id == other.Id || + this.Id != null && + this.Id.Equals(other.Id) + ) && + ( + this.ConfidenceLevel == other.ConfidenceLevel || + this.ConfidenceLevel != null && + this.ConfidenceLevel.Equals(other.ConfidenceLevel) + ) && + ( + this.ConfidenceScore == other.ConfidenceScore || + this.ConfidenceScore != null && + this.ConfidenceScore.Equals(other.ConfidenceScore) + ) && + ( + this.Direction == other.Direction || + this.Direction != null && + this.Direction.Equals(other.Direction) + ) && + ( + this.DurationOfAction == other.DurationOfAction || + this.DurationOfAction != null && + this.DurationOfAction.Equals(other.DurationOfAction) + ) && + ( + this.ErrorMessage == other.ErrorMessage || + this.ErrorMessage != null && + this.ErrorMessage.Equals(other.ErrorMessage) + ) && + ( + this.OnsetDelay == other.OnsetDelay || + this.OnsetDelay != null && + this.OnsetDelay.Equals(other.OnsetDelay) + ) && + ( + this.OutcomeVariableId == other.OutcomeVariableId || + this.OutcomeVariableId != null && + this.OutcomeVariableId.Equals(other.OutcomeVariableId) + ) && + ( + this.PredictorVariableId == other.PredictorVariableId || + this.PredictorVariableId != null && + this.PredictorVariableId.Equals(other.PredictorVariableId) + ) && + ( + this.PredictorUnitId == other.PredictorUnitId || + this.PredictorUnitId != null && + this.PredictorUnitId.Equals(other.PredictorUnitId) + ) && + ( + this.SinnRank == other.SinnRank || + this.SinnRank != null && + this.SinnRank.Equals(other.SinnRank) + ) && + ( + this.StrengthLevel == other.StrengthLevel || + this.StrengthLevel != null && + this.StrengthLevel.Equals(other.StrengthLevel) + ) && + ( + this.StrengthScore == other.StrengthScore || + this.StrengthScore != null && + this.StrengthScore.Equals(other.StrengthScore) + ) && + ( + this.UserId == other.UserId || + this.UserId != null && + this.UserId.Equals(other.UserId) + ) && + ( + this.Vote == other.Vote || + this.Vote != null && + this.Vote.Equals(other.Vote) + ) && + ( + this.ValuePredictingHighOutcome == other.ValuePredictingHighOutcome || + this.ValuePredictingHighOutcome != null && + this.ValuePredictingHighOutcome.Equals(other.ValuePredictingHighOutcome) + ) && + ( + this.ValuePredictingLowOutcome == other.ValuePredictingLowOutcome || + this.ValuePredictingLowOutcome != null && + this.ValuePredictingLowOutcome.Equals(other.ValuePredictingLowOutcome) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + + if (this.Id != null) + hash = hash * 57 + this.Id.GetHashCode(); + + if (this.ConfidenceLevel != null) + hash = hash * 57 + this.ConfidenceLevel.GetHashCode(); + + if (this.ConfidenceScore != null) + hash = hash * 57 + this.ConfidenceScore.GetHashCode(); + + if (this.Direction != null) + hash = hash * 57 + this.Direction.GetHashCode(); + + if (this.DurationOfAction != null) + hash = hash * 57 + this.DurationOfAction.GetHashCode(); + + if (this.ErrorMessage != null) + hash = hash * 57 + this.ErrorMessage.GetHashCode(); + + if (this.OnsetDelay != null) + hash = hash * 57 + this.OnsetDelay.GetHashCode(); + + if (this.OutcomeVariableId != null) + hash = hash * 57 + this.OutcomeVariableId.GetHashCode(); + + if (this.PredictorVariableId != null) + hash = hash * 57 + this.PredictorVariableId.GetHashCode(); + + if (this.PredictorUnitId != null) + hash = hash * 57 + this.PredictorUnitId.GetHashCode(); + + if (this.SinnRank != null) + hash = hash * 57 + this.SinnRank.GetHashCode(); + + if (this.StrengthLevel != null) + hash = hash * 57 + this.StrengthLevel.GetHashCode(); + + if (this.StrengthScore != null) + hash = hash * 57 + this.StrengthScore.GetHashCode(); + + if (this.UserId != null) + hash = hash * 57 + this.UserId.GetHashCode(); + + if (this.Vote != null) + hash = hash * 57 + this.Vote.GetHashCode(); + + if (this.ValuePredictingHighOutcome != null) + hash = hash * 57 + this.ValuePredictingHighOutcome.GetHashCode(); + + if (this.ValuePredictingLowOutcome != null) + hash = hash * 57 + this.ValuePredictingLowOutcome.GetHashCode(); + + return hash; + } + } + + } +} diff --git a/src/main/csharp/io/swagger/Model/Variable.cs b/src/main/csharp/io/swagger/Model/Variable.cs index aeabe51..60af11e 100644 --- a/src/main/csharp/io/swagger/Model/Variable.cs +++ b/src/main/csharp/io/swagger/Model/Variable.cs @@ -1,398 +1,697 @@ using System; +using System.Linq; +using System.IO; using System.Text; using System.Collections; using System.Collections.Generic; using System.Runtime.Serialization; using Newtonsoft.Json; -namespace IO.Swagger.Model { +namespace IO.Swagger.Model +{ + + /// + /// + /// + [DataContract] + public class Variable : IEquatable + { + + /// + /// id + /// + /// id + [DataMember(Name="id", EmitDefaultValue=false)] + public int? Id { get; set; } + + + /// + /// client_id + /// + /// client_id + [DataMember(Name="client_id", EmitDefaultValue=false)] + public string ClientId { get; set; } + + + /// + /// ID of the parent variable if this variable has any parent + /// + /// ID of the parent variable if this variable has any parent + [DataMember(Name="parent_id", EmitDefaultValue=false)] + public int? ParentId { get; set; } + + + /// + /// User-defined variable display name + /// + /// User-defined variable display name + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + + /// + /// Variable category ID + /// + /// Variable category ID + [DataMember(Name="variable_category_id", EmitDefaultValue=false)] + public int? VariableCategoryId { get; set; } + + + /// + /// ID of the default unit of measurement to use for this variable + /// + /// ID of the default unit of measurement to use for this variable + [DataMember(Name="default_unit_id", EmitDefaultValue=false)] + public int? DefaultUnitId { get; set; } + + + /// + /// How to combine values of this variable (for instance, to see a summary of the values over a month) SUM or MEAN + /// + /// How to combine values of this variable (for instance, to see a summary of the values over a month) SUM or MEAN + [DataMember(Name="combination_operation", EmitDefaultValue=false)] + public string CombinationOperation { get; set; } + + + /// + /// Value for replacing null measurements + /// + /// Value for replacing null measurements + [DataMember(Name="filling_value", EmitDefaultValue=false)] + public float? FillingValue { get; set; } + + + /// + /// Maximum reasonable value for this variable (uses default unit) + /// + /// Maximum reasonable value for this variable (uses default unit) + [DataMember(Name="maximum_allowed_value", EmitDefaultValue=false)] + public float? MaximumAllowedValue { get; set; } + + + /// + /// Minimum reasonable value for this variable (uses default unit) + /// + /// Minimum reasonable value for this variable (uses default unit) + [DataMember(Name="minimum_allowed_value", EmitDefaultValue=false)] + public float? MinimumAllowedValue { get; set; } + + + /// + /// How long it takes for a measurement in this variable to take effect + /// + /// How long it takes for a measurement in this variable to take effect + [DataMember(Name="onset_delay", EmitDefaultValue=false)] + public int? OnsetDelay { get; set; } + + + /// + /// How long the effect of a measurement in this variable lasts + /// + /// How long the effect of a measurement in this variable lasts + [DataMember(Name="duration_of_action", EmitDefaultValue=false)] + public int? DurationOfAction { get; set; } + + + /// + /// Is variable public + /// + /// Is variable public + [DataMember(Name="public", EmitDefaultValue=false)] + public int? Public { get; set; } + + + /// + /// A value of 1 indicates that this variable is generally a cause in a causal relationship. An example of a causeOnly variable would be a variable such as Cloud Cover which would generally not be influenced by the behaviour of the user + /// + /// A value of 1 indicates that this variable is generally a cause in a causal relationship. An example of a causeOnly variable would be a variable such as Cloud Cover which would generally not be influenced by the behaviour of the user + [DataMember(Name="cause_only", EmitDefaultValue=false)] + public bool? CauseOnly { get; set; } + + + /// + /// Most common value + /// + /// Most common value + [DataMember(Name="most_common_value", EmitDefaultValue=false)] + public float? MostCommonValue { get; set; } + + + /// + /// Most common Unit + /// + /// Most common Unit + [DataMember(Name="most_common_unit_id", EmitDefaultValue=false)] + public int? MostCommonUnitId { get; set; } + + + /// + /// Standard Deviation + /// + /// Standard Deviation + [DataMember(Name="standard_deviation", EmitDefaultValue=false)] + public float? StandardDeviation { get; set; } + + + /// + /// Variance + /// + /// Variance + [DataMember(Name="variance", EmitDefaultValue=false)] + public float? Variance { get; set; } + + + /// + /// Mean + /// + /// Mean + [DataMember(Name="mean", EmitDefaultValue=false)] + public float? Mean { get; set; } + + + /// + /// Median + /// + /// Median + [DataMember(Name="median", EmitDefaultValue=false)] + public float? Median { get; set; } + + + /// + /// Number of measurements + /// + /// Number of measurements + [DataMember(Name="number_of_measurements", EmitDefaultValue=false)] + public float? NumberOfMeasurements { get; set; } + + + /// + /// Number of unique values + /// + /// Number of unique values + [DataMember(Name="number_of_unique_values", EmitDefaultValue=false)] + public float? NumberOfUniqueValues { get; set; } + + + /// + /// Skewness + /// + /// Skewness + [DataMember(Name="skewness", EmitDefaultValue=false)] + public float? Skewness { get; set; } + + + /// + /// Kurtosis + /// + /// Kurtosis + [DataMember(Name="kurtosis", EmitDefaultValue=false)] + public float? Kurtosis { get; set; } + + + /// + /// status + /// + /// status + [DataMember(Name="status", EmitDefaultValue=false)] + public string Status { get; set; } + + + /// + /// error_message + /// + /// error_message + [DataMember(Name="error_message", EmitDefaultValue=false)] + public string ErrorMessage { get; set; } + + + /// + /// When this variable or its settings were last updated + /// + /// When this variable or its settings were last updated + [DataMember(Name="last_successful_update_time", EmitDefaultValue=false)] + public DateTime? LastSuccessfulUpdateTime { get; set; } + + + /// + /// When the record was first created. Use ISO 8601 datetime format + /// + /// When the record was first created. Use ISO 8601 datetime format + [DataMember(Name="created_at", EmitDefaultValue=false)] + public DateTime? CreatedAt { get; set; } + + + /// + /// When the record in the database was last updated. Use ISO 8601 datetime format + /// + /// When the record in the database was last updated. Use ISO 8601 datetime format + [DataMember(Name="updated_at", EmitDefaultValue=false)] + public DateTime? UpdatedAt { get; set; } + + + /// + /// Product URL + /// + /// Product URL + [DataMember(Name="product_url", EmitDefaultValue=false)] + public string ProductUrl { get; set; } + + + /// + /// Image URL + /// + /// Image URL + [DataMember(Name="image_url", EmitDefaultValue=false)] + public string ImageUrl { get; set; } + + + /// + /// Price + /// + /// Price + [DataMember(Name="price", EmitDefaultValue=false)] + public float? Price { get; set; } + + + /// + /// Number of variables + /// + /// Number of variables + [DataMember(Name="number_of_user_variables", EmitDefaultValue=false)] + public int? NumberOfUserVariables { get; set; } + + + /// + /// Outcome variables (those with `outcome` == 1) are variables for which a human would generally want to identify the influencing factors. These include symptoms of illness, physique, mood, cognitive performance, etc. Generally correlation calculations are only performed on outcome variables. + /// + /// Outcome variables (those with `outcome` == 1) are variables for which a human would generally want to identify the influencing factors. These include symptoms of illness, physique, mood, cognitive performance, etc. Generally correlation calculations are only performed on outcome variables. + [DataMember(Name="outcome", EmitDefaultValue=false)] + public bool? Outcome { get; set; } + + + /// + /// Minimum recorded value of this variable + /// + /// Minimum recorded value of this variable + [DataMember(Name="minimum_recorded_value", EmitDefaultValue=false)] + public float? MinimumRecordedValue { get; set; } + + + /// + /// Maximum recorded value of this variable + /// + /// Maximum recorded value of this variable + [DataMember(Name="maximum_recorded_value", EmitDefaultValue=false)] + public float? MaximumRecordedValue { get; set; } + + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Variable {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" ClientId: ").Append(ClientId).Append("\n"); + sb.Append(" ParentId: ").Append(ParentId).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" VariableCategoryId: ").Append(VariableCategoryId).Append("\n"); + sb.Append(" DefaultUnitId: ").Append(DefaultUnitId).Append("\n"); + sb.Append(" CombinationOperation: ").Append(CombinationOperation).Append("\n"); + sb.Append(" FillingValue: ").Append(FillingValue).Append("\n"); + sb.Append(" MaximumAllowedValue: ").Append(MaximumAllowedValue).Append("\n"); + sb.Append(" MinimumAllowedValue: ").Append(MinimumAllowedValue).Append("\n"); + sb.Append(" OnsetDelay: ").Append(OnsetDelay).Append("\n"); + sb.Append(" DurationOfAction: ").Append(DurationOfAction).Append("\n"); + sb.Append(" Public: ").Append(Public).Append("\n"); + sb.Append(" CauseOnly: ").Append(CauseOnly).Append("\n"); + sb.Append(" MostCommonValue: ").Append(MostCommonValue).Append("\n"); + sb.Append(" MostCommonUnitId: ").Append(MostCommonUnitId).Append("\n"); + sb.Append(" StandardDeviation: ").Append(StandardDeviation).Append("\n"); + sb.Append(" Variance: ").Append(Variance).Append("\n"); + sb.Append(" Mean: ").Append(Mean).Append("\n"); + sb.Append(" Median: ").Append(Median).Append("\n"); + sb.Append(" NumberOfMeasurements: ").Append(NumberOfMeasurements).Append("\n"); + sb.Append(" NumberOfUniqueValues: ").Append(NumberOfUniqueValues).Append("\n"); + sb.Append(" Skewness: ").Append(Skewness).Append("\n"); + sb.Append(" Kurtosis: ").Append(Kurtosis).Append("\n"); + sb.Append(" Status: ").Append(Status).Append("\n"); + sb.Append(" ErrorMessage: ").Append(ErrorMessage).Append("\n"); + sb.Append(" LastSuccessfulUpdateTime: ").Append(LastSuccessfulUpdateTime).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); + sb.Append(" ProductUrl: ").Append(ProductUrl).Append("\n"); + sb.Append(" ImageUrl: ").Append(ImageUrl).Append("\n"); + sb.Append(" Price: ").Append(Price).Append("\n"); + sb.Append(" NumberOfUserVariables: ").Append(NumberOfUserVariables).Append("\n"); + sb.Append(" Outcome: ").Append(Outcome).Append("\n"); + sb.Append(" MinimumRecordedValue: ").Append(MinimumRecordedValue).Append("\n"); + sb.Append(" MaximumRecordedValue: ").Append(MaximumRecordedValue).Append("\n"); + + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as Variable); + } + + /// + /// Returns true if Variable instances are equal + /// + /// Instance of Variable to be compared + /// Boolean + public bool Equals(Variable other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; + + return + ( + this.Id == other.Id || + this.Id != null && + this.Id.Equals(other.Id) + ) && + ( + this.ClientId == other.ClientId || + this.ClientId != null && + this.ClientId.Equals(other.ClientId) + ) && + ( + this.ParentId == other.ParentId || + this.ParentId != null && + this.ParentId.Equals(other.ParentId) + ) && + ( + this.Name == other.Name || + this.Name != null && + this.Name.Equals(other.Name) + ) && + ( + this.VariableCategoryId == other.VariableCategoryId || + this.VariableCategoryId != null && + this.VariableCategoryId.Equals(other.VariableCategoryId) + ) && + ( + this.DefaultUnitId == other.DefaultUnitId || + this.DefaultUnitId != null && + this.DefaultUnitId.Equals(other.DefaultUnitId) + ) && + ( + this.CombinationOperation == other.CombinationOperation || + this.CombinationOperation != null && + this.CombinationOperation.Equals(other.CombinationOperation) + ) && + ( + this.FillingValue == other.FillingValue || + this.FillingValue != null && + this.FillingValue.Equals(other.FillingValue) + ) && + ( + this.MaximumAllowedValue == other.MaximumAllowedValue || + this.MaximumAllowedValue != null && + this.MaximumAllowedValue.Equals(other.MaximumAllowedValue) + ) && + ( + this.MinimumAllowedValue == other.MinimumAllowedValue || + this.MinimumAllowedValue != null && + this.MinimumAllowedValue.Equals(other.MinimumAllowedValue) + ) && + ( + this.OnsetDelay == other.OnsetDelay || + this.OnsetDelay != null && + this.OnsetDelay.Equals(other.OnsetDelay) + ) && + ( + this.DurationOfAction == other.DurationOfAction || + this.DurationOfAction != null && + this.DurationOfAction.Equals(other.DurationOfAction) + ) && + ( + this.Public == other.Public || + this.Public != null && + this.Public.Equals(other.Public) + ) && + ( + this.CauseOnly == other.CauseOnly || + this.CauseOnly != null && + this.CauseOnly.Equals(other.CauseOnly) + ) && + ( + this.MostCommonValue == other.MostCommonValue || + this.MostCommonValue != null && + this.MostCommonValue.Equals(other.MostCommonValue) + ) && + ( + this.MostCommonUnitId == other.MostCommonUnitId || + this.MostCommonUnitId != null && + this.MostCommonUnitId.Equals(other.MostCommonUnitId) + ) && + ( + this.StandardDeviation == other.StandardDeviation || + this.StandardDeviation != null && + this.StandardDeviation.Equals(other.StandardDeviation) + ) && + ( + this.Variance == other.Variance || + this.Variance != null && + this.Variance.Equals(other.Variance) + ) && + ( + this.Mean == other.Mean || + this.Mean != null && + this.Mean.Equals(other.Mean) + ) && + ( + this.Median == other.Median || + this.Median != null && + this.Median.Equals(other.Median) + ) && + ( + this.NumberOfMeasurements == other.NumberOfMeasurements || + this.NumberOfMeasurements != null && + this.NumberOfMeasurements.Equals(other.NumberOfMeasurements) + ) && + ( + this.NumberOfUniqueValues == other.NumberOfUniqueValues || + this.NumberOfUniqueValues != null && + this.NumberOfUniqueValues.Equals(other.NumberOfUniqueValues) + ) && + ( + this.Skewness == other.Skewness || + this.Skewness != null && + this.Skewness.Equals(other.Skewness) + ) && + ( + this.Kurtosis == other.Kurtosis || + this.Kurtosis != null && + this.Kurtosis.Equals(other.Kurtosis) + ) && + ( + this.Status == other.Status || + this.Status != null && + this.Status.Equals(other.Status) + ) && + ( + this.ErrorMessage == other.ErrorMessage || + this.ErrorMessage != null && + this.ErrorMessage.Equals(other.ErrorMessage) + ) && + ( + this.LastSuccessfulUpdateTime == other.LastSuccessfulUpdateTime || + this.LastSuccessfulUpdateTime != null && + this.LastSuccessfulUpdateTime.Equals(other.LastSuccessfulUpdateTime) + ) && + ( + this.CreatedAt == other.CreatedAt || + this.CreatedAt != null && + this.CreatedAt.Equals(other.CreatedAt) + ) && + ( + this.UpdatedAt == other.UpdatedAt || + this.UpdatedAt != null && + this.UpdatedAt.Equals(other.UpdatedAt) + ) && + ( + this.ProductUrl == other.ProductUrl || + this.ProductUrl != null && + this.ProductUrl.Equals(other.ProductUrl) + ) && + ( + this.ImageUrl == other.ImageUrl || + this.ImageUrl != null && + this.ImageUrl.Equals(other.ImageUrl) + ) && + ( + this.Price == other.Price || + this.Price != null && + this.Price.Equals(other.Price) + ) && + ( + this.NumberOfUserVariables == other.NumberOfUserVariables || + this.NumberOfUserVariables != null && + this.NumberOfUserVariables.Equals(other.NumberOfUserVariables) + ) && + ( + this.Outcome == other.Outcome || + this.Outcome != null && + this.Outcome.Equals(other.Outcome) + ) && + ( + this.MinimumRecordedValue == other.MinimumRecordedValue || + this.MinimumRecordedValue != null && + this.MinimumRecordedValue.Equals(other.MinimumRecordedValue) + ) && + ( + this.MaximumRecordedValue == other.MaximumRecordedValue || + this.MaximumRecordedValue != null && + this.MaximumRecordedValue.Equals(other.MaximumRecordedValue) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + + if (this.Id != null) + hash = hash * 57 + this.Id.GetHashCode(); + + if (this.ClientId != null) + hash = hash * 57 + this.ClientId.GetHashCode(); + + if (this.ParentId != null) + hash = hash * 57 + this.ParentId.GetHashCode(); + + if (this.Name != null) + hash = hash * 57 + this.Name.GetHashCode(); + + if (this.VariableCategoryId != null) + hash = hash * 57 + this.VariableCategoryId.GetHashCode(); + + if (this.DefaultUnitId != null) + hash = hash * 57 + this.DefaultUnitId.GetHashCode(); + + if (this.CombinationOperation != null) + hash = hash * 57 + this.CombinationOperation.GetHashCode(); + + if (this.FillingValue != null) + hash = hash * 57 + this.FillingValue.GetHashCode(); + + if (this.MaximumAllowedValue != null) + hash = hash * 57 + this.MaximumAllowedValue.GetHashCode(); + + if (this.MinimumAllowedValue != null) + hash = hash * 57 + this.MinimumAllowedValue.GetHashCode(); + + if (this.OnsetDelay != null) + hash = hash * 57 + this.OnsetDelay.GetHashCode(); + + if (this.DurationOfAction != null) + hash = hash * 57 + this.DurationOfAction.GetHashCode(); + + if (this.Public != null) + hash = hash * 57 + this.Public.GetHashCode(); + + if (this.CauseOnly != null) + hash = hash * 57 + this.CauseOnly.GetHashCode(); + + if (this.MostCommonValue != null) + hash = hash * 57 + this.MostCommonValue.GetHashCode(); + + if (this.MostCommonUnitId != null) + hash = hash * 57 + this.MostCommonUnitId.GetHashCode(); + + if (this.StandardDeviation != null) + hash = hash * 57 + this.StandardDeviation.GetHashCode(); + + if (this.Variance != null) + hash = hash * 57 + this.Variance.GetHashCode(); + + if (this.Mean != null) + hash = hash * 57 + this.Mean.GetHashCode(); + + if (this.Median != null) + hash = hash * 57 + this.Median.GetHashCode(); + + if (this.NumberOfMeasurements != null) + hash = hash * 57 + this.NumberOfMeasurements.GetHashCode(); + + if (this.NumberOfUniqueValues != null) + hash = hash * 57 + this.NumberOfUniqueValues.GetHashCode(); + + if (this.Skewness != null) + hash = hash * 57 + this.Skewness.GetHashCode(); + + if (this.Kurtosis != null) + hash = hash * 57 + this.Kurtosis.GetHashCode(); + + if (this.Status != null) + hash = hash * 57 + this.Status.GetHashCode(); + + if (this.ErrorMessage != null) + hash = hash * 57 + this.ErrorMessage.GetHashCode(); + + if (this.LastSuccessfulUpdateTime != null) + hash = hash * 57 + this.LastSuccessfulUpdateTime.GetHashCode(); + + if (this.CreatedAt != null) + hash = hash * 57 + this.CreatedAt.GetHashCode(); + + if (this.UpdatedAt != null) + hash = hash * 57 + this.UpdatedAt.GetHashCode(); + + if (this.ProductUrl != null) + hash = hash * 57 + this.ProductUrl.GetHashCode(); + + if (this.ImageUrl != null) + hash = hash * 57 + this.ImageUrl.GetHashCode(); + + if (this.Price != null) + hash = hash * 57 + this.Price.GetHashCode(); + + if (this.NumberOfUserVariables != null) + hash = hash * 57 + this.NumberOfUserVariables.GetHashCode(); + + if (this.Outcome != null) + hash = hash * 57 + this.Outcome.GetHashCode(); + + if (this.MinimumRecordedValue != null) + hash = hash * 57 + this.MinimumRecordedValue.GetHashCode(); + + if (this.MaximumRecordedValue != null) + hash = hash * 57 + this.MaximumRecordedValue.GetHashCode(); + + return hash; + } + } - /// - /// - /// - [DataContract] - public class Variable { - - /// - /// id - /// - /// id - [DataMember(Name="id", EmitDefaultValue=false)] - public int? Id { get; set; } - - - /// - /// client_id - /// - /// client_id - [DataMember(Name="client_id", EmitDefaultValue=false)] - public string ClientId { get; set; } - - - /// - /// parent_id - /// - /// parent_id - [DataMember(Name="parent_id", EmitDefaultValue=false)] - public int? ParentId { get; set; } - - - /// - /// Name of the variable - /// - /// Name of the variable - [DataMember(Name="name", EmitDefaultValue=false)] - public string Name { get; set; } - - - /// - /// Category of the variable - /// - /// Category of the variable - [DataMember(Name="variable_category_id", EmitDefaultValue=false)] - public int? VariableCategoryId { get; set; } - - - /// - /// ID of the default unit of measurement to use for this variable - /// - /// ID of the default unit of measurement to use for this variable - [DataMember(Name="default_unit_id", EmitDefaultValue=false)] - public int? DefaultUnitId { get; set; } - - - /// - /// How to combine values of this variable (for instance, to see a summary of the values over a month) 0 for sum OR 1 for mean - /// - /// How to combine values of this variable (for instance, to see a summary of the values over a month) 0 for sum OR 1 for mean - [DataMember(Name="combination_operation", EmitDefaultValue=false)] - public string CombinationOperation { get; set; } - - - /// - /// filling_value - /// - /// filling_value - [DataMember(Name="filling_value", EmitDefaultValue=false)] - public float? FillingValue { get; set; } - - - /// - /// maximum_allowed_value - /// - /// maximum_allowed_value - [DataMember(Name="maximum_allowed_value", EmitDefaultValue=false)] - public float? MaximumAllowedValue { get; set; } - - - /// - /// minimum_allowed_value - /// - /// minimum_allowed_value - [DataMember(Name="minimum_allowed_value", EmitDefaultValue=false)] - public float? MinimumAllowedValue { get; set; } - - - /// - /// onset_delay - /// - /// onset_delay - [DataMember(Name="onset_delay", EmitDefaultValue=false)] - public int? OnsetDelay { get; set; } - - - /// - /// duration_of_action - /// - /// duration_of_action - [DataMember(Name="duration_of_action", EmitDefaultValue=false)] - public int? DurationOfAction { get; set; } - - - /// - /// public - /// - /// public - [DataMember(Name="public", EmitDefaultValue=false)] - public int? Public { get; set; } - - - /// - /// cause_only - /// - /// cause_only - [DataMember(Name="cause_only", EmitDefaultValue=false)] - public bool? CauseOnly { get; set; } - - - /// - /// most_common_value - /// - /// most_common_value - [DataMember(Name="most_common_value", EmitDefaultValue=false)] - public float? MostCommonValue { get; set; } - - - /// - /// most_common_unit_id - /// - /// most_common_unit_id - [DataMember(Name="most_common_unit_id", EmitDefaultValue=false)] - public int? MostCommonUnitId { get; set; } - - - /// - /// standard_deviation - /// - /// standard_deviation - [DataMember(Name="standard_deviation", EmitDefaultValue=false)] - public float? StandardDeviation { get; set; } - - - /// - /// variance - /// - /// variance - [DataMember(Name="variance", EmitDefaultValue=false)] - public float? Variance { get; set; } - - - /// - /// mean - /// - /// mean - [DataMember(Name="mean", EmitDefaultValue=false)] - public float? Mean { get; set; } - - - /// - /// median - /// - /// median - [DataMember(Name="median", EmitDefaultValue=false)] - public float? Median { get; set; } - - - /// - /// number_of_measurements - /// - /// number_of_measurements - [DataMember(Name="number_of_measurements", EmitDefaultValue=false)] - public float? NumberOfMeasurements { get; set; } - - - /// - /// number_of_unique_values - /// - /// number_of_unique_values - [DataMember(Name="number_of_unique_values", EmitDefaultValue=false)] - public float? NumberOfUniqueValues { get; set; } - - - /// - /// skewness - /// - /// skewness - [DataMember(Name="skewness", EmitDefaultValue=false)] - public float? Skewness { get; set; } - - - /// - /// kurtosis - /// - /// kurtosis - [DataMember(Name="kurtosis", EmitDefaultValue=false)] - public float? Kurtosis { get; set; } - - - /// - /// status - /// - /// status - [DataMember(Name="status", EmitDefaultValue=false)] - public string Status { get; set; } - - - /// - /// error_message - /// - /// error_message - [DataMember(Name="error_message", EmitDefaultValue=false)] - public string ErrorMessage { get; set; } - - - /// - /// last_successful_update_time - /// - /// last_successful_update_time - [DataMember(Name="last_successful_update_time", EmitDefaultValue=false)] - public DateTime? LastSuccessfulUpdateTime { get; set; } - - - /// - /// created_at - /// - /// created_at - [DataMember(Name="created_at", EmitDefaultValue=false)] - public DateTime? CreatedAt { get; set; } - - - /// - /// updated_at - /// - /// updated_at - [DataMember(Name="updated_at", EmitDefaultValue=false)] - public DateTime? UpdatedAt { get; set; } - - - /// - /// product_url - /// - /// product_url - [DataMember(Name="product_url", EmitDefaultValue=false)] - public string ProductUrl { get; set; } - - - /// - /// image_url - /// - /// image_url - [DataMember(Name="image_url", EmitDefaultValue=false)] - public string ImageUrl { get; set; } - - - /// - /// price - /// - /// price - [DataMember(Name="price", EmitDefaultValue=false)] - public float? Price { get; set; } - - - /// - /// number_of_user_variables - /// - /// number_of_user_variables - [DataMember(Name="number_of_user_variables", EmitDefaultValue=false)] - public int? NumberOfUserVariables { get; set; } - - - /// - /// outcome - /// - /// outcome - [DataMember(Name="outcome", EmitDefaultValue=false)] - public bool? Outcome { get; set; } - - - /// - /// minimum_recorded_value - /// - /// minimum_recorded_value - [DataMember(Name="minimum_recorded_value", EmitDefaultValue=false)] - public float? MinimumRecordedValue { get; set; } - - - /// - /// maximum_recorded_value - /// - /// maximum_recorded_value - [DataMember(Name="maximum_recorded_value", EmitDefaultValue=false)] - public float? MaximumRecordedValue { get; set; } - - - - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class Variable {\n"); - - sb.Append(" Id: ").Append(Id).Append("\n"); - - sb.Append(" ClientId: ").Append(ClientId).Append("\n"); - - sb.Append(" ParentId: ").Append(ParentId).Append("\n"); - - sb.Append(" Name: ").Append(Name).Append("\n"); - - sb.Append(" VariableCategoryId: ").Append(VariableCategoryId).Append("\n"); - - sb.Append(" DefaultUnitId: ").Append(DefaultUnitId).Append("\n"); - - sb.Append(" CombinationOperation: ").Append(CombinationOperation).Append("\n"); - - sb.Append(" FillingValue: ").Append(FillingValue).Append("\n"); - - sb.Append(" MaximumAllowedValue: ").Append(MaximumAllowedValue).Append("\n"); - - sb.Append(" MinimumAllowedValue: ").Append(MinimumAllowedValue).Append("\n"); - - sb.Append(" OnsetDelay: ").Append(OnsetDelay).Append("\n"); - - sb.Append(" DurationOfAction: ").Append(DurationOfAction).Append("\n"); - - sb.Append(" Public: ").Append(Public).Append("\n"); - - sb.Append(" CauseOnly: ").Append(CauseOnly).Append("\n"); - - sb.Append(" MostCommonValue: ").Append(MostCommonValue).Append("\n"); - - sb.Append(" MostCommonUnitId: ").Append(MostCommonUnitId).Append("\n"); - - sb.Append(" StandardDeviation: ").Append(StandardDeviation).Append("\n"); - - sb.Append(" Variance: ").Append(Variance).Append("\n"); - - sb.Append(" Mean: ").Append(Mean).Append("\n"); - - sb.Append(" Median: ").Append(Median).Append("\n"); - - sb.Append(" NumberOfMeasurements: ").Append(NumberOfMeasurements).Append("\n"); - - sb.Append(" NumberOfUniqueValues: ").Append(NumberOfUniqueValues).Append("\n"); - - sb.Append(" Skewness: ").Append(Skewness).Append("\n"); - - sb.Append(" Kurtosis: ").Append(Kurtosis).Append("\n"); - - sb.Append(" Status: ").Append(Status).Append("\n"); - - sb.Append(" ErrorMessage: ").Append(ErrorMessage).Append("\n"); - - sb.Append(" LastSuccessfulUpdateTime: ").Append(LastSuccessfulUpdateTime).Append("\n"); - - sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); - - sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); - - sb.Append(" ProductUrl: ").Append(ProductUrl).Append("\n"); - - sb.Append(" ImageUrl: ").Append(ImageUrl).Append("\n"); - - sb.Append(" Price: ").Append(Price).Append("\n"); - - sb.Append(" NumberOfUserVariables: ").Append(NumberOfUserVariables).Append("\n"); - - sb.Append(" Outcome: ").Append(Outcome).Append("\n"); - - sb.Append(" MinimumRecordedValue: ").Append(MinimumRecordedValue).Append("\n"); - - sb.Append(" MaximumRecordedValue: ").Append(MaximumRecordedValue).Append("\n"); - - sb.Append("}\n"); - return sb.ToString(); } - - /// - /// Get the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - -} } diff --git a/src/main/csharp/io/swagger/Model/VariableCategory.cs b/src/main/csharp/io/swagger/Model/VariableCategory.cs index 38483d8..8d1423c 100644 --- a/src/main/csharp/io/swagger/Model/VariableCategory.cs +++ b/src/main/csharp/io/swagger/Model/VariableCategory.cs @@ -1,198 +1,357 @@ using System; +using System.Linq; +using System.IO; using System.Text; using System.Collections; using System.Collections.Generic; using System.Runtime.Serialization; using Newtonsoft.Json; -namespace IO.Swagger.Model { +namespace IO.Swagger.Model +{ - /// - /// - /// - [DataContract] - public class VariableCategory { - /// - /// id + /// /// - /// id - [DataMember(Name="id", EmitDefaultValue=false)] - public int? Id { get; set; } + [DataContract] + public class VariableCategory : IEquatable + { + + /// + /// id + /// + /// id + [DataMember(Name="id", EmitDefaultValue=false)] + public int? Id { get; set; } + + + /// + /// Name of the category + /// + /// Name of the category + [DataMember(Name="name", EmitDefaultValue=false)] + public string Name { get; set; } + + + /// + /// Value for replacing null measurements + /// + /// Value for replacing null measurements + [DataMember(Name="filling_value", EmitDefaultValue=false)] + public float? FillingValue { get; set; } + + + /// + /// Maximum recorded value of this category + /// + /// Maximum recorded value of this category + [DataMember(Name="maximum_allowed_value", EmitDefaultValue=false)] + public float? MaximumAllowedValue { get; set; } + + + /// + /// Minimum recorded value of this category + /// + /// Minimum recorded value of this category + [DataMember(Name="minimum_allowed_value", EmitDefaultValue=false)] + public float? MinimumAllowedValue { get; set; } + + + /// + /// How long the effect of a measurement in this variable lasts + /// + /// How long the effect of a measurement in this variable lasts + [DataMember(Name="duration_of_action", EmitDefaultValue=false)] + public int? DurationOfAction { get; set; } + + + /// + /// How long it takes for a measurement in this variable to take effect + /// + /// How long it takes for a measurement in this variable to take effect + [DataMember(Name="onset_delay", EmitDefaultValue=false)] + public int? OnsetDelay { get; set; } + + + /// + /// How to combine values of this variable (for instance, to see a summary of the values over a month) 0 for sum OR 1 for mean + /// + /// How to combine values of this variable (for instance, to see a summary of the values over a month) 0 for sum OR 1 for mean + [DataMember(Name="combination_operation", EmitDefaultValue=false)] + public string CombinationOperation { get; set; } + + + /// + /// updated + /// + /// updated + [DataMember(Name="updated", EmitDefaultValue=false)] + public int? Updated { get; set; } + + + /// + /// A value of 1 indicates that this category is generally a cause in a causal relationship. An example of a causeOnly category would be a category such as Work which would generally not be influenced by the behaviour of the user + /// + /// A value of 1 indicates that this category is generally a cause in a causal relationship. An example of a causeOnly category would be a category such as Work which would generally not be influenced by the behaviour of the user + [DataMember(Name="cause_only", EmitDefaultValue=false)] + public bool? CauseOnly { get; set; } + + + /// + /// Is category public + /// + /// Is category public + [DataMember(Name="public", EmitDefaultValue=false)] + public int? Public { get; set; } + + + /// + /// outcome + /// + /// outcome + [DataMember(Name="outcome", EmitDefaultValue=false)] + public bool? Outcome { get; set; } + + + /// + /// When the record was first created. Use ISO 8601 datetime format + /// + /// When the record was first created. Use ISO 8601 datetime format + [DataMember(Name="created_at", EmitDefaultValue=false)] + public DateTime? CreatedAt { get; set; } + + + /// + /// When the record in the database was last updated. Use ISO 8601 datetime format + /// + /// When the record in the database was last updated. Use ISO 8601 datetime format + [DataMember(Name="updated_at", EmitDefaultValue=false)] + public DateTime? UpdatedAt { get; set; } + + + /// + /// Image URL + /// + /// Image URL + [DataMember(Name="image_url", EmitDefaultValue=false)] + public string ImageUrl { get; set; } + + + /// + /// ID of the default unit for the category + /// + /// ID of the default unit for the category + [DataMember(Name="default_unit_id", EmitDefaultValue=false)] + public int? DefaultUnitId { get; set; } + + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class VariableCategory {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" Name: ").Append(Name).Append("\n"); + sb.Append(" FillingValue: ").Append(FillingValue).Append("\n"); + sb.Append(" MaximumAllowedValue: ").Append(MaximumAllowedValue).Append("\n"); + sb.Append(" MinimumAllowedValue: ").Append(MinimumAllowedValue).Append("\n"); + sb.Append(" DurationOfAction: ").Append(DurationOfAction).Append("\n"); + sb.Append(" OnsetDelay: ").Append(OnsetDelay).Append("\n"); + sb.Append(" CombinationOperation: ").Append(CombinationOperation).Append("\n"); + sb.Append(" Updated: ").Append(Updated).Append("\n"); + sb.Append(" CauseOnly: ").Append(CauseOnly).Append("\n"); + sb.Append(" Public: ").Append(Public).Append("\n"); + sb.Append(" Outcome: ").Append(Outcome).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); + sb.Append(" ImageUrl: ").Append(ImageUrl).Append("\n"); + sb.Append(" DefaultUnitId: ").Append(DefaultUnitId).Append("\n"); + + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } - - /// - /// Name of the category - /// - /// Name of the category - [DataMember(Name="name", EmitDefaultValue=false)] - public string Name { get; set; } - - - /// - /// Value for replacing null measurements - /// - /// Value for replacing null measurements - [DataMember(Name="filling_value", EmitDefaultValue=false)] - public float? FillingValue { get; set; } - - - /// - /// Maximum recorded value of this category - /// - /// Maximum recorded value of this category - [DataMember(Name="maximum_allowed_value", EmitDefaultValue=false)] - public float? MaximumAllowedValue { get; set; } - - - /// - /// Minimum recorded value of this category - /// - /// Minimum recorded value of this category - [DataMember(Name="minimum_allowed_value", EmitDefaultValue=false)] - public float? MinimumAllowedValue { get; set; } - - - /// - /// How long the effect of a measurement in this variable lasts - /// - /// How long the effect of a measurement in this variable lasts - [DataMember(Name="duration_of_action", EmitDefaultValue=false)] - public int? DurationOfAction { get; set; } - - - /// - /// How long it takes for a measurement in this variable to take effect - /// - /// How long it takes for a measurement in this variable to take effect - [DataMember(Name="onset_delay", EmitDefaultValue=false)] - public int? OnsetDelay { get; set; } - - - /// - /// How to combine values of this variable (for instance, to see a summary of the values over a month) 0 for sum OR 1 for mean - /// - /// How to combine values of this variable (for instance, to see a summary of the values over a month) 0 for sum OR 1 for mean - [DataMember(Name="combination_operation", EmitDefaultValue=false)] - public string CombinationOperation { get; set; } - - - /// - /// updated - /// - /// updated - [DataMember(Name="updated", EmitDefaultValue=false)] - public int? Updated { get; set; } - - - /// - /// A value of 1 indicates that this category is generally a cause in a causal relationship. An example of a causeOnly category would be a category such as Work which would generally not be influenced by the behaviour of the user - /// - /// A value of 1 indicates that this category is generally a cause in a causal relationship. An example of a causeOnly category would be a category such as Work which would generally not be influenced by the behaviour of the user - [DataMember(Name="cause_only", EmitDefaultValue=false)] - public bool? CauseOnly { get; set; } + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as VariableCategory); + } - - /// - /// Is category public - /// - /// Is category public - [DataMember(Name="public", EmitDefaultValue=false)] - public int? Public { get; set; } + /// + /// Returns true if VariableCategory instances are equal + /// + /// Instance of VariableCategory to be compared + /// Boolean + public bool Equals(VariableCategory other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; - - /// - /// outcome - /// - /// outcome - [DataMember(Name="outcome", EmitDefaultValue=false)] - public bool? Outcome { get; set; } + return + ( + this.Id == other.Id || + this.Id != null && + this.Id.Equals(other.Id) + ) && + ( + this.Name == other.Name || + this.Name != null && + this.Name.Equals(other.Name) + ) && + ( + this.FillingValue == other.FillingValue || + this.FillingValue != null && + this.FillingValue.Equals(other.FillingValue) + ) && + ( + this.MaximumAllowedValue == other.MaximumAllowedValue || + this.MaximumAllowedValue != null && + this.MaximumAllowedValue.Equals(other.MaximumAllowedValue) + ) && + ( + this.MinimumAllowedValue == other.MinimumAllowedValue || + this.MinimumAllowedValue != null && + this.MinimumAllowedValue.Equals(other.MinimumAllowedValue) + ) && + ( + this.DurationOfAction == other.DurationOfAction || + this.DurationOfAction != null && + this.DurationOfAction.Equals(other.DurationOfAction) + ) && + ( + this.OnsetDelay == other.OnsetDelay || + this.OnsetDelay != null && + this.OnsetDelay.Equals(other.OnsetDelay) + ) && + ( + this.CombinationOperation == other.CombinationOperation || + this.CombinationOperation != null && + this.CombinationOperation.Equals(other.CombinationOperation) + ) && + ( + this.Updated == other.Updated || + this.Updated != null && + this.Updated.Equals(other.Updated) + ) && + ( + this.CauseOnly == other.CauseOnly || + this.CauseOnly != null && + this.CauseOnly.Equals(other.CauseOnly) + ) && + ( + this.Public == other.Public || + this.Public != null && + this.Public.Equals(other.Public) + ) && + ( + this.Outcome == other.Outcome || + this.Outcome != null && + this.Outcome.Equals(other.Outcome) + ) && + ( + this.CreatedAt == other.CreatedAt || + this.CreatedAt != null && + this.CreatedAt.Equals(other.CreatedAt) + ) && + ( + this.UpdatedAt == other.UpdatedAt || + this.UpdatedAt != null && + this.UpdatedAt.Equals(other.UpdatedAt) + ) && + ( + this.ImageUrl == other.ImageUrl || + this.ImageUrl != null && + this.ImageUrl.Equals(other.ImageUrl) + ) && + ( + this.DefaultUnitId == other.DefaultUnitId || + this.DefaultUnitId != null && + this.DefaultUnitId.Equals(other.DefaultUnitId) + ); + } - - /// - /// created_at - /// - /// created_at - [DataMember(Name="created_at", EmitDefaultValue=false)] - public DateTime? CreatedAt { get; set; } - - - /// - /// updated_at - /// - /// updated_at - [DataMember(Name="updated_at", EmitDefaultValue=false)] - public DateTime? UpdatedAt { get; set; } - - - /// - /// Image URL - /// - /// Image URL - [DataMember(Name="image_url", EmitDefaultValue=false)] - public string ImageUrl { get; set; } + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + + if (this.Id != null) + hash = hash * 57 + this.Id.GetHashCode(); + + if (this.Name != null) + hash = hash * 57 + this.Name.GetHashCode(); + + if (this.FillingValue != null) + hash = hash * 57 + this.FillingValue.GetHashCode(); + + if (this.MaximumAllowedValue != null) + hash = hash * 57 + this.MaximumAllowedValue.GetHashCode(); + + if (this.MinimumAllowedValue != null) + hash = hash * 57 + this.MinimumAllowedValue.GetHashCode(); + + if (this.DurationOfAction != null) + hash = hash * 57 + this.DurationOfAction.GetHashCode(); + + if (this.OnsetDelay != null) + hash = hash * 57 + this.OnsetDelay.GetHashCode(); + + if (this.CombinationOperation != null) + hash = hash * 57 + this.CombinationOperation.GetHashCode(); + + if (this.Updated != null) + hash = hash * 57 + this.Updated.GetHashCode(); + + if (this.CauseOnly != null) + hash = hash * 57 + this.CauseOnly.GetHashCode(); + + if (this.Public != null) + hash = hash * 57 + this.Public.GetHashCode(); + + if (this.Outcome != null) + hash = hash * 57 + this.Outcome.GetHashCode(); + + if (this.CreatedAt != null) + hash = hash * 57 + this.CreatedAt.GetHashCode(); + + if (this.UpdatedAt != null) + hash = hash * 57 + this.UpdatedAt.GetHashCode(); + + if (this.ImageUrl != null) + hash = hash * 57 + this.ImageUrl.GetHashCode(); + + if (this.DefaultUnitId != null) + hash = hash * 57 + this.DefaultUnitId.GetHashCode(); + + return hash; + } + } - - /// - /// ID of the default unit for the category - /// - /// ID of the default unit for the category - [DataMember(Name="default_unit_id", EmitDefaultValue=false)] - public int? DefaultUnitId { get; set; } - - - - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class VariableCategory {\n"); - - sb.Append(" Id: ").Append(Id).Append("\n"); - - sb.Append(" Name: ").Append(Name).Append("\n"); - - sb.Append(" FillingValue: ").Append(FillingValue).Append("\n"); - - sb.Append(" MaximumAllowedValue: ").Append(MaximumAllowedValue).Append("\n"); - - sb.Append(" MinimumAllowedValue: ").Append(MinimumAllowedValue).Append("\n"); - - sb.Append(" DurationOfAction: ").Append(DurationOfAction).Append("\n"); - - sb.Append(" OnsetDelay: ").Append(OnsetDelay).Append("\n"); - - sb.Append(" CombinationOperation: ").Append(CombinationOperation).Append("\n"); - - sb.Append(" Updated: ").Append(Updated).Append("\n"); - - sb.Append(" CauseOnly: ").Append(CauseOnly).Append("\n"); - - sb.Append(" Public: ").Append(Public).Append("\n"); - - sb.Append(" Outcome: ").Append(Outcome).Append("\n"); - - sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); - - sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); - - sb.Append(" ImageUrl: ").Append(ImageUrl).Append("\n"); - - sb.Append(" DefaultUnitId: ").Append(DefaultUnitId).Append("\n"); - - sb.Append("}\n"); - return sb.ToString(); } - - /// - /// Get the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - -} } diff --git a/src/main/csharp/io/swagger/Model/VariableUserSource.cs b/src/main/csharp/io/swagger/Model/VariableUserSource.cs index d46248e..ec3d667 100644 --- a/src/main/csharp/io/swagger/Model/VariableUserSource.cs +++ b/src/main/csharp/io/swagger/Model/VariableUserSource.cs @@ -1,118 +1,221 @@ using System; +using System.Linq; +using System.IO; using System.Text; using System.Collections; using System.Collections.Generic; using System.Runtime.Serialization; using Newtonsoft.Json; -namespace IO.Swagger.Model { +namespace IO.Swagger.Model +{ - /// - /// - /// - [DataContract] - public class VariableUserSource { - /// - /// ID of User + /// /// - /// ID of User - [DataMember(Name="user_id", EmitDefaultValue=false)] - public int? UserId { get; set; } + [DataContract] + public class VariableUserSource : IEquatable + { + + /// + /// ID of User + /// + /// ID of User + [DataMember(Name="user_id", EmitDefaultValue=false)] + public int? UserId { get; set; } + + + /// + /// ID of variable + /// + /// ID of variable + [DataMember(Name="variable_id", EmitDefaultValue=false)] + public int? VariableId { get; set; } + + + /// + /// ID of source + /// + /// ID of source + [DataMember(Name="source_id", EmitDefaultValue=false)] + public int? SourceId { get; set; } + + + /// + /// Time that this measurement occurred Uses epoch minute (epoch time divided by 60) + /// + /// Time that this measurement occurred Uses epoch minute (epoch time divided by 60) + [DataMember(Name="timestamp", EmitDefaultValue=false)] + public int? Timestamp { get; set; } + + + /// + /// Earliest measurement time + /// + /// Earliest measurement time + [DataMember(Name="earliest_measurement_time", EmitDefaultValue=false)] + public int? EarliestMeasurementTime { get; set; } + + + /// + /// Latest measurement time + /// + /// Latest measurement time + [DataMember(Name="latest_measurement_time", EmitDefaultValue=false)] + public int? LatestMeasurementTime { get; set; } + + + /// + /// When the record was first created. Use ISO 8601 datetime format + /// + /// When the record was first created. Use ISO 8601 datetime format + [DataMember(Name="created_at", EmitDefaultValue=false)] + public DateTime? CreatedAt { get; set; } + + + /// + /// When the record in the database was last updated. Use ISO 8601 datetime format + /// + /// When the record in the database was last updated. Use ISO 8601 datetime format + [DataMember(Name="updated_at", EmitDefaultValue=false)] + public DateTime? UpdatedAt { get; set; } + + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class VariableUserSource {\n"); + sb.Append(" UserId: ").Append(UserId).Append("\n"); + sb.Append(" VariableId: ").Append(VariableId).Append("\n"); + sb.Append(" SourceId: ").Append(SourceId).Append("\n"); + sb.Append(" Timestamp: ").Append(Timestamp).Append("\n"); + sb.Append(" EarliestMeasurementTime: ").Append(EarliestMeasurementTime).Append("\n"); + sb.Append(" LatestMeasurementTime: ").Append(LatestMeasurementTime).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); + + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } - - /// - /// ID of variable - /// - /// ID of variable - [DataMember(Name="variable_id", EmitDefaultValue=false)] - public int? VariableId { get; set; } - - - /// - /// ID of source - /// - /// ID of source - [DataMember(Name="source_id", EmitDefaultValue=false)] - public int? SourceId { get; set; } - - - /// - /// Time that this measurement occurred Uses epoch minute (epoch time divided by 60) - /// - /// Time that this measurement occurred Uses epoch minute (epoch time divided by 60) - [DataMember(Name="timestamp", EmitDefaultValue=false)] - public int? Timestamp { get; set; } - - - /// - /// Earliest measurement time - /// - /// Earliest measurement time - [DataMember(Name="earliest_measurement_time", EmitDefaultValue=false)] - public int? EarliestMeasurementTime { get; set; } - - - /// - /// Latest measurement time - /// - /// Latest measurement time - [DataMember(Name="latest_measurement_time", EmitDefaultValue=false)] - public int? LatestMeasurementTime { get; set; } + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as VariableUserSource); + } - - /// - /// created_at - /// - /// created_at - [DataMember(Name="created_at", EmitDefaultValue=false)] - public DateTime? CreatedAt { get; set; } + /// + /// Returns true if VariableUserSource instances are equal + /// + /// Instance of VariableUserSource to be compared + /// Boolean + public bool Equals(VariableUserSource other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; - - /// - /// updated_at - /// - /// updated_at - [DataMember(Name="updated_at", EmitDefaultValue=false)] - public DateTime? UpdatedAt { get; set; } + return + ( + this.UserId == other.UserId || + this.UserId != null && + this.UserId.Equals(other.UserId) + ) && + ( + this.VariableId == other.VariableId || + this.VariableId != null && + this.VariableId.Equals(other.VariableId) + ) && + ( + this.SourceId == other.SourceId || + this.SourceId != null && + this.SourceId.Equals(other.SourceId) + ) && + ( + this.Timestamp == other.Timestamp || + this.Timestamp != null && + this.Timestamp.Equals(other.Timestamp) + ) && + ( + this.EarliestMeasurementTime == other.EarliestMeasurementTime || + this.EarliestMeasurementTime != null && + this.EarliestMeasurementTime.Equals(other.EarliestMeasurementTime) + ) && + ( + this.LatestMeasurementTime == other.LatestMeasurementTime || + this.LatestMeasurementTime != null && + this.LatestMeasurementTime.Equals(other.LatestMeasurementTime) + ) && + ( + this.CreatedAt == other.CreatedAt || + this.CreatedAt != null && + this.CreatedAt.Equals(other.CreatedAt) + ) && + ( + this.UpdatedAt == other.UpdatedAt || + this.UpdatedAt != null && + this.UpdatedAt.Equals(other.UpdatedAt) + ); + } - + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + + if (this.UserId != null) + hash = hash * 57 + this.UserId.GetHashCode(); + + if (this.VariableId != null) + hash = hash * 57 + this.VariableId.GetHashCode(); + + if (this.SourceId != null) + hash = hash * 57 + this.SourceId.GetHashCode(); + + if (this.Timestamp != null) + hash = hash * 57 + this.Timestamp.GetHashCode(); + + if (this.EarliestMeasurementTime != null) + hash = hash * 57 + this.EarliestMeasurementTime.GetHashCode(); + + if (this.LatestMeasurementTime != null) + hash = hash * 57 + this.LatestMeasurementTime.GetHashCode(); + + if (this.CreatedAt != null) + hash = hash * 57 + this.CreatedAt.GetHashCode(); + + if (this.UpdatedAt != null) + hash = hash * 57 + this.UpdatedAt.GetHashCode(); + + return hash; + } + } - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class VariableUserSource {\n"); - - sb.Append(" UserId: ").Append(UserId).Append("\n"); - - sb.Append(" VariableId: ").Append(VariableId).Append("\n"); - - sb.Append(" SourceId: ").Append(SourceId).Append("\n"); - - sb.Append(" Timestamp: ").Append(Timestamp).Append("\n"); - - sb.Append(" EarliestMeasurementTime: ").Append(EarliestMeasurementTime).Append("\n"); - - sb.Append(" LatestMeasurementTime: ").Append(LatestMeasurementTime).Append("\n"); - - sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); - - sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); - - sb.Append("}\n"); - return sb.ToString(); } - - /// - /// Get the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - -} } diff --git a/src/main/csharp/io/swagger/Model/Vote.cs b/src/main/csharp/io/swagger/Model/Vote.cs index 5b001e5..a885752 100644 --- a/src/main/csharp/io/swagger/Model/Vote.cs +++ b/src/main/csharp/io/swagger/Model/Vote.cs @@ -1,118 +1,221 @@ using System; +using System.Linq; +using System.IO; using System.Text; using System.Collections; using System.Collections.Generic; using System.Runtime.Serialization; using Newtonsoft.Json; -namespace IO.Swagger.Model { +namespace IO.Swagger.Model +{ - /// - /// - /// - [DataContract] - public class Vote { - /// - /// id + /// /// - /// id - [DataMember(Name="id", EmitDefaultValue=false)] - public int? Id { get; set; } + [DataContract] + public class Vote : IEquatable + { + + /// + /// id + /// + /// id + [DataMember(Name="id", EmitDefaultValue=false)] + public int? Id { get; set; } + + + /// + /// client_id + /// + /// client_id + [DataMember(Name="client_id", EmitDefaultValue=false)] + public string ClientId { get; set; } + + + /// + /// ID of User + /// + /// ID of User + [DataMember(Name="user_id", EmitDefaultValue=false)] + public int? UserId { get; set; } + + + /// + /// ID of the predictor variable + /// + /// ID of the predictor variable + [DataMember(Name="cause_id", EmitDefaultValue=false)] + public int? CauseId { get; set; } + + + /// + /// ID of effect variable + /// + /// ID of effect variable + [DataMember(Name="effect_id", EmitDefaultValue=false)] + public int? EffectId { get; set; } + + + /// + /// Value of Vote + /// + /// Value of Vote + [DataMember(Name="value", EmitDefaultValue=false)] + public int? Value { get; set; } + + + /// + /// When the record was first created. Use ISO 8601 datetime format + /// + /// When the record was first created. Use ISO 8601 datetime format + [DataMember(Name="created_at", EmitDefaultValue=false)] + public DateTime? CreatedAt { get; set; } + + + /// + /// When the record in the database was last updated. Use ISO 8601 datetime format + /// + /// When the record in the database was last updated. Use ISO 8601 datetime format + [DataMember(Name="updated_at", EmitDefaultValue=false)] + public DateTime? UpdatedAt { get; set; } + + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class Vote {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" ClientId: ").Append(ClientId).Append("\n"); + sb.Append(" UserId: ").Append(UserId).Append("\n"); + sb.Append(" CauseId: ").Append(CauseId).Append("\n"); + sb.Append(" EffectId: ").Append(EffectId).Append("\n"); + sb.Append(" Value: ").Append(Value).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); + + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } - - /// - /// client_id - /// - /// client_id - [DataMember(Name="client_id", EmitDefaultValue=false)] - public string ClientId { get; set; } - - - /// - /// ID of User - /// - /// ID of User - [DataMember(Name="user_id", EmitDefaultValue=false)] - public int? UserId { get; set; } - - - /// - /// ID of cause variable - /// - /// ID of cause variable - [DataMember(Name="cause_id", EmitDefaultValue=false)] - public int? CauseId { get; set; } - - - /// - /// ID of effect variable - /// - /// ID of effect variable - [DataMember(Name="effect_id", EmitDefaultValue=false)] - public int? EffectId { get; set; } - - - /// - /// Value of Vote - /// - /// Value of Vote - [DataMember(Name="value", EmitDefaultValue=false)] - public int? Value { get; set; } + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as Vote); + } - - /// - /// created_at - /// - /// created_at - [DataMember(Name="created_at", EmitDefaultValue=false)] - public DateTime? CreatedAt { get; set; } + /// + /// Returns true if Vote instances are equal + /// + /// Instance of Vote to be compared + /// Boolean + public bool Equals(Vote other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; - - /// - /// updated_at - /// - /// updated_at - [DataMember(Name="updated_at", EmitDefaultValue=false)] - public DateTime? UpdatedAt { get; set; } + return + ( + this.Id == other.Id || + this.Id != null && + this.Id.Equals(other.Id) + ) && + ( + this.ClientId == other.ClientId || + this.ClientId != null && + this.ClientId.Equals(other.ClientId) + ) && + ( + this.UserId == other.UserId || + this.UserId != null && + this.UserId.Equals(other.UserId) + ) && + ( + this.CauseId == other.CauseId || + this.CauseId != null && + this.CauseId.Equals(other.CauseId) + ) && + ( + this.EffectId == other.EffectId || + this.EffectId != null && + this.EffectId.Equals(other.EffectId) + ) && + ( + this.Value == other.Value || + this.Value != null && + this.Value.Equals(other.Value) + ) && + ( + this.CreatedAt == other.CreatedAt || + this.CreatedAt != null && + this.CreatedAt.Equals(other.CreatedAt) + ) && + ( + this.UpdatedAt == other.UpdatedAt || + this.UpdatedAt != null && + this.UpdatedAt.Equals(other.UpdatedAt) + ); + } - + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + + if (this.Id != null) + hash = hash * 57 + this.Id.GetHashCode(); + + if (this.ClientId != null) + hash = hash * 57 + this.ClientId.GetHashCode(); + + if (this.UserId != null) + hash = hash * 57 + this.UserId.GetHashCode(); + + if (this.CauseId != null) + hash = hash * 57 + this.CauseId.GetHashCode(); + + if (this.EffectId != null) + hash = hash * 57 + this.EffectId.GetHashCode(); + + if (this.Value != null) + hash = hash * 57 + this.Value.GetHashCode(); + + if (this.CreatedAt != null) + hash = hash * 57 + this.CreatedAt.GetHashCode(); + + if (this.UpdatedAt != null) + hash = hash * 57 + this.UpdatedAt.GetHashCode(); + + return hash; + } + } - /// - /// Get the string presentation of the object - /// - /// String presentation of the object - public override string ToString() { - var sb = new StringBuilder(); - sb.Append("class Vote {\n"); - - sb.Append(" Id: ").Append(Id).Append("\n"); - - sb.Append(" ClientId: ").Append(ClientId).Append("\n"); - - sb.Append(" UserId: ").Append(UserId).Append("\n"); - - sb.Append(" CauseId: ").Append(CauseId).Append("\n"); - - sb.Append(" EffectId: ").Append(EffectId).Append("\n"); - - sb.Append(" Value: ").Append(Value).Append("\n"); - - sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); - - sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); - - sb.Append("}\n"); - return sb.ToString(); } - - /// - /// Get the JSON string presentation of the object - /// - /// JSON string presentation of the object - public string ToJson() { - return JsonConvert.SerializeObject(this, Formatting.Indented); - } - -} } diff --git a/src/main/csharp/io/swagger/client/ApiClient.cs b/src/main/csharp/io/swagger/client/ApiClient.cs index 939ac9c..38cb9cf 100644 --- a/src/main/csharp/io/swagger/client/ApiClient.cs +++ b/src/main/csharp/io/swagger/client/ApiClient.cs @@ -10,7 +10,6 @@ using System.Text; using Newtonsoft.Json; using RestSharp; -using RestSharp.Extensions; namespace IO.Swagger.Client { @@ -19,23 +18,23 @@ namespace IO.Swagger.Client /// public class ApiClient { - private readonly Dictionary _defaultHeaderMap = new Dictionary(); - /// /// Initializes a new instance of the class. /// /// The base path. public ApiClient(String basePath="https://app.quantimo.do/api/v2") { - BasePath = basePath; - RestClient = new RestClient(BasePath); + if (String.IsNullOrEmpty(basePath)) + throw new ArgumentException("basePath cannot be empty"); + + RestClient = new RestClient(basePath); } - + /// - /// Gets or sets the base path. + /// Gets or sets the default API client for making HTTP calls. /// - /// The base path - public string BasePath { get; set; } + /// The default API client. + public static ApiClient Default = new ApiClient(); /// /// Gets or sets the RestClient. @@ -43,38 +42,14 @@ public ApiClient(String basePath="https://app.quantimo.do/api/v2") /// An instance of the RestClient public RestClient RestClient { get; set; } - /// - /// Gets the default header. - /// - public Dictionary DefaultHeader - { - get { return _defaultHeaderMap; } - } - - /// - /// Gets the status code of the previous request - /// - public int StatusCode { get; private set; } - - /// - /// Gets the response headers of the previous request - /// - public Dictionary ResponseHeaders { get; private set; } - // Creates and sets up a RestRequest prior to a call. private RestRequest PrepareRequest( String path, RestSharp.Method method, Dictionary queryParams, String postBody, Dictionary headerParams, Dictionary formParams, - Dictionary fileParams, Dictionary pathParams, String[] authSettings) + Dictionary fileParams, Dictionary pathParams) { var request = new RestRequest(path, method); - UpdateParamsForAuth(queryParams, headerParams, authSettings); - - // add default header, if any - foreach(var defaultHeader in _defaultHeaderMap) - request.AddHeader(defaultHeader.Key, defaultHeader.Value); - // add path parameter, if any foreach(var param in pathParams) request.AddParameter(param.Key, param.Value, ParameterType.UrlSegment); @@ -112,18 +87,15 @@ private RestRequest PrepareRequest( /// Form parameters. /// File parameters. /// Path parameters. - /// Authentication settings. /// Object public Object CallApi( String path, RestSharp.Method method, Dictionary queryParams, String postBody, Dictionary headerParams, Dictionary formParams, - Dictionary fileParams, Dictionary pathParams, String[] authSettings) + Dictionary fileParams, Dictionary pathParams) { var request = PrepareRequest( - path, method, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + path, method, queryParams, postBody, headerParams, formParams, fileParams, pathParams); var response = RestClient.Execute(request); - StatusCode = (int) response.StatusCode; - ResponseHeaders = response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()); return (Object) response; } @@ -138,32 +110,18 @@ public Object CallApi( /// Form parameters. /// File parameters. /// Path parameters. - /// Authentication settings. /// The Task instance. public async System.Threading.Tasks.Task CallApiAsync( String path, RestSharp.Method method, Dictionary queryParams, String postBody, Dictionary headerParams, Dictionary formParams, - Dictionary fileParams, Dictionary pathParams, String[] authSettings) + Dictionary fileParams, Dictionary pathParams) { var request = PrepareRequest( - path, method, queryParams, postBody, headerParams, formParams, fileParams, pathParams, authSettings); + path, method, queryParams, postBody, headerParams, formParams, fileParams, pathParams); var response = await RestClient.ExecuteTaskAsync(request); - StatusCode = (int)response.StatusCode; - ResponseHeaders = response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()); return (Object)response; } - /// - /// Add default header. - /// - /// Header field name. - /// Header field value. - /// - public void AddDefaultHeader(string key, string value) - { - _defaultHeaderMap.Add(key, value); - } - /// /// Escape string (url-encoded). /// @@ -171,7 +129,7 @@ public void AddDefaultHeader(string key, string value) /// Escaped string. public string EscapeString(string str) { - return RestSharp.Extensions.StringExtensions.UrlEncode(str); + return UrlEncode(str); } /// @@ -183,9 +141,9 @@ public string EscapeString(string str) public FileParameter ParameterToFile(string name, Stream stream) { if (stream is FileStream) - return FileParameter.Create(name, stream.ReadAsBytes(), Path.GetFileName(((FileStream)stream).Name)); + return FileParameter.Create(name, ReadAsBytes(stream), Path.GetFileName(((FileStream)stream).Name)); else - return FileParameter.Create(name, stream.ReadAsBytes(), "no_file_name_provided"); + return FileParameter.Create(name, ReadAsBytes(stream), "no_file_name_provided"); } /// @@ -199,10 +157,12 @@ public string ParameterToString(object obj) { if (obj is DateTime) return ((DateTime)obj).ToString ("u"); - else if (obj is IList) { + else if (obj is IList) + { string flattenString = ""; string separator = ","; - foreach (var param in (IList)obj) { + foreach (var param in (IList)obj) + { flattenString += param.ToString() + separator; } return flattenString.Remove(flattenString.Length - 1);; @@ -285,51 +245,6 @@ public string Serialize(object obj) } } - /// - /// Get the API key with prefix. - /// - /// API key identifier (authentication scheme). - /// API key with prefix. - public string GetApiKeyWithPrefix (string apiKeyIdentifier) - { - var apiKeyValue = ""; - Configuration.ApiKey.TryGetValue (apiKeyIdentifier, out apiKeyValue); - var apiKeyPrefix = ""; - if (Configuration.ApiKeyPrefix.TryGetValue (apiKeyIdentifier, out apiKeyPrefix)) - return apiKeyPrefix + " " + apiKeyValue; - else - return apiKeyValue; - } - - /// - /// Update parameters based on authentication. - /// - /// Query parameters. - /// Header parameters. - /// Authentication settings. - public void UpdateParamsForAuth(Dictionary queryParams, Dictionary headerParams, string[] authSettings) - { - if (authSettings == null || authSettings.Length == 0) - return; - - foreach (string auth in authSettings) - { - // determine which one to use - switch(auth) - { - - case "quantimodo_oauth2": - - //TODO support oauth - break; - - default: - //TODO show warning about security definition not found - break; - } - } - } - /// /// Select the Accept header's value from the given accepts array: /// if JSON exists in the given array, use it; @@ -337,11 +252,14 @@ public void UpdateParamsForAuth(Dictionary queryParams, Dictiona /// /// The accepts array to select from. /// The Accept header to use. - public String SelectHeaderAccept(String[] accepts) { + public String SelectHeaderAccept(String[] accepts) + { if (accepts.Length == 0) return null; + if (accepts.Contains("application/json", StringComparer.OrdinalIgnoreCase)) return "application/json"; + return String.Join(",", accepts); } @@ -352,8 +270,7 @@ public String SelectHeaderAccept(String[] accepts) { /// Encoded string. public static string Base64Encode(string text) { - var textByte = System.Text.Encoding.UTF8.GetBytes(text); - return System.Convert.ToBase64String(textByte); + return System.Convert.ToBase64String(System.Text.Encoding.UTF8.GetBytes(text)); } /// @@ -363,9 +280,66 @@ public static string Base64Encode(string text) /// Object to be casted /// Target type /// Casted object - public static dynamic ConvertType(dynamic source, Type dest) { + public static dynamic ConvertType(dynamic source, Type dest) + { return Convert.ChangeType(source, dest); } + + /// + /// Convert stream to byte array + /// Credit/Ref: http://stackoverflow.com/a/221941/677735 + /// + /// Input stream to be converted + /// Byte array + public static byte[] ReadAsBytes(Stream input) + { + byte[] buffer = new byte[16*1024]; + using (MemoryStream ms = new MemoryStream()) + { + int read; + while ((read = input.Read(buffer, 0, buffer.Length)) > 0) + { + ms.Write(buffer, 0, read); + } + return ms.ToArray(); + } + } + + /// + /// URL encode a string + /// Credit/Ref: https://github.com/restsharp/RestSharp/blob/master/RestSharp/Extensions/StringExtensions.cs#L50 + /// + /// String to be URL encoded + /// Byte array + public static string UrlEncode(string input) + { + const int maxLength = 32766; + + if (input == null) + { + throw new ArgumentNullException("input"); + } + + if (input.Length <= maxLength) + { + return Uri.EscapeDataString(input); + } + + StringBuilder sb = new StringBuilder(input.Length * 2); + int index = 0; + + while (index < input.Length) + { + int length = Math.Min(input.Length - index, maxLength); + string subString = input.Substring(index, length); + + sb.Append(Uri.EscapeDataString(subString)); + index += subString.Length; + } + + return sb.ToString(); + } + } } diff --git a/src/main/csharp/io/swagger/client/ApiException.cs b/src/main/csharp/io/swagger/client/ApiException.cs index addfc83..2410626 100644 --- a/src/main/csharp/io/swagger/client/ApiException.cs +++ b/src/main/csharp/io/swagger/client/ApiException.cs @@ -1,47 +1,50 @@ using System; -namespace IO.Swagger.Client { - /// - /// API Exception - /// - public class ApiException : Exception { - /// - /// Gets or sets the error code (HTTP status code) - /// - /// The error code (HTTP status code). - public int ErrorCode { get; set; } - - /// - /// Gets or sets the error content (body json object) - /// - /// The error content (Http response body). - public dynamic ErrorContent { get; private set; } - - /// - /// Initializes a new instance of the class. - /// - public ApiException() {} - - /// - /// Initializes a new instance of the class. - /// - /// HTTP status code. - /// Error message. - public ApiException(int errorCode, string message) : base(message) { - this.ErrorCode = errorCode; - } - - /// - /// Initializes a new instance of the class. - /// - /// HTTP status code. - /// Error message. - /// Error content. - public ApiException(int errorCode, string message, dynamic errorContent = null) : base(message) { - this.ErrorCode = errorCode; - this.ErrorContent = errorContent; - } - - } - +namespace IO.Swagger.Client +{ + /// + /// API Exception + /// + public class ApiException : Exception + { + /// + /// Gets or sets the error code (HTTP status code) + /// + /// The error code (HTTP status code). + public int ErrorCode { get; set; } + + /// + /// Gets or sets the error content (body json object) + /// + /// The error content (Http response body). + public dynamic ErrorContent { get; private set; } + + /// + /// Initializes a new instance of the class. + /// + public ApiException() {} + + /// + /// Initializes a new instance of the class. + /// + /// HTTP status code. + /// Error message. + public ApiException(int errorCode, string message) : base(message) + { + this.ErrorCode = errorCode; + } + + /// + /// Initializes a new instance of the class. + /// + /// HTTP status code. + /// Error message. + /// Error content. + public ApiException(int errorCode, string message, dynamic errorContent = null) : base(message) + { + this.ErrorCode = errorCode; + this.ErrorContent = errorContent; + } + } + } diff --git a/src/main/csharp/io/swagger/client/ApiResponse.cs b/src/main/csharp/io/swagger/client/ApiResponse.cs new file mode 100644 index 0000000..1573571 --- /dev/null +++ b/src/main/csharp/io/swagger/client/ApiResponse.cs @@ -0,0 +1,44 @@ +using System; +using System.Collections.Generic; + +namespace IO.Swagger.Client +{ + /// + /// API Response + /// + public class ApiResponse + { + /// + /// Gets or sets the status code (HTTP status code) + /// + /// The status code. + public int StatusCode { get; private set; } + + /// + /// Gets or sets the HTTP headers + /// + /// HTTP headers + public IDictionary Headers { get; private set; } + + /// + /// Gets or sets the data (parsed HTTP body) + /// + /// The data. + public T Data { get; private set; } + + /// + /// Initializes a new instance of the class. + /// + /// HTTP status code. + /// Error message. + /// Data (parsed HTTP body) + public ApiResponse(int statusCode, IDictionary headers, T data) + { + this.StatusCode= statusCode; + this.Headers = headers; + this.Data = data; + } + + } + +} diff --git a/src/main/csharp/io/swagger/client/Configuration.cs b/src/main/csharp/io/swagger/client/Configuration.cs index e7cc199..6affec1 100644 --- a/src/main/csharp/io/swagger/client/Configuration.cs +++ b/src/main/csharp/io/swagger/client/Configuration.cs @@ -12,6 +12,17 @@ namespace IO.Swagger.Client /// public class Configuration { + /// + /// Initializes a new instance of the Configuration class. + /// + /// Api client. + public Configuration(ApiClient apiClient=null) + { + if (apiClient == null) + ApiClient = ApiClient.Default; + else + ApiClient = apiClient; + } /// /// Version of the package. @@ -19,35 +30,84 @@ public class Configuration /// Version of the package. public const string Version = "1.0.0"; + /// + /// Gets or sets the default Configuration. + /// + /// Configuration. + public static Configuration Default = new Configuration(); + /// /// Gets or sets the default API client for making HTTP calls. /// /// The API client. - public static ApiClient DefaultApiClient = new ApiClient(); - + public ApiClient ApiClient; + + private readonly Dictionary _defaultHeaderMap = new Dictionary(); + + /// + /// Gets the default header. + /// + public Dictionary DefaultHeader + { + get { return _defaultHeaderMap; } + } + + /// + /// Add default header. + /// + /// Header field name. + /// Header field value. + /// + public void AddDefaultHeader(string key, string value) + { + _defaultHeaderMap.Add(key, value); + } + /// /// Gets or sets the username (HTTP basic authentication). /// /// The username. - public static String Username { get; set; } + public String Username { get; set; } /// /// Gets or sets the password (HTTP basic authentication). /// /// The password. - public static String Password { get; set; } + public String Password { get; set; } + /// + /// Gets or sets the access token for OAuth2 authentication. + /// + /// The access token. + public String AccessToken { get; set; } + /// /// Gets or sets the API key based on the authentication name. /// /// The API key. - public static Dictionary ApiKey = new Dictionary(); + public Dictionary ApiKey = new Dictionary(); /// /// Gets or sets the prefix (e.g. Token) of the API key based on the authentication name. /// /// The prefix of the API key. - public static Dictionary ApiKeyPrefix = new Dictionary(); + public Dictionary ApiKeyPrefix = new Dictionary(); + + /// + /// Get the API key with prefix. + /// + /// API key identifier (authentication scheme). + /// API key with prefix. + public string GetApiKeyWithPrefix (string apiKeyIdentifier) + { + var apiKeyValue = ""; + ApiKey.TryGetValue (apiKeyIdentifier, out apiKeyValue); + var apiKeyPrefix = ""; + if (ApiKeyPrefix.TryGetValue (apiKeyIdentifier, out apiKeyPrefix)) + return apiKeyPrefix + " " + apiKeyValue; + else + return apiKeyValue; + } private static string _tempFolderPath = Path.GetTempPath(); From 9f6bc9587a6cc50ab889a8adde024853ff9cd37c Mon Sep 17 00:00:00 2001 From: "Mike P. Sinn" Date: Sun, 27 Dec 2015 21:26:26 -0600 Subject: [PATCH 2/3] SDK Update --- .../csharp/io/swagger/Api/OrganizationApi.cs | 1868 +++++++++++++---- src/main/csharp/io/swagger/Api/SourceApi.cs | 132 +- .../io/swagger/Api/TrackingReminderApi.cs | 1238 +++++++++++ src/main/csharp/io/swagger/Api/UnitApi.cs | 132 +- .../csharp/io/swagger/Api/UnitCategoryApi.cs | 132 +- src/main/csharp/io/swagger/Api/UpdateApi.cs | 132 +- .../csharp/io/swagger/Api/UserVariableApi.cs | 132 +- .../Api/UserVariableRelationshipApi.cs | 132 +- src/main/csharp/io/swagger/Api/VariableApi.cs | 132 +- .../io/swagger/Api/VariableCategoryApi.cs | 132 +- .../io/swagger/Api/VariableUserSourceApi.cs | 132 +- src/main/csharp/io/swagger/Api/VoteApi.cs | 132 +- .../io/swagger/Model/AggregatedCorrelation.cs | 8 + .../Model/CommonVariableRelationship.cs | 8 + .../csharp/io/swagger/Model/Connection.cs | 8 + src/main/csharp/io/swagger/Model/Connector.cs | 8 + .../csharp/io/swagger/Model/Correlation.cs | 8 + .../csharp/io/swagger/Model/Credential.cs | 8 + .../io/swagger/Model/InlineResponse200.cs | 8 + .../io/swagger/Model/InlineResponse2001.cs | 8 + .../io/swagger/Model/InlineResponse20010.cs | 8 + .../io/swagger/Model/InlineResponse20011.cs | 8 + .../io/swagger/Model/InlineResponse20012.cs | 8 + .../io/swagger/Model/InlineResponse20013.cs | 8 + .../io/swagger/Model/InlineResponse20014.cs | 8 + .../io/swagger/Model/InlineResponse20015.cs | 10 +- .../io/swagger/Model/InlineResponse20016.cs | 10 +- .../io/swagger/Model/InlineResponse20017.cs | 10 +- .../io/swagger/Model/InlineResponse20018.cs | 12 +- .../io/swagger/Model/InlineResponse20019.cs | 10 +- .../io/swagger/Model/InlineResponse2002.cs | 8 + .../io/swagger/Model/InlineResponse20020.cs | 12 +- .../io/swagger/Model/InlineResponse20021.cs | 10 +- .../io/swagger/Model/InlineResponse20022.cs | 10 +- .../io/swagger/Model/InlineResponse20023.cs | 10 +- .../io/swagger/Model/InlineResponse20024.cs | 10 +- .../io/swagger/Model/InlineResponse20025.cs | 10 +- .../io/swagger/Model/InlineResponse20026.cs | 12 +- .../io/swagger/Model/InlineResponse20027.cs | 12 +- .../io/swagger/Model/InlineResponse20028.cs | 10 +- .../io/swagger/Model/InlineResponse20029.cs | 12 +- .../io/swagger/Model/InlineResponse2003.cs | 8 + .../io/swagger/Model/InlineResponse20030.cs | 10 +- .../io/swagger/Model/InlineResponse20031.cs | 10 +- .../io/swagger/Model/InlineResponse20032.cs | 10 +- .../io/swagger/Model/InlineResponse20033.cs | 12 +- .../io/swagger/Model/InlineResponse20034.cs | 12 +- .../io/swagger/Model/InlineResponse20035.cs | 125 ++ .../io/swagger/Model/InlineResponse20036.cs | 125 ++ .../io/swagger/Model/InlineResponse2004.cs | 8 + .../io/swagger/Model/InlineResponse2005.cs | 8 + .../io/swagger/Model/InlineResponse2006.cs | 8 + .../io/swagger/Model/InlineResponse2007.cs | 8 + .../io/swagger/Model/InlineResponse2008.cs | 8 + .../io/swagger/Model/InlineResponse2009.cs | 8 + .../csharp/io/swagger/Model/Measurement.cs | 8 + .../io/swagger/Model/MeasurementExport.cs | 8 + .../io/swagger/Model/MeasurementPost.cs | 8 + .../io/swagger/Model/MeasurementValue.cs | 8 + src/main/csharp/io/swagger/Model/Source.cs | 8 + .../io/swagger/Model/TrackingReminder.cs | 382 ++++ src/main/csharp/io/swagger/Model/Unit.cs | 8 + .../csharp/io/swagger/Model/UnitCategory.cs | 8 + .../csharp/io/swagger/Model/UnitConversion.cs | 8 + src/main/csharp/io/swagger/Model/Update.cs | 8 + .../csharp/io/swagger/Model/UserVariable.cs | 42 + .../swagger/Model/UserVariableRelationship.cs | 8 + src/main/csharp/io/swagger/Model/Variable.cs | 8 + .../io/swagger/Model/VariableCategory.cs | 8 + .../io/swagger/Model/VariableUserSource.cs | 8 + src/main/csharp/io/swagger/Model/Vote.cs | 8 + .../csharp/io/swagger/client/ApiClient.cs | 71 +- .../csharp/io/swagger/client/Configuration.cs | 109 +- 73 files changed, 4689 insertions(+), 1085 deletions(-) create mode 100644 src/main/csharp/io/swagger/Api/TrackingReminderApi.cs create mode 100644 src/main/csharp/io/swagger/Model/InlineResponse20035.cs create mode 100644 src/main/csharp/io/swagger/Model/InlineResponse20036.cs create mode 100644 src/main/csharp/io/swagger/Model/TrackingReminder.cs diff --git a/src/main/csharp/io/swagger/Api/OrganizationApi.cs b/src/main/csharp/io/swagger/Api/OrganizationApi.cs index a884f6f..cae5c10 100644 --- a/src/main/csharp/io/swagger/Api/OrganizationApi.cs +++ b/src/main/csharp/io/swagger/Api/OrganizationApi.cs @@ -295,6 +295,70 @@ public interface IOrganizationApi /// Task of ApiResponse (InlineResponse20013) System.Threading.Tasks.Task> OrganizationMeasurementsGetAsyncWithHttpInfo (string accessToken = null, string clientId = null, int? connectorId = null, int? variableId = null, int? sourceId = null, string startTime = null, double? value = null, int? unitId = null, double? originalValue = null, int? originalUnitId = null, int? duration = null, string note = null, double? latitude = null, double? longitude = null, string location = null, string createdAt = null, string updatedAt = null, string error = null, int? limit = null, int? offset = null, string sort = null); + /// + /// Get tracking reminders + /// + /// + /// Get the variable id, frequency, and default value for the user tracking reminders + /// + /// User's OAuth2 access token + /// The ID of the client application which last created or updated this trackingReminder + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// InlineResponse20015 + InlineResponse20015 OrganizationTrackingRemindersGet (string accessToken = null, string clientId = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Get tracking reminders + /// + /// + /// Get the variable id, frequency, and default value for the user tracking reminders + /// + /// User's OAuth2 access token + /// The ID of the client application which last created or updated this trackingReminder + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// ApiResponse of InlineResponse20015 + ApiResponse OrganizationTrackingRemindersGetWithHttpInfo (string accessToken = null, string clientId = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Get tracking reminders + /// + /// + /// Get the variable id, frequency, and default value for the user tracking reminders + /// + /// User's OAuth2 access token + /// The ID of the client application which last created or updated this trackingReminder + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of InlineResponse20015 + System.Threading.Tasks.Task OrganizationTrackingRemindersGetAsync (string accessToken = null, string clientId = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Get tracking reminders + /// + /// + /// Get the variable id, frequency, and default value for the user tracking reminders + /// + /// User's OAuth2 access token + /// The ID of the client application which last created or updated this trackingReminder + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of ApiResponse (InlineResponse20015) + System.Threading.Tasks.Task> OrganizationTrackingRemindersGetAsyncWithHttpInfo (string accessToken = null, string clientId = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); + /// /// Get all Updates /// @@ -311,8 +375,8 @@ public interface IOrganizationApi /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// InlineResponse20015 - InlineResponse20015 OrganizationUpdatesGet (string accessToken = null, int? connectorId = null, int? numberOfMeasurements = null, bool? success = null, string message = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); + /// InlineResponse20016 + InlineResponse20016 OrganizationUpdatesGet (string accessToken = null, int? connectorId = null, int? numberOfMeasurements = null, bool? success = null, string message = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); /// /// Get all Updates @@ -330,8 +394,8 @@ public interface IOrganizationApi /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// ApiResponse of InlineResponse20015 - ApiResponse OrganizationUpdatesGetWithHttpInfo (string accessToken = null, int? connectorId = null, int? numberOfMeasurements = null, bool? success = null, string message = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); + /// ApiResponse of InlineResponse20016 + ApiResponse OrganizationUpdatesGetWithHttpInfo (string accessToken = null, int? connectorId = null, int? numberOfMeasurements = null, bool? success = null, string message = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); /// /// Get all Updates @@ -349,8 +413,8 @@ public interface IOrganizationApi /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// Task of InlineResponse20015 - System.Threading.Tasks.Task OrganizationUpdatesGetAsync (string accessToken = null, int? connectorId = null, int? numberOfMeasurements = null, bool? success = null, string message = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); + /// Task of InlineResponse20016 + System.Threading.Tasks.Task OrganizationUpdatesGetAsync (string accessToken = null, int? connectorId = null, int? numberOfMeasurements = null, bool? success = null, string message = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); /// /// Get all Updates @@ -368,8 +432,124 @@ public interface IOrganizationApi /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// Task of ApiResponse (InlineResponse20015) - System.Threading.Tasks.Task> OrganizationUpdatesGetAsyncWithHttpInfo (string accessToken = null, int? connectorId = null, int? numberOfMeasurements = null, bool? success = null, string message = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); + /// Task of ApiResponse (InlineResponse20016) + System.Threading.Tasks.Task> OrganizationUpdatesGetAsyncWithHttpInfo (string accessToken = null, int? connectorId = null, int? numberOfMeasurements = null, bool? success = null, string message = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Get all UserVariableRelationships + /// + /// + /// Get all UserVariableRelationships + /// + /// User's OAuth2 access token + /// id + /// Our confidence that a consistent predictive relationship exists based on the amount of evidence, reproducibility, and other factors + /// A quantitative representation of our confidence that a consistent predictive relationship exists based on the amount of evidence, reproducibility, and other factors + /// Direction is positive if higher predictor values generally precede higher outcome values. Direction is negative if higher predictor values generally precede lower outcome values. + /// Estimated number of seconds following the onset delay in which a stimulus produces a perceivable effect + /// error_message + /// Estimated number of seconds that pass before a stimulus produces a perceivable effect + /// Variable ID for the outcome variable + /// Variable ID for the predictor variable + /// ID for default unit of the predictor variable + /// A value representative of the relevance of this predictor relative to other predictors of this outcome. Usually used for relevancy sorting. + /// Can be weak, medium, or strong based on the size of the effect which the predictor appears to have on the outcome relative to other variable relationship strength scores. + /// A value represented to the size of the effect which the predictor appears to have on the outcome. + /// vote + /// Value for the predictor variable (in it's default unit) which typically precedes an above average outcome value + /// Value for the predictor variable (in it's default unit) which typically precedes a below average outcome value + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// InlineResponse20017 + InlineResponse20017 OrganizationUserVariableRelationshipsGet (string accessToken = null, int? id = null, string confidenceLevel = null, double? confidenceScore = null, string direction = null, int? durationOfAction = null, string errorMessage = null, int? onsetDelay = null, int? outcomeVariableId = null, int? predictorVariableId = null, int? predictorUnitId = null, double? sinnRank = null, string strengthLevel = null, double? strengthScore = null, string vote = null, double? valuePredictingHighOutcome = null, double? valuePredictingLowOutcome = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Get all UserVariableRelationships + /// + /// + /// Get all UserVariableRelationships + /// + /// User's OAuth2 access token + /// id + /// Our confidence that a consistent predictive relationship exists based on the amount of evidence, reproducibility, and other factors + /// A quantitative representation of our confidence that a consistent predictive relationship exists based on the amount of evidence, reproducibility, and other factors + /// Direction is positive if higher predictor values generally precede higher outcome values. Direction is negative if higher predictor values generally precede lower outcome values. + /// Estimated number of seconds following the onset delay in which a stimulus produces a perceivable effect + /// error_message + /// Estimated number of seconds that pass before a stimulus produces a perceivable effect + /// Variable ID for the outcome variable + /// Variable ID for the predictor variable + /// ID for default unit of the predictor variable + /// A value representative of the relevance of this predictor relative to other predictors of this outcome. Usually used for relevancy sorting. + /// Can be weak, medium, or strong based on the size of the effect which the predictor appears to have on the outcome relative to other variable relationship strength scores. + /// A value represented to the size of the effect which the predictor appears to have on the outcome. + /// vote + /// Value for the predictor variable (in it's default unit) which typically precedes an above average outcome value + /// Value for the predictor variable (in it's default unit) which typically precedes a below average outcome value + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// ApiResponse of InlineResponse20017 + ApiResponse OrganizationUserVariableRelationshipsGetWithHttpInfo (string accessToken = null, int? id = null, string confidenceLevel = null, double? confidenceScore = null, string direction = null, int? durationOfAction = null, string errorMessage = null, int? onsetDelay = null, int? outcomeVariableId = null, int? predictorVariableId = null, int? predictorUnitId = null, double? sinnRank = null, string strengthLevel = null, double? strengthScore = null, string vote = null, double? valuePredictingHighOutcome = null, double? valuePredictingLowOutcome = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Get all UserVariableRelationships + /// + /// + /// Get all UserVariableRelationships + /// + /// User's OAuth2 access token + /// id + /// Our confidence that a consistent predictive relationship exists based on the amount of evidence, reproducibility, and other factors + /// A quantitative representation of our confidence that a consistent predictive relationship exists based on the amount of evidence, reproducibility, and other factors + /// Direction is positive if higher predictor values generally precede higher outcome values. Direction is negative if higher predictor values generally precede lower outcome values. + /// Estimated number of seconds following the onset delay in which a stimulus produces a perceivable effect + /// error_message + /// Estimated number of seconds that pass before a stimulus produces a perceivable effect + /// Variable ID for the outcome variable + /// Variable ID for the predictor variable + /// ID for default unit of the predictor variable + /// A value representative of the relevance of this predictor relative to other predictors of this outcome. Usually used for relevancy sorting. + /// Can be weak, medium, or strong based on the size of the effect which the predictor appears to have on the outcome relative to other variable relationship strength scores. + /// A value represented to the size of the effect which the predictor appears to have on the outcome. + /// vote + /// Value for the predictor variable (in it's default unit) which typically precedes an above average outcome value + /// Value for the predictor variable (in it's default unit) which typically precedes a below average outcome value + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of InlineResponse20017 + System.Threading.Tasks.Task OrganizationUserVariableRelationshipsGetAsync (string accessToken = null, int? id = null, string confidenceLevel = null, double? confidenceScore = null, string direction = null, int? durationOfAction = null, string errorMessage = null, int? onsetDelay = null, int? outcomeVariableId = null, int? predictorVariableId = null, int? predictorUnitId = null, double? sinnRank = null, string strengthLevel = null, double? strengthScore = null, string vote = null, double? valuePredictingHighOutcome = null, double? valuePredictingLowOutcome = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Get all UserVariableRelationships + /// + /// + /// Get all UserVariableRelationships + /// + /// User's OAuth2 access token + /// id + /// Our confidence that a consistent predictive relationship exists based on the amount of evidence, reproducibility, and other factors + /// A quantitative representation of our confidence that a consistent predictive relationship exists based on the amount of evidence, reproducibility, and other factors + /// Direction is positive if higher predictor values generally precede higher outcome values. Direction is negative if higher predictor values generally precede lower outcome values. + /// Estimated number of seconds following the onset delay in which a stimulus produces a perceivable effect + /// error_message + /// Estimated number of seconds that pass before a stimulus produces a perceivable effect + /// Variable ID for the outcome variable + /// Variable ID for the predictor variable + /// ID for default unit of the predictor variable + /// A value representative of the relevance of this predictor relative to other predictors of this outcome. Usually used for relevancy sorting. + /// Can be weak, medium, or strong based on the size of the effect which the predictor appears to have on the outcome relative to other variable relationship strength scores. + /// A value represented to the size of the effect which the predictor appears to have on the outcome. + /// vote + /// Value for the predictor variable (in it's default unit) which typically precedes an above average outcome value + /// Value for the predictor variable (in it's default unit) which typically precedes a below average outcome value + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of ApiResponse (InlineResponse20017) + System.Threading.Tasks.Task> OrganizationUserVariableRelationshipsGetAsyncWithHttpInfo (string accessToken = null, int? id = null, string confidenceLevel = null, double? confidenceScore = null, string direction = null, int? durationOfAction = null, string errorMessage = null, int? onsetDelay = null, int? outcomeVariableId = null, int? predictorVariableId = null, int? predictorUnitId = null, double? sinnRank = null, string strengthLevel = null, double? strengthScore = null, string vote = null, double? valuePredictingHighOutcome = null, double? valuePredictingLowOutcome = null, int? limit = null, int? offset = null, string sort = null); /// /// Get all UserVariables @@ -434,8 +614,8 @@ public interface IOrganizationApi /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// InlineResponse20016 - InlineResponse20016 OrganizationUserVariablesGet (string accessToken = null, string clientId = null, int? parentId = null, int? variableId = null, int? defaultUnitId = null, double? minimumAllowedValue = null, double? maximumAllowedValue = null, double? fillingValue = null, int? joinWith = null, int? onsetDelay = null, int? durationOfAction = null, int? variableCategoryId = null, int? updated = null, int? _public = null, bool? causeOnly = null, string fillingType = null, int? numberOfMeasurements = null, int? numberOfProcessedMeasurements = null, int? measurementsAtLastAnalysis = null, int? lastUnitId = null, int? lastOriginalUnitId = null, int? lastOriginalValue = null, double? lastValue = null, double? lastOriginalValue2 = null, int? lastSourceId = null, int? numberOfCorrelations = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, double? standardDeviation = null, double? variance = null, double? minimumRecordedValue = null, double? maximumRecordedValue = null, double? mean = null, double? median = null, int? mostCommonUnitId = null, double? mostCommonValue = null, double? numberOfUniqueDailyValues = null, int? numberOfChanges = null, double? skewness = null, double? kurtosis = null, double? latitude = null, double? longitude = null, string location = null, string createdAt = null, string updatedAt = null, bool? outcome = null, string sources = null, int? earliestSourceTime = null, int? latestSourceTime = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, int? earliestFillingTime = null, int? latestFillingTime = null, int? limit = null, int? offset = null, string sort = null); + /// InlineResponse20018 + InlineResponse20018 OrganizationUserVariablesGet (string accessToken = null, string clientId = null, int? parentId = null, int? variableId = null, int? defaultUnitId = null, double? minimumAllowedValue = null, double? maximumAllowedValue = null, double? fillingValue = null, int? joinWith = null, int? onsetDelay = null, int? durationOfAction = null, int? variableCategoryId = null, int? updated = null, int? _public = null, bool? causeOnly = null, string fillingType = null, int? numberOfMeasurements = null, int? numberOfProcessedMeasurements = null, int? measurementsAtLastAnalysis = null, int? lastUnitId = null, int? lastOriginalUnitId = null, int? lastOriginalValue = null, double? lastValue = null, double? lastOriginalValue2 = null, int? lastSourceId = null, int? numberOfCorrelations = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, double? standardDeviation = null, double? variance = null, double? minimumRecordedValue = null, double? maximumRecordedValue = null, double? mean = null, double? median = null, int? mostCommonUnitId = null, double? mostCommonValue = null, double? numberOfUniqueDailyValues = null, int? numberOfChanges = null, double? skewness = null, double? kurtosis = null, double? latitude = null, double? longitude = null, string location = null, string createdAt = null, string updatedAt = null, bool? outcome = null, string sources = null, int? earliestSourceTime = null, int? latestSourceTime = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, int? earliestFillingTime = null, int? latestFillingTime = null, int? limit = null, int? offset = null, string sort = null); /// /// Get all UserVariables @@ -500,8 +680,8 @@ public interface IOrganizationApi /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// ApiResponse of InlineResponse20016 - ApiResponse OrganizationUserVariablesGetWithHttpInfo (string accessToken = null, string clientId = null, int? parentId = null, int? variableId = null, int? defaultUnitId = null, double? minimumAllowedValue = null, double? maximumAllowedValue = null, double? fillingValue = null, int? joinWith = null, int? onsetDelay = null, int? durationOfAction = null, int? variableCategoryId = null, int? updated = null, int? _public = null, bool? causeOnly = null, string fillingType = null, int? numberOfMeasurements = null, int? numberOfProcessedMeasurements = null, int? measurementsAtLastAnalysis = null, int? lastUnitId = null, int? lastOriginalUnitId = null, int? lastOriginalValue = null, double? lastValue = null, double? lastOriginalValue2 = null, int? lastSourceId = null, int? numberOfCorrelations = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, double? standardDeviation = null, double? variance = null, double? minimumRecordedValue = null, double? maximumRecordedValue = null, double? mean = null, double? median = null, int? mostCommonUnitId = null, double? mostCommonValue = null, double? numberOfUniqueDailyValues = null, int? numberOfChanges = null, double? skewness = null, double? kurtosis = null, double? latitude = null, double? longitude = null, string location = null, string createdAt = null, string updatedAt = null, bool? outcome = null, string sources = null, int? earliestSourceTime = null, int? latestSourceTime = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, int? earliestFillingTime = null, int? latestFillingTime = null, int? limit = null, int? offset = null, string sort = null); + /// ApiResponse of InlineResponse20018 + ApiResponse OrganizationUserVariablesGetWithHttpInfo (string accessToken = null, string clientId = null, int? parentId = null, int? variableId = null, int? defaultUnitId = null, double? minimumAllowedValue = null, double? maximumAllowedValue = null, double? fillingValue = null, int? joinWith = null, int? onsetDelay = null, int? durationOfAction = null, int? variableCategoryId = null, int? updated = null, int? _public = null, bool? causeOnly = null, string fillingType = null, int? numberOfMeasurements = null, int? numberOfProcessedMeasurements = null, int? measurementsAtLastAnalysis = null, int? lastUnitId = null, int? lastOriginalUnitId = null, int? lastOriginalValue = null, double? lastValue = null, double? lastOriginalValue2 = null, int? lastSourceId = null, int? numberOfCorrelations = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, double? standardDeviation = null, double? variance = null, double? minimumRecordedValue = null, double? maximumRecordedValue = null, double? mean = null, double? median = null, int? mostCommonUnitId = null, double? mostCommonValue = null, double? numberOfUniqueDailyValues = null, int? numberOfChanges = null, double? skewness = null, double? kurtosis = null, double? latitude = null, double? longitude = null, string location = null, string createdAt = null, string updatedAt = null, bool? outcome = null, string sources = null, int? earliestSourceTime = null, int? latestSourceTime = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, int? earliestFillingTime = null, int? latestFillingTime = null, int? limit = null, int? offset = null, string sort = null); /// /// Get all UserVariables @@ -566,8 +746,8 @@ public interface IOrganizationApi /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// Task of InlineResponse20016 - System.Threading.Tasks.Task OrganizationUserVariablesGetAsync (string accessToken = null, string clientId = null, int? parentId = null, int? variableId = null, int? defaultUnitId = null, double? minimumAllowedValue = null, double? maximumAllowedValue = null, double? fillingValue = null, int? joinWith = null, int? onsetDelay = null, int? durationOfAction = null, int? variableCategoryId = null, int? updated = null, int? _public = null, bool? causeOnly = null, string fillingType = null, int? numberOfMeasurements = null, int? numberOfProcessedMeasurements = null, int? measurementsAtLastAnalysis = null, int? lastUnitId = null, int? lastOriginalUnitId = null, int? lastOriginalValue = null, double? lastValue = null, double? lastOriginalValue2 = null, int? lastSourceId = null, int? numberOfCorrelations = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, double? standardDeviation = null, double? variance = null, double? minimumRecordedValue = null, double? maximumRecordedValue = null, double? mean = null, double? median = null, int? mostCommonUnitId = null, double? mostCommonValue = null, double? numberOfUniqueDailyValues = null, int? numberOfChanges = null, double? skewness = null, double? kurtosis = null, double? latitude = null, double? longitude = null, string location = null, string createdAt = null, string updatedAt = null, bool? outcome = null, string sources = null, int? earliestSourceTime = null, int? latestSourceTime = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, int? earliestFillingTime = null, int? latestFillingTime = null, int? limit = null, int? offset = null, string sort = null); + /// Task of InlineResponse20018 + System.Threading.Tasks.Task OrganizationUserVariablesGetAsync (string accessToken = null, string clientId = null, int? parentId = null, int? variableId = null, int? defaultUnitId = null, double? minimumAllowedValue = null, double? maximumAllowedValue = null, double? fillingValue = null, int? joinWith = null, int? onsetDelay = null, int? durationOfAction = null, int? variableCategoryId = null, int? updated = null, int? _public = null, bool? causeOnly = null, string fillingType = null, int? numberOfMeasurements = null, int? numberOfProcessedMeasurements = null, int? measurementsAtLastAnalysis = null, int? lastUnitId = null, int? lastOriginalUnitId = null, int? lastOriginalValue = null, double? lastValue = null, double? lastOriginalValue2 = null, int? lastSourceId = null, int? numberOfCorrelations = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, double? standardDeviation = null, double? variance = null, double? minimumRecordedValue = null, double? maximumRecordedValue = null, double? mean = null, double? median = null, int? mostCommonUnitId = null, double? mostCommonValue = null, double? numberOfUniqueDailyValues = null, int? numberOfChanges = null, double? skewness = null, double? kurtosis = null, double? latitude = null, double? longitude = null, string location = null, string createdAt = null, string updatedAt = null, bool? outcome = null, string sources = null, int? earliestSourceTime = null, int? latestSourceTime = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, int? earliestFillingTime = null, int? latestFillingTime = null, int? limit = null, int? offset = null, string sort = null); /// /// Get all UserVariables @@ -632,8 +812,160 @@ public interface IOrganizationApi /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// Task of ApiResponse (InlineResponse20016) - System.Threading.Tasks.Task> OrganizationUserVariablesGetAsyncWithHttpInfo (string accessToken = null, string clientId = null, int? parentId = null, int? variableId = null, int? defaultUnitId = null, double? minimumAllowedValue = null, double? maximumAllowedValue = null, double? fillingValue = null, int? joinWith = null, int? onsetDelay = null, int? durationOfAction = null, int? variableCategoryId = null, int? updated = null, int? _public = null, bool? causeOnly = null, string fillingType = null, int? numberOfMeasurements = null, int? numberOfProcessedMeasurements = null, int? measurementsAtLastAnalysis = null, int? lastUnitId = null, int? lastOriginalUnitId = null, int? lastOriginalValue = null, double? lastValue = null, double? lastOriginalValue2 = null, int? lastSourceId = null, int? numberOfCorrelations = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, double? standardDeviation = null, double? variance = null, double? minimumRecordedValue = null, double? maximumRecordedValue = null, double? mean = null, double? median = null, int? mostCommonUnitId = null, double? mostCommonValue = null, double? numberOfUniqueDailyValues = null, int? numberOfChanges = null, double? skewness = null, double? kurtosis = null, double? latitude = null, double? longitude = null, string location = null, string createdAt = null, string updatedAt = null, bool? outcome = null, string sources = null, int? earliestSourceTime = null, int? latestSourceTime = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, int? earliestFillingTime = null, int? latestFillingTime = null, int? limit = null, int? offset = null, string sort = null); + /// Task of ApiResponse (InlineResponse20018) + System.Threading.Tasks.Task> OrganizationUserVariablesGetAsyncWithHttpInfo (string accessToken = null, string clientId = null, int? parentId = null, int? variableId = null, int? defaultUnitId = null, double? minimumAllowedValue = null, double? maximumAllowedValue = null, double? fillingValue = null, int? joinWith = null, int? onsetDelay = null, int? durationOfAction = null, int? variableCategoryId = null, int? updated = null, int? _public = null, bool? causeOnly = null, string fillingType = null, int? numberOfMeasurements = null, int? numberOfProcessedMeasurements = null, int? measurementsAtLastAnalysis = null, int? lastUnitId = null, int? lastOriginalUnitId = null, int? lastOriginalValue = null, double? lastValue = null, double? lastOriginalValue2 = null, int? lastSourceId = null, int? numberOfCorrelations = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, double? standardDeviation = null, double? variance = null, double? minimumRecordedValue = null, double? maximumRecordedValue = null, double? mean = null, double? median = null, int? mostCommonUnitId = null, double? mostCommonValue = null, double? numberOfUniqueDailyValues = null, int? numberOfChanges = null, double? skewness = null, double? kurtosis = null, double? latitude = null, double? longitude = null, string location = null, string createdAt = null, string updatedAt = null, bool? outcome = null, string sources = null, int? earliestSourceTime = null, int? latestSourceTime = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, int? earliestFillingTime = null, int? latestFillingTime = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Get all VariableUserSources + /// + /// + /// Get all VariableUserSources + /// + /// User's OAuth2 access token + /// ID of variable + /// Time that this measurement occurred Uses epoch minute (epoch time divided by 60) + /// Earliest measurement time + /// Latest measurement time + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// InlineResponse20019 + InlineResponse20019 OrganizationVariableUserSourcesGet (string accessToken = null, int? variableId = null, int? timestamp = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Get all VariableUserSources + /// + /// + /// Get all VariableUserSources + /// + /// User's OAuth2 access token + /// ID of variable + /// Time that this measurement occurred Uses epoch minute (epoch time divided by 60) + /// Earliest measurement time + /// Latest measurement time + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// ApiResponse of InlineResponse20019 + ApiResponse OrganizationVariableUserSourcesGetWithHttpInfo (string accessToken = null, int? variableId = null, int? timestamp = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Get all VariableUserSources + /// + /// + /// Get all VariableUserSources + /// + /// User's OAuth2 access token + /// ID of variable + /// Time that this measurement occurred Uses epoch minute (epoch time divided by 60) + /// Earliest measurement time + /// Latest measurement time + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of InlineResponse20019 + System.Threading.Tasks.Task OrganizationVariableUserSourcesGetAsync (string accessToken = null, int? variableId = null, int? timestamp = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Get all VariableUserSources + /// + /// + /// Get all VariableUserSources + /// + /// User's OAuth2 access token + /// ID of variable + /// Time that this measurement occurred Uses epoch minute (epoch time divided by 60) + /// Earliest measurement time + /// Latest measurement time + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of ApiResponse (InlineResponse20019) + System.Threading.Tasks.Task> OrganizationVariableUserSourcesGetAsyncWithHttpInfo (string accessToken = null, int? variableId = null, int? timestamp = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Get all Votes + /// + /// + /// Get all Votes + /// + /// User's OAuth2 access token + /// The ID of the client application which last created or updated this vote + /// ID of predictor variable + /// ID of outcome variable + /// Value of Vote. 1 is for upvote. 0 is for downvote. Otherwise, there is no vote. + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// InlineResponse20020 + InlineResponse20020 OrganizationVotesGet (string accessToken = null, string clientId = null, int? causeId = null, int? effectId = null, int? value = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Get all Votes + /// + /// + /// Get all Votes + /// + /// User's OAuth2 access token + /// The ID of the client application which last created or updated this vote + /// ID of predictor variable + /// ID of outcome variable + /// Value of Vote. 1 is for upvote. 0 is for downvote. Otherwise, there is no vote. + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// ApiResponse of InlineResponse20020 + ApiResponse OrganizationVotesGetWithHttpInfo (string accessToken = null, string clientId = null, int? causeId = null, int? effectId = null, int? value = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Get all Votes + /// + /// + /// Get all Votes + /// + /// User's OAuth2 access token + /// The ID of the client application which last created or updated this vote + /// ID of predictor variable + /// ID of outcome variable + /// Value of Vote. 1 is for upvote. 0 is for downvote. Otherwise, there is no vote. + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of InlineResponse20020 + System.Threading.Tasks.Task OrganizationVotesGetAsync (string accessToken = null, string clientId = null, int? causeId = null, int? effectId = null, int? value = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Get all Votes + /// + /// + /// Get all Votes + /// + /// User's OAuth2 access token + /// The ID of the client application which last created or updated this vote + /// ID of predictor variable + /// ID of outcome variable + /// Value of Vote. 1 is for upvote. 0 is for downvote. Otherwise, there is no vote. + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of ApiResponse (InlineResponse20020) + System.Threading.Tasks.Task> OrganizationVotesGetAsyncWithHttpInfo (string accessToken = null, string clientId = null, int? causeId = null, int? effectId = null, int? value = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); } @@ -1347,44 +1679,38 @@ public async System.Threading.Tasks.Task> Organ } /// - /// Get all Updates Get all Updates + /// Get tracking reminders Get the variable id, frequency, and default value for the user tracking reminders /// - /// Organization's OAuth2 access token - /// connector_id - /// number_of_measurements - /// success - /// message + /// User's OAuth2 access token + /// The ID of the client application which last created or updated this trackingReminder /// When the record was first created. Use ISO 8601 datetime format /// When the record was last updated. Use ISO 8601 datetime format /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. /// InlineResponse20015 - public InlineResponse20015 OrganizationUpdatesGet (string accessToken = null, int? connectorId = null, int? numberOfMeasurements = null, bool? success = null, string message = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) + public InlineResponse20015 OrganizationTrackingRemindersGet (string accessToken = null, string clientId = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) { - ApiResponse response = OrganizationUpdatesGetWithHttpInfo(accessToken, connectorId, numberOfMeasurements, success, message, createdAt, updatedAt, limit, offset, sort); + ApiResponse response = OrganizationTrackingRemindersGetWithHttpInfo(accessToken, clientId, createdAt, updatedAt, limit, offset, sort); return response.Data; } /// - /// Get all Updates Get all Updates + /// Get tracking reminders Get the variable id, frequency, and default value for the user tracking reminders /// - /// Organization's OAuth2 access token - /// connector_id - /// number_of_measurements - /// success - /// message + /// User's OAuth2 access token + /// The ID of the client application which last created or updated this trackingReminder /// When the record was first created. Use ISO 8601 datetime format /// When the record was last updated. Use ISO 8601 datetime format /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. /// ApiResponse of InlineResponse20015 - public ApiResponse< InlineResponse20015 > OrganizationUpdatesGetWithHttpInfo (string accessToken = null, int? connectorId = null, int? numberOfMeasurements = null, bool? success = null, string message = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) + public ApiResponse< InlineResponse20015 > OrganizationTrackingRemindersGetWithHttpInfo (string accessToken = null, string clientId = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) { - var path_ = "/organization/updates"; + var path_ = "/organization/trackingReminders"; var pathParams = new Dictionary(); var queryParams = new Dictionary(); @@ -1406,10 +1732,7 @@ public ApiResponse< InlineResponse20015 > OrganizationUpdatesGetWithHttpInfo (st pathParams.Add("format", "json"); if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - if (connectorId != null) queryParams.Add("connector_id", Configuration.ApiClient.ParameterToString(connectorId)); // query parameter - if (numberOfMeasurements != null) queryParams.Add("number_of_measurements", Configuration.ApiClient.ParameterToString(numberOfMeasurements)); // query parameter - if (success != null) queryParams.Add("success", Configuration.ApiClient.ParameterToString(success)); // query parameter - if (message != null) queryParams.Add("message", Configuration.ApiClient.ParameterToString(message)); // query parameter + if (clientId != null) queryParams.Add("client_id", Configuration.ApiClient.ParameterToString(clientId)); // query parameter if (createdAt != null) queryParams.Add("created_at", Configuration.ApiClient.ParameterToString(createdAt)); // query parameter if (updatedAt != null) queryParams.Add("updated_at", Configuration.ApiClient.ParameterToString(updatedAt)); // query parameter if (limit != null) queryParams.Add("limit", Configuration.ApiClient.ParameterToString(limit)); // query parameter @@ -1428,9 +1751,9 @@ public ApiResponse< InlineResponse20015 > OrganizationUpdatesGetWithHttpInfo (st int statusCode = (int) response.StatusCode; if (statusCode >= 400) - throw new ApiException (statusCode, "Error calling OrganizationUpdatesGet: " + response.Content, response.Content); + throw new ApiException (statusCode, "Error calling OrganizationTrackingRemindersGet: " + response.Content, response.Content); else if (statusCode == 0) - throw new ApiException (statusCode, "Error calling OrganizationUpdatesGet: " + response.ErrorMessage, response.ErrorMessage); + throw new ApiException (statusCode, "Error calling OrganizationTrackingRemindersGet: " + response.ErrorMessage, response.ErrorMessage); return new ApiResponse(statusCode, response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), @@ -1439,45 +1762,39 @@ public ApiResponse< InlineResponse20015 > OrganizationUpdatesGetWithHttpInfo (st } /// - /// Get all Updates Get all Updates + /// Get tracking reminders Get the variable id, frequency, and default value for the user tracking reminders /// - /// Organization's OAuth2 access token - /// connector_id - /// number_of_measurements - /// success - /// message + /// User's OAuth2 access token + /// The ID of the client application which last created or updated this trackingReminder /// When the record was first created. Use ISO 8601 datetime format /// When the record was last updated. Use ISO 8601 datetime format /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. /// Task of InlineResponse20015 - public async System.Threading.Tasks.Task OrganizationUpdatesGetAsync (string accessToken = null, int? connectorId = null, int? numberOfMeasurements = null, bool? success = null, string message = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) + public async System.Threading.Tasks.Task OrganizationTrackingRemindersGetAsync (string accessToken = null, string clientId = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) { - ApiResponse response = await OrganizationUpdatesGetAsyncWithHttpInfo(accessToken, connectorId, numberOfMeasurements, success, message, createdAt, updatedAt, limit, offset, sort); + ApiResponse response = await OrganizationTrackingRemindersGetAsyncWithHttpInfo(accessToken, clientId, createdAt, updatedAt, limit, offset, sort); return response.Data; } /// - /// Get all Updates Get all Updates + /// Get tracking reminders Get the variable id, frequency, and default value for the user tracking reminders /// - /// Organization's OAuth2 access token - /// connector_id - /// number_of_measurements - /// success - /// message + /// User's OAuth2 access token + /// The ID of the client application which last created or updated this trackingReminder /// When the record was first created. Use ISO 8601 datetime format /// When the record was last updated. Use ISO 8601 datetime format /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. /// Task of ApiResponse (InlineResponse20015) - public async System.Threading.Tasks.Task> OrganizationUpdatesGetAsyncWithHttpInfo (string accessToken = null, int? connectorId = null, int? numberOfMeasurements = null, bool? success = null, string message = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) + public async System.Threading.Tasks.Task> OrganizationTrackingRemindersGetAsyncWithHttpInfo (string accessToken = null, string clientId = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) { - var path_ = "/organization/updates"; + var path_ = "/organization/trackingReminders"; var pathParams = new Dictionary(); var queryParams = new Dictionary(); @@ -1499,10 +1816,7 @@ public async System.Threading.Tasks.Task> Organ pathParams.Add("format", "json"); if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter - if (connectorId != null) queryParams.Add("connector_id", Configuration.ApiClient.ParameterToString(connectorId)); // query parameter - if (numberOfMeasurements != null) queryParams.Add("number_of_measurements", Configuration.ApiClient.ParameterToString(numberOfMeasurements)); // query parameter - if (success != null) queryParams.Add("success", Configuration.ApiClient.ParameterToString(success)); // query parameter - if (message != null) queryParams.Add("message", Configuration.ApiClient.ParameterToString(message)); // query parameter + if (clientId != null) queryParams.Add("client_id", Configuration.ApiClient.ParameterToString(clientId)); // query parameter if (createdAt != null) queryParams.Add("created_at", Configuration.ApiClient.ParameterToString(createdAt)); // query parameter if (updatedAt != null) queryParams.Add("updated_at", Configuration.ApiClient.ParameterToString(updatedAt)); // query parameter if (limit != null) queryParams.Add("limit", Configuration.ApiClient.ParameterToString(limit)); // query parameter @@ -1521,9 +1835,9 @@ public async System.Threading.Tasks.Task> Organ int statusCode = (int) response.StatusCode; if (statusCode >= 400) - throw new ApiException (statusCode, "Error calling OrganizationUpdatesGet: " + response.Content, response.Content); + throw new ApiException (statusCode, "Error calling OrganizationTrackingRemindersGet: " + response.Content, response.Content); else if (statusCode == 0) - throw new ApiException (statusCode, "Error calling OrganizationUpdatesGet: " + response.ErrorMessage, response.ErrorMessage); + throw new ApiException (statusCode, "Error calling OrganizationTrackingRemindersGet: " + response.ErrorMessage, response.ErrorMessage); return new ApiResponse(statusCode, response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), @@ -1532,110 +1846,540 @@ public async System.Threading.Tasks.Task> Organ } /// - /// Get all UserVariables Get all UserVariables + /// Get all Updates Get all Updates /// - /// User's OAuth2 access token - /// The ID of the client application which last created or updated this user variable - /// ID of the parent variable if this variable has any parent - /// ID of variable - /// D of unit to use for this variable - /// Minimum reasonable value for this variable (uses default unit) - /// Maximum reasonable value for this variable (uses default unit) - /// Value for replacing null measurements - /// The Variable this Variable should be joined with. If the variable is joined with some other variable then it is not shown to user in the list of variables - /// Estimated number of seconds that pass before a stimulus produces a perceivable effect - /// Estimated duration of time following the onset delay in which a stimulus produces a perceivable effect - /// ID of variable category - /// updated - /// Is variable public - /// A value of 1 indicates that this variable is generally a cause in a causal relationship. An example of a causeOnly variable would be a variable such as Cloud Cover which would generally not be influenced by the behaviour of the user - /// 0 -> No filling, 1 -> Use filling-value - /// Number of measurements - /// Number of processed measurements - /// Number of measurements at last analysis - /// ID of last Unit - /// ID of last original Unit - /// Last original value which is stored - /// Last Value - /// Last original value which is stored - /// ID of last source - /// Number of correlations for this variable - /// status - /// error_message - /// When this variable or its settings were last updated - /// Standard deviation - /// Variance - /// Minimum recorded value of this variable - /// Maximum recorded value of this variable - /// Mean - /// Median - /// Most common Unit ID - /// Most common value - /// Number of unique daily values - /// Number of changes - /// Skewness - /// Kurtosis - /// Latitude - /// Longitude - /// Location + /// Organization's OAuth2 access token + /// connector_id + /// number_of_measurements + /// success + /// message /// When the record was first created. Use ISO 8601 datetime format /// When the record was last updated. Use ISO 8601 datetime format - /// Outcome variables (those with `outcome` == 1) are variables for which a human would generally want to identify the influencing factors. These include symptoms of illness, physique, mood, cognitive performance, etc. Generally correlation calculations are only performed on outcome variables - /// Comma-separated list of source names to limit variables to those sources - /// Earliest source time - /// Latest source time - /// Earliest measurement time - /// Latest measurement time - /// Earliest filling time - /// Latest filling time /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. /// InlineResponse20016 - public InlineResponse20016 OrganizationUserVariablesGet (string accessToken = null, string clientId = null, int? parentId = null, int? variableId = null, int? defaultUnitId = null, double? minimumAllowedValue = null, double? maximumAllowedValue = null, double? fillingValue = null, int? joinWith = null, int? onsetDelay = null, int? durationOfAction = null, int? variableCategoryId = null, int? updated = null, int? _public = null, bool? causeOnly = null, string fillingType = null, int? numberOfMeasurements = null, int? numberOfProcessedMeasurements = null, int? measurementsAtLastAnalysis = null, int? lastUnitId = null, int? lastOriginalUnitId = null, int? lastOriginalValue = null, double? lastValue = null, double? lastOriginalValue2 = null, int? lastSourceId = null, int? numberOfCorrelations = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, double? standardDeviation = null, double? variance = null, double? minimumRecordedValue = null, double? maximumRecordedValue = null, double? mean = null, double? median = null, int? mostCommonUnitId = null, double? mostCommonValue = null, double? numberOfUniqueDailyValues = null, int? numberOfChanges = null, double? skewness = null, double? kurtosis = null, double? latitude = null, double? longitude = null, string location = null, string createdAt = null, string updatedAt = null, bool? outcome = null, string sources = null, int? earliestSourceTime = null, int? latestSourceTime = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, int? earliestFillingTime = null, int? latestFillingTime = null, int? limit = null, int? offset = null, string sort = null) + public InlineResponse20016 OrganizationUpdatesGet (string accessToken = null, int? connectorId = null, int? numberOfMeasurements = null, bool? success = null, string message = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) { - ApiResponse response = OrganizationUserVariablesGetWithHttpInfo(accessToken, clientId, parentId, variableId, defaultUnitId, minimumAllowedValue, maximumAllowedValue, fillingValue, joinWith, onsetDelay, durationOfAction, variableCategoryId, updated, _public, causeOnly, fillingType, numberOfMeasurements, numberOfProcessedMeasurements, measurementsAtLastAnalysis, lastUnitId, lastOriginalUnitId, lastOriginalValue, lastValue, lastOriginalValue2, lastSourceId, numberOfCorrelations, status, errorMessage, lastSuccessfulUpdateTime, standardDeviation, variance, minimumRecordedValue, maximumRecordedValue, mean, median, mostCommonUnitId, mostCommonValue, numberOfUniqueDailyValues, numberOfChanges, skewness, kurtosis, latitude, longitude, location, createdAt, updatedAt, outcome, sources, earliestSourceTime, latestSourceTime, earliestMeasurementTime, latestMeasurementTime, earliestFillingTime, latestFillingTime, limit, offset, sort); + ApiResponse response = OrganizationUpdatesGetWithHttpInfo(accessToken, connectorId, numberOfMeasurements, success, message, createdAt, updatedAt, limit, offset, sort); return response.Data; } /// - /// Get all UserVariables Get all UserVariables + /// Get all Updates Get all Updates + /// + /// Organization's OAuth2 access token + /// connector_id + /// number_of_measurements + /// success + /// message + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// ApiResponse of InlineResponse20016 + public ApiResponse< InlineResponse20016 > OrganizationUpdatesGetWithHttpInfo (string accessToken = null, int? connectorId = null, int? numberOfMeasurements = null, bool? success = null, string message = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) + { + + + var path_ = "/organization/updates"; + + var pathParams = new Dictionary(); + var queryParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); + var formParams = new Dictionary(); + var fileParams = new Dictionary(); + String postBody = null; + + // to determine the Accept header + String[] http_header_accepts = new String[] { + "application/json" + }; + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); + if (http_header_accept != null) + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + pathParams.Add("format", "json"); + + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + if (connectorId != null) queryParams.Add("connector_id", Configuration.ApiClient.ParameterToString(connectorId)); // query parameter + if (numberOfMeasurements != null) queryParams.Add("number_of_measurements", Configuration.ApiClient.ParameterToString(numberOfMeasurements)); // query parameter + if (success != null) queryParams.Add("success", Configuration.ApiClient.ParameterToString(success)); // query parameter + if (message != null) queryParams.Add("message", Configuration.ApiClient.ParameterToString(message)); // query parameter + if (createdAt != null) queryParams.Add("created_at", Configuration.ApiClient.ParameterToString(createdAt)); // query parameter + if (updatedAt != null) queryParams.Add("updated_at", Configuration.ApiClient.ParameterToString(updatedAt)); // query parameter + if (limit != null) queryParams.Add("limit", Configuration.ApiClient.ParameterToString(limit)); // query parameter + if (offset != null) queryParams.Add("offset", Configuration.ApiClient.ParameterToString(offset)); // query parameter + if (sort != null) queryParams.Add("sort", Configuration.ApiClient.ParameterToString(sort)); // query parameter + + + + + + + + // make the HTTP request + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling OrganizationUpdatesGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling OrganizationUpdatesGet: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20016) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20016))); + + } + + /// + /// Get all Updates Get all Updates + /// + /// Organization's OAuth2 access token + /// connector_id + /// number_of_measurements + /// success + /// message + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of InlineResponse20016 + public async System.Threading.Tasks.Task OrganizationUpdatesGetAsync (string accessToken = null, int? connectorId = null, int? numberOfMeasurements = null, bool? success = null, string message = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) + { + ApiResponse response = await OrganizationUpdatesGetAsyncWithHttpInfo(accessToken, connectorId, numberOfMeasurements, success, message, createdAt, updatedAt, limit, offset, sort); + return response.Data; + + } + + /// + /// Get all Updates Get all Updates + /// + /// Organization's OAuth2 access token + /// connector_id + /// number_of_measurements + /// success + /// message + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of ApiResponse (InlineResponse20016) + public async System.Threading.Tasks.Task> OrganizationUpdatesGetAsyncWithHttpInfo (string accessToken = null, int? connectorId = null, int? numberOfMeasurements = null, bool? success = null, string message = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) + { + + + var path_ = "/organization/updates"; + + var pathParams = new Dictionary(); + var queryParams = new Dictionary(); + var headerParams = new Dictionary(); + var formParams = new Dictionary(); + var fileParams = new Dictionary(); + String postBody = null; + + // to determine the Accept header + String[] http_header_accepts = new String[] { + "application/json" + }; + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); + if (http_header_accept != null) + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + pathParams.Add("format", "json"); + + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + if (connectorId != null) queryParams.Add("connector_id", Configuration.ApiClient.ParameterToString(connectorId)); // query parameter + if (numberOfMeasurements != null) queryParams.Add("number_of_measurements", Configuration.ApiClient.ParameterToString(numberOfMeasurements)); // query parameter + if (success != null) queryParams.Add("success", Configuration.ApiClient.ParameterToString(success)); // query parameter + if (message != null) queryParams.Add("message", Configuration.ApiClient.ParameterToString(message)); // query parameter + if (createdAt != null) queryParams.Add("created_at", Configuration.ApiClient.ParameterToString(createdAt)); // query parameter + if (updatedAt != null) queryParams.Add("updated_at", Configuration.ApiClient.ParameterToString(updatedAt)); // query parameter + if (limit != null) queryParams.Add("limit", Configuration.ApiClient.ParameterToString(limit)); // query parameter + if (offset != null) queryParams.Add("offset", Configuration.ApiClient.ParameterToString(offset)); // query parameter + if (sort != null) queryParams.Add("sort", Configuration.ApiClient.ParameterToString(sort)); // query parameter + + + + + + + + // make the HTTP request + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling OrganizationUpdatesGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling OrganizationUpdatesGet: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20016) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20016))); + + } + + /// + /// Get all UserVariableRelationships Get all UserVariableRelationships /// /// User's OAuth2 access token - /// The ID of the client application which last created or updated this user variable - /// ID of the parent variable if this variable has any parent - /// ID of variable - /// D of unit to use for this variable - /// Minimum reasonable value for this variable (uses default unit) - /// Maximum reasonable value for this variable (uses default unit) - /// Value for replacing null measurements - /// The Variable this Variable should be joined with. If the variable is joined with some other variable then it is not shown to user in the list of variables + /// id + /// Our confidence that a consistent predictive relationship exists based on the amount of evidence, reproducibility, and other factors + /// A quantitative representation of our confidence that a consistent predictive relationship exists based on the amount of evidence, reproducibility, and other factors + /// Direction is positive if higher predictor values generally precede higher outcome values. Direction is negative if higher predictor values generally precede lower outcome values. + /// Estimated number of seconds following the onset delay in which a stimulus produces a perceivable effect + /// error_message /// Estimated number of seconds that pass before a stimulus produces a perceivable effect - /// Estimated duration of time following the onset delay in which a stimulus produces a perceivable effect - /// ID of variable category - /// updated - /// Is variable public - /// A value of 1 indicates that this variable is generally a cause in a causal relationship. An example of a causeOnly variable would be a variable such as Cloud Cover which would generally not be influenced by the behaviour of the user - /// 0 -> No filling, 1 -> Use filling-value - /// Number of measurements - /// Number of processed measurements - /// Number of measurements at last analysis - /// ID of last Unit - /// ID of last original Unit - /// Last original value which is stored - /// Last Value - /// Last original value which is stored - /// ID of last source - /// Number of correlations for this variable - /// status + /// Variable ID for the outcome variable + /// Variable ID for the predictor variable + /// ID for default unit of the predictor variable + /// A value representative of the relevance of this predictor relative to other predictors of this outcome. Usually used for relevancy sorting. + /// Can be weak, medium, or strong based on the size of the effect which the predictor appears to have on the outcome relative to other variable relationship strength scores. + /// A value represented to the size of the effect which the predictor appears to have on the outcome. + /// vote + /// Value for the predictor variable (in it's default unit) which typically precedes an above average outcome value + /// Value for the predictor variable (in it's default unit) which typically precedes a below average outcome value + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// InlineResponse20017 + public InlineResponse20017 OrganizationUserVariableRelationshipsGet (string accessToken = null, int? id = null, string confidenceLevel = null, double? confidenceScore = null, string direction = null, int? durationOfAction = null, string errorMessage = null, int? onsetDelay = null, int? outcomeVariableId = null, int? predictorVariableId = null, int? predictorUnitId = null, double? sinnRank = null, string strengthLevel = null, double? strengthScore = null, string vote = null, double? valuePredictingHighOutcome = null, double? valuePredictingLowOutcome = null, int? limit = null, int? offset = null, string sort = null) + { + ApiResponse response = OrganizationUserVariableRelationshipsGetWithHttpInfo(accessToken, id, confidenceLevel, confidenceScore, direction, durationOfAction, errorMessage, onsetDelay, outcomeVariableId, predictorVariableId, predictorUnitId, sinnRank, strengthLevel, strengthScore, vote, valuePredictingHighOutcome, valuePredictingLowOutcome, limit, offset, sort); + return response.Data; + } + + /// + /// Get all UserVariableRelationships Get all UserVariableRelationships + /// + /// User's OAuth2 access token + /// id + /// Our confidence that a consistent predictive relationship exists based on the amount of evidence, reproducibility, and other factors + /// A quantitative representation of our confidence that a consistent predictive relationship exists based on the amount of evidence, reproducibility, and other factors + /// Direction is positive if higher predictor values generally precede higher outcome values. Direction is negative if higher predictor values generally precede lower outcome values. + /// Estimated number of seconds following the onset delay in which a stimulus produces a perceivable effect /// error_message - /// When this variable or its settings were last updated - /// Standard deviation - /// Variance - /// Minimum recorded value of this variable - /// Maximum recorded value of this variable - /// Mean - /// Median + /// Estimated number of seconds that pass before a stimulus produces a perceivable effect + /// Variable ID for the outcome variable + /// Variable ID for the predictor variable + /// ID for default unit of the predictor variable + /// A value representative of the relevance of this predictor relative to other predictors of this outcome. Usually used for relevancy sorting. + /// Can be weak, medium, or strong based on the size of the effect which the predictor appears to have on the outcome relative to other variable relationship strength scores. + /// A value represented to the size of the effect which the predictor appears to have on the outcome. + /// vote + /// Value for the predictor variable (in it's default unit) which typically precedes an above average outcome value + /// Value for the predictor variable (in it's default unit) which typically precedes a below average outcome value + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// ApiResponse of InlineResponse20017 + public ApiResponse< InlineResponse20017 > OrganizationUserVariableRelationshipsGetWithHttpInfo (string accessToken = null, int? id = null, string confidenceLevel = null, double? confidenceScore = null, string direction = null, int? durationOfAction = null, string errorMessage = null, int? onsetDelay = null, int? outcomeVariableId = null, int? predictorVariableId = null, int? predictorUnitId = null, double? sinnRank = null, string strengthLevel = null, double? strengthScore = null, string vote = null, double? valuePredictingHighOutcome = null, double? valuePredictingLowOutcome = null, int? limit = null, int? offset = null, string sort = null) + { + + + var path_ = "/organization/userVariableRelationships"; + + var pathParams = new Dictionary(); + var queryParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); + var formParams = new Dictionary(); + var fileParams = new Dictionary(); + String postBody = null; + + // to determine the Accept header + String[] http_header_accepts = new String[] { + "application/json" + }; + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); + if (http_header_accept != null) + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + pathParams.Add("format", "json"); + + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + if (id != null) queryParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // query parameter + if (confidenceLevel != null) queryParams.Add("confidence_level", Configuration.ApiClient.ParameterToString(confidenceLevel)); // query parameter + if (confidenceScore != null) queryParams.Add("confidence_score", Configuration.ApiClient.ParameterToString(confidenceScore)); // query parameter + if (direction != null) queryParams.Add("direction", Configuration.ApiClient.ParameterToString(direction)); // query parameter + if (durationOfAction != null) queryParams.Add("duration_of_action", Configuration.ApiClient.ParameterToString(durationOfAction)); // query parameter + if (errorMessage != null) queryParams.Add("error_message", Configuration.ApiClient.ParameterToString(errorMessage)); // query parameter + if (onsetDelay != null) queryParams.Add("onset_delay", Configuration.ApiClient.ParameterToString(onsetDelay)); // query parameter + if (outcomeVariableId != null) queryParams.Add("outcome_variable_id", Configuration.ApiClient.ParameterToString(outcomeVariableId)); // query parameter + if (predictorVariableId != null) queryParams.Add("predictor_variable_id", Configuration.ApiClient.ParameterToString(predictorVariableId)); // query parameter + if (predictorUnitId != null) queryParams.Add("predictor_unit_id", Configuration.ApiClient.ParameterToString(predictorUnitId)); // query parameter + if (sinnRank != null) queryParams.Add("sinn_rank", Configuration.ApiClient.ParameterToString(sinnRank)); // query parameter + if (strengthLevel != null) queryParams.Add("strength_level", Configuration.ApiClient.ParameterToString(strengthLevel)); // query parameter + if (strengthScore != null) queryParams.Add("strength_score", Configuration.ApiClient.ParameterToString(strengthScore)); // query parameter + if (vote != null) queryParams.Add("vote", Configuration.ApiClient.ParameterToString(vote)); // query parameter + if (valuePredictingHighOutcome != null) queryParams.Add("value_predicting_high_outcome", Configuration.ApiClient.ParameterToString(valuePredictingHighOutcome)); // query parameter + if (valuePredictingLowOutcome != null) queryParams.Add("value_predicting_low_outcome", Configuration.ApiClient.ParameterToString(valuePredictingLowOutcome)); // query parameter + if (limit != null) queryParams.Add("limit", Configuration.ApiClient.ParameterToString(limit)); // query parameter + if (offset != null) queryParams.Add("offset", Configuration.ApiClient.ParameterToString(offset)); // query parameter + if (sort != null) queryParams.Add("sort", Configuration.ApiClient.ParameterToString(sort)); // query parameter + + + + + + + + // make the HTTP request + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling OrganizationUserVariableRelationshipsGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling OrganizationUserVariableRelationshipsGet: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20017) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20017))); + + } + + /// + /// Get all UserVariableRelationships Get all UserVariableRelationships + /// + /// User's OAuth2 access token + /// id + /// Our confidence that a consistent predictive relationship exists based on the amount of evidence, reproducibility, and other factors + /// A quantitative representation of our confidence that a consistent predictive relationship exists based on the amount of evidence, reproducibility, and other factors + /// Direction is positive if higher predictor values generally precede higher outcome values. Direction is negative if higher predictor values generally precede lower outcome values. + /// Estimated number of seconds following the onset delay in which a stimulus produces a perceivable effect + /// error_message + /// Estimated number of seconds that pass before a stimulus produces a perceivable effect + /// Variable ID for the outcome variable + /// Variable ID for the predictor variable + /// ID for default unit of the predictor variable + /// A value representative of the relevance of this predictor relative to other predictors of this outcome. Usually used for relevancy sorting. + /// Can be weak, medium, or strong based on the size of the effect which the predictor appears to have on the outcome relative to other variable relationship strength scores. + /// A value represented to the size of the effect which the predictor appears to have on the outcome. + /// vote + /// Value for the predictor variable (in it's default unit) which typically precedes an above average outcome value + /// Value for the predictor variable (in it's default unit) which typically precedes a below average outcome value + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of InlineResponse20017 + public async System.Threading.Tasks.Task OrganizationUserVariableRelationshipsGetAsync (string accessToken = null, int? id = null, string confidenceLevel = null, double? confidenceScore = null, string direction = null, int? durationOfAction = null, string errorMessage = null, int? onsetDelay = null, int? outcomeVariableId = null, int? predictorVariableId = null, int? predictorUnitId = null, double? sinnRank = null, string strengthLevel = null, double? strengthScore = null, string vote = null, double? valuePredictingHighOutcome = null, double? valuePredictingLowOutcome = null, int? limit = null, int? offset = null, string sort = null) + { + ApiResponse response = await OrganizationUserVariableRelationshipsGetAsyncWithHttpInfo(accessToken, id, confidenceLevel, confidenceScore, direction, durationOfAction, errorMessage, onsetDelay, outcomeVariableId, predictorVariableId, predictorUnitId, sinnRank, strengthLevel, strengthScore, vote, valuePredictingHighOutcome, valuePredictingLowOutcome, limit, offset, sort); + return response.Data; + + } + + /// + /// Get all UserVariableRelationships Get all UserVariableRelationships + /// + /// User's OAuth2 access token + /// id + /// Our confidence that a consistent predictive relationship exists based on the amount of evidence, reproducibility, and other factors + /// A quantitative representation of our confidence that a consistent predictive relationship exists based on the amount of evidence, reproducibility, and other factors + /// Direction is positive if higher predictor values generally precede higher outcome values. Direction is negative if higher predictor values generally precede lower outcome values. + /// Estimated number of seconds following the onset delay in which a stimulus produces a perceivable effect + /// error_message + /// Estimated number of seconds that pass before a stimulus produces a perceivable effect + /// Variable ID for the outcome variable + /// Variable ID for the predictor variable + /// ID for default unit of the predictor variable + /// A value representative of the relevance of this predictor relative to other predictors of this outcome. Usually used for relevancy sorting. + /// Can be weak, medium, or strong based on the size of the effect which the predictor appears to have on the outcome relative to other variable relationship strength scores. + /// A value represented to the size of the effect which the predictor appears to have on the outcome. + /// vote + /// Value for the predictor variable (in it's default unit) which typically precedes an above average outcome value + /// Value for the predictor variable (in it's default unit) which typically precedes a below average outcome value + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of ApiResponse (InlineResponse20017) + public async System.Threading.Tasks.Task> OrganizationUserVariableRelationshipsGetAsyncWithHttpInfo (string accessToken = null, int? id = null, string confidenceLevel = null, double? confidenceScore = null, string direction = null, int? durationOfAction = null, string errorMessage = null, int? onsetDelay = null, int? outcomeVariableId = null, int? predictorVariableId = null, int? predictorUnitId = null, double? sinnRank = null, string strengthLevel = null, double? strengthScore = null, string vote = null, double? valuePredictingHighOutcome = null, double? valuePredictingLowOutcome = null, int? limit = null, int? offset = null, string sort = null) + { + + + var path_ = "/organization/userVariableRelationships"; + + var pathParams = new Dictionary(); + var queryParams = new Dictionary(); + var headerParams = new Dictionary(); + var formParams = new Dictionary(); + var fileParams = new Dictionary(); + String postBody = null; + + // to determine the Accept header + String[] http_header_accepts = new String[] { + "application/json" + }; + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); + if (http_header_accept != null) + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + pathParams.Add("format", "json"); + + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + if (id != null) queryParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // query parameter + if (confidenceLevel != null) queryParams.Add("confidence_level", Configuration.ApiClient.ParameterToString(confidenceLevel)); // query parameter + if (confidenceScore != null) queryParams.Add("confidence_score", Configuration.ApiClient.ParameterToString(confidenceScore)); // query parameter + if (direction != null) queryParams.Add("direction", Configuration.ApiClient.ParameterToString(direction)); // query parameter + if (durationOfAction != null) queryParams.Add("duration_of_action", Configuration.ApiClient.ParameterToString(durationOfAction)); // query parameter + if (errorMessage != null) queryParams.Add("error_message", Configuration.ApiClient.ParameterToString(errorMessage)); // query parameter + if (onsetDelay != null) queryParams.Add("onset_delay", Configuration.ApiClient.ParameterToString(onsetDelay)); // query parameter + if (outcomeVariableId != null) queryParams.Add("outcome_variable_id", Configuration.ApiClient.ParameterToString(outcomeVariableId)); // query parameter + if (predictorVariableId != null) queryParams.Add("predictor_variable_id", Configuration.ApiClient.ParameterToString(predictorVariableId)); // query parameter + if (predictorUnitId != null) queryParams.Add("predictor_unit_id", Configuration.ApiClient.ParameterToString(predictorUnitId)); // query parameter + if (sinnRank != null) queryParams.Add("sinn_rank", Configuration.ApiClient.ParameterToString(sinnRank)); // query parameter + if (strengthLevel != null) queryParams.Add("strength_level", Configuration.ApiClient.ParameterToString(strengthLevel)); // query parameter + if (strengthScore != null) queryParams.Add("strength_score", Configuration.ApiClient.ParameterToString(strengthScore)); // query parameter + if (vote != null) queryParams.Add("vote", Configuration.ApiClient.ParameterToString(vote)); // query parameter + if (valuePredictingHighOutcome != null) queryParams.Add("value_predicting_high_outcome", Configuration.ApiClient.ParameterToString(valuePredictingHighOutcome)); // query parameter + if (valuePredictingLowOutcome != null) queryParams.Add("value_predicting_low_outcome", Configuration.ApiClient.ParameterToString(valuePredictingLowOutcome)); // query parameter + if (limit != null) queryParams.Add("limit", Configuration.ApiClient.ParameterToString(limit)); // query parameter + if (offset != null) queryParams.Add("offset", Configuration.ApiClient.ParameterToString(offset)); // query parameter + if (sort != null) queryParams.Add("sort", Configuration.ApiClient.ParameterToString(sort)); // query parameter + + + + + + + + // make the HTTP request + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling OrganizationUserVariableRelationshipsGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling OrganizationUserVariableRelationshipsGet: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20017) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20017))); + + } + + /// + /// Get all UserVariables Get all UserVariables + /// + /// User's OAuth2 access token + /// The ID of the client application which last created or updated this user variable + /// ID of the parent variable if this variable has any parent + /// ID of variable + /// D of unit to use for this variable + /// Minimum reasonable value for this variable (uses default unit) + /// Maximum reasonable value for this variable (uses default unit) + /// Value for replacing null measurements + /// The Variable this Variable should be joined with. If the variable is joined with some other variable then it is not shown to user in the list of variables + /// Estimated number of seconds that pass before a stimulus produces a perceivable effect + /// Estimated duration of time following the onset delay in which a stimulus produces a perceivable effect + /// ID of variable category + /// updated + /// Is variable public + /// A value of 1 indicates that this variable is generally a cause in a causal relationship. An example of a causeOnly variable would be a variable such as Cloud Cover which would generally not be influenced by the behaviour of the user + /// 0 -> No filling, 1 -> Use filling-value + /// Number of measurements + /// Number of processed measurements + /// Number of measurements at last analysis + /// ID of last Unit + /// ID of last original Unit + /// Last original value which is stored + /// Last Value + /// Last original value which is stored + /// ID of last source + /// Number of correlations for this variable + /// status + /// error_message + /// When this variable or its settings were last updated + /// Standard deviation + /// Variance + /// Minimum recorded value of this variable + /// Maximum recorded value of this variable + /// Mean + /// Median + /// Most common Unit ID + /// Most common value + /// Number of unique daily values + /// Number of changes + /// Skewness + /// Kurtosis + /// Latitude + /// Longitude + /// Location + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// Outcome variables (those with `outcome` == 1) are variables for which a human would generally want to identify the influencing factors. These include symptoms of illness, physique, mood, cognitive performance, etc. Generally correlation calculations are only performed on outcome variables + /// Comma-separated list of source names to limit variables to those sources + /// Earliest source time + /// Latest source time + /// Earliest measurement time + /// Latest measurement time + /// Earliest filling time + /// Latest filling time + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// InlineResponse20018 + public InlineResponse20018 OrganizationUserVariablesGet (string accessToken = null, string clientId = null, int? parentId = null, int? variableId = null, int? defaultUnitId = null, double? minimumAllowedValue = null, double? maximumAllowedValue = null, double? fillingValue = null, int? joinWith = null, int? onsetDelay = null, int? durationOfAction = null, int? variableCategoryId = null, int? updated = null, int? _public = null, bool? causeOnly = null, string fillingType = null, int? numberOfMeasurements = null, int? numberOfProcessedMeasurements = null, int? measurementsAtLastAnalysis = null, int? lastUnitId = null, int? lastOriginalUnitId = null, int? lastOriginalValue = null, double? lastValue = null, double? lastOriginalValue2 = null, int? lastSourceId = null, int? numberOfCorrelations = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, double? standardDeviation = null, double? variance = null, double? minimumRecordedValue = null, double? maximumRecordedValue = null, double? mean = null, double? median = null, int? mostCommonUnitId = null, double? mostCommonValue = null, double? numberOfUniqueDailyValues = null, int? numberOfChanges = null, double? skewness = null, double? kurtosis = null, double? latitude = null, double? longitude = null, string location = null, string createdAt = null, string updatedAt = null, bool? outcome = null, string sources = null, int? earliestSourceTime = null, int? latestSourceTime = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, int? earliestFillingTime = null, int? latestFillingTime = null, int? limit = null, int? offset = null, string sort = null) + { + ApiResponse response = OrganizationUserVariablesGetWithHttpInfo(accessToken, clientId, parentId, variableId, defaultUnitId, minimumAllowedValue, maximumAllowedValue, fillingValue, joinWith, onsetDelay, durationOfAction, variableCategoryId, updated, _public, causeOnly, fillingType, numberOfMeasurements, numberOfProcessedMeasurements, measurementsAtLastAnalysis, lastUnitId, lastOriginalUnitId, lastOriginalValue, lastValue, lastOriginalValue2, lastSourceId, numberOfCorrelations, status, errorMessage, lastSuccessfulUpdateTime, standardDeviation, variance, minimumRecordedValue, maximumRecordedValue, mean, median, mostCommonUnitId, mostCommonValue, numberOfUniqueDailyValues, numberOfChanges, skewness, kurtosis, latitude, longitude, location, createdAt, updatedAt, outcome, sources, earliestSourceTime, latestSourceTime, earliestMeasurementTime, latestMeasurementTime, earliestFillingTime, latestFillingTime, limit, offset, sort); + return response.Data; + } + + /// + /// Get all UserVariables Get all UserVariables + /// + /// User's OAuth2 access token + /// The ID of the client application which last created or updated this user variable + /// ID of the parent variable if this variable has any parent + /// ID of variable + /// D of unit to use for this variable + /// Minimum reasonable value for this variable (uses default unit) + /// Maximum reasonable value for this variable (uses default unit) + /// Value for replacing null measurements + /// The Variable this Variable should be joined with. If the variable is joined with some other variable then it is not shown to user in the list of variables + /// Estimated number of seconds that pass before a stimulus produces a perceivable effect + /// Estimated duration of time following the onset delay in which a stimulus produces a perceivable effect + /// ID of variable category + /// updated + /// Is variable public + /// A value of 1 indicates that this variable is generally a cause in a causal relationship. An example of a causeOnly variable would be a variable such as Cloud Cover which would generally not be influenced by the behaviour of the user + /// 0 -> No filling, 1 -> Use filling-value + /// Number of measurements + /// Number of processed measurements + /// Number of measurements at last analysis + /// ID of last Unit + /// ID of last original Unit + /// Last original value which is stored + /// Last Value + /// Last original value which is stored + /// ID of last source + /// Number of correlations for this variable + /// status + /// error_message + /// When this variable or its settings were last updated + /// Standard deviation + /// Variance + /// Minimum recorded value of this variable + /// Maximum recorded value of this variable + /// Mean + /// Median /// Most common Unit ID /// Most common value /// Number of unique daily values @@ -1647,23 +2391,581 @@ public InlineResponse20016 OrganizationUserVariablesGet (string accessToken = nu /// Location /// When the record was first created. Use ISO 8601 datetime format /// When the record was last updated. Use ISO 8601 datetime format - /// Outcome variables (those with `outcome` == 1) are variables for which a human would generally want to identify the influencing factors. These include symptoms of illness, physique, mood, cognitive performance, etc. Generally correlation calculations are only performed on outcome variables - /// Comma-separated list of source names to limit variables to those sources - /// Earliest source time - /// Latest source time - /// Earliest measurement time - /// Latest measurement time - /// Earliest filling time - /// Latest filling time + /// Outcome variables (those with `outcome` == 1) are variables for which a human would generally want to identify the influencing factors. These include symptoms of illness, physique, mood, cognitive performance, etc. Generally correlation calculations are only performed on outcome variables + /// Comma-separated list of source names to limit variables to those sources + /// Earliest source time + /// Latest source time + /// Earliest measurement time + /// Latest measurement time + /// Earliest filling time + /// Latest filling time + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// ApiResponse of InlineResponse20018 + public ApiResponse< InlineResponse20018 > OrganizationUserVariablesGetWithHttpInfo (string accessToken = null, string clientId = null, int? parentId = null, int? variableId = null, int? defaultUnitId = null, double? minimumAllowedValue = null, double? maximumAllowedValue = null, double? fillingValue = null, int? joinWith = null, int? onsetDelay = null, int? durationOfAction = null, int? variableCategoryId = null, int? updated = null, int? _public = null, bool? causeOnly = null, string fillingType = null, int? numberOfMeasurements = null, int? numberOfProcessedMeasurements = null, int? measurementsAtLastAnalysis = null, int? lastUnitId = null, int? lastOriginalUnitId = null, int? lastOriginalValue = null, double? lastValue = null, double? lastOriginalValue2 = null, int? lastSourceId = null, int? numberOfCorrelations = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, double? standardDeviation = null, double? variance = null, double? minimumRecordedValue = null, double? maximumRecordedValue = null, double? mean = null, double? median = null, int? mostCommonUnitId = null, double? mostCommonValue = null, double? numberOfUniqueDailyValues = null, int? numberOfChanges = null, double? skewness = null, double? kurtosis = null, double? latitude = null, double? longitude = null, string location = null, string createdAt = null, string updatedAt = null, bool? outcome = null, string sources = null, int? earliestSourceTime = null, int? latestSourceTime = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, int? earliestFillingTime = null, int? latestFillingTime = null, int? limit = null, int? offset = null, string sort = null) + { + + + var path_ = "/organization/userVariables"; + + var pathParams = new Dictionary(); + var queryParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); + var formParams = new Dictionary(); + var fileParams = new Dictionary(); + String postBody = null; + + // to determine the Accept header + String[] http_header_accepts = new String[] { + "application/json" + }; + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); + if (http_header_accept != null) + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + pathParams.Add("format", "json"); + + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + if (clientId != null) queryParams.Add("client_id", Configuration.ApiClient.ParameterToString(clientId)); // query parameter + if (parentId != null) queryParams.Add("parent_id", Configuration.ApiClient.ParameterToString(parentId)); // query parameter + if (variableId != null) queryParams.Add("variable_id", Configuration.ApiClient.ParameterToString(variableId)); // query parameter + if (defaultUnitId != null) queryParams.Add("default_unit_id", Configuration.ApiClient.ParameterToString(defaultUnitId)); // query parameter + if (minimumAllowedValue != null) queryParams.Add("minimum_allowed_value", Configuration.ApiClient.ParameterToString(minimumAllowedValue)); // query parameter + if (maximumAllowedValue != null) queryParams.Add("maximum_allowed_value", Configuration.ApiClient.ParameterToString(maximumAllowedValue)); // query parameter + if (fillingValue != null) queryParams.Add("filling_value", Configuration.ApiClient.ParameterToString(fillingValue)); // query parameter + if (joinWith != null) queryParams.Add("join_with", Configuration.ApiClient.ParameterToString(joinWith)); // query parameter + if (onsetDelay != null) queryParams.Add("onset_delay", Configuration.ApiClient.ParameterToString(onsetDelay)); // query parameter + if (durationOfAction != null) queryParams.Add("duration_of_action", Configuration.ApiClient.ParameterToString(durationOfAction)); // query parameter + if (variableCategoryId != null) queryParams.Add("variable_category_id", Configuration.ApiClient.ParameterToString(variableCategoryId)); // query parameter + if (updated != null) queryParams.Add("updated", Configuration.ApiClient.ParameterToString(updated)); // query parameter + if (_public != null) queryParams.Add("public", Configuration.ApiClient.ParameterToString(_public)); // query parameter + if (causeOnly != null) queryParams.Add("cause_only", Configuration.ApiClient.ParameterToString(causeOnly)); // query parameter + if (fillingType != null) queryParams.Add("filling_type", Configuration.ApiClient.ParameterToString(fillingType)); // query parameter + if (numberOfMeasurements != null) queryParams.Add("number_of_measurements", Configuration.ApiClient.ParameterToString(numberOfMeasurements)); // query parameter + if (numberOfProcessedMeasurements != null) queryParams.Add("number_of_processed_measurements", Configuration.ApiClient.ParameterToString(numberOfProcessedMeasurements)); // query parameter + if (measurementsAtLastAnalysis != null) queryParams.Add("measurements_at_last_analysis", Configuration.ApiClient.ParameterToString(measurementsAtLastAnalysis)); // query parameter + if (lastUnitId != null) queryParams.Add("last_unit_id", Configuration.ApiClient.ParameterToString(lastUnitId)); // query parameter + if (lastOriginalUnitId != null) queryParams.Add("last_original_unit_id", Configuration.ApiClient.ParameterToString(lastOriginalUnitId)); // query parameter + if (lastOriginalValue != null) queryParams.Add("last_original_value", Configuration.ApiClient.ParameterToString(lastOriginalValue)); // query parameter + if (lastValue != null) queryParams.Add("last_value", Configuration.ApiClient.ParameterToString(lastValue)); // query parameter + if (lastOriginalValue2 != null) queryParams.Add("last_original_value", Configuration.ApiClient.ParameterToString(lastOriginalValue2)); // query parameter + if (lastSourceId != null) queryParams.Add("last_source_id", Configuration.ApiClient.ParameterToString(lastSourceId)); // query parameter + if (numberOfCorrelations != null) queryParams.Add("number_of_correlations", Configuration.ApiClient.ParameterToString(numberOfCorrelations)); // query parameter + if (status != null) queryParams.Add("status", Configuration.ApiClient.ParameterToString(status)); // query parameter + if (errorMessage != null) queryParams.Add("error_message", Configuration.ApiClient.ParameterToString(errorMessage)); // query parameter + if (lastSuccessfulUpdateTime != null) queryParams.Add("last_successful_update_time", Configuration.ApiClient.ParameterToString(lastSuccessfulUpdateTime)); // query parameter + if (standardDeviation != null) queryParams.Add("standard_deviation", Configuration.ApiClient.ParameterToString(standardDeviation)); // query parameter + if (variance != null) queryParams.Add("variance", Configuration.ApiClient.ParameterToString(variance)); // query parameter + if (minimumRecordedValue != null) queryParams.Add("minimum_recorded_value", Configuration.ApiClient.ParameterToString(minimumRecordedValue)); // query parameter + if (maximumRecordedValue != null) queryParams.Add("maximum_recorded_value", Configuration.ApiClient.ParameterToString(maximumRecordedValue)); // query parameter + if (mean != null) queryParams.Add("mean", Configuration.ApiClient.ParameterToString(mean)); // query parameter + if (median != null) queryParams.Add("median", Configuration.ApiClient.ParameterToString(median)); // query parameter + if (mostCommonUnitId != null) queryParams.Add("most_common_unit_id", Configuration.ApiClient.ParameterToString(mostCommonUnitId)); // query parameter + if (mostCommonValue != null) queryParams.Add("most_common_value", Configuration.ApiClient.ParameterToString(mostCommonValue)); // query parameter + if (numberOfUniqueDailyValues != null) queryParams.Add("number_of_unique_daily_values", Configuration.ApiClient.ParameterToString(numberOfUniqueDailyValues)); // query parameter + if (numberOfChanges != null) queryParams.Add("number_of_changes", Configuration.ApiClient.ParameterToString(numberOfChanges)); // query parameter + if (skewness != null) queryParams.Add("skewness", Configuration.ApiClient.ParameterToString(skewness)); // query parameter + if (kurtosis != null) queryParams.Add("kurtosis", Configuration.ApiClient.ParameterToString(kurtosis)); // query parameter + if (latitude != null) queryParams.Add("latitude", Configuration.ApiClient.ParameterToString(latitude)); // query parameter + if (longitude != null) queryParams.Add("longitude", Configuration.ApiClient.ParameterToString(longitude)); // query parameter + if (location != null) queryParams.Add("location", Configuration.ApiClient.ParameterToString(location)); // query parameter + if (createdAt != null) queryParams.Add("created_at", Configuration.ApiClient.ParameterToString(createdAt)); // query parameter + if (updatedAt != null) queryParams.Add("updated_at", Configuration.ApiClient.ParameterToString(updatedAt)); // query parameter + if (outcome != null) queryParams.Add("outcome", Configuration.ApiClient.ParameterToString(outcome)); // query parameter + if (sources != null) queryParams.Add("sources", Configuration.ApiClient.ParameterToString(sources)); // query parameter + if (earliestSourceTime != null) queryParams.Add("earliest_source_time", Configuration.ApiClient.ParameterToString(earliestSourceTime)); // query parameter + if (latestSourceTime != null) queryParams.Add("latest_source_time", Configuration.ApiClient.ParameterToString(latestSourceTime)); // query parameter + if (earliestMeasurementTime != null) queryParams.Add("earliest_measurement_time", Configuration.ApiClient.ParameterToString(earliestMeasurementTime)); // query parameter + if (latestMeasurementTime != null) queryParams.Add("latest_measurement_time", Configuration.ApiClient.ParameterToString(latestMeasurementTime)); // query parameter + if (earliestFillingTime != null) queryParams.Add("earliest_filling_time", Configuration.ApiClient.ParameterToString(earliestFillingTime)); // query parameter + if (latestFillingTime != null) queryParams.Add("latest_filling_time", Configuration.ApiClient.ParameterToString(latestFillingTime)); // query parameter + if (limit != null) queryParams.Add("limit", Configuration.ApiClient.ParameterToString(limit)); // query parameter + if (offset != null) queryParams.Add("offset", Configuration.ApiClient.ParameterToString(offset)); // query parameter + if (sort != null) queryParams.Add("sort", Configuration.ApiClient.ParameterToString(sort)); // query parameter + + + + + + + + // make the HTTP request + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling OrganizationUserVariablesGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling OrganizationUserVariablesGet: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20018) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20018))); + + } + + /// + /// Get all UserVariables Get all UserVariables + /// + /// User's OAuth2 access token + /// The ID of the client application which last created or updated this user variable + /// ID of the parent variable if this variable has any parent + /// ID of variable + /// D of unit to use for this variable + /// Minimum reasonable value for this variable (uses default unit) + /// Maximum reasonable value for this variable (uses default unit) + /// Value for replacing null measurements + /// The Variable this Variable should be joined with. If the variable is joined with some other variable then it is not shown to user in the list of variables + /// Estimated number of seconds that pass before a stimulus produces a perceivable effect + /// Estimated duration of time following the onset delay in which a stimulus produces a perceivable effect + /// ID of variable category + /// updated + /// Is variable public + /// A value of 1 indicates that this variable is generally a cause in a causal relationship. An example of a causeOnly variable would be a variable such as Cloud Cover which would generally not be influenced by the behaviour of the user + /// 0 -> No filling, 1 -> Use filling-value + /// Number of measurements + /// Number of processed measurements + /// Number of measurements at last analysis + /// ID of last Unit + /// ID of last original Unit + /// Last original value which is stored + /// Last Value + /// Last original value which is stored + /// ID of last source + /// Number of correlations for this variable + /// status + /// error_message + /// When this variable or its settings were last updated + /// Standard deviation + /// Variance + /// Minimum recorded value of this variable + /// Maximum recorded value of this variable + /// Mean + /// Median + /// Most common Unit ID + /// Most common value + /// Number of unique daily values + /// Number of changes + /// Skewness + /// Kurtosis + /// Latitude + /// Longitude + /// Location + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// Outcome variables (those with `outcome` == 1) are variables for which a human would generally want to identify the influencing factors. These include symptoms of illness, physique, mood, cognitive performance, etc. Generally correlation calculations are only performed on outcome variables + /// Comma-separated list of source names to limit variables to those sources + /// Earliest source time + /// Latest source time + /// Earliest measurement time + /// Latest measurement time + /// Earliest filling time + /// Latest filling time + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of InlineResponse20018 + public async System.Threading.Tasks.Task OrganizationUserVariablesGetAsync (string accessToken = null, string clientId = null, int? parentId = null, int? variableId = null, int? defaultUnitId = null, double? minimumAllowedValue = null, double? maximumAllowedValue = null, double? fillingValue = null, int? joinWith = null, int? onsetDelay = null, int? durationOfAction = null, int? variableCategoryId = null, int? updated = null, int? _public = null, bool? causeOnly = null, string fillingType = null, int? numberOfMeasurements = null, int? numberOfProcessedMeasurements = null, int? measurementsAtLastAnalysis = null, int? lastUnitId = null, int? lastOriginalUnitId = null, int? lastOriginalValue = null, double? lastValue = null, double? lastOriginalValue2 = null, int? lastSourceId = null, int? numberOfCorrelations = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, double? standardDeviation = null, double? variance = null, double? minimumRecordedValue = null, double? maximumRecordedValue = null, double? mean = null, double? median = null, int? mostCommonUnitId = null, double? mostCommonValue = null, double? numberOfUniqueDailyValues = null, int? numberOfChanges = null, double? skewness = null, double? kurtosis = null, double? latitude = null, double? longitude = null, string location = null, string createdAt = null, string updatedAt = null, bool? outcome = null, string sources = null, int? earliestSourceTime = null, int? latestSourceTime = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, int? earliestFillingTime = null, int? latestFillingTime = null, int? limit = null, int? offset = null, string sort = null) + { + ApiResponse response = await OrganizationUserVariablesGetAsyncWithHttpInfo(accessToken, clientId, parentId, variableId, defaultUnitId, minimumAllowedValue, maximumAllowedValue, fillingValue, joinWith, onsetDelay, durationOfAction, variableCategoryId, updated, _public, causeOnly, fillingType, numberOfMeasurements, numberOfProcessedMeasurements, measurementsAtLastAnalysis, lastUnitId, lastOriginalUnitId, lastOriginalValue, lastValue, lastOriginalValue2, lastSourceId, numberOfCorrelations, status, errorMessage, lastSuccessfulUpdateTime, standardDeviation, variance, minimumRecordedValue, maximumRecordedValue, mean, median, mostCommonUnitId, mostCommonValue, numberOfUniqueDailyValues, numberOfChanges, skewness, kurtosis, latitude, longitude, location, createdAt, updatedAt, outcome, sources, earliestSourceTime, latestSourceTime, earliestMeasurementTime, latestMeasurementTime, earliestFillingTime, latestFillingTime, limit, offset, sort); + return response.Data; + + } + + /// + /// Get all UserVariables Get all UserVariables + /// + /// User's OAuth2 access token + /// The ID of the client application which last created or updated this user variable + /// ID of the parent variable if this variable has any parent + /// ID of variable + /// D of unit to use for this variable + /// Minimum reasonable value for this variable (uses default unit) + /// Maximum reasonable value for this variable (uses default unit) + /// Value for replacing null measurements + /// The Variable this Variable should be joined with. If the variable is joined with some other variable then it is not shown to user in the list of variables + /// Estimated number of seconds that pass before a stimulus produces a perceivable effect + /// Estimated duration of time following the onset delay in which a stimulus produces a perceivable effect + /// ID of variable category + /// updated + /// Is variable public + /// A value of 1 indicates that this variable is generally a cause in a causal relationship. An example of a causeOnly variable would be a variable such as Cloud Cover which would generally not be influenced by the behaviour of the user + /// 0 -> No filling, 1 -> Use filling-value + /// Number of measurements + /// Number of processed measurements + /// Number of measurements at last analysis + /// ID of last Unit + /// ID of last original Unit + /// Last original value which is stored + /// Last Value + /// Last original value which is stored + /// ID of last source + /// Number of correlations for this variable + /// status + /// error_message + /// When this variable or its settings were last updated + /// Standard deviation + /// Variance + /// Minimum recorded value of this variable + /// Maximum recorded value of this variable + /// Mean + /// Median + /// Most common Unit ID + /// Most common value + /// Number of unique daily values + /// Number of changes + /// Skewness + /// Kurtosis + /// Latitude + /// Longitude + /// Location + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// Outcome variables (those with `outcome` == 1) are variables for which a human would generally want to identify the influencing factors. These include symptoms of illness, physique, mood, cognitive performance, etc. Generally correlation calculations are only performed on outcome variables + /// Comma-separated list of source names to limit variables to those sources + /// Earliest source time + /// Latest source time + /// Earliest measurement time + /// Latest measurement time + /// Earliest filling time + /// Latest filling time + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of ApiResponse (InlineResponse20018) + public async System.Threading.Tasks.Task> OrganizationUserVariablesGetAsyncWithHttpInfo (string accessToken = null, string clientId = null, int? parentId = null, int? variableId = null, int? defaultUnitId = null, double? minimumAllowedValue = null, double? maximumAllowedValue = null, double? fillingValue = null, int? joinWith = null, int? onsetDelay = null, int? durationOfAction = null, int? variableCategoryId = null, int? updated = null, int? _public = null, bool? causeOnly = null, string fillingType = null, int? numberOfMeasurements = null, int? numberOfProcessedMeasurements = null, int? measurementsAtLastAnalysis = null, int? lastUnitId = null, int? lastOriginalUnitId = null, int? lastOriginalValue = null, double? lastValue = null, double? lastOriginalValue2 = null, int? lastSourceId = null, int? numberOfCorrelations = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, double? standardDeviation = null, double? variance = null, double? minimumRecordedValue = null, double? maximumRecordedValue = null, double? mean = null, double? median = null, int? mostCommonUnitId = null, double? mostCommonValue = null, double? numberOfUniqueDailyValues = null, int? numberOfChanges = null, double? skewness = null, double? kurtosis = null, double? latitude = null, double? longitude = null, string location = null, string createdAt = null, string updatedAt = null, bool? outcome = null, string sources = null, int? earliestSourceTime = null, int? latestSourceTime = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, int? earliestFillingTime = null, int? latestFillingTime = null, int? limit = null, int? offset = null, string sort = null) + { + + + var path_ = "/organization/userVariables"; + + var pathParams = new Dictionary(); + var queryParams = new Dictionary(); + var headerParams = new Dictionary(); + var formParams = new Dictionary(); + var fileParams = new Dictionary(); + String postBody = null; + + // to determine the Accept header + String[] http_header_accepts = new String[] { + "application/json" + }; + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); + if (http_header_accept != null) + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + pathParams.Add("format", "json"); + + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + if (clientId != null) queryParams.Add("client_id", Configuration.ApiClient.ParameterToString(clientId)); // query parameter + if (parentId != null) queryParams.Add("parent_id", Configuration.ApiClient.ParameterToString(parentId)); // query parameter + if (variableId != null) queryParams.Add("variable_id", Configuration.ApiClient.ParameterToString(variableId)); // query parameter + if (defaultUnitId != null) queryParams.Add("default_unit_id", Configuration.ApiClient.ParameterToString(defaultUnitId)); // query parameter + if (minimumAllowedValue != null) queryParams.Add("minimum_allowed_value", Configuration.ApiClient.ParameterToString(minimumAllowedValue)); // query parameter + if (maximumAllowedValue != null) queryParams.Add("maximum_allowed_value", Configuration.ApiClient.ParameterToString(maximumAllowedValue)); // query parameter + if (fillingValue != null) queryParams.Add("filling_value", Configuration.ApiClient.ParameterToString(fillingValue)); // query parameter + if (joinWith != null) queryParams.Add("join_with", Configuration.ApiClient.ParameterToString(joinWith)); // query parameter + if (onsetDelay != null) queryParams.Add("onset_delay", Configuration.ApiClient.ParameterToString(onsetDelay)); // query parameter + if (durationOfAction != null) queryParams.Add("duration_of_action", Configuration.ApiClient.ParameterToString(durationOfAction)); // query parameter + if (variableCategoryId != null) queryParams.Add("variable_category_id", Configuration.ApiClient.ParameterToString(variableCategoryId)); // query parameter + if (updated != null) queryParams.Add("updated", Configuration.ApiClient.ParameterToString(updated)); // query parameter + if (_public != null) queryParams.Add("public", Configuration.ApiClient.ParameterToString(_public)); // query parameter + if (causeOnly != null) queryParams.Add("cause_only", Configuration.ApiClient.ParameterToString(causeOnly)); // query parameter + if (fillingType != null) queryParams.Add("filling_type", Configuration.ApiClient.ParameterToString(fillingType)); // query parameter + if (numberOfMeasurements != null) queryParams.Add("number_of_measurements", Configuration.ApiClient.ParameterToString(numberOfMeasurements)); // query parameter + if (numberOfProcessedMeasurements != null) queryParams.Add("number_of_processed_measurements", Configuration.ApiClient.ParameterToString(numberOfProcessedMeasurements)); // query parameter + if (measurementsAtLastAnalysis != null) queryParams.Add("measurements_at_last_analysis", Configuration.ApiClient.ParameterToString(measurementsAtLastAnalysis)); // query parameter + if (lastUnitId != null) queryParams.Add("last_unit_id", Configuration.ApiClient.ParameterToString(lastUnitId)); // query parameter + if (lastOriginalUnitId != null) queryParams.Add("last_original_unit_id", Configuration.ApiClient.ParameterToString(lastOriginalUnitId)); // query parameter + if (lastOriginalValue != null) queryParams.Add("last_original_value", Configuration.ApiClient.ParameterToString(lastOriginalValue)); // query parameter + if (lastValue != null) queryParams.Add("last_value", Configuration.ApiClient.ParameterToString(lastValue)); // query parameter + if (lastOriginalValue2 != null) queryParams.Add("last_original_value", Configuration.ApiClient.ParameterToString(lastOriginalValue2)); // query parameter + if (lastSourceId != null) queryParams.Add("last_source_id", Configuration.ApiClient.ParameterToString(lastSourceId)); // query parameter + if (numberOfCorrelations != null) queryParams.Add("number_of_correlations", Configuration.ApiClient.ParameterToString(numberOfCorrelations)); // query parameter + if (status != null) queryParams.Add("status", Configuration.ApiClient.ParameterToString(status)); // query parameter + if (errorMessage != null) queryParams.Add("error_message", Configuration.ApiClient.ParameterToString(errorMessage)); // query parameter + if (lastSuccessfulUpdateTime != null) queryParams.Add("last_successful_update_time", Configuration.ApiClient.ParameterToString(lastSuccessfulUpdateTime)); // query parameter + if (standardDeviation != null) queryParams.Add("standard_deviation", Configuration.ApiClient.ParameterToString(standardDeviation)); // query parameter + if (variance != null) queryParams.Add("variance", Configuration.ApiClient.ParameterToString(variance)); // query parameter + if (minimumRecordedValue != null) queryParams.Add("minimum_recorded_value", Configuration.ApiClient.ParameterToString(minimumRecordedValue)); // query parameter + if (maximumRecordedValue != null) queryParams.Add("maximum_recorded_value", Configuration.ApiClient.ParameterToString(maximumRecordedValue)); // query parameter + if (mean != null) queryParams.Add("mean", Configuration.ApiClient.ParameterToString(mean)); // query parameter + if (median != null) queryParams.Add("median", Configuration.ApiClient.ParameterToString(median)); // query parameter + if (mostCommonUnitId != null) queryParams.Add("most_common_unit_id", Configuration.ApiClient.ParameterToString(mostCommonUnitId)); // query parameter + if (mostCommonValue != null) queryParams.Add("most_common_value", Configuration.ApiClient.ParameterToString(mostCommonValue)); // query parameter + if (numberOfUniqueDailyValues != null) queryParams.Add("number_of_unique_daily_values", Configuration.ApiClient.ParameterToString(numberOfUniqueDailyValues)); // query parameter + if (numberOfChanges != null) queryParams.Add("number_of_changes", Configuration.ApiClient.ParameterToString(numberOfChanges)); // query parameter + if (skewness != null) queryParams.Add("skewness", Configuration.ApiClient.ParameterToString(skewness)); // query parameter + if (kurtosis != null) queryParams.Add("kurtosis", Configuration.ApiClient.ParameterToString(kurtosis)); // query parameter + if (latitude != null) queryParams.Add("latitude", Configuration.ApiClient.ParameterToString(latitude)); // query parameter + if (longitude != null) queryParams.Add("longitude", Configuration.ApiClient.ParameterToString(longitude)); // query parameter + if (location != null) queryParams.Add("location", Configuration.ApiClient.ParameterToString(location)); // query parameter + if (createdAt != null) queryParams.Add("created_at", Configuration.ApiClient.ParameterToString(createdAt)); // query parameter + if (updatedAt != null) queryParams.Add("updated_at", Configuration.ApiClient.ParameterToString(updatedAt)); // query parameter + if (outcome != null) queryParams.Add("outcome", Configuration.ApiClient.ParameterToString(outcome)); // query parameter + if (sources != null) queryParams.Add("sources", Configuration.ApiClient.ParameterToString(sources)); // query parameter + if (earliestSourceTime != null) queryParams.Add("earliest_source_time", Configuration.ApiClient.ParameterToString(earliestSourceTime)); // query parameter + if (latestSourceTime != null) queryParams.Add("latest_source_time", Configuration.ApiClient.ParameterToString(latestSourceTime)); // query parameter + if (earliestMeasurementTime != null) queryParams.Add("earliest_measurement_time", Configuration.ApiClient.ParameterToString(earliestMeasurementTime)); // query parameter + if (latestMeasurementTime != null) queryParams.Add("latest_measurement_time", Configuration.ApiClient.ParameterToString(latestMeasurementTime)); // query parameter + if (earliestFillingTime != null) queryParams.Add("earliest_filling_time", Configuration.ApiClient.ParameterToString(earliestFillingTime)); // query parameter + if (latestFillingTime != null) queryParams.Add("latest_filling_time", Configuration.ApiClient.ParameterToString(latestFillingTime)); // query parameter + if (limit != null) queryParams.Add("limit", Configuration.ApiClient.ParameterToString(limit)); // query parameter + if (offset != null) queryParams.Add("offset", Configuration.ApiClient.ParameterToString(offset)); // query parameter + if (sort != null) queryParams.Add("sort", Configuration.ApiClient.ParameterToString(sort)); // query parameter + + + + + + + + // make the HTTP request + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling OrganizationUserVariablesGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling OrganizationUserVariablesGet: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20018) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20018))); + + } + + /// + /// Get all VariableUserSources Get all VariableUserSources + /// + /// User's OAuth2 access token + /// ID of variable + /// Time that this measurement occurred Uses epoch minute (epoch time divided by 60) + /// Earliest measurement time + /// Latest measurement time + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// InlineResponse20019 + public InlineResponse20019 OrganizationVariableUserSourcesGet (string accessToken = null, int? variableId = null, int? timestamp = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) + { + ApiResponse response = OrganizationVariableUserSourcesGetWithHttpInfo(accessToken, variableId, timestamp, earliestMeasurementTime, latestMeasurementTime, createdAt, updatedAt, limit, offset, sort); + return response.Data; + } + + /// + /// Get all VariableUserSources Get all VariableUserSources + /// + /// User's OAuth2 access token + /// ID of variable + /// Time that this measurement occurred Uses epoch minute (epoch time divided by 60) + /// Earliest measurement time + /// Latest measurement time + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// ApiResponse of InlineResponse20019 + public ApiResponse< InlineResponse20019 > OrganizationVariableUserSourcesGetWithHttpInfo (string accessToken = null, int? variableId = null, int? timestamp = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) + { + + + var path_ = "/organization/variableUserSources"; + + var pathParams = new Dictionary(); + var queryParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); + var formParams = new Dictionary(); + var fileParams = new Dictionary(); + String postBody = null; + + // to determine the Accept header + String[] http_header_accepts = new String[] { + "application/json" + }; + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); + if (http_header_accept != null) + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + pathParams.Add("format", "json"); + + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + if (variableId != null) queryParams.Add("variable_id", Configuration.ApiClient.ParameterToString(variableId)); // query parameter + if (timestamp != null) queryParams.Add("timestamp", Configuration.ApiClient.ParameterToString(timestamp)); // query parameter + if (earliestMeasurementTime != null) queryParams.Add("earliest_measurement_time", Configuration.ApiClient.ParameterToString(earliestMeasurementTime)); // query parameter + if (latestMeasurementTime != null) queryParams.Add("latest_measurement_time", Configuration.ApiClient.ParameterToString(latestMeasurementTime)); // query parameter + if (createdAt != null) queryParams.Add("created_at", Configuration.ApiClient.ParameterToString(createdAt)); // query parameter + if (updatedAt != null) queryParams.Add("updated_at", Configuration.ApiClient.ParameterToString(updatedAt)); // query parameter + if (limit != null) queryParams.Add("limit", Configuration.ApiClient.ParameterToString(limit)); // query parameter + if (offset != null) queryParams.Add("offset", Configuration.ApiClient.ParameterToString(offset)); // query parameter + if (sort != null) queryParams.Add("sort", Configuration.ApiClient.ParameterToString(sort)); // query parameter + + + + + + + + // make the HTTP request + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling OrganizationVariableUserSourcesGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling OrganizationVariableUserSourcesGet: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20019) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20019))); + + } + + /// + /// Get all VariableUserSources Get all VariableUserSources + /// + /// User's OAuth2 access token + /// ID of variable + /// Time that this measurement occurred Uses epoch minute (epoch time divided by 60) + /// Earliest measurement time + /// Latest measurement time + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of InlineResponse20019 + public async System.Threading.Tasks.Task OrganizationVariableUserSourcesGetAsync (string accessToken = null, int? variableId = null, int? timestamp = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) + { + ApiResponse response = await OrganizationVariableUserSourcesGetAsyncWithHttpInfo(accessToken, variableId, timestamp, earliestMeasurementTime, latestMeasurementTime, createdAt, updatedAt, limit, offset, sort); + return response.Data; + + } + + /// + /// Get all VariableUserSources Get all VariableUserSources + /// + /// User's OAuth2 access token + /// ID of variable + /// Time that this measurement occurred Uses epoch minute (epoch time divided by 60) + /// Earliest measurement time + /// Latest measurement time + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of ApiResponse (InlineResponse20019) + public async System.Threading.Tasks.Task> OrganizationVariableUserSourcesGetAsyncWithHttpInfo (string accessToken = null, int? variableId = null, int? timestamp = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) + { + + + var path_ = "/organization/variableUserSources"; + + var pathParams = new Dictionary(); + var queryParams = new Dictionary(); + var headerParams = new Dictionary(); + var formParams = new Dictionary(); + var fileParams = new Dictionary(); + String postBody = null; + + // to determine the Accept header + String[] http_header_accepts = new String[] { + "application/json" + }; + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); + if (http_header_accept != null) + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + pathParams.Add("format", "json"); + + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + if (variableId != null) queryParams.Add("variable_id", Configuration.ApiClient.ParameterToString(variableId)); // query parameter + if (timestamp != null) queryParams.Add("timestamp", Configuration.ApiClient.ParameterToString(timestamp)); // query parameter + if (earliestMeasurementTime != null) queryParams.Add("earliest_measurement_time", Configuration.ApiClient.ParameterToString(earliestMeasurementTime)); // query parameter + if (latestMeasurementTime != null) queryParams.Add("latest_measurement_time", Configuration.ApiClient.ParameterToString(latestMeasurementTime)); // query parameter + if (createdAt != null) queryParams.Add("created_at", Configuration.ApiClient.ParameterToString(createdAt)); // query parameter + if (updatedAt != null) queryParams.Add("updated_at", Configuration.ApiClient.ParameterToString(updatedAt)); // query parameter + if (limit != null) queryParams.Add("limit", Configuration.ApiClient.ParameterToString(limit)); // query parameter + if (offset != null) queryParams.Add("offset", Configuration.ApiClient.ParameterToString(offset)); // query parameter + if (sort != null) queryParams.Add("sort", Configuration.ApiClient.ParameterToString(sort)); // query parameter + + + + + + + + // make the HTTP request + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling OrganizationVariableUserSourcesGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling OrganizationVariableUserSourcesGet: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20019) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20019))); + + } + + /// + /// Get all Votes Get all Votes + /// + /// User's OAuth2 access token + /// The ID of the client application which last created or updated this vote + /// ID of predictor variable + /// ID of outcome variable + /// Value of Vote. 1 is for upvote. 0 is for downvote. Otherwise, there is no vote. + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// ApiResponse of InlineResponse20016 - public ApiResponse< InlineResponse20016 > OrganizationUserVariablesGetWithHttpInfo (string accessToken = null, string clientId = null, int? parentId = null, int? variableId = null, int? defaultUnitId = null, double? minimumAllowedValue = null, double? maximumAllowedValue = null, double? fillingValue = null, int? joinWith = null, int? onsetDelay = null, int? durationOfAction = null, int? variableCategoryId = null, int? updated = null, int? _public = null, bool? causeOnly = null, string fillingType = null, int? numberOfMeasurements = null, int? numberOfProcessedMeasurements = null, int? measurementsAtLastAnalysis = null, int? lastUnitId = null, int? lastOriginalUnitId = null, int? lastOriginalValue = null, double? lastValue = null, double? lastOriginalValue2 = null, int? lastSourceId = null, int? numberOfCorrelations = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, double? standardDeviation = null, double? variance = null, double? minimumRecordedValue = null, double? maximumRecordedValue = null, double? mean = null, double? median = null, int? mostCommonUnitId = null, double? mostCommonValue = null, double? numberOfUniqueDailyValues = null, int? numberOfChanges = null, double? skewness = null, double? kurtosis = null, double? latitude = null, double? longitude = null, string location = null, string createdAt = null, string updatedAt = null, bool? outcome = null, string sources = null, int? earliestSourceTime = null, int? latestSourceTime = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, int? earliestFillingTime = null, int? latestFillingTime = null, int? limit = null, int? offset = null, string sort = null) + /// InlineResponse20020 + public InlineResponse20020 OrganizationVotesGet (string accessToken = null, string clientId = null, int? causeId = null, int? effectId = null, int? value = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) + { + ApiResponse response = OrganizationVotesGetWithHttpInfo(accessToken, clientId, causeId, effectId, value, createdAt, updatedAt, limit, offset, sort); + return response.Data; + } + + /// + /// Get all Votes Get all Votes + /// + /// User's OAuth2 access token + /// The ID of the client application which last created or updated this vote + /// ID of predictor variable + /// ID of outcome variable + /// Value of Vote. 1 is for upvote. 0 is for downvote. Otherwise, there is no vote. + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// ApiResponse of InlineResponse20020 + public ApiResponse< InlineResponse20020 > OrganizationVotesGetWithHttpInfo (string accessToken = null, string clientId = null, int? causeId = null, int? effectId = null, int? value = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) { - var path_ = "/organization/userVariables"; + var path_ = "/organization/votes"; var pathParams = new Dictionary(); var queryParams = new Dictionary(); @@ -1686,58 +2988,11 @@ public ApiResponse< InlineResponse20016 > OrganizationUserVariablesGetWithHttpIn if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter if (clientId != null) queryParams.Add("client_id", Configuration.ApiClient.ParameterToString(clientId)); // query parameter - if (parentId != null) queryParams.Add("parent_id", Configuration.ApiClient.ParameterToString(parentId)); // query parameter - if (variableId != null) queryParams.Add("variable_id", Configuration.ApiClient.ParameterToString(variableId)); // query parameter - if (defaultUnitId != null) queryParams.Add("default_unit_id", Configuration.ApiClient.ParameterToString(defaultUnitId)); // query parameter - if (minimumAllowedValue != null) queryParams.Add("minimum_allowed_value", Configuration.ApiClient.ParameterToString(minimumAllowedValue)); // query parameter - if (maximumAllowedValue != null) queryParams.Add("maximum_allowed_value", Configuration.ApiClient.ParameterToString(maximumAllowedValue)); // query parameter - if (fillingValue != null) queryParams.Add("filling_value", Configuration.ApiClient.ParameterToString(fillingValue)); // query parameter - if (joinWith != null) queryParams.Add("join_with", Configuration.ApiClient.ParameterToString(joinWith)); // query parameter - if (onsetDelay != null) queryParams.Add("onset_delay", Configuration.ApiClient.ParameterToString(onsetDelay)); // query parameter - if (durationOfAction != null) queryParams.Add("duration_of_action", Configuration.ApiClient.ParameterToString(durationOfAction)); // query parameter - if (variableCategoryId != null) queryParams.Add("variable_category_id", Configuration.ApiClient.ParameterToString(variableCategoryId)); // query parameter - if (updated != null) queryParams.Add("updated", Configuration.ApiClient.ParameterToString(updated)); // query parameter - if (_public != null) queryParams.Add("public", Configuration.ApiClient.ParameterToString(_public)); // query parameter - if (causeOnly != null) queryParams.Add("cause_only", Configuration.ApiClient.ParameterToString(causeOnly)); // query parameter - if (fillingType != null) queryParams.Add("filling_type", Configuration.ApiClient.ParameterToString(fillingType)); // query parameter - if (numberOfMeasurements != null) queryParams.Add("number_of_measurements", Configuration.ApiClient.ParameterToString(numberOfMeasurements)); // query parameter - if (numberOfProcessedMeasurements != null) queryParams.Add("number_of_processed_measurements", Configuration.ApiClient.ParameterToString(numberOfProcessedMeasurements)); // query parameter - if (measurementsAtLastAnalysis != null) queryParams.Add("measurements_at_last_analysis", Configuration.ApiClient.ParameterToString(measurementsAtLastAnalysis)); // query parameter - if (lastUnitId != null) queryParams.Add("last_unit_id", Configuration.ApiClient.ParameterToString(lastUnitId)); // query parameter - if (lastOriginalUnitId != null) queryParams.Add("last_original_unit_id", Configuration.ApiClient.ParameterToString(lastOriginalUnitId)); // query parameter - if (lastOriginalValue != null) queryParams.Add("last_original_value", Configuration.ApiClient.ParameterToString(lastOriginalValue)); // query parameter - if (lastValue != null) queryParams.Add("last_value", Configuration.ApiClient.ParameterToString(lastValue)); // query parameter - if (lastOriginalValue2 != null) queryParams.Add("last_original_value", Configuration.ApiClient.ParameterToString(lastOriginalValue2)); // query parameter - if (lastSourceId != null) queryParams.Add("last_source_id", Configuration.ApiClient.ParameterToString(lastSourceId)); // query parameter - if (numberOfCorrelations != null) queryParams.Add("number_of_correlations", Configuration.ApiClient.ParameterToString(numberOfCorrelations)); // query parameter - if (status != null) queryParams.Add("status", Configuration.ApiClient.ParameterToString(status)); // query parameter - if (errorMessage != null) queryParams.Add("error_message", Configuration.ApiClient.ParameterToString(errorMessage)); // query parameter - if (lastSuccessfulUpdateTime != null) queryParams.Add("last_successful_update_time", Configuration.ApiClient.ParameterToString(lastSuccessfulUpdateTime)); // query parameter - if (standardDeviation != null) queryParams.Add("standard_deviation", Configuration.ApiClient.ParameterToString(standardDeviation)); // query parameter - if (variance != null) queryParams.Add("variance", Configuration.ApiClient.ParameterToString(variance)); // query parameter - if (minimumRecordedValue != null) queryParams.Add("minimum_recorded_value", Configuration.ApiClient.ParameterToString(minimumRecordedValue)); // query parameter - if (maximumRecordedValue != null) queryParams.Add("maximum_recorded_value", Configuration.ApiClient.ParameterToString(maximumRecordedValue)); // query parameter - if (mean != null) queryParams.Add("mean", Configuration.ApiClient.ParameterToString(mean)); // query parameter - if (median != null) queryParams.Add("median", Configuration.ApiClient.ParameterToString(median)); // query parameter - if (mostCommonUnitId != null) queryParams.Add("most_common_unit_id", Configuration.ApiClient.ParameterToString(mostCommonUnitId)); // query parameter - if (mostCommonValue != null) queryParams.Add("most_common_value", Configuration.ApiClient.ParameterToString(mostCommonValue)); // query parameter - if (numberOfUniqueDailyValues != null) queryParams.Add("number_of_unique_daily_values", Configuration.ApiClient.ParameterToString(numberOfUniqueDailyValues)); // query parameter - if (numberOfChanges != null) queryParams.Add("number_of_changes", Configuration.ApiClient.ParameterToString(numberOfChanges)); // query parameter - if (skewness != null) queryParams.Add("skewness", Configuration.ApiClient.ParameterToString(skewness)); // query parameter - if (kurtosis != null) queryParams.Add("kurtosis", Configuration.ApiClient.ParameterToString(kurtosis)); // query parameter - if (latitude != null) queryParams.Add("latitude", Configuration.ApiClient.ParameterToString(latitude)); // query parameter - if (longitude != null) queryParams.Add("longitude", Configuration.ApiClient.ParameterToString(longitude)); // query parameter - if (location != null) queryParams.Add("location", Configuration.ApiClient.ParameterToString(location)); // query parameter + if (causeId != null) queryParams.Add("cause_id", Configuration.ApiClient.ParameterToString(causeId)); // query parameter + if (effectId != null) queryParams.Add("effect_id", Configuration.ApiClient.ParameterToString(effectId)); // query parameter + if (value != null) queryParams.Add("value", Configuration.ApiClient.ParameterToString(value)); // query parameter if (createdAt != null) queryParams.Add("created_at", Configuration.ApiClient.ParameterToString(createdAt)); // query parameter if (updatedAt != null) queryParams.Add("updated_at", Configuration.ApiClient.ParameterToString(updatedAt)); // query parameter - if (outcome != null) queryParams.Add("outcome", Configuration.ApiClient.ParameterToString(outcome)); // query parameter - if (sources != null) queryParams.Add("sources", Configuration.ApiClient.ParameterToString(sources)); // query parameter - if (earliestSourceTime != null) queryParams.Add("earliest_source_time", Configuration.ApiClient.ParameterToString(earliestSourceTime)); // query parameter - if (latestSourceTime != null) queryParams.Add("latest_source_time", Configuration.ApiClient.ParameterToString(latestSourceTime)); // query parameter - if (earliestMeasurementTime != null) queryParams.Add("earliest_measurement_time", Configuration.ApiClient.ParameterToString(earliestMeasurementTime)); // query parameter - if (latestMeasurementTime != null) queryParams.Add("latest_measurement_time", Configuration.ApiClient.ParameterToString(latestMeasurementTime)); // query parameter - if (earliestFillingTime != null) queryParams.Add("earliest_filling_time", Configuration.ApiClient.ParameterToString(earliestFillingTime)); // query parameter - if (latestFillingTime != null) queryParams.Add("latest_filling_time", Configuration.ApiClient.ParameterToString(latestFillingTime)); // query parameter if (limit != null) queryParams.Add("limit", Configuration.ApiClient.ParameterToString(limit)); // query parameter if (offset != null) queryParams.Add("offset", Configuration.ApiClient.ParameterToString(offset)); // query parameter if (sort != null) queryParams.Add("sort", Configuration.ApiClient.ParameterToString(sort)); // query parameter @@ -1754,150 +3009,56 @@ public ApiResponse< InlineResponse20016 > OrganizationUserVariablesGetWithHttpIn int statusCode = (int) response.StatusCode; if (statusCode >= 400) - throw new ApiException (statusCode, "Error calling OrganizationUserVariablesGet: " + response.Content, response.Content); + throw new ApiException (statusCode, "Error calling OrganizationVotesGet: " + response.Content, response.Content); else if (statusCode == 0) - throw new ApiException (statusCode, "Error calling OrganizationUserVariablesGet: " + response.ErrorMessage, response.ErrorMessage); + throw new ApiException (statusCode, "Error calling OrganizationVotesGet: " + response.ErrorMessage, response.ErrorMessage); - return new ApiResponse(statusCode, + return new ApiResponse(statusCode, response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (InlineResponse20016) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20016))); + (InlineResponse20020) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20020))); } /// - /// Get all UserVariables Get all UserVariables + /// Get all Votes Get all Votes /// /// User's OAuth2 access token - /// The ID of the client application which last created or updated this user variable - /// ID of the parent variable if this variable has any parent - /// ID of variable - /// D of unit to use for this variable - /// Minimum reasonable value for this variable (uses default unit) - /// Maximum reasonable value for this variable (uses default unit) - /// Value for replacing null measurements - /// The Variable this Variable should be joined with. If the variable is joined with some other variable then it is not shown to user in the list of variables - /// Estimated number of seconds that pass before a stimulus produces a perceivable effect - /// Estimated duration of time following the onset delay in which a stimulus produces a perceivable effect - /// ID of variable category - /// updated - /// Is variable public - /// A value of 1 indicates that this variable is generally a cause in a causal relationship. An example of a causeOnly variable would be a variable such as Cloud Cover which would generally not be influenced by the behaviour of the user - /// 0 -> No filling, 1 -> Use filling-value - /// Number of measurements - /// Number of processed measurements - /// Number of measurements at last analysis - /// ID of last Unit - /// ID of last original Unit - /// Last original value which is stored - /// Last Value - /// Last original value which is stored - /// ID of last source - /// Number of correlations for this variable - /// status - /// error_message - /// When this variable or its settings were last updated - /// Standard deviation - /// Variance - /// Minimum recorded value of this variable - /// Maximum recorded value of this variable - /// Mean - /// Median - /// Most common Unit ID - /// Most common value - /// Number of unique daily values - /// Number of changes - /// Skewness - /// Kurtosis - /// Latitude - /// Longitude - /// Location + /// The ID of the client application which last created or updated this vote + /// ID of predictor variable + /// ID of outcome variable + /// Value of Vote. 1 is for upvote. 0 is for downvote. Otherwise, there is no vote. /// When the record was first created. Use ISO 8601 datetime format /// When the record was last updated. Use ISO 8601 datetime format - /// Outcome variables (those with `outcome` == 1) are variables for which a human would generally want to identify the influencing factors. These include symptoms of illness, physique, mood, cognitive performance, etc. Generally correlation calculations are only performed on outcome variables - /// Comma-separated list of source names to limit variables to those sources - /// Earliest source time - /// Latest source time - /// Earliest measurement time - /// Latest measurement time - /// Earliest filling time - /// Latest filling time /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// Task of InlineResponse20016 - public async System.Threading.Tasks.Task OrganizationUserVariablesGetAsync (string accessToken = null, string clientId = null, int? parentId = null, int? variableId = null, int? defaultUnitId = null, double? minimumAllowedValue = null, double? maximumAllowedValue = null, double? fillingValue = null, int? joinWith = null, int? onsetDelay = null, int? durationOfAction = null, int? variableCategoryId = null, int? updated = null, int? _public = null, bool? causeOnly = null, string fillingType = null, int? numberOfMeasurements = null, int? numberOfProcessedMeasurements = null, int? measurementsAtLastAnalysis = null, int? lastUnitId = null, int? lastOriginalUnitId = null, int? lastOriginalValue = null, double? lastValue = null, double? lastOriginalValue2 = null, int? lastSourceId = null, int? numberOfCorrelations = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, double? standardDeviation = null, double? variance = null, double? minimumRecordedValue = null, double? maximumRecordedValue = null, double? mean = null, double? median = null, int? mostCommonUnitId = null, double? mostCommonValue = null, double? numberOfUniqueDailyValues = null, int? numberOfChanges = null, double? skewness = null, double? kurtosis = null, double? latitude = null, double? longitude = null, string location = null, string createdAt = null, string updatedAt = null, bool? outcome = null, string sources = null, int? earliestSourceTime = null, int? latestSourceTime = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, int? earliestFillingTime = null, int? latestFillingTime = null, int? limit = null, int? offset = null, string sort = null) + /// Task of InlineResponse20020 + public async System.Threading.Tasks.Task OrganizationVotesGetAsync (string accessToken = null, string clientId = null, int? causeId = null, int? effectId = null, int? value = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) { - ApiResponse response = await OrganizationUserVariablesGetAsyncWithHttpInfo(accessToken, clientId, parentId, variableId, defaultUnitId, minimumAllowedValue, maximumAllowedValue, fillingValue, joinWith, onsetDelay, durationOfAction, variableCategoryId, updated, _public, causeOnly, fillingType, numberOfMeasurements, numberOfProcessedMeasurements, measurementsAtLastAnalysis, lastUnitId, lastOriginalUnitId, lastOriginalValue, lastValue, lastOriginalValue2, lastSourceId, numberOfCorrelations, status, errorMessage, lastSuccessfulUpdateTime, standardDeviation, variance, minimumRecordedValue, maximumRecordedValue, mean, median, mostCommonUnitId, mostCommonValue, numberOfUniqueDailyValues, numberOfChanges, skewness, kurtosis, latitude, longitude, location, createdAt, updatedAt, outcome, sources, earliestSourceTime, latestSourceTime, earliestMeasurementTime, latestMeasurementTime, earliestFillingTime, latestFillingTime, limit, offset, sort); + ApiResponse response = await OrganizationVotesGetAsyncWithHttpInfo(accessToken, clientId, causeId, effectId, value, createdAt, updatedAt, limit, offset, sort); return response.Data; } /// - /// Get all UserVariables Get all UserVariables + /// Get all Votes Get all Votes /// /// User's OAuth2 access token - /// The ID of the client application which last created or updated this user variable - /// ID of the parent variable if this variable has any parent - /// ID of variable - /// D of unit to use for this variable - /// Minimum reasonable value for this variable (uses default unit) - /// Maximum reasonable value for this variable (uses default unit) - /// Value for replacing null measurements - /// The Variable this Variable should be joined with. If the variable is joined with some other variable then it is not shown to user in the list of variables - /// Estimated number of seconds that pass before a stimulus produces a perceivable effect - /// Estimated duration of time following the onset delay in which a stimulus produces a perceivable effect - /// ID of variable category - /// updated - /// Is variable public - /// A value of 1 indicates that this variable is generally a cause in a causal relationship. An example of a causeOnly variable would be a variable such as Cloud Cover which would generally not be influenced by the behaviour of the user - /// 0 -> No filling, 1 -> Use filling-value - /// Number of measurements - /// Number of processed measurements - /// Number of measurements at last analysis - /// ID of last Unit - /// ID of last original Unit - /// Last original value which is stored - /// Last Value - /// Last original value which is stored - /// ID of last source - /// Number of correlations for this variable - /// status - /// error_message - /// When this variable or its settings were last updated - /// Standard deviation - /// Variance - /// Minimum recorded value of this variable - /// Maximum recorded value of this variable - /// Mean - /// Median - /// Most common Unit ID - /// Most common value - /// Number of unique daily values - /// Number of changes - /// Skewness - /// Kurtosis - /// Latitude - /// Longitude - /// Location + /// The ID of the client application which last created or updated this vote + /// ID of predictor variable + /// ID of outcome variable + /// Value of Vote. 1 is for upvote. 0 is for downvote. Otherwise, there is no vote. /// When the record was first created. Use ISO 8601 datetime format /// When the record was last updated. Use ISO 8601 datetime format - /// Outcome variables (those with `outcome` == 1) are variables for which a human would generally want to identify the influencing factors. These include symptoms of illness, physique, mood, cognitive performance, etc. Generally correlation calculations are only performed on outcome variables - /// Comma-separated list of source names to limit variables to those sources - /// Earliest source time - /// Latest source time - /// Earliest measurement time - /// Latest measurement time - /// Earliest filling time - /// Latest filling time /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// Task of ApiResponse (InlineResponse20016) - public async System.Threading.Tasks.Task> OrganizationUserVariablesGetAsyncWithHttpInfo (string accessToken = null, string clientId = null, int? parentId = null, int? variableId = null, int? defaultUnitId = null, double? minimumAllowedValue = null, double? maximumAllowedValue = null, double? fillingValue = null, int? joinWith = null, int? onsetDelay = null, int? durationOfAction = null, int? variableCategoryId = null, int? updated = null, int? _public = null, bool? causeOnly = null, string fillingType = null, int? numberOfMeasurements = null, int? numberOfProcessedMeasurements = null, int? measurementsAtLastAnalysis = null, int? lastUnitId = null, int? lastOriginalUnitId = null, int? lastOriginalValue = null, double? lastValue = null, double? lastOriginalValue2 = null, int? lastSourceId = null, int? numberOfCorrelations = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, double? standardDeviation = null, double? variance = null, double? minimumRecordedValue = null, double? maximumRecordedValue = null, double? mean = null, double? median = null, int? mostCommonUnitId = null, double? mostCommonValue = null, double? numberOfUniqueDailyValues = null, int? numberOfChanges = null, double? skewness = null, double? kurtosis = null, double? latitude = null, double? longitude = null, string location = null, string createdAt = null, string updatedAt = null, bool? outcome = null, string sources = null, int? earliestSourceTime = null, int? latestSourceTime = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, int? earliestFillingTime = null, int? latestFillingTime = null, int? limit = null, int? offset = null, string sort = null) + /// Task of ApiResponse (InlineResponse20020) + public async System.Threading.Tasks.Task> OrganizationVotesGetAsyncWithHttpInfo (string accessToken = null, string clientId = null, int? causeId = null, int? effectId = null, int? value = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) { - var path_ = "/organization/userVariables"; + var path_ = "/organization/votes"; var pathParams = new Dictionary(); var queryParams = new Dictionary(); @@ -1920,58 +3081,11 @@ public async System.Threading.Tasks.Task> Organ if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter if (clientId != null) queryParams.Add("client_id", Configuration.ApiClient.ParameterToString(clientId)); // query parameter - if (parentId != null) queryParams.Add("parent_id", Configuration.ApiClient.ParameterToString(parentId)); // query parameter - if (variableId != null) queryParams.Add("variable_id", Configuration.ApiClient.ParameterToString(variableId)); // query parameter - if (defaultUnitId != null) queryParams.Add("default_unit_id", Configuration.ApiClient.ParameterToString(defaultUnitId)); // query parameter - if (minimumAllowedValue != null) queryParams.Add("minimum_allowed_value", Configuration.ApiClient.ParameterToString(minimumAllowedValue)); // query parameter - if (maximumAllowedValue != null) queryParams.Add("maximum_allowed_value", Configuration.ApiClient.ParameterToString(maximumAllowedValue)); // query parameter - if (fillingValue != null) queryParams.Add("filling_value", Configuration.ApiClient.ParameterToString(fillingValue)); // query parameter - if (joinWith != null) queryParams.Add("join_with", Configuration.ApiClient.ParameterToString(joinWith)); // query parameter - if (onsetDelay != null) queryParams.Add("onset_delay", Configuration.ApiClient.ParameterToString(onsetDelay)); // query parameter - if (durationOfAction != null) queryParams.Add("duration_of_action", Configuration.ApiClient.ParameterToString(durationOfAction)); // query parameter - if (variableCategoryId != null) queryParams.Add("variable_category_id", Configuration.ApiClient.ParameterToString(variableCategoryId)); // query parameter - if (updated != null) queryParams.Add("updated", Configuration.ApiClient.ParameterToString(updated)); // query parameter - if (_public != null) queryParams.Add("public", Configuration.ApiClient.ParameterToString(_public)); // query parameter - if (causeOnly != null) queryParams.Add("cause_only", Configuration.ApiClient.ParameterToString(causeOnly)); // query parameter - if (fillingType != null) queryParams.Add("filling_type", Configuration.ApiClient.ParameterToString(fillingType)); // query parameter - if (numberOfMeasurements != null) queryParams.Add("number_of_measurements", Configuration.ApiClient.ParameterToString(numberOfMeasurements)); // query parameter - if (numberOfProcessedMeasurements != null) queryParams.Add("number_of_processed_measurements", Configuration.ApiClient.ParameterToString(numberOfProcessedMeasurements)); // query parameter - if (measurementsAtLastAnalysis != null) queryParams.Add("measurements_at_last_analysis", Configuration.ApiClient.ParameterToString(measurementsAtLastAnalysis)); // query parameter - if (lastUnitId != null) queryParams.Add("last_unit_id", Configuration.ApiClient.ParameterToString(lastUnitId)); // query parameter - if (lastOriginalUnitId != null) queryParams.Add("last_original_unit_id", Configuration.ApiClient.ParameterToString(lastOriginalUnitId)); // query parameter - if (lastOriginalValue != null) queryParams.Add("last_original_value", Configuration.ApiClient.ParameterToString(lastOriginalValue)); // query parameter - if (lastValue != null) queryParams.Add("last_value", Configuration.ApiClient.ParameterToString(lastValue)); // query parameter - if (lastOriginalValue2 != null) queryParams.Add("last_original_value", Configuration.ApiClient.ParameterToString(lastOriginalValue2)); // query parameter - if (lastSourceId != null) queryParams.Add("last_source_id", Configuration.ApiClient.ParameterToString(lastSourceId)); // query parameter - if (numberOfCorrelations != null) queryParams.Add("number_of_correlations", Configuration.ApiClient.ParameterToString(numberOfCorrelations)); // query parameter - if (status != null) queryParams.Add("status", Configuration.ApiClient.ParameterToString(status)); // query parameter - if (errorMessage != null) queryParams.Add("error_message", Configuration.ApiClient.ParameterToString(errorMessage)); // query parameter - if (lastSuccessfulUpdateTime != null) queryParams.Add("last_successful_update_time", Configuration.ApiClient.ParameterToString(lastSuccessfulUpdateTime)); // query parameter - if (standardDeviation != null) queryParams.Add("standard_deviation", Configuration.ApiClient.ParameterToString(standardDeviation)); // query parameter - if (variance != null) queryParams.Add("variance", Configuration.ApiClient.ParameterToString(variance)); // query parameter - if (minimumRecordedValue != null) queryParams.Add("minimum_recorded_value", Configuration.ApiClient.ParameterToString(minimumRecordedValue)); // query parameter - if (maximumRecordedValue != null) queryParams.Add("maximum_recorded_value", Configuration.ApiClient.ParameterToString(maximumRecordedValue)); // query parameter - if (mean != null) queryParams.Add("mean", Configuration.ApiClient.ParameterToString(mean)); // query parameter - if (median != null) queryParams.Add("median", Configuration.ApiClient.ParameterToString(median)); // query parameter - if (mostCommonUnitId != null) queryParams.Add("most_common_unit_id", Configuration.ApiClient.ParameterToString(mostCommonUnitId)); // query parameter - if (mostCommonValue != null) queryParams.Add("most_common_value", Configuration.ApiClient.ParameterToString(mostCommonValue)); // query parameter - if (numberOfUniqueDailyValues != null) queryParams.Add("number_of_unique_daily_values", Configuration.ApiClient.ParameterToString(numberOfUniqueDailyValues)); // query parameter - if (numberOfChanges != null) queryParams.Add("number_of_changes", Configuration.ApiClient.ParameterToString(numberOfChanges)); // query parameter - if (skewness != null) queryParams.Add("skewness", Configuration.ApiClient.ParameterToString(skewness)); // query parameter - if (kurtosis != null) queryParams.Add("kurtosis", Configuration.ApiClient.ParameterToString(kurtosis)); // query parameter - if (latitude != null) queryParams.Add("latitude", Configuration.ApiClient.ParameterToString(latitude)); // query parameter - if (longitude != null) queryParams.Add("longitude", Configuration.ApiClient.ParameterToString(longitude)); // query parameter - if (location != null) queryParams.Add("location", Configuration.ApiClient.ParameterToString(location)); // query parameter + if (causeId != null) queryParams.Add("cause_id", Configuration.ApiClient.ParameterToString(causeId)); // query parameter + if (effectId != null) queryParams.Add("effect_id", Configuration.ApiClient.ParameterToString(effectId)); // query parameter + if (value != null) queryParams.Add("value", Configuration.ApiClient.ParameterToString(value)); // query parameter if (createdAt != null) queryParams.Add("created_at", Configuration.ApiClient.ParameterToString(createdAt)); // query parameter if (updatedAt != null) queryParams.Add("updated_at", Configuration.ApiClient.ParameterToString(updatedAt)); // query parameter - if (outcome != null) queryParams.Add("outcome", Configuration.ApiClient.ParameterToString(outcome)); // query parameter - if (sources != null) queryParams.Add("sources", Configuration.ApiClient.ParameterToString(sources)); // query parameter - if (earliestSourceTime != null) queryParams.Add("earliest_source_time", Configuration.ApiClient.ParameterToString(earliestSourceTime)); // query parameter - if (latestSourceTime != null) queryParams.Add("latest_source_time", Configuration.ApiClient.ParameterToString(latestSourceTime)); // query parameter - if (earliestMeasurementTime != null) queryParams.Add("earliest_measurement_time", Configuration.ApiClient.ParameterToString(earliestMeasurementTime)); // query parameter - if (latestMeasurementTime != null) queryParams.Add("latest_measurement_time", Configuration.ApiClient.ParameterToString(latestMeasurementTime)); // query parameter - if (earliestFillingTime != null) queryParams.Add("earliest_filling_time", Configuration.ApiClient.ParameterToString(earliestFillingTime)); // query parameter - if (latestFillingTime != null) queryParams.Add("latest_filling_time", Configuration.ApiClient.ParameterToString(latestFillingTime)); // query parameter if (limit != null) queryParams.Add("limit", Configuration.ApiClient.ParameterToString(limit)); // query parameter if (offset != null) queryParams.Add("offset", Configuration.ApiClient.ParameterToString(offset)); // query parameter if (sort != null) queryParams.Add("sort", Configuration.ApiClient.ParameterToString(sort)); // query parameter @@ -1988,13 +3102,13 @@ public async System.Threading.Tasks.Task> Organ int statusCode = (int) response.StatusCode; if (statusCode >= 400) - throw new ApiException (statusCode, "Error calling OrganizationUserVariablesGet: " + response.Content, response.Content); + throw new ApiException (statusCode, "Error calling OrganizationVotesGet: " + response.Content, response.Content); else if (statusCode == 0) - throw new ApiException (statusCode, "Error calling OrganizationUserVariablesGet: " + response.ErrorMessage, response.ErrorMessage); + throw new ApiException (statusCode, "Error calling OrganizationVotesGet: " + response.ErrorMessage, response.ErrorMessage); - return new ApiResponse(statusCode, + return new ApiResponse(statusCode, response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (InlineResponse20016) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20016))); + (InlineResponse20020) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20020))); } diff --git a/src/main/csharp/io/swagger/Api/SourceApi.cs b/src/main/csharp/io/swagger/Api/SourceApi.cs index b4c0cc0..64f6791 100644 --- a/src/main/csharp/io/swagger/Api/SourceApi.cs +++ b/src/main/csharp/io/swagger/Api/SourceApi.cs @@ -29,8 +29,8 @@ public interface ISourceApi /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// InlineResponse20017 - InlineResponse20017 SourcesGet (string accessToken = null, string clientId = null, string name = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); + /// InlineResponse20021 + InlineResponse20021 SourcesGet (string accessToken = null, string clientId = null, string name = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); /// /// Get measurement sources @@ -46,8 +46,8 @@ public interface ISourceApi /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// ApiResponse of InlineResponse20017 - ApiResponse SourcesGetWithHttpInfo (string accessToken = null, string clientId = null, string name = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); + /// ApiResponse of InlineResponse20021 + ApiResponse SourcesGetWithHttpInfo (string accessToken = null, string clientId = null, string name = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); /// /// Get measurement sources @@ -63,8 +63,8 @@ public interface ISourceApi /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// Task of InlineResponse20017 - System.Threading.Tasks.Task SourcesGetAsync (string accessToken = null, string clientId = null, string name = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); + /// Task of InlineResponse20021 + System.Threading.Tasks.Task SourcesGetAsync (string accessToken = null, string clientId = null, string name = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); /// /// Get measurement sources @@ -80,8 +80,8 @@ public interface ISourceApi /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// Task of ApiResponse (InlineResponse20017) - System.Threading.Tasks.Task> SourcesGetAsyncWithHttpInfo (string accessToken = null, string clientId = null, string name = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); + /// Task of ApiResponse (InlineResponse20021) + System.Threading.Tasks.Task> SourcesGetAsyncWithHttpInfo (string accessToken = null, string clientId = null, string name = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); /// /// Add a data source @@ -91,8 +91,8 @@ public interface ISourceApi /// /// User's OAuth2 access token /// Source that should be stored - /// InlineResponse20018 - InlineResponse20018 SourcesPost (string accessToken = null, Source body = null); + /// InlineResponse20022 + InlineResponse20022 SourcesPost (string accessToken = null, Source body = null); /// /// Add a data source @@ -102,8 +102,8 @@ public interface ISourceApi /// /// User's OAuth2 access token /// Source that should be stored - /// ApiResponse of InlineResponse20018 - ApiResponse SourcesPostWithHttpInfo (string accessToken = null, Source body = null); + /// ApiResponse of InlineResponse20022 + ApiResponse SourcesPostWithHttpInfo (string accessToken = null, Source body = null); /// /// Add a data source @@ -113,8 +113,8 @@ public interface ISourceApi /// /// User's OAuth2 access token /// Source that should be stored - /// Task of InlineResponse20018 - System.Threading.Tasks.Task SourcesPostAsync (string accessToken = null, Source body = null); + /// Task of InlineResponse20022 + System.Threading.Tasks.Task SourcesPostAsync (string accessToken = null, Source body = null); /// /// Add a data source @@ -124,8 +124,8 @@ public interface ISourceApi /// /// User's OAuth2 access token /// Source that should be stored - /// Task of ApiResponse (InlineResponse20018) - System.Threading.Tasks.Task> SourcesPostAsyncWithHttpInfo (string accessToken = null, Source body = null); + /// Task of ApiResponse (InlineResponse20022) + System.Threading.Tasks.Task> SourcesPostAsyncWithHttpInfo (string accessToken = null, Source body = null); /// /// Get Source @@ -135,8 +135,8 @@ public interface ISourceApi /// /// id of Source /// User's OAuth2 access token - /// InlineResponse20018 - InlineResponse20018 SourcesIdGet (int? id, string accessToken = null); + /// InlineResponse20022 + InlineResponse20022 SourcesIdGet (int? id, string accessToken = null); /// /// Get Source @@ -146,8 +146,8 @@ public interface ISourceApi /// /// id of Source /// User's OAuth2 access token - /// ApiResponse of InlineResponse20018 - ApiResponse SourcesIdGetWithHttpInfo (int? id, string accessToken = null); + /// ApiResponse of InlineResponse20022 + ApiResponse SourcesIdGetWithHttpInfo (int? id, string accessToken = null); /// /// Get Source @@ -157,8 +157,8 @@ public interface ISourceApi /// /// id of Source /// User's OAuth2 access token - /// Task of InlineResponse20018 - System.Threading.Tasks.Task SourcesIdGetAsync (int? id, string accessToken = null); + /// Task of InlineResponse20022 + System.Threading.Tasks.Task SourcesIdGetAsync (int? id, string accessToken = null); /// /// Get Source @@ -168,8 +168,8 @@ public interface ISourceApi /// /// id of Source /// User's OAuth2 access token - /// Task of ApiResponse (InlineResponse20018) - System.Threading.Tasks.Task> SourcesIdGetAsyncWithHttpInfo (int? id, string accessToken = null); + /// Task of ApiResponse (InlineResponse20022) + System.Threading.Tasks.Task> SourcesIdGetAsyncWithHttpInfo (int? id, string accessToken = null); /// /// Update Source @@ -352,10 +352,10 @@ public void AddDefaultHeader(string key, string value) /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// InlineResponse20017 - public InlineResponse20017 SourcesGet (string accessToken = null, string clientId = null, string name = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) + /// InlineResponse20021 + public InlineResponse20021 SourcesGet (string accessToken = null, string clientId = null, string name = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) { - ApiResponse response = SourcesGetWithHttpInfo(accessToken, clientId, name, createdAt, updatedAt, limit, offset, sort); + ApiResponse response = SourcesGetWithHttpInfo(accessToken, clientId, name, createdAt, updatedAt, limit, offset, sort); return response.Data; } @@ -370,8 +370,8 @@ public InlineResponse20017 SourcesGet (string accessToken = null, string clientI /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// ApiResponse of InlineResponse20017 - public ApiResponse< InlineResponse20017 > SourcesGetWithHttpInfo (string accessToken = null, string clientId = null, string name = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) + /// ApiResponse of InlineResponse20021 + public ApiResponse< InlineResponse20021 > SourcesGetWithHttpInfo (string accessToken = null, string clientId = null, string name = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) { @@ -429,9 +429,9 @@ public ApiResponse< InlineResponse20017 > SourcesGetWithHttpInfo (string accessT else if (statusCode == 0) throw new ApiException (statusCode, "Error calling SourcesGet: " + response.ErrorMessage, response.ErrorMessage); - return new ApiResponse(statusCode, + return new ApiResponse(statusCode, response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (InlineResponse20017) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20017))); + (InlineResponse20021) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20021))); } @@ -446,10 +446,10 @@ public ApiResponse< InlineResponse20017 > SourcesGetWithHttpInfo (string accessT /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// Task of InlineResponse20017 - public async System.Threading.Tasks.Task SourcesGetAsync (string accessToken = null, string clientId = null, string name = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) + /// Task of InlineResponse20021 + public async System.Threading.Tasks.Task SourcesGetAsync (string accessToken = null, string clientId = null, string name = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) { - ApiResponse response = await SourcesGetAsyncWithHttpInfo(accessToken, clientId, name, createdAt, updatedAt, limit, offset, sort); + ApiResponse response = await SourcesGetAsyncWithHttpInfo(accessToken, clientId, name, createdAt, updatedAt, limit, offset, sort); return response.Data; } @@ -465,8 +465,8 @@ public async System.Threading.Tasks.Task SourcesGetAsync (s /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// Task of ApiResponse (InlineResponse20017) - public async System.Threading.Tasks.Task> SourcesGetAsyncWithHttpInfo (string accessToken = null, string clientId = null, string name = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) + /// Task of ApiResponse (InlineResponse20021) + public async System.Threading.Tasks.Task> SourcesGetAsyncWithHttpInfo (string accessToken = null, string clientId = null, string name = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) { @@ -524,9 +524,9 @@ public async System.Threading.Tasks.Task> Sourc else if (statusCode == 0) throw new ApiException (statusCode, "Error calling SourcesGet: " + response.ErrorMessage, response.ErrorMessage); - return new ApiResponse(statusCode, + return new ApiResponse(statusCode, response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (InlineResponse20017) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20017))); + (InlineResponse20021) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20021))); } @@ -535,10 +535,10 @@ public async System.Threading.Tasks.Task> Sourc /// /// User's OAuth2 access token /// Source that should be stored - /// InlineResponse20018 - public InlineResponse20018 SourcesPost (string accessToken = null, Source body = null) + /// InlineResponse20022 + public InlineResponse20022 SourcesPost (string accessToken = null, Source body = null) { - ApiResponse response = SourcesPostWithHttpInfo(accessToken, body); + ApiResponse response = SourcesPostWithHttpInfo(accessToken, body); return response.Data; } @@ -547,8 +547,8 @@ public InlineResponse20018 SourcesPost (string accessToken = null, Source body = /// /// User's OAuth2 access token /// Source that should be stored - /// ApiResponse of InlineResponse20018 - public ApiResponse< InlineResponse20018 > SourcesPostWithHttpInfo (string accessToken = null, Source body = null) + /// ApiResponse of InlineResponse20022 + public ApiResponse< InlineResponse20022 > SourcesPostWithHttpInfo (string accessToken = null, Source body = null) { @@ -600,9 +600,9 @@ public ApiResponse< InlineResponse20018 > SourcesPostWithHttpInfo (string access else if (statusCode == 0) throw new ApiException (statusCode, "Error calling SourcesPost: " + response.ErrorMessage, response.ErrorMessage); - return new ApiResponse(statusCode, + return new ApiResponse(statusCode, response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (InlineResponse20018) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20018))); + (InlineResponse20022) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20022))); } @@ -611,10 +611,10 @@ public ApiResponse< InlineResponse20018 > SourcesPostWithHttpInfo (string access /// /// User's OAuth2 access token /// Source that should be stored - /// Task of InlineResponse20018 - public async System.Threading.Tasks.Task SourcesPostAsync (string accessToken = null, Source body = null) + /// Task of InlineResponse20022 + public async System.Threading.Tasks.Task SourcesPostAsync (string accessToken = null, Source body = null) { - ApiResponse response = await SourcesPostAsyncWithHttpInfo(accessToken, body); + ApiResponse response = await SourcesPostAsyncWithHttpInfo(accessToken, body); return response.Data; } @@ -624,8 +624,8 @@ public async System.Threading.Tasks.Task SourcesPostAsync ( /// /// User's OAuth2 access token /// Source that should be stored - /// Task of ApiResponse (InlineResponse20018) - public async System.Threading.Tasks.Task> SourcesPostAsyncWithHttpInfo (string accessToken = null, Source body = null) + /// Task of ApiResponse (InlineResponse20022) + public async System.Threading.Tasks.Task> SourcesPostAsyncWithHttpInfo (string accessToken = null, Source body = null) { @@ -677,9 +677,9 @@ public async System.Threading.Tasks.Task> Sourc else if (statusCode == 0) throw new ApiException (statusCode, "Error calling SourcesPost: " + response.ErrorMessage, response.ErrorMessage); - return new ApiResponse(statusCode, + return new ApiResponse(statusCode, response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (InlineResponse20018) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20018))); + (InlineResponse20022) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20022))); } @@ -688,10 +688,10 @@ public async System.Threading.Tasks.Task> Sourc /// /// id of Source /// User's OAuth2 access token - /// InlineResponse20018 - public InlineResponse20018 SourcesIdGet (int? id, string accessToken = null) + /// InlineResponse20022 + public InlineResponse20022 SourcesIdGet (int? id, string accessToken = null) { - ApiResponse response = SourcesIdGetWithHttpInfo(id, accessToken); + ApiResponse response = SourcesIdGetWithHttpInfo(id, accessToken); return response.Data; } @@ -700,8 +700,8 @@ public InlineResponse20018 SourcesIdGet (int? id, string accessToken = null) /// /// id of Source /// User's OAuth2 access token - /// ApiResponse of InlineResponse20018 - public ApiResponse< InlineResponse20018 > SourcesIdGetWithHttpInfo (int? id, string accessToken = null) + /// ApiResponse of InlineResponse20022 + public ApiResponse< InlineResponse20022 > SourcesIdGetWithHttpInfo (int? id, string accessToken = null) { // verify the required parameter 'id' is set @@ -756,9 +756,9 @@ public ApiResponse< InlineResponse20018 > SourcesIdGetWithHttpInfo (int? id, str else if (statusCode == 0) throw new ApiException (statusCode, "Error calling SourcesIdGet: " + response.ErrorMessage, response.ErrorMessage); - return new ApiResponse(statusCode, + return new ApiResponse(statusCode, response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (InlineResponse20018) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20018))); + (InlineResponse20022) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20022))); } @@ -767,10 +767,10 @@ public ApiResponse< InlineResponse20018 > SourcesIdGetWithHttpInfo (int? id, str /// /// id of Source /// User's OAuth2 access token - /// Task of InlineResponse20018 - public async System.Threading.Tasks.Task SourcesIdGetAsync (int? id, string accessToken = null) + /// Task of InlineResponse20022 + public async System.Threading.Tasks.Task SourcesIdGetAsync (int? id, string accessToken = null) { - ApiResponse response = await SourcesIdGetAsyncWithHttpInfo(id, accessToken); + ApiResponse response = await SourcesIdGetAsyncWithHttpInfo(id, accessToken); return response.Data; } @@ -780,8 +780,8 @@ public async System.Threading.Tasks.Task SourcesIdGetAsync /// /// id of Source /// User's OAuth2 access token - /// Task of ApiResponse (InlineResponse20018) - public async System.Threading.Tasks.Task> SourcesIdGetAsyncWithHttpInfo (int? id, string accessToken = null) + /// Task of ApiResponse (InlineResponse20022) + public async System.Threading.Tasks.Task> SourcesIdGetAsyncWithHttpInfo (int? id, string accessToken = null) { // verify the required parameter 'id' is set if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling SourcesIdGet"); @@ -835,9 +835,9 @@ public async System.Threading.Tasks.Task> Sourc else if (statusCode == 0) throw new ApiException (statusCode, "Error calling SourcesIdGet: " + response.ErrorMessage, response.ErrorMessage); - return new ApiResponse(statusCode, + return new ApiResponse(statusCode, response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (InlineResponse20018) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20018))); + (InlineResponse20022) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20022))); } diff --git a/src/main/csharp/io/swagger/Api/TrackingReminderApi.cs b/src/main/csharp/io/swagger/Api/TrackingReminderApi.cs new file mode 100644 index 0000000..0c19e26 --- /dev/null +++ b/src/main/csharp/io/swagger/Api/TrackingReminderApi.cs @@ -0,0 +1,1238 @@ +using System; +using System.IO; +using System.Collections.Generic; +using System.Linq; +using RestSharp; +using IO.Swagger.Client; +using IO.Swagger.Model; + +namespace IO.Swagger.Api +{ + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public interface ITrackingReminderApi + { + + /// + /// Get tracking reminders + /// + /// + /// Users can be reminded to track certain variables at a specified frequency with a default value. + /// + /// User's OAuth2 access token + /// The ID of the client application which last created or updated this tracking reminder + /// ID of the user who created a reminder + /// Id for the variable to be tracked + /// True if the reminders should appear as a popup notification + /// True if the reminders should be delivered via SMS + /// True if the reminders should be delivered via email + /// True if the reminders should appear in the notification bar + /// ISO 8601 timestamp for the last time a reminder was sent + /// ISO 8601 timestamp for the last time a measurement was received for this user and variable + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// InlineResponse20015 + InlineResponse20015 TrackingRemindersGet (string accessToken = null, string clientId = null, int? userId = null, int? variableId = null, bool? popUp = null, bool? sms = null, bool? email = null, bool? notificationBar = null, string lastReminded = null, string lastTracked = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Get tracking reminders + /// + /// + /// Users can be reminded to track certain variables at a specified frequency with a default value. + /// + /// User's OAuth2 access token + /// The ID of the client application which last created or updated this tracking reminder + /// ID of the user who created a reminder + /// Id for the variable to be tracked + /// True if the reminders should appear as a popup notification + /// True if the reminders should be delivered via SMS + /// True if the reminders should be delivered via email + /// True if the reminders should appear in the notification bar + /// ISO 8601 timestamp for the last time a reminder was sent + /// ISO 8601 timestamp for the last time a measurement was received for this user and variable + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// ApiResponse of InlineResponse20015 + ApiResponse TrackingRemindersGetWithHttpInfo (string accessToken = null, string clientId = null, int? userId = null, int? variableId = null, bool? popUp = null, bool? sms = null, bool? email = null, bool? notificationBar = null, string lastReminded = null, string lastTracked = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Get tracking reminders + /// + /// + /// Users can be reminded to track certain variables at a specified frequency with a default value. + /// + /// User's OAuth2 access token + /// The ID of the client application which last created or updated this tracking reminder + /// ID of the user who created a reminder + /// Id for the variable to be tracked + /// True if the reminders should appear as a popup notification + /// True if the reminders should be delivered via SMS + /// True if the reminders should be delivered via email + /// True if the reminders should appear in the notification bar + /// ISO 8601 timestamp for the last time a reminder was sent + /// ISO 8601 timestamp for the last time a measurement was received for this user and variable + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of InlineResponse20015 + System.Threading.Tasks.Task TrackingRemindersGetAsync (string accessToken = null, string clientId = null, int? userId = null, int? variableId = null, bool? popUp = null, bool? sms = null, bool? email = null, bool? notificationBar = null, string lastReminded = null, string lastTracked = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Get tracking reminders + /// + /// + /// Users can be reminded to track certain variables at a specified frequency with a default value. + /// + /// User's OAuth2 access token + /// The ID of the client application which last created or updated this tracking reminder + /// ID of the user who created a reminder + /// Id for the variable to be tracked + /// True if the reminders should appear as a popup notification + /// True if the reminders should be delivered via SMS + /// True if the reminders should be delivered via email + /// True if the reminders should appear in the notification bar + /// ISO 8601 timestamp for the last time a reminder was sent + /// ISO 8601 timestamp for the last time a measurement was received for this user and variable + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of ApiResponse (InlineResponse20015) + System.Threading.Tasks.Task> TrackingRemindersGetAsyncWithHttpInfo (string accessToken = null, string clientId = null, int? userId = null, int? variableId = null, bool? popUp = null, bool? sms = null, bool? email = null, bool? notificationBar = null, string lastReminded = null, string lastTracked = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); + + /// + /// Store TrackingReminder + /// + /// + /// This is to enable users to indicate their opinion on the plausibility of a causal relationship between a treatment and outcome. QuantiModo incorporates crowd-sourced plausibility estimations into their algorithm. This is done allowing user to indicate their view of the plausibility of each relationship with thumbs up/down buttons placed next to each prediction. + /// + /// User's OAuth2 access token + /// TrackingReminder that should be stored + /// InlineResponse20023 + InlineResponse20023 TrackingRemindersPost (string accessToken = null, TrackingReminder body = null); + + /// + /// Store TrackingReminder + /// + /// + /// This is to enable users to indicate their opinion on the plausibility of a causal relationship between a treatment and outcome. QuantiModo incorporates crowd-sourced plausibility estimations into their algorithm. This is done allowing user to indicate their view of the plausibility of each relationship with thumbs up/down buttons placed next to each prediction. + /// + /// User's OAuth2 access token + /// TrackingReminder that should be stored + /// ApiResponse of InlineResponse20023 + ApiResponse TrackingRemindersPostWithHttpInfo (string accessToken = null, TrackingReminder body = null); + + /// + /// Store TrackingReminder + /// + /// + /// This is to enable users to indicate their opinion on the plausibility of a causal relationship between a treatment and outcome. QuantiModo incorporates crowd-sourced plausibility estimations into their algorithm. This is done allowing user to indicate their view of the plausibility of each relationship with thumbs up/down buttons placed next to each prediction. + /// + /// User's OAuth2 access token + /// TrackingReminder that should be stored + /// Task of InlineResponse20023 + System.Threading.Tasks.Task TrackingRemindersPostAsync (string accessToken = null, TrackingReminder body = null); + + /// + /// Store TrackingReminder + /// + /// + /// This is to enable users to indicate their opinion on the plausibility of a causal relationship between a treatment and outcome. QuantiModo incorporates crowd-sourced plausibility estimations into their algorithm. This is done allowing user to indicate their view of the plausibility of each relationship with thumbs up/down buttons placed next to each prediction. + /// + /// User's OAuth2 access token + /// TrackingReminder that should be stored + /// Task of ApiResponse (InlineResponse20023) + System.Threading.Tasks.Task> TrackingRemindersPostAsyncWithHttpInfo (string accessToken = null, TrackingReminder body = null); + + /// + /// Get TrackingReminder + /// + /// + /// Get TrackingReminder + /// + /// id of TrackingReminder + /// User's OAuth2 access token + /// InlineResponse20023 + InlineResponse20023 TrackingRemindersIdGet (int? id, string accessToken = null); + + /// + /// Get TrackingReminder + /// + /// + /// Get TrackingReminder + /// + /// id of TrackingReminder + /// User's OAuth2 access token + /// ApiResponse of InlineResponse20023 + ApiResponse TrackingRemindersIdGetWithHttpInfo (int? id, string accessToken = null); + + /// + /// Get TrackingReminder + /// + /// + /// Get TrackingReminder + /// + /// id of TrackingReminder + /// User's OAuth2 access token + /// Task of InlineResponse20023 + System.Threading.Tasks.Task TrackingRemindersIdGetAsync (int? id, string accessToken = null); + + /// + /// Get TrackingReminder + /// + /// + /// Get TrackingReminder + /// + /// id of TrackingReminder + /// User's OAuth2 access token + /// Task of ApiResponse (InlineResponse20023) + System.Threading.Tasks.Task> TrackingRemindersIdGetAsyncWithHttpInfo (int? id, string accessToken = null); + + /// + /// Update TrackingReminder + /// + /// + /// Update TrackingReminder + /// + /// id of TrackingReminder + /// User's OAuth2 access token + /// TrackingReminder that should be updated + /// InlineResponse2002 + InlineResponse2002 TrackingRemindersIdPut (int? id, string accessToken = null, TrackingReminder body = null); + + /// + /// Update TrackingReminder + /// + /// + /// Update TrackingReminder + /// + /// id of TrackingReminder + /// User's OAuth2 access token + /// TrackingReminder that should be updated + /// ApiResponse of InlineResponse2002 + ApiResponse TrackingRemindersIdPutWithHttpInfo (int? id, string accessToken = null, TrackingReminder body = null); + + /// + /// Update TrackingReminder + /// + /// + /// Update TrackingReminder + /// + /// id of TrackingReminder + /// User's OAuth2 access token + /// TrackingReminder that should be updated + /// Task of InlineResponse2002 + System.Threading.Tasks.Task TrackingRemindersIdPutAsync (int? id, string accessToken = null, TrackingReminder body = null); + + /// + /// Update TrackingReminder + /// + /// + /// Update TrackingReminder + /// + /// id of TrackingReminder + /// User's OAuth2 access token + /// TrackingReminder that should be updated + /// Task of ApiResponse (InlineResponse2002) + System.Threading.Tasks.Task> TrackingRemindersIdPutAsyncWithHttpInfo (int? id, string accessToken = null, TrackingReminder body = null); + + /// + /// Delete TrackingReminder + /// + /// + /// Delete previously posted trackingReminder + /// + /// id of TrackingReminder + /// User's OAuth2 access token + /// InlineResponse2002 + InlineResponse2002 TrackingRemindersIdDelete (int? id, string accessToken = null); + + /// + /// Delete TrackingReminder + /// + /// + /// Delete previously posted trackingReminder + /// + /// id of TrackingReminder + /// User's OAuth2 access token + /// ApiResponse of InlineResponse2002 + ApiResponse TrackingRemindersIdDeleteWithHttpInfo (int? id, string accessToken = null); + + /// + /// Delete TrackingReminder + /// + /// + /// Delete previously posted trackingReminder + /// + /// id of TrackingReminder + /// User's OAuth2 access token + /// Task of InlineResponse2002 + System.Threading.Tasks.Task TrackingRemindersIdDeleteAsync (int? id, string accessToken = null); + + /// + /// Delete TrackingReminder + /// + /// + /// Delete previously posted trackingReminder + /// + /// id of TrackingReminder + /// User's OAuth2 access token + /// Task of ApiResponse (InlineResponse2002) + System.Threading.Tasks.Task> TrackingRemindersIdDeleteAsyncWithHttpInfo (int? id, string accessToken = null); + + } + + /// + /// Represents a collection of functions to interact with the API endpoints + /// + public class TrackingReminderApi : ITrackingReminderApi + { + /// + /// Initializes a new instance of the class. + /// + /// + public TrackingReminderApi(String basePath) + { + this.Configuration = new Configuration(new ApiClient(basePath)); + } + + /// + /// Initializes a new instance of the class + /// using Configuration object + /// + /// An instance of Configuration + /// + public TrackingReminderApi(Configuration configuration = null) + { + if (configuration == null) // use the default one in Configuration + this.Configuration = Configuration.Default; + else + this.Configuration = configuration; + } + + /// + /// Gets the base path of the API client. + /// + /// The base path + public String GetBasePath() + { + return this.Configuration.ApiClient.RestClient.BaseUrl.ToString(); + } + + /// + /// Sets the base path of the API client. + /// + /// The base path + [Obsolete("SetBasePath is deprecated, please do 'Configuraiton.ApiClient = new ApiClient(\"http://new-path\")' instead.")] + public void SetBasePath(String basePath) + { + // do nothing + } + + /// + /// Gets or sets the configuration object + /// + /// An instance of the Configuration + public Configuration Configuration {get; set;} + + /// + /// Gets the default header. + /// + /// Dictionary of HTTP header + [Obsolete("DefaultHeader is deprecated, please use Configuration.DefaultHeader instead.")] + public Dictionary DefaultHeader() + { + return this.Configuration.DefaultHeader; + } + + /// + /// Add default header. + /// + /// Header field name. + /// Header field value. + /// + [Obsolete("AddDefaultHeader is deprecated, please use Configuration.AddDefaultHeader instead.")] + public void AddDefaultHeader(string key, string value) + { + this.Configuration.AddDefaultHeader(key, value); + } + + + /// + /// Get tracking reminders Users can be reminded to track certain variables at a specified frequency with a default value. + /// + /// User's OAuth2 access token + /// The ID of the client application which last created or updated this tracking reminder + /// ID of the user who created a reminder + /// Id for the variable to be tracked + /// True if the reminders should appear as a popup notification + /// True if the reminders should be delivered via SMS + /// True if the reminders should be delivered via email + /// True if the reminders should appear in the notification bar + /// ISO 8601 timestamp for the last time a reminder was sent + /// ISO 8601 timestamp for the last time a measurement was received for this user and variable + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// InlineResponse20015 + public InlineResponse20015 TrackingRemindersGet (string accessToken = null, string clientId = null, int? userId = null, int? variableId = null, bool? popUp = null, bool? sms = null, bool? email = null, bool? notificationBar = null, string lastReminded = null, string lastTracked = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) + { + ApiResponse response = TrackingRemindersGetWithHttpInfo(accessToken, clientId, userId, variableId, popUp, sms, email, notificationBar, lastReminded, lastTracked, createdAt, updatedAt, limit, offset, sort); + return response.Data; + } + + /// + /// Get tracking reminders Users can be reminded to track certain variables at a specified frequency with a default value. + /// + /// User's OAuth2 access token + /// The ID of the client application which last created or updated this tracking reminder + /// ID of the user who created a reminder + /// Id for the variable to be tracked + /// True if the reminders should appear as a popup notification + /// True if the reminders should be delivered via SMS + /// True if the reminders should be delivered via email + /// True if the reminders should appear in the notification bar + /// ISO 8601 timestamp for the last time a reminder was sent + /// ISO 8601 timestamp for the last time a measurement was received for this user and variable + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// ApiResponse of InlineResponse20015 + public ApiResponse< InlineResponse20015 > TrackingRemindersGetWithHttpInfo (string accessToken = null, string clientId = null, int? userId = null, int? variableId = null, bool? popUp = null, bool? sms = null, bool? email = null, bool? notificationBar = null, string lastReminded = null, string lastTracked = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) + { + + + var path_ = "/trackingReminders"; + + var pathParams = new Dictionary(); + var queryParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); + var formParams = new Dictionary(); + var fileParams = new Dictionary(); + String postBody = null; + + // to determine the Accept header + String[] http_header_accepts = new String[] { + "application/json" + }; + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); + if (http_header_accept != null) + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + pathParams.Add("format", "json"); + + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + if (clientId != null) queryParams.Add("client_id", Configuration.ApiClient.ParameterToString(clientId)); // query parameter + if (userId != null) queryParams.Add("user_id", Configuration.ApiClient.ParameterToString(userId)); // query parameter + if (variableId != null) queryParams.Add("variable_id", Configuration.ApiClient.ParameterToString(variableId)); // query parameter + if (popUp != null) queryParams.Add("pop_up", Configuration.ApiClient.ParameterToString(popUp)); // query parameter + if (sms != null) queryParams.Add("sms", Configuration.ApiClient.ParameterToString(sms)); // query parameter + if (email != null) queryParams.Add("email", Configuration.ApiClient.ParameterToString(email)); // query parameter + if (notificationBar != null) queryParams.Add("notification_bar", Configuration.ApiClient.ParameterToString(notificationBar)); // query parameter + if (lastReminded != null) queryParams.Add("last_reminded", Configuration.ApiClient.ParameterToString(lastReminded)); // query parameter + if (lastTracked != null) queryParams.Add("last_tracked", Configuration.ApiClient.ParameterToString(lastTracked)); // query parameter + if (createdAt != null) queryParams.Add("created_at", Configuration.ApiClient.ParameterToString(createdAt)); // query parameter + if (updatedAt != null) queryParams.Add("updated_at", Configuration.ApiClient.ParameterToString(updatedAt)); // query parameter + if (limit != null) queryParams.Add("limit", Configuration.ApiClient.ParameterToString(limit)); // query parameter + if (offset != null) queryParams.Add("offset", Configuration.ApiClient.ParameterToString(offset)); // query parameter + if (sort != null) queryParams.Add("sort", Configuration.ApiClient.ParameterToString(sort)); // query parameter + + + + + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + + // make the HTTP request + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling TrackingRemindersGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling TrackingRemindersGet: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20015) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20015))); + + } + + /// + /// Get tracking reminders Users can be reminded to track certain variables at a specified frequency with a default value. + /// + /// User's OAuth2 access token + /// The ID of the client application which last created or updated this tracking reminder + /// ID of the user who created a reminder + /// Id for the variable to be tracked + /// True if the reminders should appear as a popup notification + /// True if the reminders should be delivered via SMS + /// True if the reminders should be delivered via email + /// True if the reminders should appear in the notification bar + /// ISO 8601 timestamp for the last time a reminder was sent + /// ISO 8601 timestamp for the last time a measurement was received for this user and variable + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of InlineResponse20015 + public async System.Threading.Tasks.Task TrackingRemindersGetAsync (string accessToken = null, string clientId = null, int? userId = null, int? variableId = null, bool? popUp = null, bool? sms = null, bool? email = null, bool? notificationBar = null, string lastReminded = null, string lastTracked = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) + { + ApiResponse response = await TrackingRemindersGetAsyncWithHttpInfo(accessToken, clientId, userId, variableId, popUp, sms, email, notificationBar, lastReminded, lastTracked, createdAt, updatedAt, limit, offset, sort); + return response.Data; + + } + + /// + /// Get tracking reminders Users can be reminded to track certain variables at a specified frequency with a default value. + /// + /// User's OAuth2 access token + /// The ID of the client application which last created or updated this tracking reminder + /// ID of the user who created a reminder + /// Id for the variable to be tracked + /// True if the reminders should appear as a popup notification + /// True if the reminders should be delivered via SMS + /// True if the reminders should be delivered via email + /// True if the reminders should appear in the notification bar + /// ISO 8601 timestamp for the last time a reminder was sent + /// ISO 8601 timestamp for the last time a measurement was received for this user and variable + /// When the record was first created. Use ISO 8601 datetime format + /// When the record was last updated. Use ISO 8601 datetime format + /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. + /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. + /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. + /// Task of ApiResponse (InlineResponse20015) + public async System.Threading.Tasks.Task> TrackingRemindersGetAsyncWithHttpInfo (string accessToken = null, string clientId = null, int? userId = null, int? variableId = null, bool? popUp = null, bool? sms = null, bool? email = null, bool? notificationBar = null, string lastReminded = null, string lastTracked = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) + { + + + var path_ = "/trackingReminders"; + + var pathParams = new Dictionary(); + var queryParams = new Dictionary(); + var headerParams = new Dictionary(); + var formParams = new Dictionary(); + var fileParams = new Dictionary(); + String postBody = null; + + // to determine the Accept header + String[] http_header_accepts = new String[] { + "application/json" + }; + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); + if (http_header_accept != null) + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + pathParams.Add("format", "json"); + + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + if (clientId != null) queryParams.Add("client_id", Configuration.ApiClient.ParameterToString(clientId)); // query parameter + if (userId != null) queryParams.Add("user_id", Configuration.ApiClient.ParameterToString(userId)); // query parameter + if (variableId != null) queryParams.Add("variable_id", Configuration.ApiClient.ParameterToString(variableId)); // query parameter + if (popUp != null) queryParams.Add("pop_up", Configuration.ApiClient.ParameterToString(popUp)); // query parameter + if (sms != null) queryParams.Add("sms", Configuration.ApiClient.ParameterToString(sms)); // query parameter + if (email != null) queryParams.Add("email", Configuration.ApiClient.ParameterToString(email)); // query parameter + if (notificationBar != null) queryParams.Add("notification_bar", Configuration.ApiClient.ParameterToString(notificationBar)); // query parameter + if (lastReminded != null) queryParams.Add("last_reminded", Configuration.ApiClient.ParameterToString(lastReminded)); // query parameter + if (lastTracked != null) queryParams.Add("last_tracked", Configuration.ApiClient.ParameterToString(lastTracked)); // query parameter + if (createdAt != null) queryParams.Add("created_at", Configuration.ApiClient.ParameterToString(createdAt)); // query parameter + if (updatedAt != null) queryParams.Add("updated_at", Configuration.ApiClient.ParameterToString(updatedAt)); // query parameter + if (limit != null) queryParams.Add("limit", Configuration.ApiClient.ParameterToString(limit)); // query parameter + if (offset != null) queryParams.Add("offset", Configuration.ApiClient.ParameterToString(offset)); // query parameter + if (sort != null) queryParams.Add("sort", Configuration.ApiClient.ParameterToString(sort)); // query parameter + + + + + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + + // make the HTTP request + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling TrackingRemindersGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling TrackingRemindersGet: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20015) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20015))); + + } + + /// + /// Store TrackingReminder This is to enable users to indicate their opinion on the plausibility of a causal relationship between a treatment and outcome. QuantiModo incorporates crowd-sourced plausibility estimations into their algorithm. This is done allowing user to indicate their view of the plausibility of each relationship with thumbs up/down buttons placed next to each prediction. + /// + /// User's OAuth2 access token + /// TrackingReminder that should be stored + /// InlineResponse20023 + public InlineResponse20023 TrackingRemindersPost (string accessToken = null, TrackingReminder body = null) + { + ApiResponse response = TrackingRemindersPostWithHttpInfo(accessToken, body); + return response.Data; + } + + /// + /// Store TrackingReminder This is to enable users to indicate their opinion on the plausibility of a causal relationship between a treatment and outcome. QuantiModo incorporates crowd-sourced plausibility estimations into their algorithm. This is done allowing user to indicate their view of the plausibility of each relationship with thumbs up/down buttons placed next to each prediction. + /// + /// User's OAuth2 access token + /// TrackingReminder that should be stored + /// ApiResponse of InlineResponse20023 + public ApiResponse< InlineResponse20023 > TrackingRemindersPostWithHttpInfo (string accessToken = null, TrackingReminder body = null) + { + + + var path_ = "/trackingReminders"; + + var pathParams = new Dictionary(); + var queryParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); + var formParams = new Dictionary(); + var fileParams = new Dictionary(); + String postBody = null; + + // to determine the Accept header + String[] http_header_accepts = new String[] { + "application/json" + }; + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); + if (http_header_accept != null) + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + pathParams.Add("format", "json"); + + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + + + + postBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter + + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + + // make the HTTP request + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling TrackingRemindersPost: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling TrackingRemindersPost: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20023) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20023))); + + } + + /// + /// Store TrackingReminder This is to enable users to indicate their opinion on the plausibility of a causal relationship between a treatment and outcome. QuantiModo incorporates crowd-sourced plausibility estimations into their algorithm. This is done allowing user to indicate their view of the plausibility of each relationship with thumbs up/down buttons placed next to each prediction. + /// + /// User's OAuth2 access token + /// TrackingReminder that should be stored + /// Task of InlineResponse20023 + public async System.Threading.Tasks.Task TrackingRemindersPostAsync (string accessToken = null, TrackingReminder body = null) + { + ApiResponse response = await TrackingRemindersPostAsyncWithHttpInfo(accessToken, body); + return response.Data; + + } + + /// + /// Store TrackingReminder This is to enable users to indicate their opinion on the plausibility of a causal relationship between a treatment and outcome. QuantiModo incorporates crowd-sourced plausibility estimations into their algorithm. This is done allowing user to indicate their view of the plausibility of each relationship with thumbs up/down buttons placed next to each prediction. + /// + /// User's OAuth2 access token + /// TrackingReminder that should be stored + /// Task of ApiResponse (InlineResponse20023) + public async System.Threading.Tasks.Task> TrackingRemindersPostAsyncWithHttpInfo (string accessToken = null, TrackingReminder body = null) + { + + + var path_ = "/trackingReminders"; + + var pathParams = new Dictionary(); + var queryParams = new Dictionary(); + var headerParams = new Dictionary(); + var formParams = new Dictionary(); + var fileParams = new Dictionary(); + String postBody = null; + + // to determine the Accept header + String[] http_header_accepts = new String[] { + "application/json" + }; + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); + if (http_header_accept != null) + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + pathParams.Add("format", "json"); + + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + + + + postBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter + + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + + // make the HTTP request + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.POST, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling TrackingRemindersPost: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling TrackingRemindersPost: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20023) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20023))); + + } + + /// + /// Get TrackingReminder Get TrackingReminder + /// + /// id of TrackingReminder + /// User's OAuth2 access token + /// InlineResponse20023 + public InlineResponse20023 TrackingRemindersIdGet (int? id, string accessToken = null) + { + ApiResponse response = TrackingRemindersIdGetWithHttpInfo(id, accessToken); + return response.Data; + } + + /// + /// Get TrackingReminder Get TrackingReminder + /// + /// id of TrackingReminder + /// User's OAuth2 access token + /// ApiResponse of InlineResponse20023 + public ApiResponse< InlineResponse20023 > TrackingRemindersIdGetWithHttpInfo (int? id, string accessToken = null) + { + + // verify the required parameter 'id' is set + if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling TrackingRemindersIdGet"); + + + var path_ = "/trackingReminders/{id}"; + + var pathParams = new Dictionary(); + var queryParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); + var formParams = new Dictionary(); + var fileParams = new Dictionary(); + String postBody = null; + + // to determine the Accept header + String[] http_header_accepts = new String[] { + "application/json" + }; + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); + if (http_header_accept != null) + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + pathParams.Add("format", "json"); + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + + + + + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + + // make the HTTP request + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling TrackingRemindersIdGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling TrackingRemindersIdGet: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20023) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20023))); + + } + + /// + /// Get TrackingReminder Get TrackingReminder + /// + /// id of TrackingReminder + /// User's OAuth2 access token + /// Task of InlineResponse20023 + public async System.Threading.Tasks.Task TrackingRemindersIdGetAsync (int? id, string accessToken = null) + { + ApiResponse response = await TrackingRemindersIdGetAsyncWithHttpInfo(id, accessToken); + return response.Data; + + } + + /// + /// Get TrackingReminder Get TrackingReminder + /// + /// id of TrackingReminder + /// User's OAuth2 access token + /// Task of ApiResponse (InlineResponse20023) + public async System.Threading.Tasks.Task> TrackingRemindersIdGetAsyncWithHttpInfo (int? id, string accessToken = null) + { + // verify the required parameter 'id' is set + if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling TrackingRemindersIdGet"); + + + var path_ = "/trackingReminders/{id}"; + + var pathParams = new Dictionary(); + var queryParams = new Dictionary(); + var headerParams = new Dictionary(); + var formParams = new Dictionary(); + var fileParams = new Dictionary(); + String postBody = null; + + // to determine the Accept header + String[] http_header_accepts = new String[] { + "application/json" + }; + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); + if (http_header_accept != null) + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + pathParams.Add("format", "json"); + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + + + + + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + + // make the HTTP request + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.GET, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling TrackingRemindersIdGet: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling TrackingRemindersIdGet: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse20023) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20023))); + + } + + /// + /// Update TrackingReminder Update TrackingReminder + /// + /// id of TrackingReminder + /// User's OAuth2 access token + /// TrackingReminder that should be updated + /// InlineResponse2002 + public InlineResponse2002 TrackingRemindersIdPut (int? id, string accessToken = null, TrackingReminder body = null) + { + ApiResponse response = TrackingRemindersIdPutWithHttpInfo(id, accessToken, body); + return response.Data; + } + + /// + /// Update TrackingReminder Update TrackingReminder + /// + /// id of TrackingReminder + /// User's OAuth2 access token + /// TrackingReminder that should be updated + /// ApiResponse of InlineResponse2002 + public ApiResponse< InlineResponse2002 > TrackingRemindersIdPutWithHttpInfo (int? id, string accessToken = null, TrackingReminder body = null) + { + + // verify the required parameter 'id' is set + if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling TrackingRemindersIdPut"); + + + var path_ = "/trackingReminders/{id}"; + + var pathParams = new Dictionary(); + var queryParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); + var formParams = new Dictionary(); + var fileParams = new Dictionary(); + String postBody = null; + + // to determine the Accept header + String[] http_header_accepts = new String[] { + "application/json" + }; + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); + if (http_header_accept != null) + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + pathParams.Add("format", "json"); + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + + + + postBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter + + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + + // make the HTTP request + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling TrackingRemindersIdPut: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling TrackingRemindersIdPut: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2002) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2002))); + + } + + /// + /// Update TrackingReminder Update TrackingReminder + /// + /// id of TrackingReminder + /// User's OAuth2 access token + /// TrackingReminder that should be updated + /// Task of InlineResponse2002 + public async System.Threading.Tasks.Task TrackingRemindersIdPutAsync (int? id, string accessToken = null, TrackingReminder body = null) + { + ApiResponse response = await TrackingRemindersIdPutAsyncWithHttpInfo(id, accessToken, body); + return response.Data; + + } + + /// + /// Update TrackingReminder Update TrackingReminder + /// + /// id of TrackingReminder + /// User's OAuth2 access token + /// TrackingReminder that should be updated + /// Task of ApiResponse (InlineResponse2002) + public async System.Threading.Tasks.Task> TrackingRemindersIdPutAsyncWithHttpInfo (int? id, string accessToken = null, TrackingReminder body = null) + { + // verify the required parameter 'id' is set + if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling TrackingRemindersIdPut"); + + + var path_ = "/trackingReminders/{id}"; + + var pathParams = new Dictionary(); + var queryParams = new Dictionary(); + var headerParams = new Dictionary(); + var formParams = new Dictionary(); + var fileParams = new Dictionary(); + String postBody = null; + + // to determine the Accept header + String[] http_header_accepts = new String[] { + "application/json" + }; + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); + if (http_header_accept != null) + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + pathParams.Add("format", "json"); + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + + + + postBody = Configuration.ApiClient.Serialize(body); // http body (model) parameter + + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + + // make the HTTP request + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.PUT, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling TrackingRemindersIdPut: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling TrackingRemindersIdPut: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2002) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2002))); + + } + + /// + /// Delete TrackingReminder Delete previously posted trackingReminder + /// + /// id of TrackingReminder + /// User's OAuth2 access token + /// InlineResponse2002 + public InlineResponse2002 TrackingRemindersIdDelete (int? id, string accessToken = null) + { + ApiResponse response = TrackingRemindersIdDeleteWithHttpInfo(id, accessToken); + return response.Data; + } + + /// + /// Delete TrackingReminder Delete previously posted trackingReminder + /// + /// id of TrackingReminder + /// User's OAuth2 access token + /// ApiResponse of InlineResponse2002 + public ApiResponse< InlineResponse2002 > TrackingRemindersIdDeleteWithHttpInfo (int? id, string accessToken = null) + { + + // verify the required parameter 'id' is set + if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling TrackingRemindersIdDelete"); + + + var path_ = "/trackingReminders/{id}"; + + var pathParams = new Dictionary(); + var queryParams = new Dictionary(); + var headerParams = new Dictionary(Configuration.DefaultHeader); + var formParams = new Dictionary(); + var fileParams = new Dictionary(); + String postBody = null; + + // to determine the Accept header + String[] http_header_accepts = new String[] { + "application/json" + }; + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); + if (http_header_accept != null) + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + pathParams.Add("format", "json"); + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + + + + + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + + // make the HTTP request + IRestResponse response = (IRestResponse) Configuration.ApiClient.CallApi(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling TrackingRemindersIdDelete: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling TrackingRemindersIdDelete: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2002) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2002))); + + } + + /// + /// Delete TrackingReminder Delete previously posted trackingReminder + /// + /// id of TrackingReminder + /// User's OAuth2 access token + /// Task of InlineResponse2002 + public async System.Threading.Tasks.Task TrackingRemindersIdDeleteAsync (int? id, string accessToken = null) + { + ApiResponse response = await TrackingRemindersIdDeleteAsyncWithHttpInfo(id, accessToken); + return response.Data; + + } + + /// + /// Delete TrackingReminder Delete previously posted trackingReminder + /// + /// id of TrackingReminder + /// User's OAuth2 access token + /// Task of ApiResponse (InlineResponse2002) + public async System.Threading.Tasks.Task> TrackingRemindersIdDeleteAsyncWithHttpInfo (int? id, string accessToken = null) + { + // verify the required parameter 'id' is set + if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling TrackingRemindersIdDelete"); + + + var path_ = "/trackingReminders/{id}"; + + var pathParams = new Dictionary(); + var queryParams = new Dictionary(); + var headerParams = new Dictionary(); + var formParams = new Dictionary(); + var fileParams = new Dictionary(); + String postBody = null; + + // to determine the Accept header + String[] http_header_accepts = new String[] { + "application/json" + }; + String http_header_accept = Configuration.ApiClient.SelectHeaderAccept(http_header_accepts); + if (http_header_accept != null) + headerParams.Add("Accept", Configuration.ApiClient.SelectHeaderAccept(http_header_accepts)); + + // set "format" to json by default + // e.g. /pet/{petId}.{format} becomes /pet/{petId}.json + pathParams.Add("format", "json"); + if (id != null) pathParams.Add("id", Configuration.ApiClient.ParameterToString(id)); // path parameter + + if (accessToken != null) queryParams.Add("access_token", Configuration.ApiClient.ParameterToString(accessToken)); // query parameter + + + + + + + // authentication (quantimodo_oauth2) required + + // oauth required + if (!String.IsNullOrEmpty(Configuration.AccessToken)) + { + headerParams["Authorization"] = "Bearer " + Configuration.AccessToken; + } + + + // make the HTTP request + IRestResponse response = (IRestResponse) await Configuration.ApiClient.CallApiAsync(path_, Method.DELETE, queryParams, postBody, headerParams, formParams, fileParams, pathParams); + + int statusCode = (int) response.StatusCode; + + if (statusCode >= 400) + throw new ApiException (statusCode, "Error calling TrackingRemindersIdDelete: " + response.Content, response.Content); + else if (statusCode == 0) + throw new ApiException (statusCode, "Error calling TrackingRemindersIdDelete: " + response.ErrorMessage, response.ErrorMessage); + + return new ApiResponse(statusCode, + response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), + (InlineResponse2002) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse2002))); + + } + + } + +} diff --git a/src/main/csharp/io/swagger/Api/UnitApi.cs b/src/main/csharp/io/swagger/Api/UnitApi.cs index 511e9e8..991b423 100644 --- a/src/main/csharp/io/swagger/Api/UnitApi.cs +++ b/src/main/csharp/io/swagger/Api/UnitApi.cs @@ -37,8 +37,8 @@ public interface IUnitApi /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// InlineResponse20021 - InlineResponse20021 UnitsGet (string accessToken = null, string clientId = null, string name = null, string abbreviatedName = null, int? categoryId = null, double? minimumValue = null, double? maximumValue = null, int? updated = null, int? defaultUnitId = null, double? multiply = null, double? add = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); + /// InlineResponse20026 + InlineResponse20026 UnitsGet (string accessToken = null, string clientId = null, string name = null, string abbreviatedName = null, int? categoryId = null, double? minimumValue = null, double? maximumValue = null, int? updated = null, int? defaultUnitId = null, double? multiply = null, double? add = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); /// /// Get all available units @@ -62,8 +62,8 @@ public interface IUnitApi /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// ApiResponse of InlineResponse20021 - ApiResponse UnitsGetWithHttpInfo (string accessToken = null, string clientId = null, string name = null, string abbreviatedName = null, int? categoryId = null, double? minimumValue = null, double? maximumValue = null, int? updated = null, int? defaultUnitId = null, double? multiply = null, double? add = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); + /// ApiResponse of InlineResponse20026 + ApiResponse UnitsGetWithHttpInfo (string accessToken = null, string clientId = null, string name = null, string abbreviatedName = null, int? categoryId = null, double? minimumValue = null, double? maximumValue = null, int? updated = null, int? defaultUnitId = null, double? multiply = null, double? add = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); /// /// Get all available units @@ -87,8 +87,8 @@ public interface IUnitApi /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// Task of InlineResponse20021 - System.Threading.Tasks.Task UnitsGetAsync (string accessToken = null, string clientId = null, string name = null, string abbreviatedName = null, int? categoryId = null, double? minimumValue = null, double? maximumValue = null, int? updated = null, int? defaultUnitId = null, double? multiply = null, double? add = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); + /// Task of InlineResponse20026 + System.Threading.Tasks.Task UnitsGetAsync (string accessToken = null, string clientId = null, string name = null, string abbreviatedName = null, int? categoryId = null, double? minimumValue = null, double? maximumValue = null, int? updated = null, int? defaultUnitId = null, double? multiply = null, double? add = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); /// /// Get all available units @@ -112,8 +112,8 @@ public interface IUnitApi /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// Task of ApiResponse (InlineResponse20021) - System.Threading.Tasks.Task> UnitsGetAsyncWithHttpInfo (string accessToken = null, string clientId = null, string name = null, string abbreviatedName = null, int? categoryId = null, double? minimumValue = null, double? maximumValue = null, int? updated = null, int? defaultUnitId = null, double? multiply = null, double? add = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); + /// Task of ApiResponse (InlineResponse20026) + System.Threading.Tasks.Task> UnitsGetAsyncWithHttpInfo (string accessToken = null, string clientId = null, string name = null, string abbreviatedName = null, int? categoryId = null, double? minimumValue = null, double? maximumValue = null, int? updated = null, int? defaultUnitId = null, double? multiply = null, double? add = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); /// /// Store Unit @@ -123,8 +123,8 @@ public interface IUnitApi /// /// User's OAuth2 access token /// Unit that should be stored - /// InlineResponse20022 - InlineResponse20022 UnitsPost (string accessToken = null, Unit body = null); + /// InlineResponse20027 + InlineResponse20027 UnitsPost (string accessToken = null, Unit body = null); /// /// Store Unit @@ -134,8 +134,8 @@ public interface IUnitApi /// /// User's OAuth2 access token /// Unit that should be stored - /// ApiResponse of InlineResponse20022 - ApiResponse UnitsPostWithHttpInfo (string accessToken = null, Unit body = null); + /// ApiResponse of InlineResponse20027 + ApiResponse UnitsPostWithHttpInfo (string accessToken = null, Unit body = null); /// /// Store Unit @@ -145,8 +145,8 @@ public interface IUnitApi /// /// User's OAuth2 access token /// Unit that should be stored - /// Task of InlineResponse20022 - System.Threading.Tasks.Task UnitsPostAsync (string accessToken = null, Unit body = null); + /// Task of InlineResponse20027 + System.Threading.Tasks.Task UnitsPostAsync (string accessToken = null, Unit body = null); /// /// Store Unit @@ -156,8 +156,8 @@ public interface IUnitApi /// /// User's OAuth2 access token /// Unit that should be stored - /// Task of ApiResponse (InlineResponse20022) - System.Threading.Tasks.Task> UnitsPostAsyncWithHttpInfo (string accessToken = null, Unit body = null); + /// Task of ApiResponse (InlineResponse20027) + System.Threading.Tasks.Task> UnitsPostAsyncWithHttpInfo (string accessToken = null, Unit body = null); /// /// Get Unit @@ -167,8 +167,8 @@ public interface IUnitApi /// /// id of Unit /// User's OAuth2 access token - /// InlineResponse20022 - InlineResponse20022 UnitsIdGet (int? id, string accessToken = null); + /// InlineResponse20027 + InlineResponse20027 UnitsIdGet (int? id, string accessToken = null); /// /// Get Unit @@ -178,8 +178,8 @@ public interface IUnitApi /// /// id of Unit /// User's OAuth2 access token - /// ApiResponse of InlineResponse20022 - ApiResponse UnitsIdGetWithHttpInfo (int? id, string accessToken = null); + /// ApiResponse of InlineResponse20027 + ApiResponse UnitsIdGetWithHttpInfo (int? id, string accessToken = null); /// /// Get Unit @@ -189,8 +189,8 @@ public interface IUnitApi /// /// id of Unit /// User's OAuth2 access token - /// Task of InlineResponse20022 - System.Threading.Tasks.Task UnitsIdGetAsync (int? id, string accessToken = null); + /// Task of InlineResponse20027 + System.Threading.Tasks.Task UnitsIdGetAsync (int? id, string accessToken = null); /// /// Get Unit @@ -200,8 +200,8 @@ public interface IUnitApi /// /// id of Unit /// User's OAuth2 access token - /// Task of ApiResponse (InlineResponse20022) - System.Threading.Tasks.Task> UnitsIdGetAsyncWithHttpInfo (int? id, string accessToken = null); + /// Task of ApiResponse (InlineResponse20027) + System.Threading.Tasks.Task> UnitsIdGetAsyncWithHttpInfo (int? id, string accessToken = null); /// /// Update Unit @@ -392,10 +392,10 @@ public void AddDefaultHeader(string key, string value) /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// InlineResponse20021 - public InlineResponse20021 UnitsGet (string accessToken = null, string clientId = null, string name = null, string abbreviatedName = null, int? categoryId = null, double? minimumValue = null, double? maximumValue = null, int? updated = null, int? defaultUnitId = null, double? multiply = null, double? add = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) + /// InlineResponse20026 + public InlineResponse20026 UnitsGet (string accessToken = null, string clientId = null, string name = null, string abbreviatedName = null, int? categoryId = null, double? minimumValue = null, double? maximumValue = null, int? updated = null, int? defaultUnitId = null, double? multiply = null, double? add = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) { - ApiResponse response = UnitsGetWithHttpInfo(accessToken, clientId, name, abbreviatedName, categoryId, minimumValue, maximumValue, updated, defaultUnitId, multiply, add, createdAt, updatedAt, limit, offset, sort); + ApiResponse response = UnitsGetWithHttpInfo(accessToken, clientId, name, abbreviatedName, categoryId, minimumValue, maximumValue, updated, defaultUnitId, multiply, add, createdAt, updatedAt, limit, offset, sort); return response.Data; } @@ -418,8 +418,8 @@ public InlineResponse20021 UnitsGet (string accessToken = null, string clientId /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// ApiResponse of InlineResponse20021 - public ApiResponse< InlineResponse20021 > UnitsGetWithHttpInfo (string accessToken = null, string clientId = null, string name = null, string abbreviatedName = null, int? categoryId = null, double? minimumValue = null, double? maximumValue = null, int? updated = null, int? defaultUnitId = null, double? multiply = null, double? add = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) + /// ApiResponse of InlineResponse20026 + public ApiResponse< InlineResponse20026 > UnitsGetWithHttpInfo (string accessToken = null, string clientId = null, string name = null, string abbreviatedName = null, int? categoryId = null, double? minimumValue = null, double? maximumValue = null, int? updated = null, int? defaultUnitId = null, double? multiply = null, double? add = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) { @@ -485,9 +485,9 @@ public ApiResponse< InlineResponse20021 > UnitsGetWithHttpInfo (string accessTok else if (statusCode == 0) throw new ApiException (statusCode, "Error calling UnitsGet: " + response.ErrorMessage, response.ErrorMessage); - return new ApiResponse(statusCode, + return new ApiResponse(statusCode, response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (InlineResponse20021) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20021))); + (InlineResponse20026) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20026))); } @@ -510,10 +510,10 @@ public ApiResponse< InlineResponse20021 > UnitsGetWithHttpInfo (string accessTok /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// Task of InlineResponse20021 - public async System.Threading.Tasks.Task UnitsGetAsync (string accessToken = null, string clientId = null, string name = null, string abbreviatedName = null, int? categoryId = null, double? minimumValue = null, double? maximumValue = null, int? updated = null, int? defaultUnitId = null, double? multiply = null, double? add = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) + /// Task of InlineResponse20026 + public async System.Threading.Tasks.Task UnitsGetAsync (string accessToken = null, string clientId = null, string name = null, string abbreviatedName = null, int? categoryId = null, double? minimumValue = null, double? maximumValue = null, int? updated = null, int? defaultUnitId = null, double? multiply = null, double? add = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) { - ApiResponse response = await UnitsGetAsyncWithHttpInfo(accessToken, clientId, name, abbreviatedName, categoryId, minimumValue, maximumValue, updated, defaultUnitId, multiply, add, createdAt, updatedAt, limit, offset, sort); + ApiResponse response = await UnitsGetAsyncWithHttpInfo(accessToken, clientId, name, abbreviatedName, categoryId, minimumValue, maximumValue, updated, defaultUnitId, multiply, add, createdAt, updatedAt, limit, offset, sort); return response.Data; } @@ -537,8 +537,8 @@ public async System.Threading.Tasks.Task UnitsGetAsync (str /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// Task of ApiResponse (InlineResponse20021) - public async System.Threading.Tasks.Task> UnitsGetAsyncWithHttpInfo (string accessToken = null, string clientId = null, string name = null, string abbreviatedName = null, int? categoryId = null, double? minimumValue = null, double? maximumValue = null, int? updated = null, int? defaultUnitId = null, double? multiply = null, double? add = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) + /// Task of ApiResponse (InlineResponse20026) + public async System.Threading.Tasks.Task> UnitsGetAsyncWithHttpInfo (string accessToken = null, string clientId = null, string name = null, string abbreviatedName = null, int? categoryId = null, double? minimumValue = null, double? maximumValue = null, int? updated = null, int? defaultUnitId = null, double? multiply = null, double? add = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) { @@ -604,9 +604,9 @@ public async System.Threading.Tasks.Task> Units else if (statusCode == 0) throw new ApiException (statusCode, "Error calling UnitsGet: " + response.ErrorMessage, response.ErrorMessage); - return new ApiResponse(statusCode, + return new ApiResponse(statusCode, response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (InlineResponse20021) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20021))); + (InlineResponse20026) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20026))); } @@ -615,10 +615,10 @@ public async System.Threading.Tasks.Task> Units /// /// User's OAuth2 access token /// Unit that should be stored - /// InlineResponse20022 - public InlineResponse20022 UnitsPost (string accessToken = null, Unit body = null) + /// InlineResponse20027 + public InlineResponse20027 UnitsPost (string accessToken = null, Unit body = null) { - ApiResponse response = UnitsPostWithHttpInfo(accessToken, body); + ApiResponse response = UnitsPostWithHttpInfo(accessToken, body); return response.Data; } @@ -627,8 +627,8 @@ public InlineResponse20022 UnitsPost (string accessToken = null, Unit body = nul /// /// User's OAuth2 access token /// Unit that should be stored - /// ApiResponse of InlineResponse20022 - public ApiResponse< InlineResponse20022 > UnitsPostWithHttpInfo (string accessToken = null, Unit body = null) + /// ApiResponse of InlineResponse20027 + public ApiResponse< InlineResponse20027 > UnitsPostWithHttpInfo (string accessToken = null, Unit body = null) { @@ -680,9 +680,9 @@ public ApiResponse< InlineResponse20022 > UnitsPostWithHttpInfo (string accessTo else if (statusCode == 0) throw new ApiException (statusCode, "Error calling UnitsPost: " + response.ErrorMessage, response.ErrorMessage); - return new ApiResponse(statusCode, + return new ApiResponse(statusCode, response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (InlineResponse20022) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20022))); + (InlineResponse20027) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20027))); } @@ -691,10 +691,10 @@ public ApiResponse< InlineResponse20022 > UnitsPostWithHttpInfo (string accessTo /// /// User's OAuth2 access token /// Unit that should be stored - /// Task of InlineResponse20022 - public async System.Threading.Tasks.Task UnitsPostAsync (string accessToken = null, Unit body = null) + /// Task of InlineResponse20027 + public async System.Threading.Tasks.Task UnitsPostAsync (string accessToken = null, Unit body = null) { - ApiResponse response = await UnitsPostAsyncWithHttpInfo(accessToken, body); + ApiResponse response = await UnitsPostAsyncWithHttpInfo(accessToken, body); return response.Data; } @@ -704,8 +704,8 @@ public async System.Threading.Tasks.Task UnitsPostAsync (st /// /// User's OAuth2 access token /// Unit that should be stored - /// Task of ApiResponse (InlineResponse20022) - public async System.Threading.Tasks.Task> UnitsPostAsyncWithHttpInfo (string accessToken = null, Unit body = null) + /// Task of ApiResponse (InlineResponse20027) + public async System.Threading.Tasks.Task> UnitsPostAsyncWithHttpInfo (string accessToken = null, Unit body = null) { @@ -757,9 +757,9 @@ public async System.Threading.Tasks.Task> Units else if (statusCode == 0) throw new ApiException (statusCode, "Error calling UnitsPost: " + response.ErrorMessage, response.ErrorMessage); - return new ApiResponse(statusCode, + return new ApiResponse(statusCode, response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (InlineResponse20022) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20022))); + (InlineResponse20027) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20027))); } @@ -768,10 +768,10 @@ public async System.Threading.Tasks.Task> Units /// /// id of Unit /// User's OAuth2 access token - /// InlineResponse20022 - public InlineResponse20022 UnitsIdGet (int? id, string accessToken = null) + /// InlineResponse20027 + public InlineResponse20027 UnitsIdGet (int? id, string accessToken = null) { - ApiResponse response = UnitsIdGetWithHttpInfo(id, accessToken); + ApiResponse response = UnitsIdGetWithHttpInfo(id, accessToken); return response.Data; } @@ -780,8 +780,8 @@ public InlineResponse20022 UnitsIdGet (int? id, string accessToken = null) /// /// id of Unit /// User's OAuth2 access token - /// ApiResponse of InlineResponse20022 - public ApiResponse< InlineResponse20022 > UnitsIdGetWithHttpInfo (int? id, string accessToken = null) + /// ApiResponse of InlineResponse20027 + public ApiResponse< InlineResponse20027 > UnitsIdGetWithHttpInfo (int? id, string accessToken = null) { // verify the required parameter 'id' is set @@ -836,9 +836,9 @@ public ApiResponse< InlineResponse20022 > UnitsIdGetWithHttpInfo (int? id, strin else if (statusCode == 0) throw new ApiException (statusCode, "Error calling UnitsIdGet: " + response.ErrorMessage, response.ErrorMessage); - return new ApiResponse(statusCode, + return new ApiResponse(statusCode, response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (InlineResponse20022) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20022))); + (InlineResponse20027) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20027))); } @@ -847,10 +847,10 @@ public ApiResponse< InlineResponse20022 > UnitsIdGetWithHttpInfo (int? id, strin /// /// id of Unit /// User's OAuth2 access token - /// Task of InlineResponse20022 - public async System.Threading.Tasks.Task UnitsIdGetAsync (int? id, string accessToken = null) + /// Task of InlineResponse20027 + public async System.Threading.Tasks.Task UnitsIdGetAsync (int? id, string accessToken = null) { - ApiResponse response = await UnitsIdGetAsyncWithHttpInfo(id, accessToken); + ApiResponse response = await UnitsIdGetAsyncWithHttpInfo(id, accessToken); return response.Data; } @@ -860,8 +860,8 @@ public async System.Threading.Tasks.Task UnitsIdGetAsync (i /// /// id of Unit /// User's OAuth2 access token - /// Task of ApiResponse (InlineResponse20022) - public async System.Threading.Tasks.Task> UnitsIdGetAsyncWithHttpInfo (int? id, string accessToken = null) + /// Task of ApiResponse (InlineResponse20027) + public async System.Threading.Tasks.Task> UnitsIdGetAsyncWithHttpInfo (int? id, string accessToken = null) { // verify the required parameter 'id' is set if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling UnitsIdGet"); @@ -915,9 +915,9 @@ public async System.Threading.Tasks.Task> Units else if (statusCode == 0) throw new ApiException (statusCode, "Error calling UnitsIdGet: " + response.ErrorMessage, response.ErrorMessage); - return new ApiResponse(statusCode, + return new ApiResponse(statusCode, response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (InlineResponse20022) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20022))); + (InlineResponse20027) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20027))); } diff --git a/src/main/csharp/io/swagger/Api/UnitCategoryApi.cs b/src/main/csharp/io/swagger/Api/UnitCategoryApi.cs index 06216df..6b92827 100644 --- a/src/main/csharp/io/swagger/Api/UnitCategoryApi.cs +++ b/src/main/csharp/io/swagger/Api/UnitCategoryApi.cs @@ -28,8 +28,8 @@ public interface IUnitCategoryApi /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// InlineResponse20019 - InlineResponse20019 UnitCategoriesGet (string accessToken = null, string name = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); + /// InlineResponse20024 + InlineResponse20024 UnitCategoriesGet (string accessToken = null, string name = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); /// /// Get unit categories @@ -44,8 +44,8 @@ public interface IUnitCategoryApi /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// ApiResponse of InlineResponse20019 - ApiResponse UnitCategoriesGetWithHttpInfo (string accessToken = null, string name = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); + /// ApiResponse of InlineResponse20024 + ApiResponse UnitCategoriesGetWithHttpInfo (string accessToken = null, string name = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); /// /// Get unit categories @@ -60,8 +60,8 @@ public interface IUnitCategoryApi /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// Task of InlineResponse20019 - System.Threading.Tasks.Task UnitCategoriesGetAsync (string accessToken = null, string name = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); + /// Task of InlineResponse20024 + System.Threading.Tasks.Task UnitCategoriesGetAsync (string accessToken = null, string name = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); /// /// Get unit categories @@ -76,8 +76,8 @@ public interface IUnitCategoryApi /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// Task of ApiResponse (InlineResponse20019) - System.Threading.Tasks.Task> UnitCategoriesGetAsyncWithHttpInfo (string accessToken = null, string name = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); + /// Task of ApiResponse (InlineResponse20024) + System.Threading.Tasks.Task> UnitCategoriesGetAsyncWithHttpInfo (string accessToken = null, string name = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); /// /// Store UnitCategory @@ -87,8 +87,8 @@ public interface IUnitCategoryApi /// /// User's OAuth2 access token /// UnitCategory that should be stored - /// InlineResponse20020 - InlineResponse20020 UnitCategoriesPost (string accessToken = null, UnitCategory body = null); + /// InlineResponse20025 + InlineResponse20025 UnitCategoriesPost (string accessToken = null, UnitCategory body = null); /// /// Store UnitCategory @@ -98,8 +98,8 @@ public interface IUnitCategoryApi /// /// User's OAuth2 access token /// UnitCategory that should be stored - /// ApiResponse of InlineResponse20020 - ApiResponse UnitCategoriesPostWithHttpInfo (string accessToken = null, UnitCategory body = null); + /// ApiResponse of InlineResponse20025 + ApiResponse UnitCategoriesPostWithHttpInfo (string accessToken = null, UnitCategory body = null); /// /// Store UnitCategory @@ -109,8 +109,8 @@ public interface IUnitCategoryApi /// /// User's OAuth2 access token /// UnitCategory that should be stored - /// Task of InlineResponse20020 - System.Threading.Tasks.Task UnitCategoriesPostAsync (string accessToken = null, UnitCategory body = null); + /// Task of InlineResponse20025 + System.Threading.Tasks.Task UnitCategoriesPostAsync (string accessToken = null, UnitCategory body = null); /// /// Store UnitCategory @@ -120,8 +120,8 @@ public interface IUnitCategoryApi /// /// User's OAuth2 access token /// UnitCategory that should be stored - /// Task of ApiResponse (InlineResponse20020) - System.Threading.Tasks.Task> UnitCategoriesPostAsyncWithHttpInfo (string accessToken = null, UnitCategory body = null); + /// Task of ApiResponse (InlineResponse20025) + System.Threading.Tasks.Task> UnitCategoriesPostAsyncWithHttpInfo (string accessToken = null, UnitCategory body = null); /// /// Get UnitCategory @@ -131,8 +131,8 @@ public interface IUnitCategoryApi /// /// id of UnitCategory /// User's OAuth2 access token - /// InlineResponse20020 - InlineResponse20020 UnitCategoriesIdGet (int? id, string accessToken = null); + /// InlineResponse20025 + InlineResponse20025 UnitCategoriesIdGet (int? id, string accessToken = null); /// /// Get UnitCategory @@ -142,8 +142,8 @@ public interface IUnitCategoryApi /// /// id of UnitCategory /// User's OAuth2 access token - /// ApiResponse of InlineResponse20020 - ApiResponse UnitCategoriesIdGetWithHttpInfo (int? id, string accessToken = null); + /// ApiResponse of InlineResponse20025 + ApiResponse UnitCategoriesIdGetWithHttpInfo (int? id, string accessToken = null); /// /// Get UnitCategory @@ -153,8 +153,8 @@ public interface IUnitCategoryApi /// /// id of UnitCategory /// User's OAuth2 access token - /// Task of InlineResponse20020 - System.Threading.Tasks.Task UnitCategoriesIdGetAsync (int? id, string accessToken = null); + /// Task of InlineResponse20025 + System.Threading.Tasks.Task UnitCategoriesIdGetAsync (int? id, string accessToken = null); /// /// Get UnitCategory @@ -164,8 +164,8 @@ public interface IUnitCategoryApi /// /// id of UnitCategory /// User's OAuth2 access token - /// Task of ApiResponse (InlineResponse20020) - System.Threading.Tasks.Task> UnitCategoriesIdGetAsyncWithHttpInfo (int? id, string accessToken = null); + /// Task of ApiResponse (InlineResponse20025) + System.Threading.Tasks.Task> UnitCategoriesIdGetAsyncWithHttpInfo (int? id, string accessToken = null); /// /// Update UnitCategory @@ -347,10 +347,10 @@ public void AddDefaultHeader(string key, string value) /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// InlineResponse20019 - public InlineResponse20019 UnitCategoriesGet (string accessToken = null, string name = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) + /// InlineResponse20024 + public InlineResponse20024 UnitCategoriesGet (string accessToken = null, string name = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) { - ApiResponse response = UnitCategoriesGetWithHttpInfo(accessToken, name, createdAt, updatedAt, limit, offset, sort); + ApiResponse response = UnitCategoriesGetWithHttpInfo(accessToken, name, createdAt, updatedAt, limit, offset, sort); return response.Data; } @@ -364,8 +364,8 @@ public InlineResponse20019 UnitCategoriesGet (string accessToken = null, string /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// ApiResponse of InlineResponse20019 - public ApiResponse< InlineResponse20019 > UnitCategoriesGetWithHttpInfo (string accessToken = null, string name = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) + /// ApiResponse of InlineResponse20024 + public ApiResponse< InlineResponse20024 > UnitCategoriesGetWithHttpInfo (string accessToken = null, string name = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) { @@ -422,9 +422,9 @@ public ApiResponse< InlineResponse20019 > UnitCategoriesGetWithHttpInfo (string else if (statusCode == 0) throw new ApiException (statusCode, "Error calling UnitCategoriesGet: " + response.ErrorMessage, response.ErrorMessage); - return new ApiResponse(statusCode, + return new ApiResponse(statusCode, response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (InlineResponse20019) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20019))); + (InlineResponse20024) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20024))); } @@ -438,10 +438,10 @@ public ApiResponse< InlineResponse20019 > UnitCategoriesGetWithHttpInfo (string /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// Task of InlineResponse20019 - public async System.Threading.Tasks.Task UnitCategoriesGetAsync (string accessToken = null, string name = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) + /// Task of InlineResponse20024 + public async System.Threading.Tasks.Task UnitCategoriesGetAsync (string accessToken = null, string name = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) { - ApiResponse response = await UnitCategoriesGetAsyncWithHttpInfo(accessToken, name, createdAt, updatedAt, limit, offset, sort); + ApiResponse response = await UnitCategoriesGetAsyncWithHttpInfo(accessToken, name, createdAt, updatedAt, limit, offset, sort); return response.Data; } @@ -456,8 +456,8 @@ public async System.Threading.Tasks.Task UnitCategoriesGetA /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// Task of ApiResponse (InlineResponse20019) - public async System.Threading.Tasks.Task> UnitCategoriesGetAsyncWithHttpInfo (string accessToken = null, string name = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) + /// Task of ApiResponse (InlineResponse20024) + public async System.Threading.Tasks.Task> UnitCategoriesGetAsyncWithHttpInfo (string accessToken = null, string name = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) { @@ -514,9 +514,9 @@ public async System.Threading.Tasks.Task> UnitC else if (statusCode == 0) throw new ApiException (statusCode, "Error calling UnitCategoriesGet: " + response.ErrorMessage, response.ErrorMessage); - return new ApiResponse(statusCode, + return new ApiResponse(statusCode, response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (InlineResponse20019) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20019))); + (InlineResponse20024) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20024))); } @@ -525,10 +525,10 @@ public async System.Threading.Tasks.Task> UnitC /// /// User's OAuth2 access token /// UnitCategory that should be stored - /// InlineResponse20020 - public InlineResponse20020 UnitCategoriesPost (string accessToken = null, UnitCategory body = null) + /// InlineResponse20025 + public InlineResponse20025 UnitCategoriesPost (string accessToken = null, UnitCategory body = null) { - ApiResponse response = UnitCategoriesPostWithHttpInfo(accessToken, body); + ApiResponse response = UnitCategoriesPostWithHttpInfo(accessToken, body); return response.Data; } @@ -537,8 +537,8 @@ public InlineResponse20020 UnitCategoriesPost (string accessToken = null, UnitCa /// /// User's OAuth2 access token /// UnitCategory that should be stored - /// ApiResponse of InlineResponse20020 - public ApiResponse< InlineResponse20020 > UnitCategoriesPostWithHttpInfo (string accessToken = null, UnitCategory body = null) + /// ApiResponse of InlineResponse20025 + public ApiResponse< InlineResponse20025 > UnitCategoriesPostWithHttpInfo (string accessToken = null, UnitCategory body = null) { @@ -590,9 +590,9 @@ public ApiResponse< InlineResponse20020 > UnitCategoriesPostWithHttpInfo (string else if (statusCode == 0) throw new ApiException (statusCode, "Error calling UnitCategoriesPost: " + response.ErrorMessage, response.ErrorMessage); - return new ApiResponse(statusCode, + return new ApiResponse(statusCode, response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (InlineResponse20020) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20020))); + (InlineResponse20025) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20025))); } @@ -601,10 +601,10 @@ public ApiResponse< InlineResponse20020 > UnitCategoriesPostWithHttpInfo (string /// /// User's OAuth2 access token /// UnitCategory that should be stored - /// Task of InlineResponse20020 - public async System.Threading.Tasks.Task UnitCategoriesPostAsync (string accessToken = null, UnitCategory body = null) + /// Task of InlineResponse20025 + public async System.Threading.Tasks.Task UnitCategoriesPostAsync (string accessToken = null, UnitCategory body = null) { - ApiResponse response = await UnitCategoriesPostAsyncWithHttpInfo(accessToken, body); + ApiResponse response = await UnitCategoriesPostAsyncWithHttpInfo(accessToken, body); return response.Data; } @@ -614,8 +614,8 @@ public async System.Threading.Tasks.Task UnitCategoriesPost /// /// User's OAuth2 access token /// UnitCategory that should be stored - /// Task of ApiResponse (InlineResponse20020) - public async System.Threading.Tasks.Task> UnitCategoriesPostAsyncWithHttpInfo (string accessToken = null, UnitCategory body = null) + /// Task of ApiResponse (InlineResponse20025) + public async System.Threading.Tasks.Task> UnitCategoriesPostAsyncWithHttpInfo (string accessToken = null, UnitCategory body = null) { @@ -667,9 +667,9 @@ public async System.Threading.Tasks.Task> UnitC else if (statusCode == 0) throw new ApiException (statusCode, "Error calling UnitCategoriesPost: " + response.ErrorMessage, response.ErrorMessage); - return new ApiResponse(statusCode, + return new ApiResponse(statusCode, response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (InlineResponse20020) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20020))); + (InlineResponse20025) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20025))); } @@ -678,10 +678,10 @@ public async System.Threading.Tasks.Task> UnitC /// /// id of UnitCategory /// User's OAuth2 access token - /// InlineResponse20020 - public InlineResponse20020 UnitCategoriesIdGet (int? id, string accessToken = null) + /// InlineResponse20025 + public InlineResponse20025 UnitCategoriesIdGet (int? id, string accessToken = null) { - ApiResponse response = UnitCategoriesIdGetWithHttpInfo(id, accessToken); + ApiResponse response = UnitCategoriesIdGetWithHttpInfo(id, accessToken); return response.Data; } @@ -690,8 +690,8 @@ public InlineResponse20020 UnitCategoriesIdGet (int? id, string accessToken = nu /// /// id of UnitCategory /// User's OAuth2 access token - /// ApiResponse of InlineResponse20020 - public ApiResponse< InlineResponse20020 > UnitCategoriesIdGetWithHttpInfo (int? id, string accessToken = null) + /// ApiResponse of InlineResponse20025 + public ApiResponse< InlineResponse20025 > UnitCategoriesIdGetWithHttpInfo (int? id, string accessToken = null) { // verify the required parameter 'id' is set @@ -746,9 +746,9 @@ public ApiResponse< InlineResponse20020 > UnitCategoriesIdGetWithHttpInfo (int? else if (statusCode == 0) throw new ApiException (statusCode, "Error calling UnitCategoriesIdGet: " + response.ErrorMessage, response.ErrorMessage); - return new ApiResponse(statusCode, + return new ApiResponse(statusCode, response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (InlineResponse20020) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20020))); + (InlineResponse20025) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20025))); } @@ -757,10 +757,10 @@ public ApiResponse< InlineResponse20020 > UnitCategoriesIdGetWithHttpInfo (int? /// /// id of UnitCategory /// User's OAuth2 access token - /// Task of InlineResponse20020 - public async System.Threading.Tasks.Task UnitCategoriesIdGetAsync (int? id, string accessToken = null) + /// Task of InlineResponse20025 + public async System.Threading.Tasks.Task UnitCategoriesIdGetAsync (int? id, string accessToken = null) { - ApiResponse response = await UnitCategoriesIdGetAsyncWithHttpInfo(id, accessToken); + ApiResponse response = await UnitCategoriesIdGetAsyncWithHttpInfo(id, accessToken); return response.Data; } @@ -770,8 +770,8 @@ public async System.Threading.Tasks.Task UnitCategoriesIdGe /// /// id of UnitCategory /// User's OAuth2 access token - /// Task of ApiResponse (InlineResponse20020) - public async System.Threading.Tasks.Task> UnitCategoriesIdGetAsyncWithHttpInfo (int? id, string accessToken = null) + /// Task of ApiResponse (InlineResponse20025) + public async System.Threading.Tasks.Task> UnitCategoriesIdGetAsyncWithHttpInfo (int? id, string accessToken = null) { // verify the required parameter 'id' is set if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling UnitCategoriesIdGet"); @@ -825,9 +825,9 @@ public async System.Threading.Tasks.Task> UnitC else if (statusCode == 0) throw new ApiException (statusCode, "Error calling UnitCategoriesIdGet: " + response.ErrorMessage, response.ErrorMessage); - return new ApiResponse(statusCode, + return new ApiResponse(statusCode, response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (InlineResponse20020) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20020))); + (InlineResponse20025) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20025))); } diff --git a/src/main/csharp/io/swagger/Api/UpdateApi.cs b/src/main/csharp/io/swagger/Api/UpdateApi.cs index deb65f0..9a66a8f 100644 --- a/src/main/csharp/io/swagger/Api/UpdateApi.cs +++ b/src/main/csharp/io/swagger/Api/UpdateApi.cs @@ -32,8 +32,8 @@ public interface IUpdateApi /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// InlineResponse20015 - InlineResponse20015 UpdatesGet (string accessToken = null, int? userId = null, int? connectorId = null, int? numberOfMeasurements = null, bool? success = null, string message = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); + /// InlineResponse20016 + InlineResponse20016 UpdatesGet (string accessToken = null, int? userId = null, int? connectorId = null, int? numberOfMeasurements = null, bool? success = null, string message = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); /// /// Get all Updates @@ -52,8 +52,8 @@ public interface IUpdateApi /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// ApiResponse of InlineResponse20015 - ApiResponse UpdatesGetWithHttpInfo (string accessToken = null, int? userId = null, int? connectorId = null, int? numberOfMeasurements = null, bool? success = null, string message = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); + /// ApiResponse of InlineResponse20016 + ApiResponse UpdatesGetWithHttpInfo (string accessToken = null, int? userId = null, int? connectorId = null, int? numberOfMeasurements = null, bool? success = null, string message = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); /// /// Get all Updates @@ -72,8 +72,8 @@ public interface IUpdateApi /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// Task of InlineResponse20015 - System.Threading.Tasks.Task UpdatesGetAsync (string accessToken = null, int? userId = null, int? connectorId = null, int? numberOfMeasurements = null, bool? success = null, string message = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); + /// Task of InlineResponse20016 + System.Threading.Tasks.Task UpdatesGetAsync (string accessToken = null, int? userId = null, int? connectorId = null, int? numberOfMeasurements = null, bool? success = null, string message = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); /// /// Get all Updates @@ -92,8 +92,8 @@ public interface IUpdateApi /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// Task of ApiResponse (InlineResponse20015) - System.Threading.Tasks.Task> UpdatesGetAsyncWithHttpInfo (string accessToken = null, int? userId = null, int? connectorId = null, int? numberOfMeasurements = null, bool? success = null, string message = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); + /// Task of ApiResponse (InlineResponse20016) + System.Threading.Tasks.Task> UpdatesGetAsyncWithHttpInfo (string accessToken = null, int? userId = null, int? connectorId = null, int? numberOfMeasurements = null, bool? success = null, string message = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); /// /// Store Update @@ -103,8 +103,8 @@ public interface IUpdateApi /// /// User's OAuth2 access token /// Update that should be stored - /// InlineResponse20023 - InlineResponse20023 UpdatesPost (string accessToken = null, Update body = null); + /// InlineResponse20028 + InlineResponse20028 UpdatesPost (string accessToken = null, Update body = null); /// /// Store Update @@ -114,8 +114,8 @@ public interface IUpdateApi /// /// User's OAuth2 access token /// Update that should be stored - /// ApiResponse of InlineResponse20023 - ApiResponse UpdatesPostWithHttpInfo (string accessToken = null, Update body = null); + /// ApiResponse of InlineResponse20028 + ApiResponse UpdatesPostWithHttpInfo (string accessToken = null, Update body = null); /// /// Store Update @@ -125,8 +125,8 @@ public interface IUpdateApi /// /// User's OAuth2 access token /// Update that should be stored - /// Task of InlineResponse20023 - System.Threading.Tasks.Task UpdatesPostAsync (string accessToken = null, Update body = null); + /// Task of InlineResponse20028 + System.Threading.Tasks.Task UpdatesPostAsync (string accessToken = null, Update body = null); /// /// Store Update @@ -136,8 +136,8 @@ public interface IUpdateApi /// /// User's OAuth2 access token /// Update that should be stored - /// Task of ApiResponse (InlineResponse20023) - System.Threading.Tasks.Task> UpdatesPostAsyncWithHttpInfo (string accessToken = null, Update body = null); + /// Task of ApiResponse (InlineResponse20028) + System.Threading.Tasks.Task> UpdatesPostAsyncWithHttpInfo (string accessToken = null, Update body = null); /// /// Get Update @@ -147,8 +147,8 @@ public interface IUpdateApi /// /// id of Update /// User's OAuth2 access token - /// InlineResponse20023 - InlineResponse20023 UpdatesIdGet (int? id, string accessToken = null); + /// InlineResponse20028 + InlineResponse20028 UpdatesIdGet (int? id, string accessToken = null); /// /// Get Update @@ -158,8 +158,8 @@ public interface IUpdateApi /// /// id of Update /// User's OAuth2 access token - /// ApiResponse of InlineResponse20023 - ApiResponse UpdatesIdGetWithHttpInfo (int? id, string accessToken = null); + /// ApiResponse of InlineResponse20028 + ApiResponse UpdatesIdGetWithHttpInfo (int? id, string accessToken = null); /// /// Get Update @@ -169,8 +169,8 @@ public interface IUpdateApi /// /// id of Update /// User's OAuth2 access token - /// Task of InlineResponse20023 - System.Threading.Tasks.Task UpdatesIdGetAsync (int? id, string accessToken = null); + /// Task of InlineResponse20028 + System.Threading.Tasks.Task UpdatesIdGetAsync (int? id, string accessToken = null); /// /// Get Update @@ -180,8 +180,8 @@ public interface IUpdateApi /// /// id of Update /// User's OAuth2 access token - /// Task of ApiResponse (InlineResponse20023) - System.Threading.Tasks.Task> UpdatesIdGetAsyncWithHttpInfo (int? id, string accessToken = null); + /// Task of ApiResponse (InlineResponse20028) + System.Threading.Tasks.Task> UpdatesIdGetAsyncWithHttpInfo (int? id, string accessToken = null); /// /// Update Update @@ -367,10 +367,10 @@ public void AddDefaultHeader(string key, string value) /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// InlineResponse20015 - public InlineResponse20015 UpdatesGet (string accessToken = null, int? userId = null, int? connectorId = null, int? numberOfMeasurements = null, bool? success = null, string message = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) + /// InlineResponse20016 + public InlineResponse20016 UpdatesGet (string accessToken = null, int? userId = null, int? connectorId = null, int? numberOfMeasurements = null, bool? success = null, string message = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) { - ApiResponse response = UpdatesGetWithHttpInfo(accessToken, userId, connectorId, numberOfMeasurements, success, message, createdAt, updatedAt, limit, offset, sort); + ApiResponse response = UpdatesGetWithHttpInfo(accessToken, userId, connectorId, numberOfMeasurements, success, message, createdAt, updatedAt, limit, offset, sort); return response.Data; } @@ -388,8 +388,8 @@ public InlineResponse20015 UpdatesGet (string accessToken = null, int? userId = /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// ApiResponse of InlineResponse20015 - public ApiResponse< InlineResponse20015 > UpdatesGetWithHttpInfo (string accessToken = null, int? userId = null, int? connectorId = null, int? numberOfMeasurements = null, bool? success = null, string message = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) + /// ApiResponse of InlineResponse20016 + public ApiResponse< InlineResponse20016 > UpdatesGetWithHttpInfo (string accessToken = null, int? userId = null, int? connectorId = null, int? numberOfMeasurements = null, bool? success = null, string message = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) { @@ -450,9 +450,9 @@ public ApiResponse< InlineResponse20015 > UpdatesGetWithHttpInfo (string accessT else if (statusCode == 0) throw new ApiException (statusCode, "Error calling UpdatesGet: " + response.ErrorMessage, response.ErrorMessage); - return new ApiResponse(statusCode, + return new ApiResponse(statusCode, response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (InlineResponse20015) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20015))); + (InlineResponse20016) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20016))); } @@ -470,10 +470,10 @@ public ApiResponse< InlineResponse20015 > UpdatesGetWithHttpInfo (string accessT /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// Task of InlineResponse20015 - public async System.Threading.Tasks.Task UpdatesGetAsync (string accessToken = null, int? userId = null, int? connectorId = null, int? numberOfMeasurements = null, bool? success = null, string message = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) + /// Task of InlineResponse20016 + public async System.Threading.Tasks.Task UpdatesGetAsync (string accessToken = null, int? userId = null, int? connectorId = null, int? numberOfMeasurements = null, bool? success = null, string message = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) { - ApiResponse response = await UpdatesGetAsyncWithHttpInfo(accessToken, userId, connectorId, numberOfMeasurements, success, message, createdAt, updatedAt, limit, offset, sort); + ApiResponse response = await UpdatesGetAsyncWithHttpInfo(accessToken, userId, connectorId, numberOfMeasurements, success, message, createdAt, updatedAt, limit, offset, sort); return response.Data; } @@ -492,8 +492,8 @@ public async System.Threading.Tasks.Task UpdatesGetAsync (s /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// Task of ApiResponse (InlineResponse20015) - public async System.Threading.Tasks.Task> UpdatesGetAsyncWithHttpInfo (string accessToken = null, int? userId = null, int? connectorId = null, int? numberOfMeasurements = null, bool? success = null, string message = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) + /// Task of ApiResponse (InlineResponse20016) + public async System.Threading.Tasks.Task> UpdatesGetAsyncWithHttpInfo (string accessToken = null, int? userId = null, int? connectorId = null, int? numberOfMeasurements = null, bool? success = null, string message = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) { @@ -554,9 +554,9 @@ public async System.Threading.Tasks.Task> Updat else if (statusCode == 0) throw new ApiException (statusCode, "Error calling UpdatesGet: " + response.ErrorMessage, response.ErrorMessage); - return new ApiResponse(statusCode, + return new ApiResponse(statusCode, response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (InlineResponse20015) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20015))); + (InlineResponse20016) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20016))); } @@ -565,10 +565,10 @@ public async System.Threading.Tasks.Task> Updat /// /// User's OAuth2 access token /// Update that should be stored - /// InlineResponse20023 - public InlineResponse20023 UpdatesPost (string accessToken = null, Update body = null) + /// InlineResponse20028 + public InlineResponse20028 UpdatesPost (string accessToken = null, Update body = null) { - ApiResponse response = UpdatesPostWithHttpInfo(accessToken, body); + ApiResponse response = UpdatesPostWithHttpInfo(accessToken, body); return response.Data; } @@ -577,8 +577,8 @@ public InlineResponse20023 UpdatesPost (string accessToken = null, Update body = /// /// User's OAuth2 access token /// Update that should be stored - /// ApiResponse of InlineResponse20023 - public ApiResponse< InlineResponse20023 > UpdatesPostWithHttpInfo (string accessToken = null, Update body = null) + /// ApiResponse of InlineResponse20028 + public ApiResponse< InlineResponse20028 > UpdatesPostWithHttpInfo (string accessToken = null, Update body = null) { @@ -630,9 +630,9 @@ public ApiResponse< InlineResponse20023 > UpdatesPostWithHttpInfo (string access else if (statusCode == 0) throw new ApiException (statusCode, "Error calling UpdatesPost: " + response.ErrorMessage, response.ErrorMessage); - return new ApiResponse(statusCode, + return new ApiResponse(statusCode, response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (InlineResponse20023) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20023))); + (InlineResponse20028) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20028))); } @@ -641,10 +641,10 @@ public ApiResponse< InlineResponse20023 > UpdatesPostWithHttpInfo (string access /// /// User's OAuth2 access token /// Update that should be stored - /// Task of InlineResponse20023 - public async System.Threading.Tasks.Task UpdatesPostAsync (string accessToken = null, Update body = null) + /// Task of InlineResponse20028 + public async System.Threading.Tasks.Task UpdatesPostAsync (string accessToken = null, Update body = null) { - ApiResponse response = await UpdatesPostAsyncWithHttpInfo(accessToken, body); + ApiResponse response = await UpdatesPostAsyncWithHttpInfo(accessToken, body); return response.Data; } @@ -654,8 +654,8 @@ public async System.Threading.Tasks.Task UpdatesPostAsync ( /// /// User's OAuth2 access token /// Update that should be stored - /// Task of ApiResponse (InlineResponse20023) - public async System.Threading.Tasks.Task> UpdatesPostAsyncWithHttpInfo (string accessToken = null, Update body = null) + /// Task of ApiResponse (InlineResponse20028) + public async System.Threading.Tasks.Task> UpdatesPostAsyncWithHttpInfo (string accessToken = null, Update body = null) { @@ -707,9 +707,9 @@ public async System.Threading.Tasks.Task> Updat else if (statusCode == 0) throw new ApiException (statusCode, "Error calling UpdatesPost: " + response.ErrorMessage, response.ErrorMessage); - return new ApiResponse(statusCode, + return new ApiResponse(statusCode, response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (InlineResponse20023) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20023))); + (InlineResponse20028) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20028))); } @@ -718,10 +718,10 @@ public async System.Threading.Tasks.Task> Updat /// /// id of Update /// User's OAuth2 access token - /// InlineResponse20023 - public InlineResponse20023 UpdatesIdGet (int? id, string accessToken = null) + /// InlineResponse20028 + public InlineResponse20028 UpdatesIdGet (int? id, string accessToken = null) { - ApiResponse response = UpdatesIdGetWithHttpInfo(id, accessToken); + ApiResponse response = UpdatesIdGetWithHttpInfo(id, accessToken); return response.Data; } @@ -730,8 +730,8 @@ public InlineResponse20023 UpdatesIdGet (int? id, string accessToken = null) /// /// id of Update /// User's OAuth2 access token - /// ApiResponse of InlineResponse20023 - public ApiResponse< InlineResponse20023 > UpdatesIdGetWithHttpInfo (int? id, string accessToken = null) + /// ApiResponse of InlineResponse20028 + public ApiResponse< InlineResponse20028 > UpdatesIdGetWithHttpInfo (int? id, string accessToken = null) { // verify the required parameter 'id' is set @@ -786,9 +786,9 @@ public ApiResponse< InlineResponse20023 > UpdatesIdGetWithHttpInfo (int? id, str else if (statusCode == 0) throw new ApiException (statusCode, "Error calling UpdatesIdGet: " + response.ErrorMessage, response.ErrorMessage); - return new ApiResponse(statusCode, + return new ApiResponse(statusCode, response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (InlineResponse20023) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20023))); + (InlineResponse20028) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20028))); } @@ -797,10 +797,10 @@ public ApiResponse< InlineResponse20023 > UpdatesIdGetWithHttpInfo (int? id, str /// /// id of Update /// User's OAuth2 access token - /// Task of InlineResponse20023 - public async System.Threading.Tasks.Task UpdatesIdGetAsync (int? id, string accessToken = null) + /// Task of InlineResponse20028 + public async System.Threading.Tasks.Task UpdatesIdGetAsync (int? id, string accessToken = null) { - ApiResponse response = await UpdatesIdGetAsyncWithHttpInfo(id, accessToken); + ApiResponse response = await UpdatesIdGetAsyncWithHttpInfo(id, accessToken); return response.Data; } @@ -810,8 +810,8 @@ public async System.Threading.Tasks.Task UpdatesIdGetAsync /// /// id of Update /// User's OAuth2 access token - /// Task of ApiResponse (InlineResponse20023) - public async System.Threading.Tasks.Task> UpdatesIdGetAsyncWithHttpInfo (int? id, string accessToken = null) + /// Task of ApiResponse (InlineResponse20028) + public async System.Threading.Tasks.Task> UpdatesIdGetAsyncWithHttpInfo (int? id, string accessToken = null) { // verify the required parameter 'id' is set if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling UpdatesIdGet"); @@ -865,9 +865,9 @@ public async System.Threading.Tasks.Task> Updat else if (statusCode == 0) throw new ApiException (statusCode, "Error calling UpdatesIdGet: " + response.ErrorMessage, response.ErrorMessage); - return new ApiResponse(statusCode, + return new ApiResponse(statusCode, response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (InlineResponse20023) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20023))); + (InlineResponse20028) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20028))); } diff --git a/src/main/csharp/io/swagger/Api/UserVariableApi.cs b/src/main/csharp/io/swagger/Api/UserVariableApi.cs index b72b68c..e832399 100644 --- a/src/main/csharp/io/swagger/Api/UserVariableApi.cs +++ b/src/main/csharp/io/swagger/Api/UserVariableApi.cs @@ -79,8 +79,8 @@ public interface IUserVariableApi /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// InlineResponse20016 - InlineResponse20016 UserVariablesGet (string accessToken = null, string clientId = null, int? parentId = null, int? variableId = null, int? userId = null, int? defaultUnitId = null, double? minimumAllowedValue = null, double? maximumAllowedValue = null, double? fillingValue = null, int? joinWith = null, int? onsetDelay = null, int? durationOfAction = null, int? variableCategoryId = null, int? updated = null, int? _public = null, bool? causeOnly = null, string fillingType = null, int? numberOfMeasurements = null, int? numberOfProcessedMeasurements = null, int? measurementsAtLastAnalysis = null, int? lastUnitId = null, int? lastOriginalUnitId = null, int? lastOriginalValue = null, double? lastValue = null, double? lastOriginalValue2 = null, int? lastSourceId = null, int? numberOfCorrelations = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, double? standardDeviation = null, double? variance = null, double? minimumRecordedValue = null, double? maximumRecordedValue = null, double? mean = null, double? median = null, int? mostCommonUnitId = null, double? mostCommonValue = null, double? numberOfUniqueDailyValues = null, int? numberOfChanges = null, double? skewness = null, double? kurtosis = null, double? latitude = null, double? longitude = null, string location = null, string createdAt = null, string updatedAt = null, bool? outcome = null, string sources = null, int? earliestSourceTime = null, int? latestSourceTime = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, int? earliestFillingTime = null, int? latestFillingTime = null, int? limit = null, int? offset = null, string sort = null); + /// InlineResponse20018 + InlineResponse20018 UserVariablesGet (string accessToken = null, string clientId = null, int? parentId = null, int? variableId = null, int? userId = null, int? defaultUnitId = null, double? minimumAllowedValue = null, double? maximumAllowedValue = null, double? fillingValue = null, int? joinWith = null, int? onsetDelay = null, int? durationOfAction = null, int? variableCategoryId = null, int? updated = null, int? _public = null, bool? causeOnly = null, string fillingType = null, int? numberOfMeasurements = null, int? numberOfProcessedMeasurements = null, int? measurementsAtLastAnalysis = null, int? lastUnitId = null, int? lastOriginalUnitId = null, int? lastOriginalValue = null, double? lastValue = null, double? lastOriginalValue2 = null, int? lastSourceId = null, int? numberOfCorrelations = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, double? standardDeviation = null, double? variance = null, double? minimumRecordedValue = null, double? maximumRecordedValue = null, double? mean = null, double? median = null, int? mostCommonUnitId = null, double? mostCommonValue = null, double? numberOfUniqueDailyValues = null, int? numberOfChanges = null, double? skewness = null, double? kurtosis = null, double? latitude = null, double? longitude = null, string location = null, string createdAt = null, string updatedAt = null, bool? outcome = null, string sources = null, int? earliestSourceTime = null, int? latestSourceTime = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, int? earliestFillingTime = null, int? latestFillingTime = null, int? limit = null, int? offset = null, string sort = null); /// /// Get all UserVariables @@ -146,8 +146,8 @@ public interface IUserVariableApi /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// ApiResponse of InlineResponse20016 - ApiResponse UserVariablesGetWithHttpInfo (string accessToken = null, string clientId = null, int? parentId = null, int? variableId = null, int? userId = null, int? defaultUnitId = null, double? minimumAllowedValue = null, double? maximumAllowedValue = null, double? fillingValue = null, int? joinWith = null, int? onsetDelay = null, int? durationOfAction = null, int? variableCategoryId = null, int? updated = null, int? _public = null, bool? causeOnly = null, string fillingType = null, int? numberOfMeasurements = null, int? numberOfProcessedMeasurements = null, int? measurementsAtLastAnalysis = null, int? lastUnitId = null, int? lastOriginalUnitId = null, int? lastOriginalValue = null, double? lastValue = null, double? lastOriginalValue2 = null, int? lastSourceId = null, int? numberOfCorrelations = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, double? standardDeviation = null, double? variance = null, double? minimumRecordedValue = null, double? maximumRecordedValue = null, double? mean = null, double? median = null, int? mostCommonUnitId = null, double? mostCommonValue = null, double? numberOfUniqueDailyValues = null, int? numberOfChanges = null, double? skewness = null, double? kurtosis = null, double? latitude = null, double? longitude = null, string location = null, string createdAt = null, string updatedAt = null, bool? outcome = null, string sources = null, int? earliestSourceTime = null, int? latestSourceTime = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, int? earliestFillingTime = null, int? latestFillingTime = null, int? limit = null, int? offset = null, string sort = null); + /// ApiResponse of InlineResponse20018 + ApiResponse UserVariablesGetWithHttpInfo (string accessToken = null, string clientId = null, int? parentId = null, int? variableId = null, int? userId = null, int? defaultUnitId = null, double? minimumAllowedValue = null, double? maximumAllowedValue = null, double? fillingValue = null, int? joinWith = null, int? onsetDelay = null, int? durationOfAction = null, int? variableCategoryId = null, int? updated = null, int? _public = null, bool? causeOnly = null, string fillingType = null, int? numberOfMeasurements = null, int? numberOfProcessedMeasurements = null, int? measurementsAtLastAnalysis = null, int? lastUnitId = null, int? lastOriginalUnitId = null, int? lastOriginalValue = null, double? lastValue = null, double? lastOriginalValue2 = null, int? lastSourceId = null, int? numberOfCorrelations = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, double? standardDeviation = null, double? variance = null, double? minimumRecordedValue = null, double? maximumRecordedValue = null, double? mean = null, double? median = null, int? mostCommonUnitId = null, double? mostCommonValue = null, double? numberOfUniqueDailyValues = null, int? numberOfChanges = null, double? skewness = null, double? kurtosis = null, double? latitude = null, double? longitude = null, string location = null, string createdAt = null, string updatedAt = null, bool? outcome = null, string sources = null, int? earliestSourceTime = null, int? latestSourceTime = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, int? earliestFillingTime = null, int? latestFillingTime = null, int? limit = null, int? offset = null, string sort = null); /// /// Get all UserVariables @@ -213,8 +213,8 @@ public interface IUserVariableApi /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// Task of InlineResponse20016 - System.Threading.Tasks.Task UserVariablesGetAsync (string accessToken = null, string clientId = null, int? parentId = null, int? variableId = null, int? userId = null, int? defaultUnitId = null, double? minimumAllowedValue = null, double? maximumAllowedValue = null, double? fillingValue = null, int? joinWith = null, int? onsetDelay = null, int? durationOfAction = null, int? variableCategoryId = null, int? updated = null, int? _public = null, bool? causeOnly = null, string fillingType = null, int? numberOfMeasurements = null, int? numberOfProcessedMeasurements = null, int? measurementsAtLastAnalysis = null, int? lastUnitId = null, int? lastOriginalUnitId = null, int? lastOriginalValue = null, double? lastValue = null, double? lastOriginalValue2 = null, int? lastSourceId = null, int? numberOfCorrelations = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, double? standardDeviation = null, double? variance = null, double? minimumRecordedValue = null, double? maximumRecordedValue = null, double? mean = null, double? median = null, int? mostCommonUnitId = null, double? mostCommonValue = null, double? numberOfUniqueDailyValues = null, int? numberOfChanges = null, double? skewness = null, double? kurtosis = null, double? latitude = null, double? longitude = null, string location = null, string createdAt = null, string updatedAt = null, bool? outcome = null, string sources = null, int? earliestSourceTime = null, int? latestSourceTime = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, int? earliestFillingTime = null, int? latestFillingTime = null, int? limit = null, int? offset = null, string sort = null); + /// Task of InlineResponse20018 + System.Threading.Tasks.Task UserVariablesGetAsync (string accessToken = null, string clientId = null, int? parentId = null, int? variableId = null, int? userId = null, int? defaultUnitId = null, double? minimumAllowedValue = null, double? maximumAllowedValue = null, double? fillingValue = null, int? joinWith = null, int? onsetDelay = null, int? durationOfAction = null, int? variableCategoryId = null, int? updated = null, int? _public = null, bool? causeOnly = null, string fillingType = null, int? numberOfMeasurements = null, int? numberOfProcessedMeasurements = null, int? measurementsAtLastAnalysis = null, int? lastUnitId = null, int? lastOriginalUnitId = null, int? lastOriginalValue = null, double? lastValue = null, double? lastOriginalValue2 = null, int? lastSourceId = null, int? numberOfCorrelations = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, double? standardDeviation = null, double? variance = null, double? minimumRecordedValue = null, double? maximumRecordedValue = null, double? mean = null, double? median = null, int? mostCommonUnitId = null, double? mostCommonValue = null, double? numberOfUniqueDailyValues = null, int? numberOfChanges = null, double? skewness = null, double? kurtosis = null, double? latitude = null, double? longitude = null, string location = null, string createdAt = null, string updatedAt = null, bool? outcome = null, string sources = null, int? earliestSourceTime = null, int? latestSourceTime = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, int? earliestFillingTime = null, int? latestFillingTime = null, int? limit = null, int? offset = null, string sort = null); /// /// Get all UserVariables @@ -280,8 +280,8 @@ public interface IUserVariableApi /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// Task of ApiResponse (InlineResponse20016) - System.Threading.Tasks.Task> UserVariablesGetAsyncWithHttpInfo (string accessToken = null, string clientId = null, int? parentId = null, int? variableId = null, int? userId = null, int? defaultUnitId = null, double? minimumAllowedValue = null, double? maximumAllowedValue = null, double? fillingValue = null, int? joinWith = null, int? onsetDelay = null, int? durationOfAction = null, int? variableCategoryId = null, int? updated = null, int? _public = null, bool? causeOnly = null, string fillingType = null, int? numberOfMeasurements = null, int? numberOfProcessedMeasurements = null, int? measurementsAtLastAnalysis = null, int? lastUnitId = null, int? lastOriginalUnitId = null, int? lastOriginalValue = null, double? lastValue = null, double? lastOriginalValue2 = null, int? lastSourceId = null, int? numberOfCorrelations = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, double? standardDeviation = null, double? variance = null, double? minimumRecordedValue = null, double? maximumRecordedValue = null, double? mean = null, double? median = null, int? mostCommonUnitId = null, double? mostCommonValue = null, double? numberOfUniqueDailyValues = null, int? numberOfChanges = null, double? skewness = null, double? kurtosis = null, double? latitude = null, double? longitude = null, string location = null, string createdAt = null, string updatedAt = null, bool? outcome = null, string sources = null, int? earliestSourceTime = null, int? latestSourceTime = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, int? earliestFillingTime = null, int? latestFillingTime = null, int? limit = null, int? offset = null, string sort = null); + /// Task of ApiResponse (InlineResponse20018) + System.Threading.Tasks.Task> UserVariablesGetAsyncWithHttpInfo (string accessToken = null, string clientId = null, int? parentId = null, int? variableId = null, int? userId = null, int? defaultUnitId = null, double? minimumAllowedValue = null, double? maximumAllowedValue = null, double? fillingValue = null, int? joinWith = null, int? onsetDelay = null, int? durationOfAction = null, int? variableCategoryId = null, int? updated = null, int? _public = null, bool? causeOnly = null, string fillingType = null, int? numberOfMeasurements = null, int? numberOfProcessedMeasurements = null, int? measurementsAtLastAnalysis = null, int? lastUnitId = null, int? lastOriginalUnitId = null, int? lastOriginalValue = null, double? lastValue = null, double? lastOriginalValue2 = null, int? lastSourceId = null, int? numberOfCorrelations = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, double? standardDeviation = null, double? variance = null, double? minimumRecordedValue = null, double? maximumRecordedValue = null, double? mean = null, double? median = null, int? mostCommonUnitId = null, double? mostCommonValue = null, double? numberOfUniqueDailyValues = null, int? numberOfChanges = null, double? skewness = null, double? kurtosis = null, double? latitude = null, double? longitude = null, string location = null, string createdAt = null, string updatedAt = null, bool? outcome = null, string sources = null, int? earliestSourceTime = null, int? latestSourceTime = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, int? earliestFillingTime = null, int? latestFillingTime = null, int? limit = null, int? offset = null, string sort = null); /// /// Store UserVariable @@ -291,8 +291,8 @@ public interface IUserVariableApi /// /// User's OAuth2 access token /// UserVariable that should be stored - /// InlineResponse20026 - InlineResponse20026 UserVariablesPost (string accessToken = null, UserVariable body = null); + /// InlineResponse20030 + InlineResponse20030 UserVariablesPost (string accessToken = null, UserVariable body = null); /// /// Store UserVariable @@ -302,8 +302,8 @@ public interface IUserVariableApi /// /// User's OAuth2 access token /// UserVariable that should be stored - /// ApiResponse of InlineResponse20026 - ApiResponse UserVariablesPostWithHttpInfo (string accessToken = null, UserVariable body = null); + /// ApiResponse of InlineResponse20030 + ApiResponse UserVariablesPostWithHttpInfo (string accessToken = null, UserVariable body = null); /// /// Store UserVariable @@ -313,8 +313,8 @@ public interface IUserVariableApi /// /// User's OAuth2 access token /// UserVariable that should be stored - /// Task of InlineResponse20026 - System.Threading.Tasks.Task UserVariablesPostAsync (string accessToken = null, UserVariable body = null); + /// Task of InlineResponse20030 + System.Threading.Tasks.Task UserVariablesPostAsync (string accessToken = null, UserVariable body = null); /// /// Store UserVariable @@ -324,8 +324,8 @@ public interface IUserVariableApi /// /// User's OAuth2 access token /// UserVariable that should be stored - /// Task of ApiResponse (InlineResponse20026) - System.Threading.Tasks.Task> UserVariablesPostAsyncWithHttpInfo (string accessToken = null, UserVariable body = null); + /// Task of ApiResponse (InlineResponse20030) + System.Threading.Tasks.Task> UserVariablesPostAsyncWithHttpInfo (string accessToken = null, UserVariable body = null); /// /// Get UserVariable @@ -335,8 +335,8 @@ public interface IUserVariableApi /// /// id of UserVariable /// User's OAuth2 access token - /// InlineResponse20026 - InlineResponse20026 UserVariablesIdGet (int? id, string accessToken = null); + /// InlineResponse20030 + InlineResponse20030 UserVariablesIdGet (int? id, string accessToken = null); /// /// Get UserVariable @@ -346,8 +346,8 @@ public interface IUserVariableApi /// /// id of UserVariable /// User's OAuth2 access token - /// ApiResponse of InlineResponse20026 - ApiResponse UserVariablesIdGetWithHttpInfo (int? id, string accessToken = null); + /// ApiResponse of InlineResponse20030 + ApiResponse UserVariablesIdGetWithHttpInfo (int? id, string accessToken = null); /// /// Get UserVariable @@ -357,8 +357,8 @@ public interface IUserVariableApi /// /// id of UserVariable /// User's OAuth2 access token - /// Task of InlineResponse20026 - System.Threading.Tasks.Task UserVariablesIdGetAsync (int? id, string accessToken = null); + /// Task of InlineResponse20030 + System.Threading.Tasks.Task UserVariablesIdGetAsync (int? id, string accessToken = null); /// /// Get UserVariable @@ -368,8 +368,8 @@ public interface IUserVariableApi /// /// id of UserVariable /// User's OAuth2 access token - /// Task of ApiResponse (InlineResponse20026) - System.Threading.Tasks.Task> UserVariablesIdGetAsyncWithHttpInfo (int? id, string accessToken = null); + /// Task of ApiResponse (InlineResponse20030) + System.Threading.Tasks.Task> UserVariablesIdGetAsyncWithHttpInfo (int? id, string accessToken = null); /// /// Update UserVariable @@ -602,10 +602,10 @@ public void AddDefaultHeader(string key, string value) /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// InlineResponse20016 - public InlineResponse20016 UserVariablesGet (string accessToken = null, string clientId = null, int? parentId = null, int? variableId = null, int? userId = null, int? defaultUnitId = null, double? minimumAllowedValue = null, double? maximumAllowedValue = null, double? fillingValue = null, int? joinWith = null, int? onsetDelay = null, int? durationOfAction = null, int? variableCategoryId = null, int? updated = null, int? _public = null, bool? causeOnly = null, string fillingType = null, int? numberOfMeasurements = null, int? numberOfProcessedMeasurements = null, int? measurementsAtLastAnalysis = null, int? lastUnitId = null, int? lastOriginalUnitId = null, int? lastOriginalValue = null, double? lastValue = null, double? lastOriginalValue2 = null, int? lastSourceId = null, int? numberOfCorrelations = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, double? standardDeviation = null, double? variance = null, double? minimumRecordedValue = null, double? maximumRecordedValue = null, double? mean = null, double? median = null, int? mostCommonUnitId = null, double? mostCommonValue = null, double? numberOfUniqueDailyValues = null, int? numberOfChanges = null, double? skewness = null, double? kurtosis = null, double? latitude = null, double? longitude = null, string location = null, string createdAt = null, string updatedAt = null, bool? outcome = null, string sources = null, int? earliestSourceTime = null, int? latestSourceTime = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, int? earliestFillingTime = null, int? latestFillingTime = null, int? limit = null, int? offset = null, string sort = null) + /// InlineResponse20018 + public InlineResponse20018 UserVariablesGet (string accessToken = null, string clientId = null, int? parentId = null, int? variableId = null, int? userId = null, int? defaultUnitId = null, double? minimumAllowedValue = null, double? maximumAllowedValue = null, double? fillingValue = null, int? joinWith = null, int? onsetDelay = null, int? durationOfAction = null, int? variableCategoryId = null, int? updated = null, int? _public = null, bool? causeOnly = null, string fillingType = null, int? numberOfMeasurements = null, int? numberOfProcessedMeasurements = null, int? measurementsAtLastAnalysis = null, int? lastUnitId = null, int? lastOriginalUnitId = null, int? lastOriginalValue = null, double? lastValue = null, double? lastOriginalValue2 = null, int? lastSourceId = null, int? numberOfCorrelations = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, double? standardDeviation = null, double? variance = null, double? minimumRecordedValue = null, double? maximumRecordedValue = null, double? mean = null, double? median = null, int? mostCommonUnitId = null, double? mostCommonValue = null, double? numberOfUniqueDailyValues = null, int? numberOfChanges = null, double? skewness = null, double? kurtosis = null, double? latitude = null, double? longitude = null, string location = null, string createdAt = null, string updatedAt = null, bool? outcome = null, string sources = null, int? earliestSourceTime = null, int? latestSourceTime = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, int? earliestFillingTime = null, int? latestFillingTime = null, int? limit = null, int? offset = null, string sort = null) { - ApiResponse response = UserVariablesGetWithHttpInfo(accessToken, clientId, parentId, variableId, userId, defaultUnitId, minimumAllowedValue, maximumAllowedValue, fillingValue, joinWith, onsetDelay, durationOfAction, variableCategoryId, updated, _public, causeOnly, fillingType, numberOfMeasurements, numberOfProcessedMeasurements, measurementsAtLastAnalysis, lastUnitId, lastOriginalUnitId, lastOriginalValue, lastValue, lastOriginalValue2, lastSourceId, numberOfCorrelations, status, errorMessage, lastSuccessfulUpdateTime, standardDeviation, variance, minimumRecordedValue, maximumRecordedValue, mean, median, mostCommonUnitId, mostCommonValue, numberOfUniqueDailyValues, numberOfChanges, skewness, kurtosis, latitude, longitude, location, createdAt, updatedAt, outcome, sources, earliestSourceTime, latestSourceTime, earliestMeasurementTime, latestMeasurementTime, earliestFillingTime, latestFillingTime, limit, offset, sort); + ApiResponse response = UserVariablesGetWithHttpInfo(accessToken, clientId, parentId, variableId, userId, defaultUnitId, minimumAllowedValue, maximumAllowedValue, fillingValue, joinWith, onsetDelay, durationOfAction, variableCategoryId, updated, _public, causeOnly, fillingType, numberOfMeasurements, numberOfProcessedMeasurements, measurementsAtLastAnalysis, lastUnitId, lastOriginalUnitId, lastOriginalValue, lastValue, lastOriginalValue2, lastSourceId, numberOfCorrelations, status, errorMessage, lastSuccessfulUpdateTime, standardDeviation, variance, minimumRecordedValue, maximumRecordedValue, mean, median, mostCommonUnitId, mostCommonValue, numberOfUniqueDailyValues, numberOfChanges, skewness, kurtosis, latitude, longitude, location, createdAt, updatedAt, outcome, sources, earliestSourceTime, latestSourceTime, earliestMeasurementTime, latestMeasurementTime, earliestFillingTime, latestFillingTime, limit, offset, sort); return response.Data; } @@ -670,8 +670,8 @@ public InlineResponse20016 UserVariablesGet (string accessToken = null, string c /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// ApiResponse of InlineResponse20016 - public ApiResponse< InlineResponse20016 > UserVariablesGetWithHttpInfo (string accessToken = null, string clientId = null, int? parentId = null, int? variableId = null, int? userId = null, int? defaultUnitId = null, double? minimumAllowedValue = null, double? maximumAllowedValue = null, double? fillingValue = null, int? joinWith = null, int? onsetDelay = null, int? durationOfAction = null, int? variableCategoryId = null, int? updated = null, int? _public = null, bool? causeOnly = null, string fillingType = null, int? numberOfMeasurements = null, int? numberOfProcessedMeasurements = null, int? measurementsAtLastAnalysis = null, int? lastUnitId = null, int? lastOriginalUnitId = null, int? lastOriginalValue = null, double? lastValue = null, double? lastOriginalValue2 = null, int? lastSourceId = null, int? numberOfCorrelations = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, double? standardDeviation = null, double? variance = null, double? minimumRecordedValue = null, double? maximumRecordedValue = null, double? mean = null, double? median = null, int? mostCommonUnitId = null, double? mostCommonValue = null, double? numberOfUniqueDailyValues = null, int? numberOfChanges = null, double? skewness = null, double? kurtosis = null, double? latitude = null, double? longitude = null, string location = null, string createdAt = null, string updatedAt = null, bool? outcome = null, string sources = null, int? earliestSourceTime = null, int? latestSourceTime = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, int? earliestFillingTime = null, int? latestFillingTime = null, int? limit = null, int? offset = null, string sort = null) + /// ApiResponse of InlineResponse20018 + public ApiResponse< InlineResponse20018 > UserVariablesGetWithHttpInfo (string accessToken = null, string clientId = null, int? parentId = null, int? variableId = null, int? userId = null, int? defaultUnitId = null, double? minimumAllowedValue = null, double? maximumAllowedValue = null, double? fillingValue = null, int? joinWith = null, int? onsetDelay = null, int? durationOfAction = null, int? variableCategoryId = null, int? updated = null, int? _public = null, bool? causeOnly = null, string fillingType = null, int? numberOfMeasurements = null, int? numberOfProcessedMeasurements = null, int? measurementsAtLastAnalysis = null, int? lastUnitId = null, int? lastOriginalUnitId = null, int? lastOriginalValue = null, double? lastValue = null, double? lastOriginalValue2 = null, int? lastSourceId = null, int? numberOfCorrelations = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, double? standardDeviation = null, double? variance = null, double? minimumRecordedValue = null, double? maximumRecordedValue = null, double? mean = null, double? median = null, int? mostCommonUnitId = null, double? mostCommonValue = null, double? numberOfUniqueDailyValues = null, int? numberOfChanges = null, double? skewness = null, double? kurtosis = null, double? latitude = null, double? longitude = null, string location = null, string createdAt = null, string updatedAt = null, bool? outcome = null, string sources = null, int? earliestSourceTime = null, int? latestSourceTime = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, int? earliestFillingTime = null, int? latestFillingTime = null, int? limit = null, int? offset = null, string sort = null) { @@ -779,9 +779,9 @@ public ApiResponse< InlineResponse20016 > UserVariablesGetWithHttpInfo (string a else if (statusCode == 0) throw new ApiException (statusCode, "Error calling UserVariablesGet: " + response.ErrorMessage, response.ErrorMessage); - return new ApiResponse(statusCode, + return new ApiResponse(statusCode, response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (InlineResponse20016) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20016))); + (InlineResponse20018) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20018))); } @@ -846,10 +846,10 @@ public ApiResponse< InlineResponse20016 > UserVariablesGetWithHttpInfo (string a /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// Task of InlineResponse20016 - public async System.Threading.Tasks.Task UserVariablesGetAsync (string accessToken = null, string clientId = null, int? parentId = null, int? variableId = null, int? userId = null, int? defaultUnitId = null, double? minimumAllowedValue = null, double? maximumAllowedValue = null, double? fillingValue = null, int? joinWith = null, int? onsetDelay = null, int? durationOfAction = null, int? variableCategoryId = null, int? updated = null, int? _public = null, bool? causeOnly = null, string fillingType = null, int? numberOfMeasurements = null, int? numberOfProcessedMeasurements = null, int? measurementsAtLastAnalysis = null, int? lastUnitId = null, int? lastOriginalUnitId = null, int? lastOriginalValue = null, double? lastValue = null, double? lastOriginalValue2 = null, int? lastSourceId = null, int? numberOfCorrelations = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, double? standardDeviation = null, double? variance = null, double? minimumRecordedValue = null, double? maximumRecordedValue = null, double? mean = null, double? median = null, int? mostCommonUnitId = null, double? mostCommonValue = null, double? numberOfUniqueDailyValues = null, int? numberOfChanges = null, double? skewness = null, double? kurtosis = null, double? latitude = null, double? longitude = null, string location = null, string createdAt = null, string updatedAt = null, bool? outcome = null, string sources = null, int? earliestSourceTime = null, int? latestSourceTime = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, int? earliestFillingTime = null, int? latestFillingTime = null, int? limit = null, int? offset = null, string sort = null) + /// Task of InlineResponse20018 + public async System.Threading.Tasks.Task UserVariablesGetAsync (string accessToken = null, string clientId = null, int? parentId = null, int? variableId = null, int? userId = null, int? defaultUnitId = null, double? minimumAllowedValue = null, double? maximumAllowedValue = null, double? fillingValue = null, int? joinWith = null, int? onsetDelay = null, int? durationOfAction = null, int? variableCategoryId = null, int? updated = null, int? _public = null, bool? causeOnly = null, string fillingType = null, int? numberOfMeasurements = null, int? numberOfProcessedMeasurements = null, int? measurementsAtLastAnalysis = null, int? lastUnitId = null, int? lastOriginalUnitId = null, int? lastOriginalValue = null, double? lastValue = null, double? lastOriginalValue2 = null, int? lastSourceId = null, int? numberOfCorrelations = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, double? standardDeviation = null, double? variance = null, double? minimumRecordedValue = null, double? maximumRecordedValue = null, double? mean = null, double? median = null, int? mostCommonUnitId = null, double? mostCommonValue = null, double? numberOfUniqueDailyValues = null, int? numberOfChanges = null, double? skewness = null, double? kurtosis = null, double? latitude = null, double? longitude = null, string location = null, string createdAt = null, string updatedAt = null, bool? outcome = null, string sources = null, int? earliestSourceTime = null, int? latestSourceTime = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, int? earliestFillingTime = null, int? latestFillingTime = null, int? limit = null, int? offset = null, string sort = null) { - ApiResponse response = await UserVariablesGetAsyncWithHttpInfo(accessToken, clientId, parentId, variableId, userId, defaultUnitId, minimumAllowedValue, maximumAllowedValue, fillingValue, joinWith, onsetDelay, durationOfAction, variableCategoryId, updated, _public, causeOnly, fillingType, numberOfMeasurements, numberOfProcessedMeasurements, measurementsAtLastAnalysis, lastUnitId, lastOriginalUnitId, lastOriginalValue, lastValue, lastOriginalValue2, lastSourceId, numberOfCorrelations, status, errorMessage, lastSuccessfulUpdateTime, standardDeviation, variance, minimumRecordedValue, maximumRecordedValue, mean, median, mostCommonUnitId, mostCommonValue, numberOfUniqueDailyValues, numberOfChanges, skewness, kurtosis, latitude, longitude, location, createdAt, updatedAt, outcome, sources, earliestSourceTime, latestSourceTime, earliestMeasurementTime, latestMeasurementTime, earliestFillingTime, latestFillingTime, limit, offset, sort); + ApiResponse response = await UserVariablesGetAsyncWithHttpInfo(accessToken, clientId, parentId, variableId, userId, defaultUnitId, minimumAllowedValue, maximumAllowedValue, fillingValue, joinWith, onsetDelay, durationOfAction, variableCategoryId, updated, _public, causeOnly, fillingType, numberOfMeasurements, numberOfProcessedMeasurements, measurementsAtLastAnalysis, lastUnitId, lastOriginalUnitId, lastOriginalValue, lastValue, lastOriginalValue2, lastSourceId, numberOfCorrelations, status, errorMessage, lastSuccessfulUpdateTime, standardDeviation, variance, minimumRecordedValue, maximumRecordedValue, mean, median, mostCommonUnitId, mostCommonValue, numberOfUniqueDailyValues, numberOfChanges, skewness, kurtosis, latitude, longitude, location, createdAt, updatedAt, outcome, sources, earliestSourceTime, latestSourceTime, earliestMeasurementTime, latestMeasurementTime, earliestFillingTime, latestFillingTime, limit, offset, sort); return response.Data; } @@ -915,8 +915,8 @@ public async System.Threading.Tasks.Task UserVariablesGetAs /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// Task of ApiResponse (InlineResponse20016) - public async System.Threading.Tasks.Task> UserVariablesGetAsyncWithHttpInfo (string accessToken = null, string clientId = null, int? parentId = null, int? variableId = null, int? userId = null, int? defaultUnitId = null, double? minimumAllowedValue = null, double? maximumAllowedValue = null, double? fillingValue = null, int? joinWith = null, int? onsetDelay = null, int? durationOfAction = null, int? variableCategoryId = null, int? updated = null, int? _public = null, bool? causeOnly = null, string fillingType = null, int? numberOfMeasurements = null, int? numberOfProcessedMeasurements = null, int? measurementsAtLastAnalysis = null, int? lastUnitId = null, int? lastOriginalUnitId = null, int? lastOriginalValue = null, double? lastValue = null, double? lastOriginalValue2 = null, int? lastSourceId = null, int? numberOfCorrelations = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, double? standardDeviation = null, double? variance = null, double? minimumRecordedValue = null, double? maximumRecordedValue = null, double? mean = null, double? median = null, int? mostCommonUnitId = null, double? mostCommonValue = null, double? numberOfUniqueDailyValues = null, int? numberOfChanges = null, double? skewness = null, double? kurtosis = null, double? latitude = null, double? longitude = null, string location = null, string createdAt = null, string updatedAt = null, bool? outcome = null, string sources = null, int? earliestSourceTime = null, int? latestSourceTime = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, int? earliestFillingTime = null, int? latestFillingTime = null, int? limit = null, int? offset = null, string sort = null) + /// Task of ApiResponse (InlineResponse20018) + public async System.Threading.Tasks.Task> UserVariablesGetAsyncWithHttpInfo (string accessToken = null, string clientId = null, int? parentId = null, int? variableId = null, int? userId = null, int? defaultUnitId = null, double? minimumAllowedValue = null, double? maximumAllowedValue = null, double? fillingValue = null, int? joinWith = null, int? onsetDelay = null, int? durationOfAction = null, int? variableCategoryId = null, int? updated = null, int? _public = null, bool? causeOnly = null, string fillingType = null, int? numberOfMeasurements = null, int? numberOfProcessedMeasurements = null, int? measurementsAtLastAnalysis = null, int? lastUnitId = null, int? lastOriginalUnitId = null, int? lastOriginalValue = null, double? lastValue = null, double? lastOriginalValue2 = null, int? lastSourceId = null, int? numberOfCorrelations = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, double? standardDeviation = null, double? variance = null, double? minimumRecordedValue = null, double? maximumRecordedValue = null, double? mean = null, double? median = null, int? mostCommonUnitId = null, double? mostCommonValue = null, double? numberOfUniqueDailyValues = null, int? numberOfChanges = null, double? skewness = null, double? kurtosis = null, double? latitude = null, double? longitude = null, string location = null, string createdAt = null, string updatedAt = null, bool? outcome = null, string sources = null, int? earliestSourceTime = null, int? latestSourceTime = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, int? earliestFillingTime = null, int? latestFillingTime = null, int? limit = null, int? offset = null, string sort = null) { @@ -1024,9 +1024,9 @@ public async System.Threading.Tasks.Task> UserV else if (statusCode == 0) throw new ApiException (statusCode, "Error calling UserVariablesGet: " + response.ErrorMessage, response.ErrorMessage); - return new ApiResponse(statusCode, + return new ApiResponse(statusCode, response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (InlineResponse20016) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20016))); + (InlineResponse20018) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20018))); } @@ -1035,10 +1035,10 @@ public async System.Threading.Tasks.Task> UserV /// /// User's OAuth2 access token /// UserVariable that should be stored - /// InlineResponse20026 - public InlineResponse20026 UserVariablesPost (string accessToken = null, UserVariable body = null) + /// InlineResponse20030 + public InlineResponse20030 UserVariablesPost (string accessToken = null, UserVariable body = null) { - ApiResponse response = UserVariablesPostWithHttpInfo(accessToken, body); + ApiResponse response = UserVariablesPostWithHttpInfo(accessToken, body); return response.Data; } @@ -1047,8 +1047,8 @@ public InlineResponse20026 UserVariablesPost (string accessToken = null, UserVar /// /// User's OAuth2 access token /// UserVariable that should be stored - /// ApiResponse of InlineResponse20026 - public ApiResponse< InlineResponse20026 > UserVariablesPostWithHttpInfo (string accessToken = null, UserVariable body = null) + /// ApiResponse of InlineResponse20030 + public ApiResponse< InlineResponse20030 > UserVariablesPostWithHttpInfo (string accessToken = null, UserVariable body = null) { @@ -1100,9 +1100,9 @@ public ApiResponse< InlineResponse20026 > UserVariablesPostWithHttpInfo (string else if (statusCode == 0) throw new ApiException (statusCode, "Error calling UserVariablesPost: " + response.ErrorMessage, response.ErrorMessage); - return new ApiResponse(statusCode, + return new ApiResponse(statusCode, response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (InlineResponse20026) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20026))); + (InlineResponse20030) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20030))); } @@ -1111,10 +1111,10 @@ public ApiResponse< InlineResponse20026 > UserVariablesPostWithHttpInfo (string /// /// User's OAuth2 access token /// UserVariable that should be stored - /// Task of InlineResponse20026 - public async System.Threading.Tasks.Task UserVariablesPostAsync (string accessToken = null, UserVariable body = null) + /// Task of InlineResponse20030 + public async System.Threading.Tasks.Task UserVariablesPostAsync (string accessToken = null, UserVariable body = null) { - ApiResponse response = await UserVariablesPostAsyncWithHttpInfo(accessToken, body); + ApiResponse response = await UserVariablesPostAsyncWithHttpInfo(accessToken, body); return response.Data; } @@ -1124,8 +1124,8 @@ public async System.Threading.Tasks.Task UserVariablesPostA /// /// User's OAuth2 access token /// UserVariable that should be stored - /// Task of ApiResponse (InlineResponse20026) - public async System.Threading.Tasks.Task> UserVariablesPostAsyncWithHttpInfo (string accessToken = null, UserVariable body = null) + /// Task of ApiResponse (InlineResponse20030) + public async System.Threading.Tasks.Task> UserVariablesPostAsyncWithHttpInfo (string accessToken = null, UserVariable body = null) { @@ -1177,9 +1177,9 @@ public async System.Threading.Tasks.Task> UserV else if (statusCode == 0) throw new ApiException (statusCode, "Error calling UserVariablesPost: " + response.ErrorMessage, response.ErrorMessage); - return new ApiResponse(statusCode, + return new ApiResponse(statusCode, response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (InlineResponse20026) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20026))); + (InlineResponse20030) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20030))); } @@ -1188,10 +1188,10 @@ public async System.Threading.Tasks.Task> UserV /// /// id of UserVariable /// User's OAuth2 access token - /// InlineResponse20026 - public InlineResponse20026 UserVariablesIdGet (int? id, string accessToken = null) + /// InlineResponse20030 + public InlineResponse20030 UserVariablesIdGet (int? id, string accessToken = null) { - ApiResponse response = UserVariablesIdGetWithHttpInfo(id, accessToken); + ApiResponse response = UserVariablesIdGetWithHttpInfo(id, accessToken); return response.Data; } @@ -1200,8 +1200,8 @@ public InlineResponse20026 UserVariablesIdGet (int? id, string accessToken = nul /// /// id of UserVariable /// User's OAuth2 access token - /// ApiResponse of InlineResponse20026 - public ApiResponse< InlineResponse20026 > UserVariablesIdGetWithHttpInfo (int? id, string accessToken = null) + /// ApiResponse of InlineResponse20030 + public ApiResponse< InlineResponse20030 > UserVariablesIdGetWithHttpInfo (int? id, string accessToken = null) { // verify the required parameter 'id' is set @@ -1256,9 +1256,9 @@ public ApiResponse< InlineResponse20026 > UserVariablesIdGetWithHttpInfo (int? i else if (statusCode == 0) throw new ApiException (statusCode, "Error calling UserVariablesIdGet: " + response.ErrorMessage, response.ErrorMessage); - return new ApiResponse(statusCode, + return new ApiResponse(statusCode, response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (InlineResponse20026) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20026))); + (InlineResponse20030) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20030))); } @@ -1267,10 +1267,10 @@ public ApiResponse< InlineResponse20026 > UserVariablesIdGetWithHttpInfo (int? i /// /// id of UserVariable /// User's OAuth2 access token - /// Task of InlineResponse20026 - public async System.Threading.Tasks.Task UserVariablesIdGetAsync (int? id, string accessToken = null) + /// Task of InlineResponse20030 + public async System.Threading.Tasks.Task UserVariablesIdGetAsync (int? id, string accessToken = null) { - ApiResponse response = await UserVariablesIdGetAsyncWithHttpInfo(id, accessToken); + ApiResponse response = await UserVariablesIdGetAsyncWithHttpInfo(id, accessToken); return response.Data; } @@ -1280,8 +1280,8 @@ public async System.Threading.Tasks.Task UserVariablesIdGet /// /// id of UserVariable /// User's OAuth2 access token - /// Task of ApiResponse (InlineResponse20026) - public async System.Threading.Tasks.Task> UserVariablesIdGetAsyncWithHttpInfo (int? id, string accessToken = null) + /// Task of ApiResponse (InlineResponse20030) + public async System.Threading.Tasks.Task> UserVariablesIdGetAsyncWithHttpInfo (int? id, string accessToken = null) { // verify the required parameter 'id' is set if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling UserVariablesIdGet"); @@ -1335,9 +1335,9 @@ public async System.Threading.Tasks.Task> UserV else if (statusCode == 0) throw new ApiException (statusCode, "Error calling UserVariablesIdGet: " + response.ErrorMessage, response.ErrorMessage); - return new ApiResponse(statusCode, + return new ApiResponse(statusCode, response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (InlineResponse20026) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20026))); + (InlineResponse20030) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20030))); } diff --git a/src/main/csharp/io/swagger/Api/UserVariableRelationshipApi.cs b/src/main/csharp/io/swagger/Api/UserVariableRelationshipApi.cs index 4bb8236..a3db606 100644 --- a/src/main/csharp/io/swagger/Api/UserVariableRelationshipApi.cs +++ b/src/main/csharp/io/swagger/Api/UserVariableRelationshipApi.cs @@ -42,8 +42,8 @@ public interface IUserVariableRelationshipApi /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// InlineResponse20024 - InlineResponse20024 UserVariableRelationshipsGet (string accessToken = null, int? id = null, string confidenceLevel = null, double? confidenceScore = null, string direction = null, int? durationOfAction = null, string errorMessage = null, int? onsetDelay = null, int? outcomeVariableId = null, int? predictorVariableId = null, int? predictorUnitId = null, double? sinnRank = null, string strengthLevel = null, double? strengthScore = null, int? userId = null, string vote = null, double? valuePredictingHighOutcome = null, double? valuePredictingLowOutcome = null, int? limit = null, int? offset = null, string sort = null); + /// InlineResponse20017 + InlineResponse20017 UserVariableRelationshipsGet (string accessToken = null, int? id = null, string confidenceLevel = null, double? confidenceScore = null, string direction = null, int? durationOfAction = null, string errorMessage = null, int? onsetDelay = null, int? outcomeVariableId = null, int? predictorVariableId = null, int? predictorUnitId = null, double? sinnRank = null, string strengthLevel = null, double? strengthScore = null, int? userId = null, string vote = null, double? valuePredictingHighOutcome = null, double? valuePredictingLowOutcome = null, int? limit = null, int? offset = null, string sort = null); /// /// Get all UserVariableRelationships @@ -72,8 +72,8 @@ public interface IUserVariableRelationshipApi /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// ApiResponse of InlineResponse20024 - ApiResponse UserVariableRelationshipsGetWithHttpInfo (string accessToken = null, int? id = null, string confidenceLevel = null, double? confidenceScore = null, string direction = null, int? durationOfAction = null, string errorMessage = null, int? onsetDelay = null, int? outcomeVariableId = null, int? predictorVariableId = null, int? predictorUnitId = null, double? sinnRank = null, string strengthLevel = null, double? strengthScore = null, int? userId = null, string vote = null, double? valuePredictingHighOutcome = null, double? valuePredictingLowOutcome = null, int? limit = null, int? offset = null, string sort = null); + /// ApiResponse of InlineResponse20017 + ApiResponse UserVariableRelationshipsGetWithHttpInfo (string accessToken = null, int? id = null, string confidenceLevel = null, double? confidenceScore = null, string direction = null, int? durationOfAction = null, string errorMessage = null, int? onsetDelay = null, int? outcomeVariableId = null, int? predictorVariableId = null, int? predictorUnitId = null, double? sinnRank = null, string strengthLevel = null, double? strengthScore = null, int? userId = null, string vote = null, double? valuePredictingHighOutcome = null, double? valuePredictingLowOutcome = null, int? limit = null, int? offset = null, string sort = null); /// /// Get all UserVariableRelationships @@ -102,8 +102,8 @@ public interface IUserVariableRelationshipApi /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// Task of InlineResponse20024 - System.Threading.Tasks.Task UserVariableRelationshipsGetAsync (string accessToken = null, int? id = null, string confidenceLevel = null, double? confidenceScore = null, string direction = null, int? durationOfAction = null, string errorMessage = null, int? onsetDelay = null, int? outcomeVariableId = null, int? predictorVariableId = null, int? predictorUnitId = null, double? sinnRank = null, string strengthLevel = null, double? strengthScore = null, int? userId = null, string vote = null, double? valuePredictingHighOutcome = null, double? valuePredictingLowOutcome = null, int? limit = null, int? offset = null, string sort = null); + /// Task of InlineResponse20017 + System.Threading.Tasks.Task UserVariableRelationshipsGetAsync (string accessToken = null, int? id = null, string confidenceLevel = null, double? confidenceScore = null, string direction = null, int? durationOfAction = null, string errorMessage = null, int? onsetDelay = null, int? outcomeVariableId = null, int? predictorVariableId = null, int? predictorUnitId = null, double? sinnRank = null, string strengthLevel = null, double? strengthScore = null, int? userId = null, string vote = null, double? valuePredictingHighOutcome = null, double? valuePredictingLowOutcome = null, int? limit = null, int? offset = null, string sort = null); /// /// Get all UserVariableRelationships @@ -132,8 +132,8 @@ public interface IUserVariableRelationshipApi /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// Task of ApiResponse (InlineResponse20024) - System.Threading.Tasks.Task> UserVariableRelationshipsGetAsyncWithHttpInfo (string accessToken = null, int? id = null, string confidenceLevel = null, double? confidenceScore = null, string direction = null, int? durationOfAction = null, string errorMessage = null, int? onsetDelay = null, int? outcomeVariableId = null, int? predictorVariableId = null, int? predictorUnitId = null, double? sinnRank = null, string strengthLevel = null, double? strengthScore = null, int? userId = null, string vote = null, double? valuePredictingHighOutcome = null, double? valuePredictingLowOutcome = null, int? limit = null, int? offset = null, string sort = null); + /// Task of ApiResponse (InlineResponse20017) + System.Threading.Tasks.Task> UserVariableRelationshipsGetAsyncWithHttpInfo (string accessToken = null, int? id = null, string confidenceLevel = null, double? confidenceScore = null, string direction = null, int? durationOfAction = null, string errorMessage = null, int? onsetDelay = null, int? outcomeVariableId = null, int? predictorVariableId = null, int? predictorUnitId = null, double? sinnRank = null, string strengthLevel = null, double? strengthScore = null, int? userId = null, string vote = null, double? valuePredictingHighOutcome = null, double? valuePredictingLowOutcome = null, int? limit = null, int? offset = null, string sort = null); /// /// Store UserVariableRelationship @@ -143,8 +143,8 @@ public interface IUserVariableRelationshipApi /// /// User's OAuth2 access token /// UserVariableRelationship that should be stored - /// InlineResponse20025 - InlineResponse20025 UserVariableRelationshipsPost (string accessToken = null, UserVariableRelationship body = null); + /// InlineResponse20029 + InlineResponse20029 UserVariableRelationshipsPost (string accessToken = null, UserVariableRelationship body = null); /// /// Store UserVariableRelationship @@ -154,8 +154,8 @@ public interface IUserVariableRelationshipApi /// /// User's OAuth2 access token /// UserVariableRelationship that should be stored - /// ApiResponse of InlineResponse20025 - ApiResponse UserVariableRelationshipsPostWithHttpInfo (string accessToken = null, UserVariableRelationship body = null); + /// ApiResponse of InlineResponse20029 + ApiResponse UserVariableRelationshipsPostWithHttpInfo (string accessToken = null, UserVariableRelationship body = null); /// /// Store UserVariableRelationship @@ -165,8 +165,8 @@ public interface IUserVariableRelationshipApi /// /// User's OAuth2 access token /// UserVariableRelationship that should be stored - /// Task of InlineResponse20025 - System.Threading.Tasks.Task UserVariableRelationshipsPostAsync (string accessToken = null, UserVariableRelationship body = null); + /// Task of InlineResponse20029 + System.Threading.Tasks.Task UserVariableRelationshipsPostAsync (string accessToken = null, UserVariableRelationship body = null); /// /// Store UserVariableRelationship @@ -176,8 +176,8 @@ public interface IUserVariableRelationshipApi /// /// User's OAuth2 access token /// UserVariableRelationship that should be stored - /// Task of ApiResponse (InlineResponse20025) - System.Threading.Tasks.Task> UserVariableRelationshipsPostAsyncWithHttpInfo (string accessToken = null, UserVariableRelationship body = null); + /// Task of ApiResponse (InlineResponse20029) + System.Threading.Tasks.Task> UserVariableRelationshipsPostAsyncWithHttpInfo (string accessToken = null, UserVariableRelationship body = null); /// /// Get UserVariableRelationship @@ -187,8 +187,8 @@ public interface IUserVariableRelationshipApi /// /// id of UserVariableRelationship /// User's OAuth2 access token - /// InlineResponse20025 - InlineResponse20025 UserVariableRelationshipsIdGet (int? id, string accessToken = null); + /// InlineResponse20029 + InlineResponse20029 UserVariableRelationshipsIdGet (int? id, string accessToken = null); /// /// Get UserVariableRelationship @@ -198,8 +198,8 @@ public interface IUserVariableRelationshipApi /// /// id of UserVariableRelationship /// User's OAuth2 access token - /// ApiResponse of InlineResponse20025 - ApiResponse UserVariableRelationshipsIdGetWithHttpInfo (int? id, string accessToken = null); + /// ApiResponse of InlineResponse20029 + ApiResponse UserVariableRelationshipsIdGetWithHttpInfo (int? id, string accessToken = null); /// /// Get UserVariableRelationship @@ -209,8 +209,8 @@ public interface IUserVariableRelationshipApi /// /// id of UserVariableRelationship /// User's OAuth2 access token - /// Task of InlineResponse20025 - System.Threading.Tasks.Task UserVariableRelationshipsIdGetAsync (int? id, string accessToken = null); + /// Task of InlineResponse20029 + System.Threading.Tasks.Task UserVariableRelationshipsIdGetAsync (int? id, string accessToken = null); /// /// Get UserVariableRelationship @@ -220,8 +220,8 @@ public interface IUserVariableRelationshipApi /// /// id of UserVariableRelationship /// User's OAuth2 access token - /// Task of ApiResponse (InlineResponse20025) - System.Threading.Tasks.Task> UserVariableRelationshipsIdGetAsyncWithHttpInfo (int? id, string accessToken = null); + /// Task of ApiResponse (InlineResponse20029) + System.Threading.Tasks.Task> UserVariableRelationshipsIdGetAsyncWithHttpInfo (int? id, string accessToken = null); /// /// Update UserVariableRelationship @@ -417,10 +417,10 @@ public void AddDefaultHeader(string key, string value) /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// InlineResponse20024 - public InlineResponse20024 UserVariableRelationshipsGet (string accessToken = null, int? id = null, string confidenceLevel = null, double? confidenceScore = null, string direction = null, int? durationOfAction = null, string errorMessage = null, int? onsetDelay = null, int? outcomeVariableId = null, int? predictorVariableId = null, int? predictorUnitId = null, double? sinnRank = null, string strengthLevel = null, double? strengthScore = null, int? userId = null, string vote = null, double? valuePredictingHighOutcome = null, double? valuePredictingLowOutcome = null, int? limit = null, int? offset = null, string sort = null) + /// InlineResponse20017 + public InlineResponse20017 UserVariableRelationshipsGet (string accessToken = null, int? id = null, string confidenceLevel = null, double? confidenceScore = null, string direction = null, int? durationOfAction = null, string errorMessage = null, int? onsetDelay = null, int? outcomeVariableId = null, int? predictorVariableId = null, int? predictorUnitId = null, double? sinnRank = null, string strengthLevel = null, double? strengthScore = null, int? userId = null, string vote = null, double? valuePredictingHighOutcome = null, double? valuePredictingLowOutcome = null, int? limit = null, int? offset = null, string sort = null) { - ApiResponse response = UserVariableRelationshipsGetWithHttpInfo(accessToken, id, confidenceLevel, confidenceScore, direction, durationOfAction, errorMessage, onsetDelay, outcomeVariableId, predictorVariableId, predictorUnitId, sinnRank, strengthLevel, strengthScore, userId, vote, valuePredictingHighOutcome, valuePredictingLowOutcome, limit, offset, sort); + ApiResponse response = UserVariableRelationshipsGetWithHttpInfo(accessToken, id, confidenceLevel, confidenceScore, direction, durationOfAction, errorMessage, onsetDelay, outcomeVariableId, predictorVariableId, predictorUnitId, sinnRank, strengthLevel, strengthScore, userId, vote, valuePredictingHighOutcome, valuePredictingLowOutcome, limit, offset, sort); return response.Data; } @@ -448,8 +448,8 @@ public InlineResponse20024 UserVariableRelationshipsGet (string accessToken = nu /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// ApiResponse of InlineResponse20024 - public ApiResponse< InlineResponse20024 > UserVariableRelationshipsGetWithHttpInfo (string accessToken = null, int? id = null, string confidenceLevel = null, double? confidenceScore = null, string direction = null, int? durationOfAction = null, string errorMessage = null, int? onsetDelay = null, int? outcomeVariableId = null, int? predictorVariableId = null, int? predictorUnitId = null, double? sinnRank = null, string strengthLevel = null, double? strengthScore = null, int? userId = null, string vote = null, double? valuePredictingHighOutcome = null, double? valuePredictingLowOutcome = null, int? limit = null, int? offset = null, string sort = null) + /// ApiResponse of InlineResponse20017 + public ApiResponse< InlineResponse20017 > UserVariableRelationshipsGetWithHttpInfo (string accessToken = null, int? id = null, string confidenceLevel = null, double? confidenceScore = null, string direction = null, int? durationOfAction = null, string errorMessage = null, int? onsetDelay = null, int? outcomeVariableId = null, int? predictorVariableId = null, int? predictorUnitId = null, double? sinnRank = null, string strengthLevel = null, double? strengthScore = null, int? userId = null, string vote = null, double? valuePredictingHighOutcome = null, double? valuePredictingLowOutcome = null, int? limit = null, int? offset = null, string sort = null) { @@ -520,9 +520,9 @@ public ApiResponse< InlineResponse20024 > UserVariableRelationshipsGetWithHttpIn else if (statusCode == 0) throw new ApiException (statusCode, "Error calling UserVariableRelationshipsGet: " + response.ErrorMessage, response.ErrorMessage); - return new ApiResponse(statusCode, + return new ApiResponse(statusCode, response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (InlineResponse20024) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20024))); + (InlineResponse20017) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20017))); } @@ -550,10 +550,10 @@ public ApiResponse< InlineResponse20024 > UserVariableRelationshipsGetWithHttpIn /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// Task of InlineResponse20024 - public async System.Threading.Tasks.Task UserVariableRelationshipsGetAsync (string accessToken = null, int? id = null, string confidenceLevel = null, double? confidenceScore = null, string direction = null, int? durationOfAction = null, string errorMessage = null, int? onsetDelay = null, int? outcomeVariableId = null, int? predictorVariableId = null, int? predictorUnitId = null, double? sinnRank = null, string strengthLevel = null, double? strengthScore = null, int? userId = null, string vote = null, double? valuePredictingHighOutcome = null, double? valuePredictingLowOutcome = null, int? limit = null, int? offset = null, string sort = null) + /// Task of InlineResponse20017 + public async System.Threading.Tasks.Task UserVariableRelationshipsGetAsync (string accessToken = null, int? id = null, string confidenceLevel = null, double? confidenceScore = null, string direction = null, int? durationOfAction = null, string errorMessage = null, int? onsetDelay = null, int? outcomeVariableId = null, int? predictorVariableId = null, int? predictorUnitId = null, double? sinnRank = null, string strengthLevel = null, double? strengthScore = null, int? userId = null, string vote = null, double? valuePredictingHighOutcome = null, double? valuePredictingLowOutcome = null, int? limit = null, int? offset = null, string sort = null) { - ApiResponse response = await UserVariableRelationshipsGetAsyncWithHttpInfo(accessToken, id, confidenceLevel, confidenceScore, direction, durationOfAction, errorMessage, onsetDelay, outcomeVariableId, predictorVariableId, predictorUnitId, sinnRank, strengthLevel, strengthScore, userId, vote, valuePredictingHighOutcome, valuePredictingLowOutcome, limit, offset, sort); + ApiResponse response = await UserVariableRelationshipsGetAsyncWithHttpInfo(accessToken, id, confidenceLevel, confidenceScore, direction, durationOfAction, errorMessage, onsetDelay, outcomeVariableId, predictorVariableId, predictorUnitId, sinnRank, strengthLevel, strengthScore, userId, vote, valuePredictingHighOutcome, valuePredictingLowOutcome, limit, offset, sort); return response.Data; } @@ -582,8 +582,8 @@ public async System.Threading.Tasks.Task UserVariableRelati /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// Task of ApiResponse (InlineResponse20024) - public async System.Threading.Tasks.Task> UserVariableRelationshipsGetAsyncWithHttpInfo (string accessToken = null, int? id = null, string confidenceLevel = null, double? confidenceScore = null, string direction = null, int? durationOfAction = null, string errorMessage = null, int? onsetDelay = null, int? outcomeVariableId = null, int? predictorVariableId = null, int? predictorUnitId = null, double? sinnRank = null, string strengthLevel = null, double? strengthScore = null, int? userId = null, string vote = null, double? valuePredictingHighOutcome = null, double? valuePredictingLowOutcome = null, int? limit = null, int? offset = null, string sort = null) + /// Task of ApiResponse (InlineResponse20017) + public async System.Threading.Tasks.Task> UserVariableRelationshipsGetAsyncWithHttpInfo (string accessToken = null, int? id = null, string confidenceLevel = null, double? confidenceScore = null, string direction = null, int? durationOfAction = null, string errorMessage = null, int? onsetDelay = null, int? outcomeVariableId = null, int? predictorVariableId = null, int? predictorUnitId = null, double? sinnRank = null, string strengthLevel = null, double? strengthScore = null, int? userId = null, string vote = null, double? valuePredictingHighOutcome = null, double? valuePredictingLowOutcome = null, int? limit = null, int? offset = null, string sort = null) { @@ -654,9 +654,9 @@ public async System.Threading.Tasks.Task> UserV else if (statusCode == 0) throw new ApiException (statusCode, "Error calling UserVariableRelationshipsGet: " + response.ErrorMessage, response.ErrorMessage); - return new ApiResponse(statusCode, + return new ApiResponse(statusCode, response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (InlineResponse20024) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20024))); + (InlineResponse20017) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20017))); } @@ -665,10 +665,10 @@ public async System.Threading.Tasks.Task> UserV /// /// User's OAuth2 access token /// UserVariableRelationship that should be stored - /// InlineResponse20025 - public InlineResponse20025 UserVariableRelationshipsPost (string accessToken = null, UserVariableRelationship body = null) + /// InlineResponse20029 + public InlineResponse20029 UserVariableRelationshipsPost (string accessToken = null, UserVariableRelationship body = null) { - ApiResponse response = UserVariableRelationshipsPostWithHttpInfo(accessToken, body); + ApiResponse response = UserVariableRelationshipsPostWithHttpInfo(accessToken, body); return response.Data; } @@ -677,8 +677,8 @@ public InlineResponse20025 UserVariableRelationshipsPost (string accessToken = n /// /// User's OAuth2 access token /// UserVariableRelationship that should be stored - /// ApiResponse of InlineResponse20025 - public ApiResponse< InlineResponse20025 > UserVariableRelationshipsPostWithHttpInfo (string accessToken = null, UserVariableRelationship body = null) + /// ApiResponse of InlineResponse20029 + public ApiResponse< InlineResponse20029 > UserVariableRelationshipsPostWithHttpInfo (string accessToken = null, UserVariableRelationship body = null) { @@ -730,9 +730,9 @@ public ApiResponse< InlineResponse20025 > UserVariableRelationshipsPostWithHttpI else if (statusCode == 0) throw new ApiException (statusCode, "Error calling UserVariableRelationshipsPost: " + response.ErrorMessage, response.ErrorMessage); - return new ApiResponse(statusCode, + return new ApiResponse(statusCode, response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (InlineResponse20025) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20025))); + (InlineResponse20029) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20029))); } @@ -741,10 +741,10 @@ public ApiResponse< InlineResponse20025 > UserVariableRelationshipsPostWithHttpI /// /// User's OAuth2 access token /// UserVariableRelationship that should be stored - /// Task of InlineResponse20025 - public async System.Threading.Tasks.Task UserVariableRelationshipsPostAsync (string accessToken = null, UserVariableRelationship body = null) + /// Task of InlineResponse20029 + public async System.Threading.Tasks.Task UserVariableRelationshipsPostAsync (string accessToken = null, UserVariableRelationship body = null) { - ApiResponse response = await UserVariableRelationshipsPostAsyncWithHttpInfo(accessToken, body); + ApiResponse response = await UserVariableRelationshipsPostAsyncWithHttpInfo(accessToken, body); return response.Data; } @@ -754,8 +754,8 @@ public async System.Threading.Tasks.Task UserVariableRelati /// /// User's OAuth2 access token /// UserVariableRelationship that should be stored - /// Task of ApiResponse (InlineResponse20025) - public async System.Threading.Tasks.Task> UserVariableRelationshipsPostAsyncWithHttpInfo (string accessToken = null, UserVariableRelationship body = null) + /// Task of ApiResponse (InlineResponse20029) + public async System.Threading.Tasks.Task> UserVariableRelationshipsPostAsyncWithHttpInfo (string accessToken = null, UserVariableRelationship body = null) { @@ -807,9 +807,9 @@ public async System.Threading.Tasks.Task> UserV else if (statusCode == 0) throw new ApiException (statusCode, "Error calling UserVariableRelationshipsPost: " + response.ErrorMessage, response.ErrorMessage); - return new ApiResponse(statusCode, + return new ApiResponse(statusCode, response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (InlineResponse20025) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20025))); + (InlineResponse20029) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20029))); } @@ -818,10 +818,10 @@ public async System.Threading.Tasks.Task> UserV /// /// id of UserVariableRelationship /// User's OAuth2 access token - /// InlineResponse20025 - public InlineResponse20025 UserVariableRelationshipsIdGet (int? id, string accessToken = null) + /// InlineResponse20029 + public InlineResponse20029 UserVariableRelationshipsIdGet (int? id, string accessToken = null) { - ApiResponse response = UserVariableRelationshipsIdGetWithHttpInfo(id, accessToken); + ApiResponse response = UserVariableRelationshipsIdGetWithHttpInfo(id, accessToken); return response.Data; } @@ -830,8 +830,8 @@ public InlineResponse20025 UserVariableRelationshipsIdGet (int? id, string acces /// /// id of UserVariableRelationship /// User's OAuth2 access token - /// ApiResponse of InlineResponse20025 - public ApiResponse< InlineResponse20025 > UserVariableRelationshipsIdGetWithHttpInfo (int? id, string accessToken = null) + /// ApiResponse of InlineResponse20029 + public ApiResponse< InlineResponse20029 > UserVariableRelationshipsIdGetWithHttpInfo (int? id, string accessToken = null) { // verify the required parameter 'id' is set @@ -886,9 +886,9 @@ public ApiResponse< InlineResponse20025 > UserVariableRelationshipsIdGetWithHttp else if (statusCode == 0) throw new ApiException (statusCode, "Error calling UserVariableRelationshipsIdGet: " + response.ErrorMessage, response.ErrorMessage); - return new ApiResponse(statusCode, + return new ApiResponse(statusCode, response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (InlineResponse20025) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20025))); + (InlineResponse20029) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20029))); } @@ -897,10 +897,10 @@ public ApiResponse< InlineResponse20025 > UserVariableRelationshipsIdGetWithHttp /// /// id of UserVariableRelationship /// User's OAuth2 access token - /// Task of InlineResponse20025 - public async System.Threading.Tasks.Task UserVariableRelationshipsIdGetAsync (int? id, string accessToken = null) + /// Task of InlineResponse20029 + public async System.Threading.Tasks.Task UserVariableRelationshipsIdGetAsync (int? id, string accessToken = null) { - ApiResponse response = await UserVariableRelationshipsIdGetAsyncWithHttpInfo(id, accessToken); + ApiResponse response = await UserVariableRelationshipsIdGetAsyncWithHttpInfo(id, accessToken); return response.Data; } @@ -910,8 +910,8 @@ public async System.Threading.Tasks.Task UserVariableRelati /// /// id of UserVariableRelationship /// User's OAuth2 access token - /// Task of ApiResponse (InlineResponse20025) - public async System.Threading.Tasks.Task> UserVariableRelationshipsIdGetAsyncWithHttpInfo (int? id, string accessToken = null) + /// Task of ApiResponse (InlineResponse20029) + public async System.Threading.Tasks.Task> UserVariableRelationshipsIdGetAsyncWithHttpInfo (int? id, string accessToken = null) { // verify the required parameter 'id' is set if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling UserVariableRelationshipsIdGet"); @@ -965,9 +965,9 @@ public async System.Threading.Tasks.Task> UserV else if (statusCode == 0) throw new ApiException (statusCode, "Error calling UserVariableRelationshipsIdGet: " + response.ErrorMessage, response.ErrorMessage); - return new ApiResponse(statusCode, + return new ApiResponse(statusCode, response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (InlineResponse20025) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20025))); + (InlineResponse20029) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20029))); } diff --git a/src/main/csharp/io/swagger/Api/VariableApi.cs b/src/main/csharp/io/swagger/Api/VariableApi.cs index a52381d..e0d605f 100644 --- a/src/main/csharp/io/swagger/Api/VariableApi.cs +++ b/src/main/csharp/io/swagger/Api/VariableApi.cs @@ -61,8 +61,8 @@ public interface IVariableApi /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort records by a given field name. If the field name is prefixed with '-', it will sort in descending order. - /// InlineResponse20031 - InlineResponse20031 VariablesGet (string accessToken = null, int? id = null, string clientId = null, int? parentId = null, string name = null, int? variableCategoryId = null, int? defaultUnitId = null, string combinationOperation = null, double? fillingValue = null, double? maximumAllowedValue = null, double? minimumAllowedValue = null, int? onsetDelay = null, int? durationOfAction = null, int? _public = null, bool? causeOnly = null, double? mostCommonValue = null, int? mostCommonUnitId = null, double? standardDeviation = null, double? variance = null, double? mean = null, double? median = null, double? numberOfMeasurements = null, double? numberOfUniqueValues = null, double? skewness = null, double? kurtosis = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, string createdAt = null, string updatedAt = null, string productUrl = null, string imageUrl = null, double? price = null, int? numberOfUserVariables = null, bool? outcome = null, double? minimumRecordedValue = null, double? maximumRecordedValue = null, int? limit = null, int? offset = null, string sort = null); + /// InlineResponse20034 + InlineResponse20034 VariablesGet (string accessToken = null, int? id = null, string clientId = null, int? parentId = null, string name = null, int? variableCategoryId = null, int? defaultUnitId = null, string combinationOperation = null, double? fillingValue = null, double? maximumAllowedValue = null, double? minimumAllowedValue = null, int? onsetDelay = null, int? durationOfAction = null, int? _public = null, bool? causeOnly = null, double? mostCommonValue = null, int? mostCommonUnitId = null, double? standardDeviation = null, double? variance = null, double? mean = null, double? median = null, double? numberOfMeasurements = null, double? numberOfUniqueValues = null, double? skewness = null, double? kurtosis = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, string createdAt = null, string updatedAt = null, string productUrl = null, string imageUrl = null, double? price = null, int? numberOfUserVariables = null, bool? outcome = null, double? minimumRecordedValue = null, double? maximumRecordedValue = null, int? limit = null, int? offset = null, string sort = null); /// /// Get all Variables @@ -110,8 +110,8 @@ public interface IVariableApi /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort records by a given field name. If the field name is prefixed with '-', it will sort in descending order. - /// ApiResponse of InlineResponse20031 - ApiResponse VariablesGetWithHttpInfo (string accessToken = null, int? id = null, string clientId = null, int? parentId = null, string name = null, int? variableCategoryId = null, int? defaultUnitId = null, string combinationOperation = null, double? fillingValue = null, double? maximumAllowedValue = null, double? minimumAllowedValue = null, int? onsetDelay = null, int? durationOfAction = null, int? _public = null, bool? causeOnly = null, double? mostCommonValue = null, int? mostCommonUnitId = null, double? standardDeviation = null, double? variance = null, double? mean = null, double? median = null, double? numberOfMeasurements = null, double? numberOfUniqueValues = null, double? skewness = null, double? kurtosis = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, string createdAt = null, string updatedAt = null, string productUrl = null, string imageUrl = null, double? price = null, int? numberOfUserVariables = null, bool? outcome = null, double? minimumRecordedValue = null, double? maximumRecordedValue = null, int? limit = null, int? offset = null, string sort = null); + /// ApiResponse of InlineResponse20034 + ApiResponse VariablesGetWithHttpInfo (string accessToken = null, int? id = null, string clientId = null, int? parentId = null, string name = null, int? variableCategoryId = null, int? defaultUnitId = null, string combinationOperation = null, double? fillingValue = null, double? maximumAllowedValue = null, double? minimumAllowedValue = null, int? onsetDelay = null, int? durationOfAction = null, int? _public = null, bool? causeOnly = null, double? mostCommonValue = null, int? mostCommonUnitId = null, double? standardDeviation = null, double? variance = null, double? mean = null, double? median = null, double? numberOfMeasurements = null, double? numberOfUniqueValues = null, double? skewness = null, double? kurtosis = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, string createdAt = null, string updatedAt = null, string productUrl = null, string imageUrl = null, double? price = null, int? numberOfUserVariables = null, bool? outcome = null, double? minimumRecordedValue = null, double? maximumRecordedValue = null, int? limit = null, int? offset = null, string sort = null); /// /// Get all Variables @@ -159,8 +159,8 @@ public interface IVariableApi /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort records by a given field name. If the field name is prefixed with '-', it will sort in descending order. - /// Task of InlineResponse20031 - System.Threading.Tasks.Task VariablesGetAsync (string accessToken = null, int? id = null, string clientId = null, int? parentId = null, string name = null, int? variableCategoryId = null, int? defaultUnitId = null, string combinationOperation = null, double? fillingValue = null, double? maximumAllowedValue = null, double? minimumAllowedValue = null, int? onsetDelay = null, int? durationOfAction = null, int? _public = null, bool? causeOnly = null, double? mostCommonValue = null, int? mostCommonUnitId = null, double? standardDeviation = null, double? variance = null, double? mean = null, double? median = null, double? numberOfMeasurements = null, double? numberOfUniqueValues = null, double? skewness = null, double? kurtosis = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, string createdAt = null, string updatedAt = null, string productUrl = null, string imageUrl = null, double? price = null, int? numberOfUserVariables = null, bool? outcome = null, double? minimumRecordedValue = null, double? maximumRecordedValue = null, int? limit = null, int? offset = null, string sort = null); + /// Task of InlineResponse20034 + System.Threading.Tasks.Task VariablesGetAsync (string accessToken = null, int? id = null, string clientId = null, int? parentId = null, string name = null, int? variableCategoryId = null, int? defaultUnitId = null, string combinationOperation = null, double? fillingValue = null, double? maximumAllowedValue = null, double? minimumAllowedValue = null, int? onsetDelay = null, int? durationOfAction = null, int? _public = null, bool? causeOnly = null, double? mostCommonValue = null, int? mostCommonUnitId = null, double? standardDeviation = null, double? variance = null, double? mean = null, double? median = null, double? numberOfMeasurements = null, double? numberOfUniqueValues = null, double? skewness = null, double? kurtosis = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, string createdAt = null, string updatedAt = null, string productUrl = null, string imageUrl = null, double? price = null, int? numberOfUserVariables = null, bool? outcome = null, double? minimumRecordedValue = null, double? maximumRecordedValue = null, int? limit = null, int? offset = null, string sort = null); /// /// Get all Variables @@ -208,8 +208,8 @@ public interface IVariableApi /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort records by a given field name. If the field name is prefixed with '-', it will sort in descending order. - /// Task of ApiResponse (InlineResponse20031) - System.Threading.Tasks.Task> VariablesGetAsyncWithHttpInfo (string accessToken = null, int? id = null, string clientId = null, int? parentId = null, string name = null, int? variableCategoryId = null, int? defaultUnitId = null, string combinationOperation = null, double? fillingValue = null, double? maximumAllowedValue = null, double? minimumAllowedValue = null, int? onsetDelay = null, int? durationOfAction = null, int? _public = null, bool? causeOnly = null, double? mostCommonValue = null, int? mostCommonUnitId = null, double? standardDeviation = null, double? variance = null, double? mean = null, double? median = null, double? numberOfMeasurements = null, double? numberOfUniqueValues = null, double? skewness = null, double? kurtosis = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, string createdAt = null, string updatedAt = null, string productUrl = null, string imageUrl = null, double? price = null, int? numberOfUserVariables = null, bool? outcome = null, double? minimumRecordedValue = null, double? maximumRecordedValue = null, int? limit = null, int? offset = null, string sort = null); + /// Task of ApiResponse (InlineResponse20034) + System.Threading.Tasks.Task> VariablesGetAsyncWithHttpInfo (string accessToken = null, int? id = null, string clientId = null, int? parentId = null, string name = null, int? variableCategoryId = null, int? defaultUnitId = null, string combinationOperation = null, double? fillingValue = null, double? maximumAllowedValue = null, double? minimumAllowedValue = null, int? onsetDelay = null, int? durationOfAction = null, int? _public = null, bool? causeOnly = null, double? mostCommonValue = null, int? mostCommonUnitId = null, double? standardDeviation = null, double? variance = null, double? mean = null, double? median = null, double? numberOfMeasurements = null, double? numberOfUniqueValues = null, double? skewness = null, double? kurtosis = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, string createdAt = null, string updatedAt = null, string productUrl = null, string imageUrl = null, double? price = null, int? numberOfUserVariables = null, bool? outcome = null, double? minimumRecordedValue = null, double? maximumRecordedValue = null, int? limit = null, int? offset = null, string sort = null); /// /// Store Variable @@ -219,8 +219,8 @@ public interface IVariableApi /// /// User's OAuth2 access token /// Variable that should be stored - /// InlineResponse20032 - InlineResponse20032 VariablesPost (string accessToken = null, Variable body = null); + /// InlineResponse20035 + InlineResponse20035 VariablesPost (string accessToken = null, Variable body = null); /// /// Store Variable @@ -230,8 +230,8 @@ public interface IVariableApi /// /// User's OAuth2 access token /// Variable that should be stored - /// ApiResponse of InlineResponse20032 - ApiResponse VariablesPostWithHttpInfo (string accessToken = null, Variable body = null); + /// ApiResponse of InlineResponse20035 + ApiResponse VariablesPostWithHttpInfo (string accessToken = null, Variable body = null); /// /// Store Variable @@ -241,8 +241,8 @@ public interface IVariableApi /// /// User's OAuth2 access token /// Variable that should be stored - /// Task of InlineResponse20032 - System.Threading.Tasks.Task VariablesPostAsync (string accessToken = null, Variable body = null); + /// Task of InlineResponse20035 + System.Threading.Tasks.Task VariablesPostAsync (string accessToken = null, Variable body = null); /// /// Store Variable @@ -252,8 +252,8 @@ public interface IVariableApi /// /// User's OAuth2 access token /// Variable that should be stored - /// Task of ApiResponse (InlineResponse20032) - System.Threading.Tasks.Task> VariablesPostAsyncWithHttpInfo (string accessToken = null, Variable body = null); + /// Task of ApiResponse (InlineResponse20035) + System.Threading.Tasks.Task> VariablesPostAsyncWithHttpInfo (string accessToken = null, Variable body = null); /// /// Get Variable @@ -263,8 +263,8 @@ public interface IVariableApi /// /// id of Variable /// User's OAuth2 access token - /// InlineResponse20032 - InlineResponse20032 VariablesIdGet (int? id, string accessToken = null); + /// InlineResponse20035 + InlineResponse20035 VariablesIdGet (int? id, string accessToken = null); /// /// Get Variable @@ -274,8 +274,8 @@ public interface IVariableApi /// /// id of Variable /// User's OAuth2 access token - /// ApiResponse of InlineResponse20032 - ApiResponse VariablesIdGetWithHttpInfo (int? id, string accessToken = null); + /// ApiResponse of InlineResponse20035 + ApiResponse VariablesIdGetWithHttpInfo (int? id, string accessToken = null); /// /// Get Variable @@ -285,8 +285,8 @@ public interface IVariableApi /// /// id of Variable /// User's OAuth2 access token - /// Task of InlineResponse20032 - System.Threading.Tasks.Task VariablesIdGetAsync (int? id, string accessToken = null); + /// Task of InlineResponse20035 + System.Threading.Tasks.Task VariablesIdGetAsync (int? id, string accessToken = null); /// /// Get Variable @@ -296,8 +296,8 @@ public interface IVariableApi /// /// id of Variable /// User's OAuth2 access token - /// Task of ApiResponse (InlineResponse20032) - System.Threading.Tasks.Task> VariablesIdGetAsyncWithHttpInfo (int? id, string accessToken = null); + /// Task of ApiResponse (InlineResponse20035) + System.Threading.Tasks.Task> VariablesIdGetAsyncWithHttpInfo (int? id, string accessToken = null); /// /// Update Variable @@ -512,10 +512,10 @@ public void AddDefaultHeader(string key, string value) /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort records by a given field name. If the field name is prefixed with '-', it will sort in descending order. - /// InlineResponse20031 - public InlineResponse20031 VariablesGet (string accessToken = null, int? id = null, string clientId = null, int? parentId = null, string name = null, int? variableCategoryId = null, int? defaultUnitId = null, string combinationOperation = null, double? fillingValue = null, double? maximumAllowedValue = null, double? minimumAllowedValue = null, int? onsetDelay = null, int? durationOfAction = null, int? _public = null, bool? causeOnly = null, double? mostCommonValue = null, int? mostCommonUnitId = null, double? standardDeviation = null, double? variance = null, double? mean = null, double? median = null, double? numberOfMeasurements = null, double? numberOfUniqueValues = null, double? skewness = null, double? kurtosis = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, string createdAt = null, string updatedAt = null, string productUrl = null, string imageUrl = null, double? price = null, int? numberOfUserVariables = null, bool? outcome = null, double? minimumRecordedValue = null, double? maximumRecordedValue = null, int? limit = null, int? offset = null, string sort = null) + /// InlineResponse20034 + public InlineResponse20034 VariablesGet (string accessToken = null, int? id = null, string clientId = null, int? parentId = null, string name = null, int? variableCategoryId = null, int? defaultUnitId = null, string combinationOperation = null, double? fillingValue = null, double? maximumAllowedValue = null, double? minimumAllowedValue = null, int? onsetDelay = null, int? durationOfAction = null, int? _public = null, bool? causeOnly = null, double? mostCommonValue = null, int? mostCommonUnitId = null, double? standardDeviation = null, double? variance = null, double? mean = null, double? median = null, double? numberOfMeasurements = null, double? numberOfUniqueValues = null, double? skewness = null, double? kurtosis = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, string createdAt = null, string updatedAt = null, string productUrl = null, string imageUrl = null, double? price = null, int? numberOfUserVariables = null, bool? outcome = null, double? minimumRecordedValue = null, double? maximumRecordedValue = null, int? limit = null, int? offset = null, string sort = null) { - ApiResponse response = VariablesGetWithHttpInfo(accessToken, id, clientId, parentId, name, variableCategoryId, defaultUnitId, combinationOperation, fillingValue, maximumAllowedValue, minimumAllowedValue, onsetDelay, durationOfAction, _public, causeOnly, mostCommonValue, mostCommonUnitId, standardDeviation, variance, mean, median, numberOfMeasurements, numberOfUniqueValues, skewness, kurtosis, status, errorMessage, lastSuccessfulUpdateTime, createdAt, updatedAt, productUrl, imageUrl, price, numberOfUserVariables, outcome, minimumRecordedValue, maximumRecordedValue, limit, offset, sort); + ApiResponse response = VariablesGetWithHttpInfo(accessToken, id, clientId, parentId, name, variableCategoryId, defaultUnitId, combinationOperation, fillingValue, maximumAllowedValue, minimumAllowedValue, onsetDelay, durationOfAction, _public, causeOnly, mostCommonValue, mostCommonUnitId, standardDeviation, variance, mean, median, numberOfMeasurements, numberOfUniqueValues, skewness, kurtosis, status, errorMessage, lastSuccessfulUpdateTime, createdAt, updatedAt, productUrl, imageUrl, price, numberOfUserVariables, outcome, minimumRecordedValue, maximumRecordedValue, limit, offset, sort); return response.Data; } @@ -562,8 +562,8 @@ public InlineResponse20031 VariablesGet (string accessToken = null, int? id = nu /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort records by a given field name. If the field name is prefixed with '-', it will sort in descending order. - /// ApiResponse of InlineResponse20031 - public ApiResponse< InlineResponse20031 > VariablesGetWithHttpInfo (string accessToken = null, int? id = null, string clientId = null, int? parentId = null, string name = null, int? variableCategoryId = null, int? defaultUnitId = null, string combinationOperation = null, double? fillingValue = null, double? maximumAllowedValue = null, double? minimumAllowedValue = null, int? onsetDelay = null, int? durationOfAction = null, int? _public = null, bool? causeOnly = null, double? mostCommonValue = null, int? mostCommonUnitId = null, double? standardDeviation = null, double? variance = null, double? mean = null, double? median = null, double? numberOfMeasurements = null, double? numberOfUniqueValues = null, double? skewness = null, double? kurtosis = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, string createdAt = null, string updatedAt = null, string productUrl = null, string imageUrl = null, double? price = null, int? numberOfUserVariables = null, bool? outcome = null, double? minimumRecordedValue = null, double? maximumRecordedValue = null, int? limit = null, int? offset = null, string sort = null) + /// ApiResponse of InlineResponse20034 + public ApiResponse< InlineResponse20034 > VariablesGetWithHttpInfo (string accessToken = null, int? id = null, string clientId = null, int? parentId = null, string name = null, int? variableCategoryId = null, int? defaultUnitId = null, string combinationOperation = null, double? fillingValue = null, double? maximumAllowedValue = null, double? minimumAllowedValue = null, int? onsetDelay = null, int? durationOfAction = null, int? _public = null, bool? causeOnly = null, double? mostCommonValue = null, int? mostCommonUnitId = null, double? standardDeviation = null, double? variance = null, double? mean = null, double? median = null, double? numberOfMeasurements = null, double? numberOfUniqueValues = null, double? skewness = null, double? kurtosis = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, string createdAt = null, string updatedAt = null, string productUrl = null, string imageUrl = null, double? price = null, int? numberOfUserVariables = null, bool? outcome = null, double? minimumRecordedValue = null, double? maximumRecordedValue = null, int? limit = null, int? offset = null, string sort = null) { @@ -653,9 +653,9 @@ public ApiResponse< InlineResponse20031 > VariablesGetWithHttpInfo (string acces else if (statusCode == 0) throw new ApiException (statusCode, "Error calling VariablesGet: " + response.ErrorMessage, response.ErrorMessage); - return new ApiResponse(statusCode, + return new ApiResponse(statusCode, response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (InlineResponse20031) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20031))); + (InlineResponse20034) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20034))); } @@ -702,10 +702,10 @@ public ApiResponse< InlineResponse20031 > VariablesGetWithHttpInfo (string acces /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort records by a given field name. If the field name is prefixed with '-', it will sort in descending order. - /// Task of InlineResponse20031 - public async System.Threading.Tasks.Task VariablesGetAsync (string accessToken = null, int? id = null, string clientId = null, int? parentId = null, string name = null, int? variableCategoryId = null, int? defaultUnitId = null, string combinationOperation = null, double? fillingValue = null, double? maximumAllowedValue = null, double? minimumAllowedValue = null, int? onsetDelay = null, int? durationOfAction = null, int? _public = null, bool? causeOnly = null, double? mostCommonValue = null, int? mostCommonUnitId = null, double? standardDeviation = null, double? variance = null, double? mean = null, double? median = null, double? numberOfMeasurements = null, double? numberOfUniqueValues = null, double? skewness = null, double? kurtosis = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, string createdAt = null, string updatedAt = null, string productUrl = null, string imageUrl = null, double? price = null, int? numberOfUserVariables = null, bool? outcome = null, double? minimumRecordedValue = null, double? maximumRecordedValue = null, int? limit = null, int? offset = null, string sort = null) + /// Task of InlineResponse20034 + public async System.Threading.Tasks.Task VariablesGetAsync (string accessToken = null, int? id = null, string clientId = null, int? parentId = null, string name = null, int? variableCategoryId = null, int? defaultUnitId = null, string combinationOperation = null, double? fillingValue = null, double? maximumAllowedValue = null, double? minimumAllowedValue = null, int? onsetDelay = null, int? durationOfAction = null, int? _public = null, bool? causeOnly = null, double? mostCommonValue = null, int? mostCommonUnitId = null, double? standardDeviation = null, double? variance = null, double? mean = null, double? median = null, double? numberOfMeasurements = null, double? numberOfUniqueValues = null, double? skewness = null, double? kurtosis = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, string createdAt = null, string updatedAt = null, string productUrl = null, string imageUrl = null, double? price = null, int? numberOfUserVariables = null, bool? outcome = null, double? minimumRecordedValue = null, double? maximumRecordedValue = null, int? limit = null, int? offset = null, string sort = null) { - ApiResponse response = await VariablesGetAsyncWithHttpInfo(accessToken, id, clientId, parentId, name, variableCategoryId, defaultUnitId, combinationOperation, fillingValue, maximumAllowedValue, minimumAllowedValue, onsetDelay, durationOfAction, _public, causeOnly, mostCommonValue, mostCommonUnitId, standardDeviation, variance, mean, median, numberOfMeasurements, numberOfUniqueValues, skewness, kurtosis, status, errorMessage, lastSuccessfulUpdateTime, createdAt, updatedAt, productUrl, imageUrl, price, numberOfUserVariables, outcome, minimumRecordedValue, maximumRecordedValue, limit, offset, sort); + ApiResponse response = await VariablesGetAsyncWithHttpInfo(accessToken, id, clientId, parentId, name, variableCategoryId, defaultUnitId, combinationOperation, fillingValue, maximumAllowedValue, minimumAllowedValue, onsetDelay, durationOfAction, _public, causeOnly, mostCommonValue, mostCommonUnitId, standardDeviation, variance, mean, median, numberOfMeasurements, numberOfUniqueValues, skewness, kurtosis, status, errorMessage, lastSuccessfulUpdateTime, createdAt, updatedAt, productUrl, imageUrl, price, numberOfUserVariables, outcome, minimumRecordedValue, maximumRecordedValue, limit, offset, sort); return response.Data; } @@ -753,8 +753,8 @@ public async System.Threading.Tasks.Task VariablesGetAsync /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort records by a given field name. If the field name is prefixed with '-', it will sort in descending order. - /// Task of ApiResponse (InlineResponse20031) - public async System.Threading.Tasks.Task> VariablesGetAsyncWithHttpInfo (string accessToken = null, int? id = null, string clientId = null, int? parentId = null, string name = null, int? variableCategoryId = null, int? defaultUnitId = null, string combinationOperation = null, double? fillingValue = null, double? maximumAllowedValue = null, double? minimumAllowedValue = null, int? onsetDelay = null, int? durationOfAction = null, int? _public = null, bool? causeOnly = null, double? mostCommonValue = null, int? mostCommonUnitId = null, double? standardDeviation = null, double? variance = null, double? mean = null, double? median = null, double? numberOfMeasurements = null, double? numberOfUniqueValues = null, double? skewness = null, double? kurtosis = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, string createdAt = null, string updatedAt = null, string productUrl = null, string imageUrl = null, double? price = null, int? numberOfUserVariables = null, bool? outcome = null, double? minimumRecordedValue = null, double? maximumRecordedValue = null, int? limit = null, int? offset = null, string sort = null) + /// Task of ApiResponse (InlineResponse20034) + public async System.Threading.Tasks.Task> VariablesGetAsyncWithHttpInfo (string accessToken = null, int? id = null, string clientId = null, int? parentId = null, string name = null, int? variableCategoryId = null, int? defaultUnitId = null, string combinationOperation = null, double? fillingValue = null, double? maximumAllowedValue = null, double? minimumAllowedValue = null, int? onsetDelay = null, int? durationOfAction = null, int? _public = null, bool? causeOnly = null, double? mostCommonValue = null, int? mostCommonUnitId = null, double? standardDeviation = null, double? variance = null, double? mean = null, double? median = null, double? numberOfMeasurements = null, double? numberOfUniqueValues = null, double? skewness = null, double? kurtosis = null, string status = null, string errorMessage = null, string lastSuccessfulUpdateTime = null, string createdAt = null, string updatedAt = null, string productUrl = null, string imageUrl = null, double? price = null, int? numberOfUserVariables = null, bool? outcome = null, double? minimumRecordedValue = null, double? maximumRecordedValue = null, int? limit = null, int? offset = null, string sort = null) { @@ -844,9 +844,9 @@ public async System.Threading.Tasks.Task> Varia else if (statusCode == 0) throw new ApiException (statusCode, "Error calling VariablesGet: " + response.ErrorMessage, response.ErrorMessage); - return new ApiResponse(statusCode, + return new ApiResponse(statusCode, response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (InlineResponse20031) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20031))); + (InlineResponse20034) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20034))); } @@ -855,10 +855,10 @@ public async System.Threading.Tasks.Task> Varia /// /// User's OAuth2 access token /// Variable that should be stored - /// InlineResponse20032 - public InlineResponse20032 VariablesPost (string accessToken = null, Variable body = null) + /// InlineResponse20035 + public InlineResponse20035 VariablesPost (string accessToken = null, Variable body = null) { - ApiResponse response = VariablesPostWithHttpInfo(accessToken, body); + ApiResponse response = VariablesPostWithHttpInfo(accessToken, body); return response.Data; } @@ -867,8 +867,8 @@ public InlineResponse20032 VariablesPost (string accessToken = null, Variable bo /// /// User's OAuth2 access token /// Variable that should be stored - /// ApiResponse of InlineResponse20032 - public ApiResponse< InlineResponse20032 > VariablesPostWithHttpInfo (string accessToken = null, Variable body = null) + /// ApiResponse of InlineResponse20035 + public ApiResponse< InlineResponse20035 > VariablesPostWithHttpInfo (string accessToken = null, Variable body = null) { @@ -920,9 +920,9 @@ public ApiResponse< InlineResponse20032 > VariablesPostWithHttpInfo (string acce else if (statusCode == 0) throw new ApiException (statusCode, "Error calling VariablesPost: " + response.ErrorMessage, response.ErrorMessage); - return new ApiResponse(statusCode, + return new ApiResponse(statusCode, response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (InlineResponse20032) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20032))); + (InlineResponse20035) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20035))); } @@ -931,10 +931,10 @@ public ApiResponse< InlineResponse20032 > VariablesPostWithHttpInfo (string acce /// /// User's OAuth2 access token /// Variable that should be stored - /// Task of InlineResponse20032 - public async System.Threading.Tasks.Task VariablesPostAsync (string accessToken = null, Variable body = null) + /// Task of InlineResponse20035 + public async System.Threading.Tasks.Task VariablesPostAsync (string accessToken = null, Variable body = null) { - ApiResponse response = await VariablesPostAsyncWithHttpInfo(accessToken, body); + ApiResponse response = await VariablesPostAsyncWithHttpInfo(accessToken, body); return response.Data; } @@ -944,8 +944,8 @@ public async System.Threading.Tasks.Task VariablesPostAsync /// /// User's OAuth2 access token /// Variable that should be stored - /// Task of ApiResponse (InlineResponse20032) - public async System.Threading.Tasks.Task> VariablesPostAsyncWithHttpInfo (string accessToken = null, Variable body = null) + /// Task of ApiResponse (InlineResponse20035) + public async System.Threading.Tasks.Task> VariablesPostAsyncWithHttpInfo (string accessToken = null, Variable body = null) { @@ -997,9 +997,9 @@ public async System.Threading.Tasks.Task> Varia else if (statusCode == 0) throw new ApiException (statusCode, "Error calling VariablesPost: " + response.ErrorMessage, response.ErrorMessage); - return new ApiResponse(statusCode, + return new ApiResponse(statusCode, response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (InlineResponse20032) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20032))); + (InlineResponse20035) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20035))); } @@ -1008,10 +1008,10 @@ public async System.Threading.Tasks.Task> Varia /// /// id of Variable /// User's OAuth2 access token - /// InlineResponse20032 - public InlineResponse20032 VariablesIdGet (int? id, string accessToken = null) + /// InlineResponse20035 + public InlineResponse20035 VariablesIdGet (int? id, string accessToken = null) { - ApiResponse response = VariablesIdGetWithHttpInfo(id, accessToken); + ApiResponse response = VariablesIdGetWithHttpInfo(id, accessToken); return response.Data; } @@ -1020,8 +1020,8 @@ public InlineResponse20032 VariablesIdGet (int? id, string accessToken = null) /// /// id of Variable /// User's OAuth2 access token - /// ApiResponse of InlineResponse20032 - public ApiResponse< InlineResponse20032 > VariablesIdGetWithHttpInfo (int? id, string accessToken = null) + /// ApiResponse of InlineResponse20035 + public ApiResponse< InlineResponse20035 > VariablesIdGetWithHttpInfo (int? id, string accessToken = null) { // verify the required parameter 'id' is set @@ -1076,9 +1076,9 @@ public ApiResponse< InlineResponse20032 > VariablesIdGetWithHttpInfo (int? id, s else if (statusCode == 0) throw new ApiException (statusCode, "Error calling VariablesIdGet: " + response.ErrorMessage, response.ErrorMessage); - return new ApiResponse(statusCode, + return new ApiResponse(statusCode, response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (InlineResponse20032) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20032))); + (InlineResponse20035) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20035))); } @@ -1087,10 +1087,10 @@ public ApiResponse< InlineResponse20032 > VariablesIdGetWithHttpInfo (int? id, s /// /// id of Variable /// User's OAuth2 access token - /// Task of InlineResponse20032 - public async System.Threading.Tasks.Task VariablesIdGetAsync (int? id, string accessToken = null) + /// Task of InlineResponse20035 + public async System.Threading.Tasks.Task VariablesIdGetAsync (int? id, string accessToken = null) { - ApiResponse response = await VariablesIdGetAsyncWithHttpInfo(id, accessToken); + ApiResponse response = await VariablesIdGetAsyncWithHttpInfo(id, accessToken); return response.Data; } @@ -1100,8 +1100,8 @@ public async System.Threading.Tasks.Task VariablesIdGetAsyn /// /// id of Variable /// User's OAuth2 access token - /// Task of ApiResponse (InlineResponse20032) - public async System.Threading.Tasks.Task> VariablesIdGetAsyncWithHttpInfo (int? id, string accessToken = null) + /// Task of ApiResponse (InlineResponse20035) + public async System.Threading.Tasks.Task> VariablesIdGetAsyncWithHttpInfo (int? id, string accessToken = null) { // verify the required parameter 'id' is set if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling VariablesIdGet"); @@ -1155,9 +1155,9 @@ public async System.Threading.Tasks.Task> Varia else if (statusCode == 0) throw new ApiException (statusCode, "Error calling VariablesIdGet: " + response.ErrorMessage, response.ErrorMessage); - return new ApiResponse(statusCode, + return new ApiResponse(statusCode, response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (InlineResponse20032) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20032))); + (InlineResponse20035) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20035))); } diff --git a/src/main/csharp/io/swagger/Api/VariableCategoryApi.cs b/src/main/csharp/io/swagger/Api/VariableCategoryApi.cs index 3d3e272..0c427ac 100644 --- a/src/main/csharp/io/swagger/Api/VariableCategoryApi.cs +++ b/src/main/csharp/io/swagger/Api/VariableCategoryApi.cs @@ -40,8 +40,8 @@ public interface IVariableCategoryApi /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// InlineResponse20027 - InlineResponse20027 VariableCategoriesGet (string accessToken = null, string name = null, double? fillingValue = null, double? maximumAllowedValue = null, double? minimumAllowedValue = null, int? durationOfAction = null, int? onsetDelay = null, string combinationOperation = null, int? updated = null, bool? causeOnly = null, int? _public = null, bool? outcome = null, string createdAt = null, string updatedAt = null, string imageUrl = null, int? defaultUnitId = null, int? limit = null, int? offset = null, string sort = null); + /// InlineResponse20031 + InlineResponse20031 VariableCategoriesGet (string accessToken = null, string name = null, double? fillingValue = null, double? maximumAllowedValue = null, double? minimumAllowedValue = null, int? durationOfAction = null, int? onsetDelay = null, string combinationOperation = null, int? updated = null, bool? causeOnly = null, int? _public = null, bool? outcome = null, string createdAt = null, string updatedAt = null, string imageUrl = null, int? defaultUnitId = null, int? limit = null, int? offset = null, string sort = null); /// /// Get all VariableCategories @@ -68,8 +68,8 @@ public interface IVariableCategoryApi /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// ApiResponse of InlineResponse20027 - ApiResponse VariableCategoriesGetWithHttpInfo (string accessToken = null, string name = null, double? fillingValue = null, double? maximumAllowedValue = null, double? minimumAllowedValue = null, int? durationOfAction = null, int? onsetDelay = null, string combinationOperation = null, int? updated = null, bool? causeOnly = null, int? _public = null, bool? outcome = null, string createdAt = null, string updatedAt = null, string imageUrl = null, int? defaultUnitId = null, int? limit = null, int? offset = null, string sort = null); + /// ApiResponse of InlineResponse20031 + ApiResponse VariableCategoriesGetWithHttpInfo (string accessToken = null, string name = null, double? fillingValue = null, double? maximumAllowedValue = null, double? minimumAllowedValue = null, int? durationOfAction = null, int? onsetDelay = null, string combinationOperation = null, int? updated = null, bool? causeOnly = null, int? _public = null, bool? outcome = null, string createdAt = null, string updatedAt = null, string imageUrl = null, int? defaultUnitId = null, int? limit = null, int? offset = null, string sort = null); /// /// Get all VariableCategories @@ -96,8 +96,8 @@ public interface IVariableCategoryApi /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// Task of InlineResponse20027 - System.Threading.Tasks.Task VariableCategoriesGetAsync (string accessToken = null, string name = null, double? fillingValue = null, double? maximumAllowedValue = null, double? minimumAllowedValue = null, int? durationOfAction = null, int? onsetDelay = null, string combinationOperation = null, int? updated = null, bool? causeOnly = null, int? _public = null, bool? outcome = null, string createdAt = null, string updatedAt = null, string imageUrl = null, int? defaultUnitId = null, int? limit = null, int? offset = null, string sort = null); + /// Task of InlineResponse20031 + System.Threading.Tasks.Task VariableCategoriesGetAsync (string accessToken = null, string name = null, double? fillingValue = null, double? maximumAllowedValue = null, double? minimumAllowedValue = null, int? durationOfAction = null, int? onsetDelay = null, string combinationOperation = null, int? updated = null, bool? causeOnly = null, int? _public = null, bool? outcome = null, string createdAt = null, string updatedAt = null, string imageUrl = null, int? defaultUnitId = null, int? limit = null, int? offset = null, string sort = null); /// /// Get all VariableCategories @@ -124,8 +124,8 @@ public interface IVariableCategoryApi /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// Task of ApiResponse (InlineResponse20027) - System.Threading.Tasks.Task> VariableCategoriesGetAsyncWithHttpInfo (string accessToken = null, string name = null, double? fillingValue = null, double? maximumAllowedValue = null, double? minimumAllowedValue = null, int? durationOfAction = null, int? onsetDelay = null, string combinationOperation = null, int? updated = null, bool? causeOnly = null, int? _public = null, bool? outcome = null, string createdAt = null, string updatedAt = null, string imageUrl = null, int? defaultUnitId = null, int? limit = null, int? offset = null, string sort = null); + /// Task of ApiResponse (InlineResponse20031) + System.Threading.Tasks.Task> VariableCategoriesGetAsyncWithHttpInfo (string accessToken = null, string name = null, double? fillingValue = null, double? maximumAllowedValue = null, double? minimumAllowedValue = null, int? durationOfAction = null, int? onsetDelay = null, string combinationOperation = null, int? updated = null, bool? causeOnly = null, int? _public = null, bool? outcome = null, string createdAt = null, string updatedAt = null, string imageUrl = null, int? defaultUnitId = null, int? limit = null, int? offset = null, string sort = null); /// /// Store VariableCategory @@ -135,8 +135,8 @@ public interface IVariableCategoryApi /// /// User's OAuth2 access token /// VariableCategory that should be stored - /// InlineResponse20028 - InlineResponse20028 VariableCategoriesPost (string accessToken = null, VariableCategory body = null); + /// InlineResponse20032 + InlineResponse20032 VariableCategoriesPost (string accessToken = null, VariableCategory body = null); /// /// Store VariableCategory @@ -146,8 +146,8 @@ public interface IVariableCategoryApi /// /// User's OAuth2 access token /// VariableCategory that should be stored - /// ApiResponse of InlineResponse20028 - ApiResponse VariableCategoriesPostWithHttpInfo (string accessToken = null, VariableCategory body = null); + /// ApiResponse of InlineResponse20032 + ApiResponse VariableCategoriesPostWithHttpInfo (string accessToken = null, VariableCategory body = null); /// /// Store VariableCategory @@ -157,8 +157,8 @@ public interface IVariableCategoryApi /// /// User's OAuth2 access token /// VariableCategory that should be stored - /// Task of InlineResponse20028 - System.Threading.Tasks.Task VariableCategoriesPostAsync (string accessToken = null, VariableCategory body = null); + /// Task of InlineResponse20032 + System.Threading.Tasks.Task VariableCategoriesPostAsync (string accessToken = null, VariableCategory body = null); /// /// Store VariableCategory @@ -168,8 +168,8 @@ public interface IVariableCategoryApi /// /// User's OAuth2 access token /// VariableCategory that should be stored - /// Task of ApiResponse (InlineResponse20028) - System.Threading.Tasks.Task> VariableCategoriesPostAsyncWithHttpInfo (string accessToken = null, VariableCategory body = null); + /// Task of ApiResponse (InlineResponse20032) + System.Threading.Tasks.Task> VariableCategoriesPostAsyncWithHttpInfo (string accessToken = null, VariableCategory body = null); /// /// Get VariableCategory @@ -179,8 +179,8 @@ public interface IVariableCategoryApi /// /// id of VariableCategory /// User's OAuth2 access token - /// InlineResponse20028 - InlineResponse20028 VariableCategoriesIdGet (int? id, string accessToken = null); + /// InlineResponse20032 + InlineResponse20032 VariableCategoriesIdGet (int? id, string accessToken = null); /// /// Get VariableCategory @@ -190,8 +190,8 @@ public interface IVariableCategoryApi /// /// id of VariableCategory /// User's OAuth2 access token - /// ApiResponse of InlineResponse20028 - ApiResponse VariableCategoriesIdGetWithHttpInfo (int? id, string accessToken = null); + /// ApiResponse of InlineResponse20032 + ApiResponse VariableCategoriesIdGetWithHttpInfo (int? id, string accessToken = null); /// /// Get VariableCategory @@ -201,8 +201,8 @@ public interface IVariableCategoryApi /// /// id of VariableCategory /// User's OAuth2 access token - /// Task of InlineResponse20028 - System.Threading.Tasks.Task VariableCategoriesIdGetAsync (int? id, string accessToken = null); + /// Task of InlineResponse20032 + System.Threading.Tasks.Task VariableCategoriesIdGetAsync (int? id, string accessToken = null); /// /// Get VariableCategory @@ -212,8 +212,8 @@ public interface IVariableCategoryApi /// /// id of VariableCategory /// User's OAuth2 access token - /// Task of ApiResponse (InlineResponse20028) - System.Threading.Tasks.Task> VariableCategoriesIdGetAsyncWithHttpInfo (int? id, string accessToken = null); + /// Task of ApiResponse (InlineResponse20032) + System.Threading.Tasks.Task> VariableCategoriesIdGetAsyncWithHttpInfo (int? id, string accessToken = null); /// /// Update VariableCategory @@ -407,10 +407,10 @@ public void AddDefaultHeader(string key, string value) /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// InlineResponse20027 - public InlineResponse20027 VariableCategoriesGet (string accessToken = null, string name = null, double? fillingValue = null, double? maximumAllowedValue = null, double? minimumAllowedValue = null, int? durationOfAction = null, int? onsetDelay = null, string combinationOperation = null, int? updated = null, bool? causeOnly = null, int? _public = null, bool? outcome = null, string createdAt = null, string updatedAt = null, string imageUrl = null, int? defaultUnitId = null, int? limit = null, int? offset = null, string sort = null) + /// InlineResponse20031 + public InlineResponse20031 VariableCategoriesGet (string accessToken = null, string name = null, double? fillingValue = null, double? maximumAllowedValue = null, double? minimumAllowedValue = null, int? durationOfAction = null, int? onsetDelay = null, string combinationOperation = null, int? updated = null, bool? causeOnly = null, int? _public = null, bool? outcome = null, string createdAt = null, string updatedAt = null, string imageUrl = null, int? defaultUnitId = null, int? limit = null, int? offset = null, string sort = null) { - ApiResponse response = VariableCategoriesGetWithHttpInfo(accessToken, name, fillingValue, maximumAllowedValue, minimumAllowedValue, durationOfAction, onsetDelay, combinationOperation, updated, causeOnly, _public, outcome, createdAt, updatedAt, imageUrl, defaultUnitId, limit, offset, sort); + ApiResponse response = VariableCategoriesGetWithHttpInfo(accessToken, name, fillingValue, maximumAllowedValue, minimumAllowedValue, durationOfAction, onsetDelay, combinationOperation, updated, causeOnly, _public, outcome, createdAt, updatedAt, imageUrl, defaultUnitId, limit, offset, sort); return response.Data; } @@ -436,8 +436,8 @@ public InlineResponse20027 VariableCategoriesGet (string accessToken = null, str /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// ApiResponse of InlineResponse20027 - public ApiResponse< InlineResponse20027 > VariableCategoriesGetWithHttpInfo (string accessToken = null, string name = null, double? fillingValue = null, double? maximumAllowedValue = null, double? minimumAllowedValue = null, int? durationOfAction = null, int? onsetDelay = null, string combinationOperation = null, int? updated = null, bool? causeOnly = null, int? _public = null, bool? outcome = null, string createdAt = null, string updatedAt = null, string imageUrl = null, int? defaultUnitId = null, int? limit = null, int? offset = null, string sort = null) + /// ApiResponse of InlineResponse20031 + public ApiResponse< InlineResponse20031 > VariableCategoriesGetWithHttpInfo (string accessToken = null, string name = null, double? fillingValue = null, double? maximumAllowedValue = null, double? minimumAllowedValue = null, int? durationOfAction = null, int? onsetDelay = null, string combinationOperation = null, int? updated = null, bool? causeOnly = null, int? _public = null, bool? outcome = null, string createdAt = null, string updatedAt = null, string imageUrl = null, int? defaultUnitId = null, int? limit = null, int? offset = null, string sort = null) { @@ -506,9 +506,9 @@ public ApiResponse< InlineResponse20027 > VariableCategoriesGetWithHttpInfo (str else if (statusCode == 0) throw new ApiException (statusCode, "Error calling VariableCategoriesGet: " + response.ErrorMessage, response.ErrorMessage); - return new ApiResponse(statusCode, + return new ApiResponse(statusCode, response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (InlineResponse20027) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20027))); + (InlineResponse20031) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20031))); } @@ -534,10 +534,10 @@ public ApiResponse< InlineResponse20027 > VariableCategoriesGetWithHttpInfo (str /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// Task of InlineResponse20027 - public async System.Threading.Tasks.Task VariableCategoriesGetAsync (string accessToken = null, string name = null, double? fillingValue = null, double? maximumAllowedValue = null, double? minimumAllowedValue = null, int? durationOfAction = null, int? onsetDelay = null, string combinationOperation = null, int? updated = null, bool? causeOnly = null, int? _public = null, bool? outcome = null, string createdAt = null, string updatedAt = null, string imageUrl = null, int? defaultUnitId = null, int? limit = null, int? offset = null, string sort = null) + /// Task of InlineResponse20031 + public async System.Threading.Tasks.Task VariableCategoriesGetAsync (string accessToken = null, string name = null, double? fillingValue = null, double? maximumAllowedValue = null, double? minimumAllowedValue = null, int? durationOfAction = null, int? onsetDelay = null, string combinationOperation = null, int? updated = null, bool? causeOnly = null, int? _public = null, bool? outcome = null, string createdAt = null, string updatedAt = null, string imageUrl = null, int? defaultUnitId = null, int? limit = null, int? offset = null, string sort = null) { - ApiResponse response = await VariableCategoriesGetAsyncWithHttpInfo(accessToken, name, fillingValue, maximumAllowedValue, minimumAllowedValue, durationOfAction, onsetDelay, combinationOperation, updated, causeOnly, _public, outcome, createdAt, updatedAt, imageUrl, defaultUnitId, limit, offset, sort); + ApiResponse response = await VariableCategoriesGetAsyncWithHttpInfo(accessToken, name, fillingValue, maximumAllowedValue, minimumAllowedValue, durationOfAction, onsetDelay, combinationOperation, updated, causeOnly, _public, outcome, createdAt, updatedAt, imageUrl, defaultUnitId, limit, offset, sort); return response.Data; } @@ -564,8 +564,8 @@ public async System.Threading.Tasks.Task VariableCategories /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// Task of ApiResponse (InlineResponse20027) - public async System.Threading.Tasks.Task> VariableCategoriesGetAsyncWithHttpInfo (string accessToken = null, string name = null, double? fillingValue = null, double? maximumAllowedValue = null, double? minimumAllowedValue = null, int? durationOfAction = null, int? onsetDelay = null, string combinationOperation = null, int? updated = null, bool? causeOnly = null, int? _public = null, bool? outcome = null, string createdAt = null, string updatedAt = null, string imageUrl = null, int? defaultUnitId = null, int? limit = null, int? offset = null, string sort = null) + /// Task of ApiResponse (InlineResponse20031) + public async System.Threading.Tasks.Task> VariableCategoriesGetAsyncWithHttpInfo (string accessToken = null, string name = null, double? fillingValue = null, double? maximumAllowedValue = null, double? minimumAllowedValue = null, int? durationOfAction = null, int? onsetDelay = null, string combinationOperation = null, int? updated = null, bool? causeOnly = null, int? _public = null, bool? outcome = null, string createdAt = null, string updatedAt = null, string imageUrl = null, int? defaultUnitId = null, int? limit = null, int? offset = null, string sort = null) { @@ -634,9 +634,9 @@ public async System.Threading.Tasks.Task> Varia else if (statusCode == 0) throw new ApiException (statusCode, "Error calling VariableCategoriesGet: " + response.ErrorMessage, response.ErrorMessage); - return new ApiResponse(statusCode, + return new ApiResponse(statusCode, response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (InlineResponse20027) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20027))); + (InlineResponse20031) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20031))); } @@ -645,10 +645,10 @@ public async System.Threading.Tasks.Task> Varia /// /// User's OAuth2 access token /// VariableCategory that should be stored - /// InlineResponse20028 - public InlineResponse20028 VariableCategoriesPost (string accessToken = null, VariableCategory body = null) + /// InlineResponse20032 + public InlineResponse20032 VariableCategoriesPost (string accessToken = null, VariableCategory body = null) { - ApiResponse response = VariableCategoriesPostWithHttpInfo(accessToken, body); + ApiResponse response = VariableCategoriesPostWithHttpInfo(accessToken, body); return response.Data; } @@ -657,8 +657,8 @@ public InlineResponse20028 VariableCategoriesPost (string accessToken = null, Va /// /// User's OAuth2 access token /// VariableCategory that should be stored - /// ApiResponse of InlineResponse20028 - public ApiResponse< InlineResponse20028 > VariableCategoriesPostWithHttpInfo (string accessToken = null, VariableCategory body = null) + /// ApiResponse of InlineResponse20032 + public ApiResponse< InlineResponse20032 > VariableCategoriesPostWithHttpInfo (string accessToken = null, VariableCategory body = null) { @@ -710,9 +710,9 @@ public ApiResponse< InlineResponse20028 > VariableCategoriesPostWithHttpInfo (st else if (statusCode == 0) throw new ApiException (statusCode, "Error calling VariableCategoriesPost: " + response.ErrorMessage, response.ErrorMessage); - return new ApiResponse(statusCode, + return new ApiResponse(statusCode, response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (InlineResponse20028) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20028))); + (InlineResponse20032) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20032))); } @@ -721,10 +721,10 @@ public ApiResponse< InlineResponse20028 > VariableCategoriesPostWithHttpInfo (st /// /// User's OAuth2 access token /// VariableCategory that should be stored - /// Task of InlineResponse20028 - public async System.Threading.Tasks.Task VariableCategoriesPostAsync (string accessToken = null, VariableCategory body = null) + /// Task of InlineResponse20032 + public async System.Threading.Tasks.Task VariableCategoriesPostAsync (string accessToken = null, VariableCategory body = null) { - ApiResponse response = await VariableCategoriesPostAsyncWithHttpInfo(accessToken, body); + ApiResponse response = await VariableCategoriesPostAsyncWithHttpInfo(accessToken, body); return response.Data; } @@ -734,8 +734,8 @@ public async System.Threading.Tasks.Task VariableCategories /// /// User's OAuth2 access token /// VariableCategory that should be stored - /// Task of ApiResponse (InlineResponse20028) - public async System.Threading.Tasks.Task> VariableCategoriesPostAsyncWithHttpInfo (string accessToken = null, VariableCategory body = null) + /// Task of ApiResponse (InlineResponse20032) + public async System.Threading.Tasks.Task> VariableCategoriesPostAsyncWithHttpInfo (string accessToken = null, VariableCategory body = null) { @@ -787,9 +787,9 @@ public async System.Threading.Tasks.Task> Varia else if (statusCode == 0) throw new ApiException (statusCode, "Error calling VariableCategoriesPost: " + response.ErrorMessage, response.ErrorMessage); - return new ApiResponse(statusCode, + return new ApiResponse(statusCode, response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (InlineResponse20028) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20028))); + (InlineResponse20032) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20032))); } @@ -798,10 +798,10 @@ public async System.Threading.Tasks.Task> Varia /// /// id of VariableCategory /// User's OAuth2 access token - /// InlineResponse20028 - public InlineResponse20028 VariableCategoriesIdGet (int? id, string accessToken = null) + /// InlineResponse20032 + public InlineResponse20032 VariableCategoriesIdGet (int? id, string accessToken = null) { - ApiResponse response = VariableCategoriesIdGetWithHttpInfo(id, accessToken); + ApiResponse response = VariableCategoriesIdGetWithHttpInfo(id, accessToken); return response.Data; } @@ -810,8 +810,8 @@ public InlineResponse20028 VariableCategoriesIdGet (int? id, string accessToken /// /// id of VariableCategory /// User's OAuth2 access token - /// ApiResponse of InlineResponse20028 - public ApiResponse< InlineResponse20028 > VariableCategoriesIdGetWithHttpInfo (int? id, string accessToken = null) + /// ApiResponse of InlineResponse20032 + public ApiResponse< InlineResponse20032 > VariableCategoriesIdGetWithHttpInfo (int? id, string accessToken = null) { // verify the required parameter 'id' is set @@ -866,9 +866,9 @@ public ApiResponse< InlineResponse20028 > VariableCategoriesIdGetWithHttpInfo (i else if (statusCode == 0) throw new ApiException (statusCode, "Error calling VariableCategoriesIdGet: " + response.ErrorMessage, response.ErrorMessage); - return new ApiResponse(statusCode, + return new ApiResponse(statusCode, response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (InlineResponse20028) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20028))); + (InlineResponse20032) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20032))); } @@ -877,10 +877,10 @@ public ApiResponse< InlineResponse20028 > VariableCategoriesIdGetWithHttpInfo (i /// /// id of VariableCategory /// User's OAuth2 access token - /// Task of InlineResponse20028 - public async System.Threading.Tasks.Task VariableCategoriesIdGetAsync (int? id, string accessToken = null) + /// Task of InlineResponse20032 + public async System.Threading.Tasks.Task VariableCategoriesIdGetAsync (int? id, string accessToken = null) { - ApiResponse response = await VariableCategoriesIdGetAsyncWithHttpInfo(id, accessToken); + ApiResponse response = await VariableCategoriesIdGetAsyncWithHttpInfo(id, accessToken); return response.Data; } @@ -890,8 +890,8 @@ public async System.Threading.Tasks.Task VariableCategories /// /// id of VariableCategory /// User's OAuth2 access token - /// Task of ApiResponse (InlineResponse20028) - public async System.Threading.Tasks.Task> VariableCategoriesIdGetAsyncWithHttpInfo (int? id, string accessToken = null) + /// Task of ApiResponse (InlineResponse20032) + public async System.Threading.Tasks.Task> VariableCategoriesIdGetAsyncWithHttpInfo (int? id, string accessToken = null) { // verify the required parameter 'id' is set if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling VariableCategoriesIdGet"); @@ -945,9 +945,9 @@ public async System.Threading.Tasks.Task> Varia else if (statusCode == 0) throw new ApiException (statusCode, "Error calling VariableCategoriesIdGet: " + response.ErrorMessage, response.ErrorMessage); - return new ApiResponse(statusCode, + return new ApiResponse(statusCode, response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (InlineResponse20028) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20028))); + (InlineResponse20032) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20032))); } diff --git a/src/main/csharp/io/swagger/Api/VariableUserSourceApi.cs b/src/main/csharp/io/swagger/Api/VariableUserSourceApi.cs index a649ef2..c6ee5e3 100644 --- a/src/main/csharp/io/swagger/Api/VariableUserSourceApi.cs +++ b/src/main/csharp/io/swagger/Api/VariableUserSourceApi.cs @@ -32,8 +32,8 @@ public interface IVariableUserSourceApi /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// InlineResponse20029 - InlineResponse20029 VariableUserSourcesGet (string accessToken = null, int? variableId = null, int? userId = null, int? timestamp = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); + /// InlineResponse20019 + InlineResponse20019 VariableUserSourcesGet (string accessToken = null, int? variableId = null, int? userId = null, int? timestamp = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); /// /// Get all VariableUserSources @@ -52,8 +52,8 @@ public interface IVariableUserSourceApi /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// ApiResponse of InlineResponse20029 - ApiResponse VariableUserSourcesGetWithHttpInfo (string accessToken = null, int? variableId = null, int? userId = null, int? timestamp = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); + /// ApiResponse of InlineResponse20019 + ApiResponse VariableUserSourcesGetWithHttpInfo (string accessToken = null, int? variableId = null, int? userId = null, int? timestamp = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); /// /// Get all VariableUserSources @@ -72,8 +72,8 @@ public interface IVariableUserSourceApi /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// Task of InlineResponse20029 - System.Threading.Tasks.Task VariableUserSourcesGetAsync (string accessToken = null, int? variableId = null, int? userId = null, int? timestamp = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); + /// Task of InlineResponse20019 + System.Threading.Tasks.Task VariableUserSourcesGetAsync (string accessToken = null, int? variableId = null, int? userId = null, int? timestamp = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); /// /// Get all VariableUserSources @@ -92,8 +92,8 @@ public interface IVariableUserSourceApi /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// Task of ApiResponse (InlineResponse20029) - System.Threading.Tasks.Task> VariableUserSourcesGetAsyncWithHttpInfo (string accessToken = null, int? variableId = null, int? userId = null, int? timestamp = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); + /// Task of ApiResponse (InlineResponse20019) + System.Threading.Tasks.Task> VariableUserSourcesGetAsyncWithHttpInfo (string accessToken = null, int? variableId = null, int? userId = null, int? timestamp = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); /// /// Store VariableUserSource @@ -103,8 +103,8 @@ public interface IVariableUserSourceApi /// /// User's OAuth2 access token /// VariableUserSource that should be stored - /// InlineResponse20030 - InlineResponse20030 VariableUserSourcesPost (string accessToken = null, VariableUserSource body = null); + /// InlineResponse20033 + InlineResponse20033 VariableUserSourcesPost (string accessToken = null, VariableUserSource body = null); /// /// Store VariableUserSource @@ -114,8 +114,8 @@ public interface IVariableUserSourceApi /// /// User's OAuth2 access token /// VariableUserSource that should be stored - /// ApiResponse of InlineResponse20030 - ApiResponse VariableUserSourcesPostWithHttpInfo (string accessToken = null, VariableUserSource body = null); + /// ApiResponse of InlineResponse20033 + ApiResponse VariableUserSourcesPostWithHttpInfo (string accessToken = null, VariableUserSource body = null); /// /// Store VariableUserSource @@ -125,8 +125,8 @@ public interface IVariableUserSourceApi /// /// User's OAuth2 access token /// VariableUserSource that should be stored - /// Task of InlineResponse20030 - System.Threading.Tasks.Task VariableUserSourcesPostAsync (string accessToken = null, VariableUserSource body = null); + /// Task of InlineResponse20033 + System.Threading.Tasks.Task VariableUserSourcesPostAsync (string accessToken = null, VariableUserSource body = null); /// /// Store VariableUserSource @@ -136,8 +136,8 @@ public interface IVariableUserSourceApi /// /// User's OAuth2 access token /// VariableUserSource that should be stored - /// Task of ApiResponse (InlineResponse20030) - System.Threading.Tasks.Task> VariableUserSourcesPostAsyncWithHttpInfo (string accessToken = null, VariableUserSource body = null); + /// Task of ApiResponse (InlineResponse20033) + System.Threading.Tasks.Task> VariableUserSourcesPostAsyncWithHttpInfo (string accessToken = null, VariableUserSource body = null); /// /// Get VariableUserSource @@ -148,8 +148,8 @@ public interface IVariableUserSourceApi /// id of VariableUserSource /// source id of VariableUserSource /// User's OAuth2 access token - /// InlineResponse20030 - InlineResponse20030 VariableUserSourcesIdGet (int? id, int? sourceId, string accessToken = null); + /// InlineResponse20033 + InlineResponse20033 VariableUserSourcesIdGet (int? id, int? sourceId, string accessToken = null); /// /// Get VariableUserSource @@ -160,8 +160,8 @@ public interface IVariableUserSourceApi /// id of VariableUserSource /// source id of VariableUserSource /// User's OAuth2 access token - /// ApiResponse of InlineResponse20030 - ApiResponse VariableUserSourcesIdGetWithHttpInfo (int? id, int? sourceId, string accessToken = null); + /// ApiResponse of InlineResponse20033 + ApiResponse VariableUserSourcesIdGetWithHttpInfo (int? id, int? sourceId, string accessToken = null); /// /// Get VariableUserSource @@ -172,8 +172,8 @@ public interface IVariableUserSourceApi /// id of VariableUserSource /// source id of VariableUserSource /// User's OAuth2 access token - /// Task of InlineResponse20030 - System.Threading.Tasks.Task VariableUserSourcesIdGetAsync (int? id, int? sourceId, string accessToken = null); + /// Task of InlineResponse20033 + System.Threading.Tasks.Task VariableUserSourcesIdGetAsync (int? id, int? sourceId, string accessToken = null); /// /// Get VariableUserSource @@ -184,8 +184,8 @@ public interface IVariableUserSourceApi /// id of VariableUserSource /// source id of VariableUserSource /// User's OAuth2 access token - /// Task of ApiResponse (InlineResponse20030) - System.Threading.Tasks.Task> VariableUserSourcesIdGetAsyncWithHttpInfo (int? id, int? sourceId, string accessToken = null); + /// Task of ApiResponse (InlineResponse20033) + System.Threading.Tasks.Task> VariableUserSourcesIdGetAsyncWithHttpInfo (int? id, int? sourceId, string accessToken = null); /// /// Update VariableUserSource @@ -379,10 +379,10 @@ public void AddDefaultHeader(string key, string value) /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// InlineResponse20029 - public InlineResponse20029 VariableUserSourcesGet (string accessToken = null, int? variableId = null, int? userId = null, int? timestamp = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) + /// InlineResponse20019 + public InlineResponse20019 VariableUserSourcesGet (string accessToken = null, int? variableId = null, int? userId = null, int? timestamp = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) { - ApiResponse response = VariableUserSourcesGetWithHttpInfo(accessToken, variableId, userId, timestamp, earliestMeasurementTime, latestMeasurementTime, createdAt, updatedAt, limit, offset, sort); + ApiResponse response = VariableUserSourcesGetWithHttpInfo(accessToken, variableId, userId, timestamp, earliestMeasurementTime, latestMeasurementTime, createdAt, updatedAt, limit, offset, sort); return response.Data; } @@ -400,8 +400,8 @@ public InlineResponse20029 VariableUserSourcesGet (string accessToken = null, in /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// ApiResponse of InlineResponse20029 - public ApiResponse< InlineResponse20029 > VariableUserSourcesGetWithHttpInfo (string accessToken = null, int? variableId = null, int? userId = null, int? timestamp = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) + /// ApiResponse of InlineResponse20019 + public ApiResponse< InlineResponse20019 > VariableUserSourcesGetWithHttpInfo (string accessToken = null, int? variableId = null, int? userId = null, int? timestamp = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) { @@ -462,9 +462,9 @@ public ApiResponse< InlineResponse20029 > VariableUserSourcesGetWithHttpInfo (st else if (statusCode == 0) throw new ApiException (statusCode, "Error calling VariableUserSourcesGet: " + response.ErrorMessage, response.ErrorMessage); - return new ApiResponse(statusCode, + return new ApiResponse(statusCode, response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (InlineResponse20029) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20029))); + (InlineResponse20019) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20019))); } @@ -482,10 +482,10 @@ public ApiResponse< InlineResponse20029 > VariableUserSourcesGetWithHttpInfo (st /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// Task of InlineResponse20029 - public async System.Threading.Tasks.Task VariableUserSourcesGetAsync (string accessToken = null, int? variableId = null, int? userId = null, int? timestamp = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) + /// Task of InlineResponse20019 + public async System.Threading.Tasks.Task VariableUserSourcesGetAsync (string accessToken = null, int? variableId = null, int? userId = null, int? timestamp = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) { - ApiResponse response = await VariableUserSourcesGetAsyncWithHttpInfo(accessToken, variableId, userId, timestamp, earliestMeasurementTime, latestMeasurementTime, createdAt, updatedAt, limit, offset, sort); + ApiResponse response = await VariableUserSourcesGetAsyncWithHttpInfo(accessToken, variableId, userId, timestamp, earliestMeasurementTime, latestMeasurementTime, createdAt, updatedAt, limit, offset, sort); return response.Data; } @@ -504,8 +504,8 @@ public async System.Threading.Tasks.Task VariableUserSource /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// Task of ApiResponse (InlineResponse20029) - public async System.Threading.Tasks.Task> VariableUserSourcesGetAsyncWithHttpInfo (string accessToken = null, int? variableId = null, int? userId = null, int? timestamp = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) + /// Task of ApiResponse (InlineResponse20019) + public async System.Threading.Tasks.Task> VariableUserSourcesGetAsyncWithHttpInfo (string accessToken = null, int? variableId = null, int? userId = null, int? timestamp = null, int? earliestMeasurementTime = null, int? latestMeasurementTime = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) { @@ -566,9 +566,9 @@ public async System.Threading.Tasks.Task> Varia else if (statusCode == 0) throw new ApiException (statusCode, "Error calling VariableUserSourcesGet: " + response.ErrorMessage, response.ErrorMessage); - return new ApiResponse(statusCode, + return new ApiResponse(statusCode, response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (InlineResponse20029) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20029))); + (InlineResponse20019) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20019))); } @@ -577,10 +577,10 @@ public async System.Threading.Tasks.Task> Varia /// /// User's OAuth2 access token /// VariableUserSource that should be stored - /// InlineResponse20030 - public InlineResponse20030 VariableUserSourcesPost (string accessToken = null, VariableUserSource body = null) + /// InlineResponse20033 + public InlineResponse20033 VariableUserSourcesPost (string accessToken = null, VariableUserSource body = null) { - ApiResponse response = VariableUserSourcesPostWithHttpInfo(accessToken, body); + ApiResponse response = VariableUserSourcesPostWithHttpInfo(accessToken, body); return response.Data; } @@ -589,8 +589,8 @@ public InlineResponse20030 VariableUserSourcesPost (string accessToken = null, V /// /// User's OAuth2 access token /// VariableUserSource that should be stored - /// ApiResponse of InlineResponse20030 - public ApiResponse< InlineResponse20030 > VariableUserSourcesPostWithHttpInfo (string accessToken = null, VariableUserSource body = null) + /// ApiResponse of InlineResponse20033 + public ApiResponse< InlineResponse20033 > VariableUserSourcesPostWithHttpInfo (string accessToken = null, VariableUserSource body = null) { @@ -642,9 +642,9 @@ public ApiResponse< InlineResponse20030 > VariableUserSourcesPostWithHttpInfo (s else if (statusCode == 0) throw new ApiException (statusCode, "Error calling VariableUserSourcesPost: " + response.ErrorMessage, response.ErrorMessage); - return new ApiResponse(statusCode, + return new ApiResponse(statusCode, response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (InlineResponse20030) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20030))); + (InlineResponse20033) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20033))); } @@ -653,10 +653,10 @@ public ApiResponse< InlineResponse20030 > VariableUserSourcesPostWithHttpInfo (s /// /// User's OAuth2 access token /// VariableUserSource that should be stored - /// Task of InlineResponse20030 - public async System.Threading.Tasks.Task VariableUserSourcesPostAsync (string accessToken = null, VariableUserSource body = null) + /// Task of InlineResponse20033 + public async System.Threading.Tasks.Task VariableUserSourcesPostAsync (string accessToken = null, VariableUserSource body = null) { - ApiResponse response = await VariableUserSourcesPostAsyncWithHttpInfo(accessToken, body); + ApiResponse response = await VariableUserSourcesPostAsyncWithHttpInfo(accessToken, body); return response.Data; } @@ -666,8 +666,8 @@ public async System.Threading.Tasks.Task VariableUserSource /// /// User's OAuth2 access token /// VariableUserSource that should be stored - /// Task of ApiResponse (InlineResponse20030) - public async System.Threading.Tasks.Task> VariableUserSourcesPostAsyncWithHttpInfo (string accessToken = null, VariableUserSource body = null) + /// Task of ApiResponse (InlineResponse20033) + public async System.Threading.Tasks.Task> VariableUserSourcesPostAsyncWithHttpInfo (string accessToken = null, VariableUserSource body = null) { @@ -719,9 +719,9 @@ public async System.Threading.Tasks.Task> Varia else if (statusCode == 0) throw new ApiException (statusCode, "Error calling VariableUserSourcesPost: " + response.ErrorMessage, response.ErrorMessage); - return new ApiResponse(statusCode, + return new ApiResponse(statusCode, response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (InlineResponse20030) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20030))); + (InlineResponse20033) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20033))); } @@ -731,10 +731,10 @@ public async System.Threading.Tasks.Task> Varia /// id of VariableUserSource /// source id of VariableUserSource /// User's OAuth2 access token - /// InlineResponse20030 - public InlineResponse20030 VariableUserSourcesIdGet (int? id, int? sourceId, string accessToken = null) + /// InlineResponse20033 + public InlineResponse20033 VariableUserSourcesIdGet (int? id, int? sourceId, string accessToken = null) { - ApiResponse response = VariableUserSourcesIdGetWithHttpInfo(id, sourceId, accessToken); + ApiResponse response = VariableUserSourcesIdGetWithHttpInfo(id, sourceId, accessToken); return response.Data; } @@ -744,8 +744,8 @@ public InlineResponse20030 VariableUserSourcesIdGet (int? id, int? sourceId, str /// id of VariableUserSource /// source id of VariableUserSource /// User's OAuth2 access token - /// ApiResponse of InlineResponse20030 - public ApiResponse< InlineResponse20030 > VariableUserSourcesIdGetWithHttpInfo (int? id, int? sourceId, string accessToken = null) + /// ApiResponse of InlineResponse20033 + public ApiResponse< InlineResponse20033 > VariableUserSourcesIdGetWithHttpInfo (int? id, int? sourceId, string accessToken = null) { // verify the required parameter 'id' is set @@ -804,9 +804,9 @@ public ApiResponse< InlineResponse20030 > VariableUserSourcesIdGetWithHttpInfo ( else if (statusCode == 0) throw new ApiException (statusCode, "Error calling VariableUserSourcesIdGet: " + response.ErrorMessage, response.ErrorMessage); - return new ApiResponse(statusCode, + return new ApiResponse(statusCode, response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (InlineResponse20030) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20030))); + (InlineResponse20033) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20033))); } @@ -816,10 +816,10 @@ public ApiResponse< InlineResponse20030 > VariableUserSourcesIdGetWithHttpInfo ( /// id of VariableUserSource /// source id of VariableUserSource /// User's OAuth2 access token - /// Task of InlineResponse20030 - public async System.Threading.Tasks.Task VariableUserSourcesIdGetAsync (int? id, int? sourceId, string accessToken = null) + /// Task of InlineResponse20033 + public async System.Threading.Tasks.Task VariableUserSourcesIdGetAsync (int? id, int? sourceId, string accessToken = null) { - ApiResponse response = await VariableUserSourcesIdGetAsyncWithHttpInfo(id, sourceId, accessToken); + ApiResponse response = await VariableUserSourcesIdGetAsyncWithHttpInfo(id, sourceId, accessToken); return response.Data; } @@ -830,8 +830,8 @@ public async System.Threading.Tasks.Task VariableUserSource /// id of VariableUserSource /// source id of VariableUserSource /// User's OAuth2 access token - /// Task of ApiResponse (InlineResponse20030) - public async System.Threading.Tasks.Task> VariableUserSourcesIdGetAsyncWithHttpInfo (int? id, int? sourceId, string accessToken = null) + /// Task of ApiResponse (InlineResponse20033) + public async System.Threading.Tasks.Task> VariableUserSourcesIdGetAsyncWithHttpInfo (int? id, int? sourceId, string accessToken = null) { // verify the required parameter 'id' is set if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling VariableUserSourcesIdGet"); @@ -888,9 +888,9 @@ public async System.Threading.Tasks.Task> Varia else if (statusCode == 0) throw new ApiException (statusCode, "Error calling VariableUserSourcesIdGet: " + response.ErrorMessage, response.ErrorMessage); - return new ApiResponse(statusCode, + return new ApiResponse(statusCode, response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (InlineResponse20030) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20030))); + (InlineResponse20033) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20033))); } diff --git a/src/main/csharp/io/swagger/Api/VoteApi.cs b/src/main/csharp/io/swagger/Api/VoteApi.cs index b091563..68ee3d0 100644 --- a/src/main/csharp/io/swagger/Api/VoteApi.cs +++ b/src/main/csharp/io/swagger/Api/VoteApi.cs @@ -32,8 +32,8 @@ public interface IVoteApi /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// InlineResponse20033 - InlineResponse20033 VotesGet (string accessToken = null, string clientId = null, int? userId = null, int? causeId = null, int? effectId = null, int? value = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); + /// InlineResponse20020 + InlineResponse20020 VotesGet (string accessToken = null, string clientId = null, int? userId = null, int? causeId = null, int? effectId = null, int? value = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); /// /// Get all Votes @@ -52,8 +52,8 @@ public interface IVoteApi /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// ApiResponse of InlineResponse20033 - ApiResponse VotesGetWithHttpInfo (string accessToken = null, string clientId = null, int? userId = null, int? causeId = null, int? effectId = null, int? value = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); + /// ApiResponse of InlineResponse20020 + ApiResponse VotesGetWithHttpInfo (string accessToken = null, string clientId = null, int? userId = null, int? causeId = null, int? effectId = null, int? value = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); /// /// Get all Votes @@ -72,8 +72,8 @@ public interface IVoteApi /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// Task of InlineResponse20033 - System.Threading.Tasks.Task VotesGetAsync (string accessToken = null, string clientId = null, int? userId = null, int? causeId = null, int? effectId = null, int? value = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); + /// Task of InlineResponse20020 + System.Threading.Tasks.Task VotesGetAsync (string accessToken = null, string clientId = null, int? userId = null, int? causeId = null, int? effectId = null, int? value = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); /// /// Get all Votes @@ -92,8 +92,8 @@ public interface IVoteApi /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// Task of ApiResponse (InlineResponse20033) - System.Threading.Tasks.Task> VotesGetAsyncWithHttpInfo (string accessToken = null, string clientId = null, int? userId = null, int? causeId = null, int? effectId = null, int? value = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); + /// Task of ApiResponse (InlineResponse20020) + System.Threading.Tasks.Task> VotesGetAsyncWithHttpInfo (string accessToken = null, string clientId = null, int? userId = null, int? causeId = null, int? effectId = null, int? value = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null); /// /// Store Vote @@ -103,8 +103,8 @@ public interface IVoteApi /// /// User's OAuth2 access token /// Vote that should be stored - /// InlineResponse20034 - InlineResponse20034 VotesPost (string accessToken = null, Vote body = null); + /// InlineResponse20036 + InlineResponse20036 VotesPost (string accessToken = null, Vote body = null); /// /// Store Vote @@ -114,8 +114,8 @@ public interface IVoteApi /// /// User's OAuth2 access token /// Vote that should be stored - /// ApiResponse of InlineResponse20034 - ApiResponse VotesPostWithHttpInfo (string accessToken = null, Vote body = null); + /// ApiResponse of InlineResponse20036 + ApiResponse VotesPostWithHttpInfo (string accessToken = null, Vote body = null); /// /// Store Vote @@ -125,8 +125,8 @@ public interface IVoteApi /// /// User's OAuth2 access token /// Vote that should be stored - /// Task of InlineResponse20034 - System.Threading.Tasks.Task VotesPostAsync (string accessToken = null, Vote body = null); + /// Task of InlineResponse20036 + System.Threading.Tasks.Task VotesPostAsync (string accessToken = null, Vote body = null); /// /// Store Vote @@ -136,8 +136,8 @@ public interface IVoteApi /// /// User's OAuth2 access token /// Vote that should be stored - /// Task of ApiResponse (InlineResponse20034) - System.Threading.Tasks.Task> VotesPostAsyncWithHttpInfo (string accessToken = null, Vote body = null); + /// Task of ApiResponse (InlineResponse20036) + System.Threading.Tasks.Task> VotesPostAsyncWithHttpInfo (string accessToken = null, Vote body = null); /// /// Get Vote @@ -147,8 +147,8 @@ public interface IVoteApi /// /// id of Vote /// User's OAuth2 access token - /// InlineResponse20034 - InlineResponse20034 VotesIdGet (int? id, string accessToken = null); + /// InlineResponse20036 + InlineResponse20036 VotesIdGet (int? id, string accessToken = null); /// /// Get Vote @@ -158,8 +158,8 @@ public interface IVoteApi /// /// id of Vote /// User's OAuth2 access token - /// ApiResponse of InlineResponse20034 - ApiResponse VotesIdGetWithHttpInfo (int? id, string accessToken = null); + /// ApiResponse of InlineResponse20036 + ApiResponse VotesIdGetWithHttpInfo (int? id, string accessToken = null); /// /// Get Vote @@ -169,8 +169,8 @@ public interface IVoteApi /// /// id of Vote /// User's OAuth2 access token - /// Task of InlineResponse20034 - System.Threading.Tasks.Task VotesIdGetAsync (int? id, string accessToken = null); + /// Task of InlineResponse20036 + System.Threading.Tasks.Task VotesIdGetAsync (int? id, string accessToken = null); /// /// Get Vote @@ -180,8 +180,8 @@ public interface IVoteApi /// /// id of Vote /// User's OAuth2 access token - /// Task of ApiResponse (InlineResponse20034) - System.Threading.Tasks.Task> VotesIdGetAsyncWithHttpInfo (int? id, string accessToken = null); + /// Task of ApiResponse (InlineResponse20036) + System.Threading.Tasks.Task> VotesIdGetAsyncWithHttpInfo (int? id, string accessToken = null); /// /// Update Vote @@ -367,10 +367,10 @@ public void AddDefaultHeader(string key, string value) /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// InlineResponse20033 - public InlineResponse20033 VotesGet (string accessToken = null, string clientId = null, int? userId = null, int? causeId = null, int? effectId = null, int? value = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) + /// InlineResponse20020 + public InlineResponse20020 VotesGet (string accessToken = null, string clientId = null, int? userId = null, int? causeId = null, int? effectId = null, int? value = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) { - ApiResponse response = VotesGetWithHttpInfo(accessToken, clientId, userId, causeId, effectId, value, createdAt, updatedAt, limit, offset, sort); + ApiResponse response = VotesGetWithHttpInfo(accessToken, clientId, userId, causeId, effectId, value, createdAt, updatedAt, limit, offset, sort); return response.Data; } @@ -388,8 +388,8 @@ public InlineResponse20033 VotesGet (string accessToken = null, string clientId /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// ApiResponse of InlineResponse20033 - public ApiResponse< InlineResponse20033 > VotesGetWithHttpInfo (string accessToken = null, string clientId = null, int? userId = null, int? causeId = null, int? effectId = null, int? value = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) + /// ApiResponse of InlineResponse20020 + public ApiResponse< InlineResponse20020 > VotesGetWithHttpInfo (string accessToken = null, string clientId = null, int? userId = null, int? causeId = null, int? effectId = null, int? value = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) { @@ -450,9 +450,9 @@ public ApiResponse< InlineResponse20033 > VotesGetWithHttpInfo (string accessTok else if (statusCode == 0) throw new ApiException (statusCode, "Error calling VotesGet: " + response.ErrorMessage, response.ErrorMessage); - return new ApiResponse(statusCode, + return new ApiResponse(statusCode, response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (InlineResponse20033) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20033))); + (InlineResponse20020) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20020))); } @@ -470,10 +470,10 @@ public ApiResponse< InlineResponse20033 > VotesGetWithHttpInfo (string accessTok /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// Task of InlineResponse20033 - public async System.Threading.Tasks.Task VotesGetAsync (string accessToken = null, string clientId = null, int? userId = null, int? causeId = null, int? effectId = null, int? value = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) + /// Task of InlineResponse20020 + public async System.Threading.Tasks.Task VotesGetAsync (string accessToken = null, string clientId = null, int? userId = null, int? causeId = null, int? effectId = null, int? value = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) { - ApiResponse response = await VotesGetAsyncWithHttpInfo(accessToken, clientId, userId, causeId, effectId, value, createdAt, updatedAt, limit, offset, sort); + ApiResponse response = await VotesGetAsyncWithHttpInfo(accessToken, clientId, userId, causeId, effectId, value, createdAt, updatedAt, limit, offset, sort); return response.Data; } @@ -492,8 +492,8 @@ public async System.Threading.Tasks.Task VotesGetAsync (str /// The LIMIT is used to limit the number of results returned. So if you have 1000 results, but only want to the first 10, you would set this to 10 and offset to 0. The maximum limit is 200 records. /// OFFSET says to skip that many rows before beginning to return rows to the client. OFFSET 0 is the same as omitting the OFFSET clause. If both OFFSET and LIMIT appear, then OFFSET rows are skipped before starting to count the LIMIT rows that are returned. /// Sort by given field. If the field is prefixed with '-', it will sort in descending order. - /// Task of ApiResponse (InlineResponse20033) - public async System.Threading.Tasks.Task> VotesGetAsyncWithHttpInfo (string accessToken = null, string clientId = null, int? userId = null, int? causeId = null, int? effectId = null, int? value = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) + /// Task of ApiResponse (InlineResponse20020) + public async System.Threading.Tasks.Task> VotesGetAsyncWithHttpInfo (string accessToken = null, string clientId = null, int? userId = null, int? causeId = null, int? effectId = null, int? value = null, string createdAt = null, string updatedAt = null, int? limit = null, int? offset = null, string sort = null) { @@ -554,9 +554,9 @@ public async System.Threading.Tasks.Task> Votes else if (statusCode == 0) throw new ApiException (statusCode, "Error calling VotesGet: " + response.ErrorMessage, response.ErrorMessage); - return new ApiResponse(statusCode, + return new ApiResponse(statusCode, response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (InlineResponse20033) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20033))); + (InlineResponse20020) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20020))); } @@ -565,10 +565,10 @@ public async System.Threading.Tasks.Task> Votes /// /// User's OAuth2 access token /// Vote that should be stored - /// InlineResponse20034 - public InlineResponse20034 VotesPost (string accessToken = null, Vote body = null) + /// InlineResponse20036 + public InlineResponse20036 VotesPost (string accessToken = null, Vote body = null) { - ApiResponse response = VotesPostWithHttpInfo(accessToken, body); + ApiResponse response = VotesPostWithHttpInfo(accessToken, body); return response.Data; } @@ -577,8 +577,8 @@ public InlineResponse20034 VotesPost (string accessToken = null, Vote body = nul /// /// User's OAuth2 access token /// Vote that should be stored - /// ApiResponse of InlineResponse20034 - public ApiResponse< InlineResponse20034 > VotesPostWithHttpInfo (string accessToken = null, Vote body = null) + /// ApiResponse of InlineResponse20036 + public ApiResponse< InlineResponse20036 > VotesPostWithHttpInfo (string accessToken = null, Vote body = null) { @@ -630,9 +630,9 @@ public ApiResponse< InlineResponse20034 > VotesPostWithHttpInfo (string accessTo else if (statusCode == 0) throw new ApiException (statusCode, "Error calling VotesPost: " + response.ErrorMessage, response.ErrorMessage); - return new ApiResponse(statusCode, + return new ApiResponse(statusCode, response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (InlineResponse20034) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20034))); + (InlineResponse20036) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20036))); } @@ -641,10 +641,10 @@ public ApiResponse< InlineResponse20034 > VotesPostWithHttpInfo (string accessTo /// /// User's OAuth2 access token /// Vote that should be stored - /// Task of InlineResponse20034 - public async System.Threading.Tasks.Task VotesPostAsync (string accessToken = null, Vote body = null) + /// Task of InlineResponse20036 + public async System.Threading.Tasks.Task VotesPostAsync (string accessToken = null, Vote body = null) { - ApiResponse response = await VotesPostAsyncWithHttpInfo(accessToken, body); + ApiResponse response = await VotesPostAsyncWithHttpInfo(accessToken, body); return response.Data; } @@ -654,8 +654,8 @@ public async System.Threading.Tasks.Task VotesPostAsync (st /// /// User's OAuth2 access token /// Vote that should be stored - /// Task of ApiResponse (InlineResponse20034) - public async System.Threading.Tasks.Task> VotesPostAsyncWithHttpInfo (string accessToken = null, Vote body = null) + /// Task of ApiResponse (InlineResponse20036) + public async System.Threading.Tasks.Task> VotesPostAsyncWithHttpInfo (string accessToken = null, Vote body = null) { @@ -707,9 +707,9 @@ public async System.Threading.Tasks.Task> Votes else if (statusCode == 0) throw new ApiException (statusCode, "Error calling VotesPost: " + response.ErrorMessage, response.ErrorMessage); - return new ApiResponse(statusCode, + return new ApiResponse(statusCode, response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (InlineResponse20034) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20034))); + (InlineResponse20036) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20036))); } @@ -718,10 +718,10 @@ public async System.Threading.Tasks.Task> Votes /// /// id of Vote /// User's OAuth2 access token - /// InlineResponse20034 - public InlineResponse20034 VotesIdGet (int? id, string accessToken = null) + /// InlineResponse20036 + public InlineResponse20036 VotesIdGet (int? id, string accessToken = null) { - ApiResponse response = VotesIdGetWithHttpInfo(id, accessToken); + ApiResponse response = VotesIdGetWithHttpInfo(id, accessToken); return response.Data; } @@ -730,8 +730,8 @@ public InlineResponse20034 VotesIdGet (int? id, string accessToken = null) /// /// id of Vote /// User's OAuth2 access token - /// ApiResponse of InlineResponse20034 - public ApiResponse< InlineResponse20034 > VotesIdGetWithHttpInfo (int? id, string accessToken = null) + /// ApiResponse of InlineResponse20036 + public ApiResponse< InlineResponse20036 > VotesIdGetWithHttpInfo (int? id, string accessToken = null) { // verify the required parameter 'id' is set @@ -786,9 +786,9 @@ public ApiResponse< InlineResponse20034 > VotesIdGetWithHttpInfo (int? id, strin else if (statusCode == 0) throw new ApiException (statusCode, "Error calling VotesIdGet: " + response.ErrorMessage, response.ErrorMessage); - return new ApiResponse(statusCode, + return new ApiResponse(statusCode, response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (InlineResponse20034) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20034))); + (InlineResponse20036) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20036))); } @@ -797,10 +797,10 @@ public ApiResponse< InlineResponse20034 > VotesIdGetWithHttpInfo (int? id, strin /// /// id of Vote /// User's OAuth2 access token - /// Task of InlineResponse20034 - public async System.Threading.Tasks.Task VotesIdGetAsync (int? id, string accessToken = null) + /// Task of InlineResponse20036 + public async System.Threading.Tasks.Task VotesIdGetAsync (int? id, string accessToken = null) { - ApiResponse response = await VotesIdGetAsyncWithHttpInfo(id, accessToken); + ApiResponse response = await VotesIdGetAsyncWithHttpInfo(id, accessToken); return response.Data; } @@ -810,8 +810,8 @@ public async System.Threading.Tasks.Task VotesIdGetAsync (i /// /// id of Vote /// User's OAuth2 access token - /// Task of ApiResponse (InlineResponse20034) - public async System.Threading.Tasks.Task> VotesIdGetAsyncWithHttpInfo (int? id, string accessToken = null) + /// Task of ApiResponse (InlineResponse20036) + public async System.Threading.Tasks.Task> VotesIdGetAsyncWithHttpInfo (int? id, string accessToken = null) { // verify the required parameter 'id' is set if (id == null) throw new ApiException(400, "Missing required parameter 'id' when calling VotesIdGet"); @@ -865,9 +865,9 @@ public async System.Threading.Tasks.Task> Votes else if (statusCode == 0) throw new ApiException (statusCode, "Error calling VotesIdGet: " + response.ErrorMessage, response.ErrorMessage); - return new ApiResponse(statusCode, + return new ApiResponse(statusCode, response.Headers.ToDictionary(x => x.Name, x => x.Value.ToString()), - (InlineResponse20034) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20034))); + (InlineResponse20036) Configuration.ApiClient.Deserialize(response, typeof(InlineResponse20036))); } diff --git a/src/main/csharp/io/swagger/Model/AggregatedCorrelation.cs b/src/main/csharp/io/swagger/Model/AggregatedCorrelation.cs index 9dfac06..fc26f58 100644 --- a/src/main/csharp/io/swagger/Model/AggregatedCorrelation.cs +++ b/src/main/csharp/io/swagger/Model/AggregatedCorrelation.cs @@ -16,6 +16,14 @@ namespace IO.Swagger.Model [DataContract] public class AggregatedCorrelation : IEquatable { + /// + /// Initializes a new instance of the class. + /// + public AggregatedCorrelation() + { + + } + /// /// id diff --git a/src/main/csharp/io/swagger/Model/CommonVariableRelationship.cs b/src/main/csharp/io/swagger/Model/CommonVariableRelationship.cs index ea70688..1152b0e 100644 --- a/src/main/csharp/io/swagger/Model/CommonVariableRelationship.cs +++ b/src/main/csharp/io/swagger/Model/CommonVariableRelationship.cs @@ -16,6 +16,14 @@ namespace IO.Swagger.Model [DataContract] public class CommonVariableRelationship : IEquatable { + /// + /// Initializes a new instance of the class. + /// + public CommonVariableRelationship() + { + + } + /// /// id diff --git a/src/main/csharp/io/swagger/Model/Connection.cs b/src/main/csharp/io/swagger/Model/Connection.cs index ad24078..9d3c5d5 100644 --- a/src/main/csharp/io/swagger/Model/Connection.cs +++ b/src/main/csharp/io/swagger/Model/Connection.cs @@ -16,6 +16,14 @@ namespace IO.Swagger.Model [DataContract] public class Connection : IEquatable { + /// + /// Initializes a new instance of the class. + /// + public Connection() + { + + } + /// /// id diff --git a/src/main/csharp/io/swagger/Model/Connector.cs b/src/main/csharp/io/swagger/Model/Connector.cs index d0f0407..56268dd 100644 --- a/src/main/csharp/io/swagger/Model/Connector.cs +++ b/src/main/csharp/io/swagger/Model/Connector.cs @@ -16,6 +16,14 @@ namespace IO.Swagger.Model [DataContract] public class Connector : IEquatable { + /// + /// Initializes a new instance of the class. + /// + public Connector() + { + + } + /// /// Connector ID number diff --git a/src/main/csharp/io/swagger/Model/Correlation.cs b/src/main/csharp/io/swagger/Model/Correlation.cs index 021f6ea..a1f470e 100644 --- a/src/main/csharp/io/swagger/Model/Correlation.cs +++ b/src/main/csharp/io/swagger/Model/Correlation.cs @@ -16,6 +16,14 @@ namespace IO.Swagger.Model [DataContract] public class Correlation : IEquatable { + /// + /// Initializes a new instance of the class. + /// + public Correlation() + { + + } + /// /// id diff --git a/src/main/csharp/io/swagger/Model/Credential.cs b/src/main/csharp/io/swagger/Model/Credential.cs index 80a9afb..c80a5e3 100644 --- a/src/main/csharp/io/swagger/Model/Credential.cs +++ b/src/main/csharp/io/swagger/Model/Credential.cs @@ -16,6 +16,14 @@ namespace IO.Swagger.Model [DataContract] public class Credential : IEquatable { + /// + /// Initializes a new instance of the class. + /// + public Credential() + { + + } + /// /// ID of user that owns this credential diff --git a/src/main/csharp/io/swagger/Model/InlineResponse200.cs b/src/main/csharp/io/swagger/Model/InlineResponse200.cs index 3bf54fb..f5e8fb8 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse200.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse200.cs @@ -16,6 +16,14 @@ namespace IO.Swagger.Model [DataContract] public class InlineResponse200 : IEquatable { + /// + /// Initializes a new instance of the class. + /// + public InlineResponse200() + { + + } + /// /// Gets or Sets Data diff --git a/src/main/csharp/io/swagger/Model/InlineResponse2001.cs b/src/main/csharp/io/swagger/Model/InlineResponse2001.cs index 0355520..6416f72 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse2001.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse2001.cs @@ -16,6 +16,14 @@ namespace IO.Swagger.Model [DataContract] public class InlineResponse2001 : IEquatable { + /// + /// Initializes a new instance of the class. + /// + public InlineResponse2001() + { + + } + /// /// Gets or Sets Data diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20010.cs b/src/main/csharp/io/swagger/Model/InlineResponse20010.cs index 32fea1a..11b4caf 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse20010.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse20010.cs @@ -16,6 +16,14 @@ namespace IO.Swagger.Model [DataContract] public class InlineResponse20010 : IEquatable { + /// + /// Initializes a new instance of the class. + /// + public InlineResponse20010() + { + + } + /// /// Gets or Sets Data diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20011.cs b/src/main/csharp/io/swagger/Model/InlineResponse20011.cs index 843652d..9f5ccbb 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse20011.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse20011.cs @@ -16,6 +16,14 @@ namespace IO.Swagger.Model [DataContract] public class InlineResponse20011 : IEquatable { + /// + /// Initializes a new instance of the class. + /// + public InlineResponse20011() + { + + } + /// /// Gets or Sets Data diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20012.cs b/src/main/csharp/io/swagger/Model/InlineResponse20012.cs index 883d44b..e2c1424 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse20012.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse20012.cs @@ -16,6 +16,14 @@ namespace IO.Swagger.Model [DataContract] public class InlineResponse20012 : IEquatable { + /// + /// Initializes a new instance of the class. + /// + public InlineResponse20012() + { + + } + /// /// Gets or Sets Data diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20013.cs b/src/main/csharp/io/swagger/Model/InlineResponse20013.cs index 27d8cb4..630bda0 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse20013.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse20013.cs @@ -16,6 +16,14 @@ namespace IO.Swagger.Model [DataContract] public class InlineResponse20013 : IEquatable { + /// + /// Initializes a new instance of the class. + /// + public InlineResponse20013() + { + + } + /// /// Gets or Sets Data diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20014.cs b/src/main/csharp/io/swagger/Model/InlineResponse20014.cs index 3d782fc..dabbeeb 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse20014.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse20014.cs @@ -16,6 +16,14 @@ namespace IO.Swagger.Model [DataContract] public class InlineResponse20014 : IEquatable { + /// + /// Initializes a new instance of the class. + /// + public InlineResponse20014() + { + + } + /// /// Gets or Sets Data diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20015.cs b/src/main/csharp/io/swagger/Model/InlineResponse20015.cs index 1690912..045b1fe 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse20015.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse20015.cs @@ -16,12 +16,20 @@ namespace IO.Swagger.Model [DataContract] public class InlineResponse20015 : IEquatable { + /// + /// Initializes a new instance of the class. + /// + public InlineResponse20015() + { + + } + /// /// Gets or Sets Data /// [DataMember(Name="data", EmitDefaultValue=false)] - public List Data { get; set; } + public List Data { get; set; } /// diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20016.cs b/src/main/csharp/io/swagger/Model/InlineResponse20016.cs index fa38acc..090aa0b 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse20016.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse20016.cs @@ -16,12 +16,20 @@ namespace IO.Swagger.Model [DataContract] public class InlineResponse20016 : IEquatable { + /// + /// Initializes a new instance of the class. + /// + public InlineResponse20016() + { + + } + /// /// Gets or Sets Data /// [DataMember(Name="data", EmitDefaultValue=false)] - public List Data { get; set; } + public List Data { get; set; } /// diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20017.cs b/src/main/csharp/io/swagger/Model/InlineResponse20017.cs index b6114d1..bc1c832 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse20017.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse20017.cs @@ -16,12 +16,20 @@ namespace IO.Swagger.Model [DataContract] public class InlineResponse20017 : IEquatable { + /// + /// Initializes a new instance of the class. + /// + public InlineResponse20017() + { + + } + /// /// Gets or Sets Data /// [DataMember(Name="data", EmitDefaultValue=false)] - public List Data { get; set; } + public List Data { get; set; } /// diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20018.cs b/src/main/csharp/io/swagger/Model/InlineResponse20018.cs index b492e59..f03a305 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse20018.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse20018.cs @@ -16,12 +16,20 @@ namespace IO.Swagger.Model [DataContract] public class InlineResponse20018 : IEquatable { + /// + /// Initializes a new instance of the class. + /// + public InlineResponse20018() + { + + } + /// /// Gets or Sets Data /// [DataMember(Name="data", EmitDefaultValue=false)] - public Source Data { get; set; } + public List Data { get; set; } /// @@ -82,7 +90,7 @@ public bool Equals(InlineResponse20018 other) ( this.Data == other.Data || this.Data != null && - this.Data.Equals(other.Data) + this.Data.SequenceEqual(other.Data) ) && ( this.Success == other.Success || diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20019.cs b/src/main/csharp/io/swagger/Model/InlineResponse20019.cs index 28e0976..57c4947 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse20019.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse20019.cs @@ -16,12 +16,20 @@ namespace IO.Swagger.Model [DataContract] public class InlineResponse20019 : IEquatable { + /// + /// Initializes a new instance of the class. + /// + public InlineResponse20019() + { + + } + /// /// Gets or Sets Data /// [DataMember(Name="data", EmitDefaultValue=false)] - public List Data { get; set; } + public List Data { get; set; } /// diff --git a/src/main/csharp/io/swagger/Model/InlineResponse2002.cs b/src/main/csharp/io/swagger/Model/InlineResponse2002.cs index a0ae0b8..5748be4 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse2002.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse2002.cs @@ -16,6 +16,14 @@ namespace IO.Swagger.Model [DataContract] public class InlineResponse2002 : IEquatable { + /// + /// Initializes a new instance of the class. + /// + public InlineResponse2002() + { + + } + /// /// Gets or Sets Data diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20020.cs b/src/main/csharp/io/swagger/Model/InlineResponse20020.cs index 519b0ae..8c69da6 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse20020.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse20020.cs @@ -16,12 +16,20 @@ namespace IO.Swagger.Model [DataContract] public class InlineResponse20020 : IEquatable { + /// + /// Initializes a new instance of the class. + /// + public InlineResponse20020() + { + + } + /// /// Gets or Sets Data /// [DataMember(Name="data", EmitDefaultValue=false)] - public UnitCategory Data { get; set; } + public List Data { get; set; } /// @@ -82,7 +90,7 @@ public bool Equals(InlineResponse20020 other) ( this.Data == other.Data || this.Data != null && - this.Data.Equals(other.Data) + this.Data.SequenceEqual(other.Data) ) && ( this.Success == other.Success || diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20021.cs b/src/main/csharp/io/swagger/Model/InlineResponse20021.cs index 8257ed7..ca516f5 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse20021.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse20021.cs @@ -16,12 +16,20 @@ namespace IO.Swagger.Model [DataContract] public class InlineResponse20021 : IEquatable { + /// + /// Initializes a new instance of the class. + /// + public InlineResponse20021() + { + + } + /// /// Gets or Sets Data /// [DataMember(Name="data", EmitDefaultValue=false)] - public List Data { get; set; } + public List Data { get; set; } /// diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20022.cs b/src/main/csharp/io/swagger/Model/InlineResponse20022.cs index 5d791ff..237b2d5 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse20022.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse20022.cs @@ -16,12 +16,20 @@ namespace IO.Swagger.Model [DataContract] public class InlineResponse20022 : IEquatable { + /// + /// Initializes a new instance of the class. + /// + public InlineResponse20022() + { + + } + /// /// Gets or Sets Data /// [DataMember(Name="data", EmitDefaultValue=false)] - public Unit Data { get; set; } + public Source Data { get; set; } /// diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20023.cs b/src/main/csharp/io/swagger/Model/InlineResponse20023.cs index 36f796c..5a37a50 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse20023.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse20023.cs @@ -16,12 +16,20 @@ namespace IO.Swagger.Model [DataContract] public class InlineResponse20023 : IEquatable { + /// + /// Initializes a new instance of the class. + /// + public InlineResponse20023() + { + + } + /// /// Gets or Sets Data /// [DataMember(Name="data", EmitDefaultValue=false)] - public Update Data { get; set; } + public TrackingReminder Data { get; set; } /// diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20024.cs b/src/main/csharp/io/swagger/Model/InlineResponse20024.cs index 85c12e0..9b813d5 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse20024.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse20024.cs @@ -16,12 +16,20 @@ namespace IO.Swagger.Model [DataContract] public class InlineResponse20024 : IEquatable { + /// + /// Initializes a new instance of the class. + /// + public InlineResponse20024() + { + + } + /// /// Gets or Sets Data /// [DataMember(Name="data", EmitDefaultValue=false)] - public List Data { get; set; } + public List Data { get; set; } /// diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20025.cs b/src/main/csharp/io/swagger/Model/InlineResponse20025.cs index 6e20a20..34e0003 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse20025.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse20025.cs @@ -16,12 +16,20 @@ namespace IO.Swagger.Model [DataContract] public class InlineResponse20025 : IEquatable { + /// + /// Initializes a new instance of the class. + /// + public InlineResponse20025() + { + + } + /// /// Gets or Sets Data /// [DataMember(Name="data", EmitDefaultValue=false)] - public UserVariableRelationship Data { get; set; } + public UnitCategory Data { get; set; } /// diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20026.cs b/src/main/csharp/io/swagger/Model/InlineResponse20026.cs index 59a33f5..7b56974 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse20026.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse20026.cs @@ -16,12 +16,20 @@ namespace IO.Swagger.Model [DataContract] public class InlineResponse20026 : IEquatable { + /// + /// Initializes a new instance of the class. + /// + public InlineResponse20026() + { + + } + /// /// Gets or Sets Data /// [DataMember(Name="data", EmitDefaultValue=false)] - public UserVariable Data { get; set; } + public List Data { get; set; } /// @@ -82,7 +90,7 @@ public bool Equals(InlineResponse20026 other) ( this.Data == other.Data || this.Data != null && - this.Data.Equals(other.Data) + this.Data.SequenceEqual(other.Data) ) && ( this.Success == other.Success || diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20027.cs b/src/main/csharp/io/swagger/Model/InlineResponse20027.cs index abf6ebb..1cf33c4 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse20027.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse20027.cs @@ -16,12 +16,20 @@ namespace IO.Swagger.Model [DataContract] public class InlineResponse20027 : IEquatable { + /// + /// Initializes a new instance of the class. + /// + public InlineResponse20027() + { + + } + /// /// Gets or Sets Data /// [DataMember(Name="data", EmitDefaultValue=false)] - public List Data { get; set; } + public Unit Data { get; set; } /// @@ -82,7 +90,7 @@ public bool Equals(InlineResponse20027 other) ( this.Data == other.Data || this.Data != null && - this.Data.SequenceEqual(other.Data) + this.Data.Equals(other.Data) ) && ( this.Success == other.Success || diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20028.cs b/src/main/csharp/io/swagger/Model/InlineResponse20028.cs index 65f9004..4da501f 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse20028.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse20028.cs @@ -16,12 +16,20 @@ namespace IO.Swagger.Model [DataContract] public class InlineResponse20028 : IEquatable { + /// + /// Initializes a new instance of the class. + /// + public InlineResponse20028() + { + + } + /// /// Gets or Sets Data /// [DataMember(Name="data", EmitDefaultValue=false)] - public VariableCategory Data { get; set; } + public Update Data { get; set; } /// diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20029.cs b/src/main/csharp/io/swagger/Model/InlineResponse20029.cs index 224de64..3bc9af0 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse20029.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse20029.cs @@ -16,12 +16,20 @@ namespace IO.Swagger.Model [DataContract] public class InlineResponse20029 : IEquatable { + /// + /// Initializes a new instance of the class. + /// + public InlineResponse20029() + { + + } + /// /// Gets or Sets Data /// [DataMember(Name="data", EmitDefaultValue=false)] - public List Data { get; set; } + public UserVariableRelationship Data { get; set; } /// @@ -82,7 +90,7 @@ public bool Equals(InlineResponse20029 other) ( this.Data == other.Data || this.Data != null && - this.Data.SequenceEqual(other.Data) + this.Data.Equals(other.Data) ) && ( this.Success == other.Success || diff --git a/src/main/csharp/io/swagger/Model/InlineResponse2003.cs b/src/main/csharp/io/swagger/Model/InlineResponse2003.cs index cc03bee..78e576a 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse2003.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse2003.cs @@ -16,6 +16,14 @@ namespace IO.Swagger.Model [DataContract] public class InlineResponse2003 : IEquatable { + /// + /// Initializes a new instance of the class. + /// + public InlineResponse2003() + { + + } + /// /// Gets or Sets Data diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20030.cs b/src/main/csharp/io/swagger/Model/InlineResponse20030.cs index f407501..339a068 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse20030.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse20030.cs @@ -16,12 +16,20 @@ namespace IO.Swagger.Model [DataContract] public class InlineResponse20030 : IEquatable { + /// + /// Initializes a new instance of the class. + /// + public InlineResponse20030() + { + + } + /// /// Gets or Sets Data /// [DataMember(Name="data", EmitDefaultValue=false)] - public VariableUserSource Data { get; set; } + public UserVariable Data { get; set; } /// diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20031.cs b/src/main/csharp/io/swagger/Model/InlineResponse20031.cs index 4fda1b5..3a1407f 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse20031.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse20031.cs @@ -16,12 +16,20 @@ namespace IO.Swagger.Model [DataContract] public class InlineResponse20031 : IEquatable { + /// + /// Initializes a new instance of the class. + /// + public InlineResponse20031() + { + + } + /// /// Gets or Sets Data /// [DataMember(Name="data", EmitDefaultValue=false)] - public List Data { get; set; } + public List Data { get; set; } /// diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20032.cs b/src/main/csharp/io/swagger/Model/InlineResponse20032.cs index 10d72af..1768c7a 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse20032.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse20032.cs @@ -16,12 +16,20 @@ namespace IO.Swagger.Model [DataContract] public class InlineResponse20032 : IEquatable { + /// + /// Initializes a new instance of the class. + /// + public InlineResponse20032() + { + + } + /// /// Gets or Sets Data /// [DataMember(Name="data", EmitDefaultValue=false)] - public Variable Data { get; set; } + public VariableCategory Data { get; set; } /// diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20033.cs b/src/main/csharp/io/swagger/Model/InlineResponse20033.cs index 23e6cae..64f40f2 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse20033.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse20033.cs @@ -16,12 +16,20 @@ namespace IO.Swagger.Model [DataContract] public class InlineResponse20033 : IEquatable { + /// + /// Initializes a new instance of the class. + /// + public InlineResponse20033() + { + + } + /// /// Gets or Sets Data /// [DataMember(Name="data", EmitDefaultValue=false)] - public List Data { get; set; } + public VariableUserSource Data { get; set; } /// @@ -82,7 +90,7 @@ public bool Equals(InlineResponse20033 other) ( this.Data == other.Data || this.Data != null && - this.Data.SequenceEqual(other.Data) + this.Data.Equals(other.Data) ) && ( this.Success == other.Success || diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20034.cs b/src/main/csharp/io/swagger/Model/InlineResponse20034.cs index 8e0382d..b3c3491 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse20034.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse20034.cs @@ -16,12 +16,20 @@ namespace IO.Swagger.Model [DataContract] public class InlineResponse20034 : IEquatable { + /// + /// Initializes a new instance of the class. + /// + public InlineResponse20034() + { + + } + /// /// Gets or Sets Data /// [DataMember(Name="data", EmitDefaultValue=false)] - public Vote Data { get; set; } + public List Data { get; set; } /// @@ -82,7 +90,7 @@ public bool Equals(InlineResponse20034 other) ( this.Data == other.Data || this.Data != null && - this.Data.Equals(other.Data) + this.Data.SequenceEqual(other.Data) ) && ( this.Success == other.Success || diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20035.cs b/src/main/csharp/io/swagger/Model/InlineResponse20035.cs new file mode 100644 index 0000000..74af342 --- /dev/null +++ b/src/main/csharp/io/swagger/Model/InlineResponse20035.cs @@ -0,0 +1,125 @@ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Collections; +using System.Collections.Generic; +using System.Runtime.Serialization; +using Newtonsoft.Json; + +namespace IO.Swagger.Model +{ + + /// + /// + /// + [DataContract] + public class InlineResponse20035 : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + public InlineResponse20035() + { + + } + + + /// + /// Gets or Sets Data + /// + [DataMember(Name="data", EmitDefaultValue=false)] + public Variable Data { get; set; } + + + /// + /// Gets or Sets Success + /// + [DataMember(Name="success", EmitDefaultValue=false)] + public bool? Success { get; set; } + + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class InlineResponse20035 {\n"); + sb.Append(" Data: ").Append(Data).Append("\n"); + sb.Append(" Success: ").Append(Success).Append("\n"); + + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as InlineResponse20035); + } + + /// + /// Returns true if InlineResponse20035 instances are equal + /// + /// Instance of InlineResponse20035 to be compared + /// Boolean + public bool Equals(InlineResponse20035 other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; + + return + ( + this.Data == other.Data || + this.Data != null && + this.Data.Equals(other.Data) + ) && + ( + this.Success == other.Success || + this.Success != null && + this.Success.Equals(other.Success) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + + if (this.Data != null) + hash = hash * 57 + this.Data.GetHashCode(); + + if (this.Success != null) + hash = hash * 57 + this.Success.GetHashCode(); + + return hash; + } + } + + } +} diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20036.cs b/src/main/csharp/io/swagger/Model/InlineResponse20036.cs new file mode 100644 index 0000000..31e5af3 --- /dev/null +++ b/src/main/csharp/io/swagger/Model/InlineResponse20036.cs @@ -0,0 +1,125 @@ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Collections; +using System.Collections.Generic; +using System.Runtime.Serialization; +using Newtonsoft.Json; + +namespace IO.Swagger.Model +{ + + /// + /// + /// + [DataContract] + public class InlineResponse20036 : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + public InlineResponse20036() + { + + } + + + /// + /// Gets or Sets Data + /// + [DataMember(Name="data", EmitDefaultValue=false)] + public Vote Data { get; set; } + + + /// + /// Gets or Sets Success + /// + [DataMember(Name="success", EmitDefaultValue=false)] + public bool? Success { get; set; } + + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class InlineResponse20036 {\n"); + sb.Append(" Data: ").Append(Data).Append("\n"); + sb.Append(" Success: ").Append(Success).Append("\n"); + + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as InlineResponse20036); + } + + /// + /// Returns true if InlineResponse20036 instances are equal + /// + /// Instance of InlineResponse20036 to be compared + /// Boolean + public bool Equals(InlineResponse20036 other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; + + return + ( + this.Data == other.Data || + this.Data != null && + this.Data.Equals(other.Data) + ) && + ( + this.Success == other.Success || + this.Success != null && + this.Success.Equals(other.Success) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + + if (this.Data != null) + hash = hash * 57 + this.Data.GetHashCode(); + + if (this.Success != null) + hash = hash * 57 + this.Success.GetHashCode(); + + return hash; + } + } + + } +} diff --git a/src/main/csharp/io/swagger/Model/InlineResponse2004.cs b/src/main/csharp/io/swagger/Model/InlineResponse2004.cs index c450ac9..0b5958d 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse2004.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse2004.cs @@ -16,6 +16,14 @@ namespace IO.Swagger.Model [DataContract] public class InlineResponse2004 : IEquatable { + /// + /// Initializes a new instance of the class. + /// + public InlineResponse2004() + { + + } + /// /// Gets or Sets Data diff --git a/src/main/csharp/io/swagger/Model/InlineResponse2005.cs b/src/main/csharp/io/swagger/Model/InlineResponse2005.cs index 9221a14..de66cee 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse2005.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse2005.cs @@ -16,6 +16,14 @@ namespace IO.Swagger.Model [DataContract] public class InlineResponse2005 : IEquatable { + /// + /// Initializes a new instance of the class. + /// + public InlineResponse2005() + { + + } + /// /// Gets or Sets Data diff --git a/src/main/csharp/io/swagger/Model/InlineResponse2006.cs b/src/main/csharp/io/swagger/Model/InlineResponse2006.cs index 2cf3154..dad6a10 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse2006.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse2006.cs @@ -16,6 +16,14 @@ namespace IO.Swagger.Model [DataContract] public class InlineResponse2006 : IEquatable { + /// + /// Initializes a new instance of the class. + /// + public InlineResponse2006() + { + + } + /// /// Gets or Sets Data diff --git a/src/main/csharp/io/swagger/Model/InlineResponse2007.cs b/src/main/csharp/io/swagger/Model/InlineResponse2007.cs index d19799d..7a9ced7 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse2007.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse2007.cs @@ -16,6 +16,14 @@ namespace IO.Swagger.Model [DataContract] public class InlineResponse2007 : IEquatable { + /// + /// Initializes a new instance of the class. + /// + public InlineResponse2007() + { + + } + /// /// Gets or Sets Data diff --git a/src/main/csharp/io/swagger/Model/InlineResponse2008.cs b/src/main/csharp/io/swagger/Model/InlineResponse2008.cs index 28775cb..82d1efd 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse2008.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse2008.cs @@ -16,6 +16,14 @@ namespace IO.Swagger.Model [DataContract] public class InlineResponse2008 : IEquatable { + /// + /// Initializes a new instance of the class. + /// + public InlineResponse2008() + { + + } + /// /// Gets or Sets Data diff --git a/src/main/csharp/io/swagger/Model/InlineResponse2009.cs b/src/main/csharp/io/swagger/Model/InlineResponse2009.cs index ce3c4c7..db1d2b3 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse2009.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse2009.cs @@ -16,6 +16,14 @@ namespace IO.Swagger.Model [DataContract] public class InlineResponse2009 : IEquatable { + /// + /// Initializes a new instance of the class. + /// + public InlineResponse2009() + { + + } + /// /// Gets or Sets Data diff --git a/src/main/csharp/io/swagger/Model/Measurement.cs b/src/main/csharp/io/swagger/Model/Measurement.cs index ed35bfb..ef90eac 100644 --- a/src/main/csharp/io/swagger/Model/Measurement.cs +++ b/src/main/csharp/io/swagger/Model/Measurement.cs @@ -16,6 +16,14 @@ namespace IO.Swagger.Model [DataContract] public class Measurement : IEquatable { + /// + /// Initializes a new instance of the class. + /// + public Measurement() + { + + } + /// /// id diff --git a/src/main/csharp/io/swagger/Model/MeasurementExport.cs b/src/main/csharp/io/swagger/Model/MeasurementExport.cs index ccdb8e4..809a67f 100644 --- a/src/main/csharp/io/swagger/Model/MeasurementExport.cs +++ b/src/main/csharp/io/swagger/Model/MeasurementExport.cs @@ -16,6 +16,14 @@ namespace IO.Swagger.Model [DataContract] public class MeasurementExport : IEquatable { + /// + /// Initializes a new instance of the class. + /// + public MeasurementExport() + { + + } + /// /// id diff --git a/src/main/csharp/io/swagger/Model/MeasurementPost.cs b/src/main/csharp/io/swagger/Model/MeasurementPost.cs index 08436e7..cea3f30 100644 --- a/src/main/csharp/io/swagger/Model/MeasurementPost.cs +++ b/src/main/csharp/io/swagger/Model/MeasurementPost.cs @@ -16,6 +16,14 @@ namespace IO.Swagger.Model [DataContract] public class MeasurementPost : IEquatable { + /// + /// Initializes a new instance of the class. + /// + public MeasurementPost() + { + + } + /// /// ID of the variable for the measurement as obtained from the GET variables endpoint diff --git a/src/main/csharp/io/swagger/Model/MeasurementValue.cs b/src/main/csharp/io/swagger/Model/MeasurementValue.cs index da2e50d..4293137 100644 --- a/src/main/csharp/io/swagger/Model/MeasurementValue.cs +++ b/src/main/csharp/io/swagger/Model/MeasurementValue.cs @@ -16,6 +16,14 @@ namespace IO.Swagger.Model [DataContract] public class MeasurementValue : IEquatable { + /// + /// Initializes a new instance of the class. + /// + public MeasurementValue() + { + + } + /// /// When the measurement event occurred . Use ISO 8601 datetime format diff --git a/src/main/csharp/io/swagger/Model/Source.cs b/src/main/csharp/io/swagger/Model/Source.cs index 54f86b5..8939793 100644 --- a/src/main/csharp/io/swagger/Model/Source.cs +++ b/src/main/csharp/io/swagger/Model/Source.cs @@ -16,6 +16,14 @@ namespace IO.Swagger.Model [DataContract] public class Source : IEquatable { + /// + /// Initializes a new instance of the class. + /// + public Source() + { + + } + /// /// id diff --git a/src/main/csharp/io/swagger/Model/TrackingReminder.cs b/src/main/csharp/io/swagger/Model/TrackingReminder.cs new file mode 100644 index 0000000..bd2ddca --- /dev/null +++ b/src/main/csharp/io/swagger/Model/TrackingReminder.cs @@ -0,0 +1,382 @@ +using System; +using System.Linq; +using System.IO; +using System.Text; +using System.Collections; +using System.Collections.Generic; +using System.Runtime.Serialization; +using Newtonsoft.Json; + +namespace IO.Swagger.Model +{ + + /// + /// + /// + [DataContract] + public class TrackingReminder : IEquatable + { + /// + /// Initializes a new instance of the class. + /// + public TrackingReminder() + { + + } + + + /// + /// id + /// + /// id + [DataMember(Name="id", EmitDefaultValue=false)] + public int? Id { get; set; } + + + /// + /// client_id + /// + /// client_id + [DataMember(Name="client_id", EmitDefaultValue=false)] + public string ClientId { get; set; } + + + /// + /// ID of User + /// + /// ID of User + [DataMember(Name="user_id", EmitDefaultValue=false)] + public int? UserId { get; set; } + + + /// + /// Id for the variable to be tracked + /// + /// Id for the variable to be tracked + [DataMember(Name="variable_id", EmitDefaultValue=false)] + public int? VariableId { get; set; } + + + /// + /// Default value to use for the measurement when tracking + /// + /// Default value to use for the measurement when tracking + [DataMember(Name="default_value", EmitDefaultValue=false)] + public float? DefaultValue { get; set; } + + + /// + /// Earliest time of day at which reminders should appear + /// + /// Earliest time of day at which reminders should appear + [DataMember(Name="reminder_start_time", EmitDefaultValue=false)] + public string ReminderStartTime { get; set; } + + + /// + /// Latest time of day at which reminders should appear + /// + /// Latest time of day at which reminders should appear + [DataMember(Name="reminder_end_time", EmitDefaultValue=false)] + public string ReminderEndTime { get; set; } + + + /// + /// String identifier for the sound to accompany the reminder + /// + /// String identifier for the sound to accompany the reminder + [DataMember(Name="reminder_sound", EmitDefaultValue=false)] + public string ReminderSound { get; set; } + + + /// + /// Number of seconds between one reminder and the next + /// + /// Number of seconds between one reminder and the next + [DataMember(Name="reminder_frequency", EmitDefaultValue=false)] + public int? ReminderFrequency { get; set; } + + + /// + /// True if the reminders should appear as a popup notification + /// + /// True if the reminders should appear as a popup notification + [DataMember(Name="pop_up", EmitDefaultValue=false)] + public bool? PopUp { get; set; } + + + /// + /// True if the reminders should be delivered via SMS + /// + /// True if the reminders should be delivered via SMS + [DataMember(Name="sms", EmitDefaultValue=false)] + public bool? Sms { get; set; } + + + /// + /// True if the reminders should be delivered via email + /// + /// True if the reminders should be delivered via email + [DataMember(Name="email", EmitDefaultValue=false)] + public bool? Email { get; set; } + + + /// + /// True if the reminders should appear in the notification bar + /// + /// True if the reminders should appear in the notification bar + [DataMember(Name="notification_bar", EmitDefaultValue=false)] + public bool? NotificationBar { get; set; } + + + /// + /// ISO 8601 timestamp for the last time a reminder was sent + /// + /// ISO 8601 timestamp for the last time a reminder was sent + [DataMember(Name="last_reminded", EmitDefaultValue=false)] + public DateTime? LastReminded { get; set; } + + + /// + /// ISO 8601 timestamp for the last time a measurement was received for this user and variable + /// + /// ISO 8601 timestamp for the last time a measurement was received for this user and variable + [DataMember(Name="last_tracked", EmitDefaultValue=false)] + public DateTime? LastTracked { get; set; } + + + /// + /// When the record was first created. Use ISO 8601 datetime format + /// + /// When the record was first created. Use ISO 8601 datetime format + [DataMember(Name="created_at", EmitDefaultValue=false)] + public DateTime? CreatedAt { get; set; } + + + /// + /// When the record in the database was last updated. Use ISO 8601 datetime format + /// + /// When the record in the database was last updated. Use ISO 8601 datetime format + [DataMember(Name="updated_at", EmitDefaultValue=false)] + public DateTime? UpdatedAt { get; set; } + + + + /// + /// Returns the string presentation of the object + /// + /// String presentation of the object + public override string ToString() + { + var sb = new StringBuilder(); + sb.Append("class TrackingReminder {\n"); + sb.Append(" Id: ").Append(Id).Append("\n"); + sb.Append(" ClientId: ").Append(ClientId).Append("\n"); + sb.Append(" UserId: ").Append(UserId).Append("\n"); + sb.Append(" VariableId: ").Append(VariableId).Append("\n"); + sb.Append(" DefaultValue: ").Append(DefaultValue).Append("\n"); + sb.Append(" ReminderStartTime: ").Append(ReminderStartTime).Append("\n"); + sb.Append(" ReminderEndTime: ").Append(ReminderEndTime).Append("\n"); + sb.Append(" ReminderSound: ").Append(ReminderSound).Append("\n"); + sb.Append(" ReminderFrequency: ").Append(ReminderFrequency).Append("\n"); + sb.Append(" PopUp: ").Append(PopUp).Append("\n"); + sb.Append(" Sms: ").Append(Sms).Append("\n"); + sb.Append(" Email: ").Append(Email).Append("\n"); + sb.Append(" NotificationBar: ").Append(NotificationBar).Append("\n"); + sb.Append(" LastReminded: ").Append(LastReminded).Append("\n"); + sb.Append(" LastTracked: ").Append(LastTracked).Append("\n"); + sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); + sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); + + sb.Append("}\n"); + return sb.ToString(); + } + + /// + /// Returns the JSON string presentation of the object + /// + /// JSON string presentation of the object + public string ToJson() + { + return JsonConvert.SerializeObject(this, Formatting.Indented); + } + + /// + /// Returns true if objects are equal + /// + /// Object to be compared + /// Boolean + public override bool Equals(object obj) + { + // credit: http://stackoverflow.com/a/10454552/677735 + return this.Equals(obj as TrackingReminder); + } + + /// + /// Returns true if TrackingReminder instances are equal + /// + /// Instance of TrackingReminder to be compared + /// Boolean + public bool Equals(TrackingReminder other) + { + // credit: http://stackoverflow.com/a/10454552/677735 + if (other == null) + return false; + + return + ( + this.Id == other.Id || + this.Id != null && + this.Id.Equals(other.Id) + ) && + ( + this.ClientId == other.ClientId || + this.ClientId != null && + this.ClientId.Equals(other.ClientId) + ) && + ( + this.UserId == other.UserId || + this.UserId != null && + this.UserId.Equals(other.UserId) + ) && + ( + this.VariableId == other.VariableId || + this.VariableId != null && + this.VariableId.Equals(other.VariableId) + ) && + ( + this.DefaultValue == other.DefaultValue || + this.DefaultValue != null && + this.DefaultValue.Equals(other.DefaultValue) + ) && + ( + this.ReminderStartTime == other.ReminderStartTime || + this.ReminderStartTime != null && + this.ReminderStartTime.Equals(other.ReminderStartTime) + ) && + ( + this.ReminderEndTime == other.ReminderEndTime || + this.ReminderEndTime != null && + this.ReminderEndTime.Equals(other.ReminderEndTime) + ) && + ( + this.ReminderSound == other.ReminderSound || + this.ReminderSound != null && + this.ReminderSound.Equals(other.ReminderSound) + ) && + ( + this.ReminderFrequency == other.ReminderFrequency || + this.ReminderFrequency != null && + this.ReminderFrequency.Equals(other.ReminderFrequency) + ) && + ( + this.PopUp == other.PopUp || + this.PopUp != null && + this.PopUp.Equals(other.PopUp) + ) && + ( + this.Sms == other.Sms || + this.Sms != null && + this.Sms.Equals(other.Sms) + ) && + ( + this.Email == other.Email || + this.Email != null && + this.Email.Equals(other.Email) + ) && + ( + this.NotificationBar == other.NotificationBar || + this.NotificationBar != null && + this.NotificationBar.Equals(other.NotificationBar) + ) && + ( + this.LastReminded == other.LastReminded || + this.LastReminded != null && + this.LastReminded.Equals(other.LastReminded) + ) && + ( + this.LastTracked == other.LastTracked || + this.LastTracked != null && + this.LastTracked.Equals(other.LastTracked) + ) && + ( + this.CreatedAt == other.CreatedAt || + this.CreatedAt != null && + this.CreatedAt.Equals(other.CreatedAt) + ) && + ( + this.UpdatedAt == other.UpdatedAt || + this.UpdatedAt != null && + this.UpdatedAt.Equals(other.UpdatedAt) + ); + } + + /// + /// Gets the hash code + /// + /// Hash code + public override int GetHashCode() + { + // credit: http://stackoverflow.com/a/263416/677735 + unchecked // Overflow is fine, just wrap + { + int hash = 41; + // Suitable nullity checks etc, of course :) + + if (this.Id != null) + hash = hash * 57 + this.Id.GetHashCode(); + + if (this.ClientId != null) + hash = hash * 57 + this.ClientId.GetHashCode(); + + if (this.UserId != null) + hash = hash * 57 + this.UserId.GetHashCode(); + + if (this.VariableId != null) + hash = hash * 57 + this.VariableId.GetHashCode(); + + if (this.DefaultValue != null) + hash = hash * 57 + this.DefaultValue.GetHashCode(); + + if (this.ReminderStartTime != null) + hash = hash * 57 + this.ReminderStartTime.GetHashCode(); + + if (this.ReminderEndTime != null) + hash = hash * 57 + this.ReminderEndTime.GetHashCode(); + + if (this.ReminderSound != null) + hash = hash * 57 + this.ReminderSound.GetHashCode(); + + if (this.ReminderFrequency != null) + hash = hash * 57 + this.ReminderFrequency.GetHashCode(); + + if (this.PopUp != null) + hash = hash * 57 + this.PopUp.GetHashCode(); + + if (this.Sms != null) + hash = hash * 57 + this.Sms.GetHashCode(); + + if (this.Email != null) + hash = hash * 57 + this.Email.GetHashCode(); + + if (this.NotificationBar != null) + hash = hash * 57 + this.NotificationBar.GetHashCode(); + + if (this.LastReminded != null) + hash = hash * 57 + this.LastReminded.GetHashCode(); + + if (this.LastTracked != null) + hash = hash * 57 + this.LastTracked.GetHashCode(); + + if (this.CreatedAt != null) + hash = hash * 57 + this.CreatedAt.GetHashCode(); + + if (this.UpdatedAt != null) + hash = hash * 57 + this.UpdatedAt.GetHashCode(); + + return hash; + } + } + + } +} diff --git a/src/main/csharp/io/swagger/Model/Unit.cs b/src/main/csharp/io/swagger/Model/Unit.cs index 294ed45..3e588dd 100644 --- a/src/main/csharp/io/swagger/Model/Unit.cs +++ b/src/main/csharp/io/swagger/Model/Unit.cs @@ -16,6 +16,14 @@ namespace IO.Swagger.Model [DataContract] public class Unit : IEquatable { + /// + /// Initializes a new instance of the class. + /// + public Unit() + { + + } + /// /// id diff --git a/src/main/csharp/io/swagger/Model/UnitCategory.cs b/src/main/csharp/io/swagger/Model/UnitCategory.cs index 7904519..6920bee 100644 --- a/src/main/csharp/io/swagger/Model/UnitCategory.cs +++ b/src/main/csharp/io/swagger/Model/UnitCategory.cs @@ -16,6 +16,14 @@ namespace IO.Swagger.Model [DataContract] public class UnitCategory : IEquatable { + /// + /// Initializes a new instance of the class. + /// + public UnitCategory() + { + + } + /// /// id diff --git a/src/main/csharp/io/swagger/Model/UnitConversion.cs b/src/main/csharp/io/swagger/Model/UnitConversion.cs index 741e478..99c9649 100644 --- a/src/main/csharp/io/swagger/Model/UnitConversion.cs +++ b/src/main/csharp/io/swagger/Model/UnitConversion.cs @@ -16,6 +16,14 @@ namespace IO.Swagger.Model [DataContract] public class UnitConversion : IEquatable { + /// + /// Initializes a new instance of the class. + /// + public UnitConversion() + { + + } + /// /// unit_id diff --git a/src/main/csharp/io/swagger/Model/Update.cs b/src/main/csharp/io/swagger/Model/Update.cs index aafff46..c59d573 100644 --- a/src/main/csharp/io/swagger/Model/Update.cs +++ b/src/main/csharp/io/swagger/Model/Update.cs @@ -16,6 +16,14 @@ namespace IO.Swagger.Model [DataContract] public class Update : IEquatable { + /// + /// Initializes a new instance of the class. + /// + public Update() + { + + } + /// /// id diff --git a/src/main/csharp/io/swagger/Model/UserVariable.cs b/src/main/csharp/io/swagger/Model/UserVariable.cs index 6e38764..806c92b 100644 --- a/src/main/csharp/io/swagger/Model/UserVariable.cs +++ b/src/main/csharp/io/swagger/Model/UserVariable.cs @@ -16,6 +16,14 @@ namespace IO.Swagger.Model [DataContract] public class UserVariable : IEquatable { + /// + /// Initializes a new instance of the class. + /// + public UserVariable() + { + + } + /// /// ID of the parent variable if this variable has any parent @@ -361,6 +369,22 @@ public class UserVariable : IEquatable public string Location { get; set; } + /// + /// Earliest measurement start_time to be used in analysis. Use ISO 8601 datetime format + /// + /// Earliest measurement start_time to be used in analysis. Use ISO 8601 datetime format + [DataMember(Name="experiment_start_time", EmitDefaultValue=false)] + public DateTime? ExperimentStartTime { get; set; } + + + /// + /// Latest measurement start_time to be used in analysis. Use ISO 8601 datetime format + /// + /// Latest measurement start_time to be used in analysis. Use ISO 8601 datetime format + [DataMember(Name="experiment_end_time", EmitDefaultValue=false)] + public DateTime? ExperimentEndTime { get; set; } + + /// /// When the record was first created. Use ISO 8601 datetime format /// @@ -493,6 +517,8 @@ public override string ToString() sb.Append(" Latitude: ").Append(Latitude).Append("\n"); sb.Append(" Longitude: ").Append(Longitude).Append("\n"); sb.Append(" Location: ").Append(Location).Append("\n"); + sb.Append(" ExperimentStartTime: ").Append(ExperimentStartTime).Append("\n"); + sb.Append(" ExperimentEndTime: ").Append(ExperimentEndTime).Append("\n"); sb.Append(" CreatedAt: ").Append(CreatedAt).Append("\n"); sb.Append(" UpdatedAt: ").Append(UpdatedAt).Append("\n"); sb.Append(" Outcome: ").Append(Outcome).Append("\n"); @@ -755,6 +781,16 @@ public bool Equals(UserVariable other) this.Location != null && this.Location.Equals(other.Location) ) && + ( + this.ExperimentStartTime == other.ExperimentStartTime || + this.ExperimentStartTime != null && + this.ExperimentStartTime.Equals(other.ExperimentStartTime) + ) && + ( + this.ExperimentEndTime == other.ExperimentEndTime || + this.ExperimentEndTime != null && + this.ExperimentEndTime.Equals(other.ExperimentEndTime) + ) && ( this.CreatedAt == other.CreatedAt || this.CreatedAt != null && @@ -948,6 +984,12 @@ public override int GetHashCode() if (this.Location != null) hash = hash * 57 + this.Location.GetHashCode(); + if (this.ExperimentStartTime != null) + hash = hash * 57 + this.ExperimentStartTime.GetHashCode(); + + if (this.ExperimentEndTime != null) + hash = hash * 57 + this.ExperimentEndTime.GetHashCode(); + if (this.CreatedAt != null) hash = hash * 57 + this.CreatedAt.GetHashCode(); diff --git a/src/main/csharp/io/swagger/Model/UserVariableRelationship.cs b/src/main/csharp/io/swagger/Model/UserVariableRelationship.cs index 81731c3..1cad2ee 100644 --- a/src/main/csharp/io/swagger/Model/UserVariableRelationship.cs +++ b/src/main/csharp/io/swagger/Model/UserVariableRelationship.cs @@ -16,6 +16,14 @@ namespace IO.Swagger.Model [DataContract] public class UserVariableRelationship : IEquatable { + /// + /// Initializes a new instance of the class. + /// + public UserVariableRelationship() + { + + } + /// /// id diff --git a/src/main/csharp/io/swagger/Model/Variable.cs b/src/main/csharp/io/swagger/Model/Variable.cs index 60af11e..e7652fa 100644 --- a/src/main/csharp/io/swagger/Model/Variable.cs +++ b/src/main/csharp/io/swagger/Model/Variable.cs @@ -16,6 +16,14 @@ namespace IO.Swagger.Model [DataContract] public class Variable : IEquatable { + /// + /// Initializes a new instance of the class. + /// + public Variable() + { + + } + /// /// id diff --git a/src/main/csharp/io/swagger/Model/VariableCategory.cs b/src/main/csharp/io/swagger/Model/VariableCategory.cs index 8d1423c..7b66363 100644 --- a/src/main/csharp/io/swagger/Model/VariableCategory.cs +++ b/src/main/csharp/io/swagger/Model/VariableCategory.cs @@ -16,6 +16,14 @@ namespace IO.Swagger.Model [DataContract] public class VariableCategory : IEquatable { + /// + /// Initializes a new instance of the class. + /// + public VariableCategory() + { + + } + /// /// id diff --git a/src/main/csharp/io/swagger/Model/VariableUserSource.cs b/src/main/csharp/io/swagger/Model/VariableUserSource.cs index ec3d667..bc84614 100644 --- a/src/main/csharp/io/swagger/Model/VariableUserSource.cs +++ b/src/main/csharp/io/swagger/Model/VariableUserSource.cs @@ -16,6 +16,14 @@ namespace IO.Swagger.Model [DataContract] public class VariableUserSource : IEquatable { + /// + /// Initializes a new instance of the class. + /// + public VariableUserSource() + { + + } + /// /// ID of User diff --git a/src/main/csharp/io/swagger/Model/Vote.cs b/src/main/csharp/io/swagger/Model/Vote.cs index a885752..da39e90 100644 --- a/src/main/csharp/io/swagger/Model/Vote.cs +++ b/src/main/csharp/io/swagger/Model/Vote.cs @@ -16,6 +16,14 @@ namespace IO.Swagger.Model [DataContract] public class Vote : IEquatable { + /// + /// Initializes a new instance of the class. + /// + public Vote() + { + + } + /// /// id diff --git a/src/main/csharp/io/swagger/client/ApiClient.cs b/src/main/csharp/io/swagger/client/ApiClient.cs index 38cb9cf..dca44c0 100644 --- a/src/main/csharp/io/swagger/client/ApiClient.cs +++ b/src/main/csharp/io/swagger/client/ApiClient.cs @@ -19,23 +19,56 @@ namespace IO.Swagger.Client public class ApiClient { /// - /// Initializes a new instance of the class. + /// Initializes a new instance of the class + /// with default configuration and base path (https://app.quantimo.do/api/v2). + /// + public ApiClient() + { + Configuration = Configuration.Default; + RestClient = new RestClient("https://app.quantimo.do/api/v2"); + } + + /// + /// Initializes a new instance of the class + /// with default base path (https://app.quantimo.do/api/v2). + /// + /// An instance of Configuration. + public ApiClient(Configuration config = null) + { + if (config == null) + Configuration = Configuration.Default; + else + Configuration = config; + + RestClient = new RestClient("https://app.quantimo.do/api/v2"); + } + + /// + /// Initializes a new instance of the class + /// with default configuration. /// /// The base path. - public ApiClient(String basePath="https://app.quantimo.do/api/v2") + public ApiClient(String basePath = "https://app.quantimo.do/api/v2") { if (String.IsNullOrEmpty(basePath)) throw new ArgumentException("basePath cannot be empty"); RestClient = new RestClient(basePath); + Configuration = Configuration.Default; } /// /// Gets or sets the default API client for making HTTP calls. /// /// The default API client. - public static ApiClient Default = new ApiClient(); + public static ApiClient Default = new ApiClient(Configuration.Default); + /// + /// Gets or sets the Configuration. + /// + /// An instance of the Configuration. + public Configuration Configuration { get; set; } + /// /// Gets or sets the RestClient. /// @@ -147,7 +180,7 @@ public FileParameter ParameterToFile(string name, Stream stream) } /// - /// If parameter is DateTime, output in ISO8601 format. + /// If parameter is DateTime, output in a formatted string (default ISO 8601), customizable with Configuration.DateTime. /// If parameter is a list, join the list with ",". /// Otherwise just return the string. /// @@ -156,16 +189,21 @@ public FileParameter ParameterToFile(string name, Stream stream) public string ParameterToString(object obj) { if (obj is DateTime) - return ((DateTime)obj).ToString ("u"); + // Return a formatted date string - Can be customized with Configuration.DateTimeFormat + // Defaults to an ISO 8601, using the known as a Round-trip date/time pattern ("o") + // https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx#Anchor_8 + // For example: 2009-06-15T13:45:30.0000000 + return ((DateTime)obj).ToString (Configuration.DateTimeFormat); else if (obj is IList) { - string flattenString = ""; - string separator = ","; + var flattenedString = new StringBuilder(); foreach (var param in (IList)obj) { - flattenString += param.ToString() + separator; + if (flattenedString.Length > 0) + flattenedString.Append(","); + flattenedString.Append(param); } - return flattenString.Remove(flattenString.Length - 1);; + return flattenedString.ToString(); } else return Convert.ToString (obj); @@ -194,13 +232,16 @@ public object Deserialize(IRestResponse response, Type type) var filePath = String.IsNullOrEmpty(Configuration.TempFolderPath) ? Path.GetTempPath() : Configuration.TempFolderPath; - var regex = new Regex(@"Content-Disposition:.*filename=['""]?([^'""\s]+)['""]?$"); - var match = regex.Match(headers.ToString()); - if (match.Success) + var regex = new Regex(@"Content-Disposition=.*filename=['""]?([^'""\s]+)['""]?$"); + foreach (var header in headers) { - string fileName = filePath + match.Value.Replace("\"", "").Replace("'", ""); - File.WriteAllBytes(fileName, data); - return new FileStream(fileName, FileMode.Open); + var match = regex.Match(header.ToString()); + if (match.Success) + { + string fileName = filePath + match.Groups[1].Value.Replace("\"", "").Replace("'", ""); + File.WriteAllBytes(fileName, data); + return new FileStream(fileName, FileMode.Open); + } } } var stream = new MemoryStream(data); diff --git a/src/main/csharp/io/swagger/client/Configuration.cs b/src/main/csharp/io/swagger/client/Configuration.cs index 6affec1..882f1f0 100644 --- a/src/main/csharp/io/swagger/client/Configuration.cs +++ b/src/main/csharp/io/swagger/client/Configuration.cs @@ -12,11 +12,56 @@ namespace IO.Swagger.Client /// public class Configuration { + /// + /// Initializes a new instance of the Configuration class with different settings + /// + /// Api client + /// Dictionary of default HTTP header + /// Username + /// Password + /// accessToken + /// Dictionary of API key + /// Dictionary of API key prefix + /// Temp folder path + /// DateTime format string + public Configuration(ApiClient apiClient = null, + Dictionary defaultHeader = null, + string username = null, + string password = null, + string accessToken = null, + Dictionary apiKey = null, + Dictionary apiKeyPrefix = null, + string tempFolderPath = null, + string dateTimeFormat = null, + int timeout = 100000 + ) + { + if (apiClient == null) + ApiClient = ApiClient.Default; + else + ApiClient = apiClient; + + Username = username; + Password = password; + AccessToken = accessToken; + + if (defaultHeader != null) + DefaultHeader = defaultHeader; + if (apiKey != null) + ApiKey = apiKey; + if (apiKeyPrefix != null) + ApiKeyPrefix = apiKeyPrefix; + + TempFolderPath = tempFolderPath; + DateTimeFormat = dateTimeFormat; + Timeout = timeout; + } + /// /// Initializes a new instance of the Configuration class. /// /// Api client. - public Configuration(ApiClient apiClient=null) + public Configuration(ApiClient apiClient) { if (apiClient == null) ApiClient = ApiClient.Default; @@ -36,20 +81,39 @@ public Configuration(ApiClient apiClient=null) /// Configuration. public static Configuration Default = new Configuration(); + /// + /// Gets or sets the HTTP timeout (milliseconds) of ApiClient. Default to 100000 milliseconds. + /// + /// Timeout. + public int Timeout + { + get { return ApiClient.RestClient.Timeout; } + + set + { + ApiClient.RestClient.Timeout = value; + } + } + /// /// Gets or sets the default API client for making HTTP calls. /// /// The API client. public ApiClient ApiClient; - private readonly Dictionary _defaultHeaderMap = new Dictionary(); + private Dictionary _defaultHeaderMap = new Dictionary(); /// - /// Gets the default header. + /// Gets or sets the default header. /// public Dictionary DefaultHeader { get { return _defaultHeaderMap; } + + set + { + _defaultHeaderMap = value; + } } /// @@ -109,13 +173,13 @@ public string GetApiKeyWithPrefix (string apiKeyIdentifier) return apiKeyValue; } - private static string _tempFolderPath = Path.GetTempPath(); + private string _tempFolderPath = Path.GetTempPath(); /// /// Gets or sets the temporary folder path to store the files downloaded from the server. /// /// Folder path. - public static String TempFolderPath + public String TempFolderPath { get { return _tempFolderPath; } @@ -138,7 +202,40 @@ public static String TempFolderPath _tempFolderPath = value + Path.DirectorySeparatorChar; } } - + + private const string ISO8601_DATETIME_FORMAT = "o"; + + private string _dateTimeFormat = ISO8601_DATETIME_FORMAT; + + /// + /// Gets or sets the the date time format used when serializing in the ApiClient + /// By default, it's set to ISO 8601 - "o", for others see: + /// https://msdn.microsoft.com/en-us/library/az4se3k1(v=vs.110).aspx + /// and https://msdn.microsoft.com/en-us/library/8kb3ddd4(v=vs.110).aspx + /// No validation is done to ensure that the string you're providing is valid + /// + /// The DateTimeFormat string + public String DateTimeFormat + { + get + { + return _dateTimeFormat; + } + set + { + if (string.IsNullOrEmpty(value)) + { + // Never allow a blank or null string, go back to the default + _dateTimeFormat = ISO8601_DATETIME_FORMAT; + return; + } + + // Caution, no validation when you choose date time format other than ISO 8601 + // Take a look at the above links + _dateTimeFormat = value; + } + } + /// /// Returns a string with essential information for debugging. /// From 889b5b21c785b9146e6696d9de8b4f5c349bc58d Mon Sep 17 00:00:00 2001 From: "Mike P. Sinn" Date: Sat, 9 Jan 2016 06:27:59 -0600 Subject: [PATCH 3/3] SDK Update --- src/Properties/AssemblyInfo.cs | 33 +++++++++++++++++++ .../io/swagger/Model/AggregatedCorrelation.cs | 2 +- .../Model/CommonVariableRelationship.cs | 2 +- .../csharp/io/swagger/Model/Connection.cs | 2 +- src/main/csharp/io/swagger/Model/Connector.cs | 2 +- .../csharp/io/swagger/Model/Correlation.cs | 2 +- .../csharp/io/swagger/Model/Credential.cs | 2 +- .../io/swagger/Model/InlineResponse200.cs | 2 +- .../io/swagger/Model/InlineResponse2001.cs | 2 +- .../io/swagger/Model/InlineResponse20010.cs | 2 +- .../io/swagger/Model/InlineResponse20011.cs | 2 +- .../io/swagger/Model/InlineResponse20012.cs | 2 +- .../io/swagger/Model/InlineResponse20013.cs | 2 +- .../io/swagger/Model/InlineResponse20014.cs | 2 +- .../io/swagger/Model/InlineResponse20015.cs | 2 +- .../io/swagger/Model/InlineResponse20016.cs | 2 +- .../io/swagger/Model/InlineResponse20017.cs | 2 +- .../io/swagger/Model/InlineResponse20018.cs | 2 +- .../io/swagger/Model/InlineResponse20019.cs | 2 +- .../io/swagger/Model/InlineResponse2002.cs | 2 +- .../io/swagger/Model/InlineResponse20020.cs | 2 +- .../io/swagger/Model/InlineResponse20021.cs | 2 +- .../io/swagger/Model/InlineResponse20022.cs | 2 +- .../io/swagger/Model/InlineResponse20023.cs | 2 +- .../io/swagger/Model/InlineResponse20024.cs | 2 +- .../io/swagger/Model/InlineResponse20025.cs | 2 +- .../io/swagger/Model/InlineResponse20026.cs | 2 +- .../io/swagger/Model/InlineResponse20027.cs | 2 +- .../io/swagger/Model/InlineResponse20028.cs | 2 +- .../io/swagger/Model/InlineResponse20029.cs | 2 +- .../io/swagger/Model/InlineResponse2003.cs | 2 +- .../io/swagger/Model/InlineResponse20030.cs | 2 +- .../io/swagger/Model/InlineResponse20031.cs | 2 +- .../io/swagger/Model/InlineResponse20032.cs | 2 +- .../io/swagger/Model/InlineResponse20033.cs | 2 +- .../io/swagger/Model/InlineResponse20034.cs | 2 +- .../io/swagger/Model/InlineResponse20035.cs | 2 +- .../io/swagger/Model/InlineResponse20036.cs | 2 +- .../io/swagger/Model/InlineResponse2004.cs | 2 +- .../io/swagger/Model/InlineResponse2005.cs | 2 +- .../io/swagger/Model/InlineResponse2006.cs | 2 +- .../io/swagger/Model/InlineResponse2007.cs | 2 +- .../io/swagger/Model/InlineResponse2008.cs | 2 +- .../io/swagger/Model/InlineResponse2009.cs | 2 +- .../csharp/io/swagger/Model/Measurement.cs | 2 +- .../io/swagger/Model/MeasurementExport.cs | 2 +- .../io/swagger/Model/MeasurementPost.cs | 2 +- .../io/swagger/Model/MeasurementValue.cs | 2 +- src/main/csharp/io/swagger/Model/Source.cs | 2 +- .../io/swagger/Model/TrackingReminder.cs | 2 +- src/main/csharp/io/swagger/Model/Unit.cs | 2 +- .../csharp/io/swagger/Model/UnitCategory.cs | 2 +- .../csharp/io/swagger/Model/UnitConversion.cs | 2 +- src/main/csharp/io/swagger/Model/Update.cs | 2 +- .../csharp/io/swagger/Model/UserVariable.cs | 2 +- .../swagger/Model/UserVariableRelationship.cs | 2 +- src/main/csharp/io/swagger/Model/Variable.cs | 2 +- .../io/swagger/Model/VariableCategory.cs | 2 +- .../io/swagger/Model/VariableUserSource.cs | 2 +- src/main/csharp/io/swagger/Model/Vote.cs | 2 +- 60 files changed, 92 insertions(+), 59 deletions(-) create mode 100644 src/Properties/AssemblyInfo.cs diff --git a/src/Properties/AssemblyInfo.cs b/src/Properties/AssemblyInfo.cs new file mode 100644 index 0000000..1de9edb --- /dev/null +++ b/src/Properties/AssemblyInfo.cs @@ -0,0 +1,33 @@ +using System.Reflection; +using System.Runtime.InteropServices; +using System.Windows; + +// General Information about an assembly is controlled through the following +// set of attributes. Change these attribute values to modify the information +// associated with an assembly. +[assembly: AssemblyTitle("Swagger Library")] +[assembly: AssemblyDescription("A library generated from a Swagger doc")] +[assembly: AssemblyConfiguration("")] +[assembly: AssemblyCompany("Swagger")] +[assembly: AssemblyProduct("SwaggerLibrary")] +[assembly: AssemblyCopyright("No Copyright")] +[assembly: AssemblyTrademark("")] +[assembly: AssemblyCulture("")] + +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from +// COM, set the ComVisible attribute to true on that type. +[assembly: ComVisible(false)] + +// Version information for an assembly consists of the following four values: +// +// Major Version +// Minor Version +// Build Number +// Revision +// +// You can specify all the values or you can default the Build and Revision Numbers +// by using the '*' as shown below: +// [assembly: AssemblyVersion("1.0.*")] +[assembly: AssemblyVersion("1.0.0")] +[assembly: AssemblyFileVersion("1.0.0")] diff --git a/src/main/csharp/io/swagger/Model/AggregatedCorrelation.cs b/src/main/csharp/io/swagger/Model/AggregatedCorrelation.cs index fc26f58..a772936 100644 --- a/src/main/csharp/io/swagger/Model/AggregatedCorrelation.cs +++ b/src/main/csharp/io/swagger/Model/AggregatedCorrelation.cs @@ -14,7 +14,7 @@ namespace IO.Swagger.Model /// /// [DataContract] - public class AggregatedCorrelation : IEquatable + public class AggregatedCorrelation : IEquatable { /// /// Initializes a new instance of the class. diff --git a/src/main/csharp/io/swagger/Model/CommonVariableRelationship.cs b/src/main/csharp/io/swagger/Model/CommonVariableRelationship.cs index 1152b0e..39cbfdf 100644 --- a/src/main/csharp/io/swagger/Model/CommonVariableRelationship.cs +++ b/src/main/csharp/io/swagger/Model/CommonVariableRelationship.cs @@ -14,7 +14,7 @@ namespace IO.Swagger.Model /// /// [DataContract] - public class CommonVariableRelationship : IEquatable + public class CommonVariableRelationship : IEquatable { /// /// Initializes a new instance of the class. diff --git a/src/main/csharp/io/swagger/Model/Connection.cs b/src/main/csharp/io/swagger/Model/Connection.cs index 9d3c5d5..9dd3332 100644 --- a/src/main/csharp/io/swagger/Model/Connection.cs +++ b/src/main/csharp/io/swagger/Model/Connection.cs @@ -14,7 +14,7 @@ namespace IO.Swagger.Model /// /// [DataContract] - public class Connection : IEquatable + public class Connection : IEquatable { /// /// Initializes a new instance of the class. diff --git a/src/main/csharp/io/swagger/Model/Connector.cs b/src/main/csharp/io/swagger/Model/Connector.cs index 56268dd..7bfc146 100644 --- a/src/main/csharp/io/swagger/Model/Connector.cs +++ b/src/main/csharp/io/swagger/Model/Connector.cs @@ -14,7 +14,7 @@ namespace IO.Swagger.Model /// /// [DataContract] - public class Connector : IEquatable + public class Connector : IEquatable { /// /// Initializes a new instance of the class. diff --git a/src/main/csharp/io/swagger/Model/Correlation.cs b/src/main/csharp/io/swagger/Model/Correlation.cs index a1f470e..58f1f78 100644 --- a/src/main/csharp/io/swagger/Model/Correlation.cs +++ b/src/main/csharp/io/swagger/Model/Correlation.cs @@ -14,7 +14,7 @@ namespace IO.Swagger.Model /// /// [DataContract] - public class Correlation : IEquatable + public class Correlation : IEquatable { /// /// Initializes a new instance of the class. diff --git a/src/main/csharp/io/swagger/Model/Credential.cs b/src/main/csharp/io/swagger/Model/Credential.cs index c80a5e3..bba0640 100644 --- a/src/main/csharp/io/swagger/Model/Credential.cs +++ b/src/main/csharp/io/swagger/Model/Credential.cs @@ -14,7 +14,7 @@ namespace IO.Swagger.Model /// /// [DataContract] - public class Credential : IEquatable + public class Credential : IEquatable { /// /// Initializes a new instance of the class. diff --git a/src/main/csharp/io/swagger/Model/InlineResponse200.cs b/src/main/csharp/io/swagger/Model/InlineResponse200.cs index f5e8fb8..305c4e9 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse200.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse200.cs @@ -14,7 +14,7 @@ namespace IO.Swagger.Model /// /// [DataContract] - public class InlineResponse200 : IEquatable + public class InlineResponse200 : IEquatable { /// /// Initializes a new instance of the class. diff --git a/src/main/csharp/io/swagger/Model/InlineResponse2001.cs b/src/main/csharp/io/swagger/Model/InlineResponse2001.cs index 6416f72..4a3aba9 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse2001.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse2001.cs @@ -14,7 +14,7 @@ namespace IO.Swagger.Model /// /// [DataContract] - public class InlineResponse2001 : IEquatable + public class InlineResponse2001 : IEquatable { /// /// Initializes a new instance of the class. diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20010.cs b/src/main/csharp/io/swagger/Model/InlineResponse20010.cs index 11b4caf..cb9653b 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse20010.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse20010.cs @@ -14,7 +14,7 @@ namespace IO.Swagger.Model /// /// [DataContract] - public class InlineResponse20010 : IEquatable + public class InlineResponse20010 : IEquatable { /// /// Initializes a new instance of the class. diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20011.cs b/src/main/csharp/io/swagger/Model/InlineResponse20011.cs index 9f5ccbb..0966cbe 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse20011.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse20011.cs @@ -14,7 +14,7 @@ namespace IO.Swagger.Model /// /// [DataContract] - public class InlineResponse20011 : IEquatable + public class InlineResponse20011 : IEquatable { /// /// Initializes a new instance of the class. diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20012.cs b/src/main/csharp/io/swagger/Model/InlineResponse20012.cs index e2c1424..926f249 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse20012.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse20012.cs @@ -14,7 +14,7 @@ namespace IO.Swagger.Model /// /// [DataContract] - public class InlineResponse20012 : IEquatable + public class InlineResponse20012 : IEquatable { /// /// Initializes a new instance of the class. diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20013.cs b/src/main/csharp/io/swagger/Model/InlineResponse20013.cs index 630bda0..0261801 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse20013.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse20013.cs @@ -14,7 +14,7 @@ namespace IO.Swagger.Model /// /// [DataContract] - public class InlineResponse20013 : IEquatable + public class InlineResponse20013 : IEquatable { /// /// Initializes a new instance of the class. diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20014.cs b/src/main/csharp/io/swagger/Model/InlineResponse20014.cs index dabbeeb..b4443aa 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse20014.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse20014.cs @@ -14,7 +14,7 @@ namespace IO.Swagger.Model /// /// [DataContract] - public class InlineResponse20014 : IEquatable + public class InlineResponse20014 : IEquatable { /// /// Initializes a new instance of the class. diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20015.cs b/src/main/csharp/io/swagger/Model/InlineResponse20015.cs index 045b1fe..821e257 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse20015.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse20015.cs @@ -14,7 +14,7 @@ namespace IO.Swagger.Model /// /// [DataContract] - public class InlineResponse20015 : IEquatable + public class InlineResponse20015 : IEquatable { /// /// Initializes a new instance of the class. diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20016.cs b/src/main/csharp/io/swagger/Model/InlineResponse20016.cs index 090aa0b..7ed0644 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse20016.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse20016.cs @@ -14,7 +14,7 @@ namespace IO.Swagger.Model /// /// [DataContract] - public class InlineResponse20016 : IEquatable + public class InlineResponse20016 : IEquatable { /// /// Initializes a new instance of the class. diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20017.cs b/src/main/csharp/io/swagger/Model/InlineResponse20017.cs index bc1c832..b325f86 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse20017.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse20017.cs @@ -14,7 +14,7 @@ namespace IO.Swagger.Model /// /// [DataContract] - public class InlineResponse20017 : IEquatable + public class InlineResponse20017 : IEquatable { /// /// Initializes a new instance of the class. diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20018.cs b/src/main/csharp/io/swagger/Model/InlineResponse20018.cs index f03a305..ae5de6a 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse20018.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse20018.cs @@ -14,7 +14,7 @@ namespace IO.Swagger.Model /// /// [DataContract] - public class InlineResponse20018 : IEquatable + public class InlineResponse20018 : IEquatable { /// /// Initializes a new instance of the class. diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20019.cs b/src/main/csharp/io/swagger/Model/InlineResponse20019.cs index 57c4947..f181417 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse20019.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse20019.cs @@ -14,7 +14,7 @@ namespace IO.Swagger.Model /// /// [DataContract] - public class InlineResponse20019 : IEquatable + public class InlineResponse20019 : IEquatable { /// /// Initializes a new instance of the class. diff --git a/src/main/csharp/io/swagger/Model/InlineResponse2002.cs b/src/main/csharp/io/swagger/Model/InlineResponse2002.cs index 5748be4..fd9f0af 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse2002.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse2002.cs @@ -14,7 +14,7 @@ namespace IO.Swagger.Model /// /// [DataContract] - public class InlineResponse2002 : IEquatable + public class InlineResponse2002 : IEquatable { /// /// Initializes a new instance of the class. diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20020.cs b/src/main/csharp/io/swagger/Model/InlineResponse20020.cs index 8c69da6..6974b9d 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse20020.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse20020.cs @@ -14,7 +14,7 @@ namespace IO.Swagger.Model /// /// [DataContract] - public class InlineResponse20020 : IEquatable + public class InlineResponse20020 : IEquatable { /// /// Initializes a new instance of the class. diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20021.cs b/src/main/csharp/io/swagger/Model/InlineResponse20021.cs index ca516f5..524aa00 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse20021.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse20021.cs @@ -14,7 +14,7 @@ namespace IO.Swagger.Model /// /// [DataContract] - public class InlineResponse20021 : IEquatable + public class InlineResponse20021 : IEquatable { /// /// Initializes a new instance of the class. diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20022.cs b/src/main/csharp/io/swagger/Model/InlineResponse20022.cs index 237b2d5..47fa5c6 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse20022.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse20022.cs @@ -14,7 +14,7 @@ namespace IO.Swagger.Model /// /// [DataContract] - public class InlineResponse20022 : IEquatable + public class InlineResponse20022 : IEquatable { /// /// Initializes a new instance of the class. diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20023.cs b/src/main/csharp/io/swagger/Model/InlineResponse20023.cs index 5a37a50..1f7fe32 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse20023.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse20023.cs @@ -14,7 +14,7 @@ namespace IO.Swagger.Model /// /// [DataContract] - public class InlineResponse20023 : IEquatable + public class InlineResponse20023 : IEquatable { /// /// Initializes a new instance of the class. diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20024.cs b/src/main/csharp/io/swagger/Model/InlineResponse20024.cs index 9b813d5..2190dca 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse20024.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse20024.cs @@ -14,7 +14,7 @@ namespace IO.Swagger.Model /// /// [DataContract] - public class InlineResponse20024 : IEquatable + public class InlineResponse20024 : IEquatable { /// /// Initializes a new instance of the class. diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20025.cs b/src/main/csharp/io/swagger/Model/InlineResponse20025.cs index 34e0003..f94d407 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse20025.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse20025.cs @@ -14,7 +14,7 @@ namespace IO.Swagger.Model /// /// [DataContract] - public class InlineResponse20025 : IEquatable + public class InlineResponse20025 : IEquatable { /// /// Initializes a new instance of the class. diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20026.cs b/src/main/csharp/io/swagger/Model/InlineResponse20026.cs index 7b56974..67071c4 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse20026.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse20026.cs @@ -14,7 +14,7 @@ namespace IO.Swagger.Model /// /// [DataContract] - public class InlineResponse20026 : IEquatable + public class InlineResponse20026 : IEquatable { /// /// Initializes a new instance of the class. diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20027.cs b/src/main/csharp/io/swagger/Model/InlineResponse20027.cs index 1cf33c4..684826f 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse20027.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse20027.cs @@ -14,7 +14,7 @@ namespace IO.Swagger.Model /// /// [DataContract] - public class InlineResponse20027 : IEquatable + public class InlineResponse20027 : IEquatable { /// /// Initializes a new instance of the class. diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20028.cs b/src/main/csharp/io/swagger/Model/InlineResponse20028.cs index 4da501f..a79953c 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse20028.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse20028.cs @@ -14,7 +14,7 @@ namespace IO.Swagger.Model /// /// [DataContract] - public class InlineResponse20028 : IEquatable + public class InlineResponse20028 : IEquatable { /// /// Initializes a new instance of the class. diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20029.cs b/src/main/csharp/io/swagger/Model/InlineResponse20029.cs index 3bc9af0..43bc690 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse20029.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse20029.cs @@ -14,7 +14,7 @@ namespace IO.Swagger.Model /// /// [DataContract] - public class InlineResponse20029 : IEquatable + public class InlineResponse20029 : IEquatable { /// /// Initializes a new instance of the class. diff --git a/src/main/csharp/io/swagger/Model/InlineResponse2003.cs b/src/main/csharp/io/swagger/Model/InlineResponse2003.cs index 78e576a..27f6be9 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse2003.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse2003.cs @@ -14,7 +14,7 @@ namespace IO.Swagger.Model /// /// [DataContract] - public class InlineResponse2003 : IEquatable + public class InlineResponse2003 : IEquatable { /// /// Initializes a new instance of the class. diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20030.cs b/src/main/csharp/io/swagger/Model/InlineResponse20030.cs index 339a068..ed24043 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse20030.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse20030.cs @@ -14,7 +14,7 @@ namespace IO.Swagger.Model /// /// [DataContract] - public class InlineResponse20030 : IEquatable + public class InlineResponse20030 : IEquatable { /// /// Initializes a new instance of the class. diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20031.cs b/src/main/csharp/io/swagger/Model/InlineResponse20031.cs index 3a1407f..baa528d 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse20031.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse20031.cs @@ -14,7 +14,7 @@ namespace IO.Swagger.Model /// /// [DataContract] - public class InlineResponse20031 : IEquatable + public class InlineResponse20031 : IEquatable { /// /// Initializes a new instance of the class. diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20032.cs b/src/main/csharp/io/swagger/Model/InlineResponse20032.cs index 1768c7a..748b6b5 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse20032.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse20032.cs @@ -14,7 +14,7 @@ namespace IO.Swagger.Model /// /// [DataContract] - public class InlineResponse20032 : IEquatable + public class InlineResponse20032 : IEquatable { /// /// Initializes a new instance of the class. diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20033.cs b/src/main/csharp/io/swagger/Model/InlineResponse20033.cs index 64f40f2..14867f1 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse20033.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse20033.cs @@ -14,7 +14,7 @@ namespace IO.Swagger.Model /// /// [DataContract] - public class InlineResponse20033 : IEquatable + public class InlineResponse20033 : IEquatable { /// /// Initializes a new instance of the class. diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20034.cs b/src/main/csharp/io/swagger/Model/InlineResponse20034.cs index b3c3491..c0c26e4 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse20034.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse20034.cs @@ -14,7 +14,7 @@ namespace IO.Swagger.Model /// /// [DataContract] - public class InlineResponse20034 : IEquatable + public class InlineResponse20034 : IEquatable { /// /// Initializes a new instance of the class. diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20035.cs b/src/main/csharp/io/swagger/Model/InlineResponse20035.cs index 74af342..03b343f 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse20035.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse20035.cs @@ -14,7 +14,7 @@ namespace IO.Swagger.Model /// /// [DataContract] - public class InlineResponse20035 : IEquatable + public class InlineResponse20035 : IEquatable { /// /// Initializes a new instance of the class. diff --git a/src/main/csharp/io/swagger/Model/InlineResponse20036.cs b/src/main/csharp/io/swagger/Model/InlineResponse20036.cs index 31e5af3..103cc48 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse20036.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse20036.cs @@ -14,7 +14,7 @@ namespace IO.Swagger.Model /// /// [DataContract] - public class InlineResponse20036 : IEquatable + public class InlineResponse20036 : IEquatable { /// /// Initializes a new instance of the class. diff --git a/src/main/csharp/io/swagger/Model/InlineResponse2004.cs b/src/main/csharp/io/swagger/Model/InlineResponse2004.cs index 0b5958d..c45587e 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse2004.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse2004.cs @@ -14,7 +14,7 @@ namespace IO.Swagger.Model /// /// [DataContract] - public class InlineResponse2004 : IEquatable + public class InlineResponse2004 : IEquatable { /// /// Initializes a new instance of the class. diff --git a/src/main/csharp/io/swagger/Model/InlineResponse2005.cs b/src/main/csharp/io/swagger/Model/InlineResponse2005.cs index de66cee..a63743c 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse2005.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse2005.cs @@ -14,7 +14,7 @@ namespace IO.Swagger.Model /// /// [DataContract] - public class InlineResponse2005 : IEquatable + public class InlineResponse2005 : IEquatable { /// /// Initializes a new instance of the class. diff --git a/src/main/csharp/io/swagger/Model/InlineResponse2006.cs b/src/main/csharp/io/swagger/Model/InlineResponse2006.cs index dad6a10..b053f59 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse2006.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse2006.cs @@ -14,7 +14,7 @@ namespace IO.Swagger.Model /// /// [DataContract] - public class InlineResponse2006 : IEquatable + public class InlineResponse2006 : IEquatable { /// /// Initializes a new instance of the class. diff --git a/src/main/csharp/io/swagger/Model/InlineResponse2007.cs b/src/main/csharp/io/swagger/Model/InlineResponse2007.cs index 7a9ced7..1a29940 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse2007.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse2007.cs @@ -14,7 +14,7 @@ namespace IO.Swagger.Model /// /// [DataContract] - public class InlineResponse2007 : IEquatable + public class InlineResponse2007 : IEquatable { /// /// Initializes a new instance of the class. diff --git a/src/main/csharp/io/swagger/Model/InlineResponse2008.cs b/src/main/csharp/io/swagger/Model/InlineResponse2008.cs index 82d1efd..42ec311 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse2008.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse2008.cs @@ -14,7 +14,7 @@ namespace IO.Swagger.Model /// /// [DataContract] - public class InlineResponse2008 : IEquatable + public class InlineResponse2008 : IEquatable { /// /// Initializes a new instance of the class. diff --git a/src/main/csharp/io/swagger/Model/InlineResponse2009.cs b/src/main/csharp/io/swagger/Model/InlineResponse2009.cs index db1d2b3..e2870b6 100644 --- a/src/main/csharp/io/swagger/Model/InlineResponse2009.cs +++ b/src/main/csharp/io/swagger/Model/InlineResponse2009.cs @@ -14,7 +14,7 @@ namespace IO.Swagger.Model /// /// [DataContract] - public class InlineResponse2009 : IEquatable + public class InlineResponse2009 : IEquatable { /// /// Initializes a new instance of the class. diff --git a/src/main/csharp/io/swagger/Model/Measurement.cs b/src/main/csharp/io/swagger/Model/Measurement.cs index ef90eac..8f81ad6 100644 --- a/src/main/csharp/io/swagger/Model/Measurement.cs +++ b/src/main/csharp/io/swagger/Model/Measurement.cs @@ -14,7 +14,7 @@ namespace IO.Swagger.Model /// /// [DataContract] - public class Measurement : IEquatable + public class Measurement : IEquatable { /// /// Initializes a new instance of the class. diff --git a/src/main/csharp/io/swagger/Model/MeasurementExport.cs b/src/main/csharp/io/swagger/Model/MeasurementExport.cs index 809a67f..fd0b09f 100644 --- a/src/main/csharp/io/swagger/Model/MeasurementExport.cs +++ b/src/main/csharp/io/swagger/Model/MeasurementExport.cs @@ -14,7 +14,7 @@ namespace IO.Swagger.Model /// /// [DataContract] - public class MeasurementExport : IEquatable + public class MeasurementExport : IEquatable { /// /// Initializes a new instance of the class. diff --git a/src/main/csharp/io/swagger/Model/MeasurementPost.cs b/src/main/csharp/io/swagger/Model/MeasurementPost.cs index cea3f30..436828b 100644 --- a/src/main/csharp/io/swagger/Model/MeasurementPost.cs +++ b/src/main/csharp/io/swagger/Model/MeasurementPost.cs @@ -14,7 +14,7 @@ namespace IO.Swagger.Model /// /// [DataContract] - public class MeasurementPost : IEquatable + public class MeasurementPost : IEquatable { /// /// Initializes a new instance of the class. diff --git a/src/main/csharp/io/swagger/Model/MeasurementValue.cs b/src/main/csharp/io/swagger/Model/MeasurementValue.cs index 4293137..650ff2e 100644 --- a/src/main/csharp/io/swagger/Model/MeasurementValue.cs +++ b/src/main/csharp/io/swagger/Model/MeasurementValue.cs @@ -14,7 +14,7 @@ namespace IO.Swagger.Model /// /// [DataContract] - public class MeasurementValue : IEquatable + public class MeasurementValue : IEquatable { /// /// Initializes a new instance of the class. diff --git a/src/main/csharp/io/swagger/Model/Source.cs b/src/main/csharp/io/swagger/Model/Source.cs index 8939793..aa40e38 100644 --- a/src/main/csharp/io/swagger/Model/Source.cs +++ b/src/main/csharp/io/swagger/Model/Source.cs @@ -14,7 +14,7 @@ namespace IO.Swagger.Model /// /// [DataContract] - public class Source : IEquatable + public class Source : IEquatable { /// /// Initializes a new instance of the class. diff --git a/src/main/csharp/io/swagger/Model/TrackingReminder.cs b/src/main/csharp/io/swagger/Model/TrackingReminder.cs index bd2ddca..cd25cbe 100644 --- a/src/main/csharp/io/swagger/Model/TrackingReminder.cs +++ b/src/main/csharp/io/swagger/Model/TrackingReminder.cs @@ -14,7 +14,7 @@ namespace IO.Swagger.Model /// /// [DataContract] - public class TrackingReminder : IEquatable + public class TrackingReminder : IEquatable { /// /// Initializes a new instance of the class. diff --git a/src/main/csharp/io/swagger/Model/Unit.cs b/src/main/csharp/io/swagger/Model/Unit.cs index 3e588dd..ce21c8d 100644 --- a/src/main/csharp/io/swagger/Model/Unit.cs +++ b/src/main/csharp/io/swagger/Model/Unit.cs @@ -14,7 +14,7 @@ namespace IO.Swagger.Model /// /// [DataContract] - public class Unit : IEquatable + public class Unit : IEquatable { /// /// Initializes a new instance of the class. diff --git a/src/main/csharp/io/swagger/Model/UnitCategory.cs b/src/main/csharp/io/swagger/Model/UnitCategory.cs index 6920bee..30175da 100644 --- a/src/main/csharp/io/swagger/Model/UnitCategory.cs +++ b/src/main/csharp/io/swagger/Model/UnitCategory.cs @@ -14,7 +14,7 @@ namespace IO.Swagger.Model /// /// [DataContract] - public class UnitCategory : IEquatable + public class UnitCategory : IEquatable { /// /// Initializes a new instance of the class. diff --git a/src/main/csharp/io/swagger/Model/UnitConversion.cs b/src/main/csharp/io/swagger/Model/UnitConversion.cs index 99c9649..44724e6 100644 --- a/src/main/csharp/io/swagger/Model/UnitConversion.cs +++ b/src/main/csharp/io/swagger/Model/UnitConversion.cs @@ -14,7 +14,7 @@ namespace IO.Swagger.Model /// /// [DataContract] - public class UnitConversion : IEquatable + public class UnitConversion : IEquatable { /// /// Initializes a new instance of the class. diff --git a/src/main/csharp/io/swagger/Model/Update.cs b/src/main/csharp/io/swagger/Model/Update.cs index c59d573..ecbfb5a 100644 --- a/src/main/csharp/io/swagger/Model/Update.cs +++ b/src/main/csharp/io/swagger/Model/Update.cs @@ -14,7 +14,7 @@ namespace IO.Swagger.Model /// /// [DataContract] - public class Update : IEquatable + public class Update : IEquatable { /// /// Initializes a new instance of the class. diff --git a/src/main/csharp/io/swagger/Model/UserVariable.cs b/src/main/csharp/io/swagger/Model/UserVariable.cs index 806c92b..987fc69 100644 --- a/src/main/csharp/io/swagger/Model/UserVariable.cs +++ b/src/main/csharp/io/swagger/Model/UserVariable.cs @@ -14,7 +14,7 @@ namespace IO.Swagger.Model /// /// [DataContract] - public class UserVariable : IEquatable + public class UserVariable : IEquatable { /// /// Initializes a new instance of the class. diff --git a/src/main/csharp/io/swagger/Model/UserVariableRelationship.cs b/src/main/csharp/io/swagger/Model/UserVariableRelationship.cs index 1cad2ee..a213842 100644 --- a/src/main/csharp/io/swagger/Model/UserVariableRelationship.cs +++ b/src/main/csharp/io/swagger/Model/UserVariableRelationship.cs @@ -14,7 +14,7 @@ namespace IO.Swagger.Model /// /// [DataContract] - public class UserVariableRelationship : IEquatable + public class UserVariableRelationship : IEquatable { /// /// Initializes a new instance of the class. diff --git a/src/main/csharp/io/swagger/Model/Variable.cs b/src/main/csharp/io/swagger/Model/Variable.cs index e7652fa..161c4ba 100644 --- a/src/main/csharp/io/swagger/Model/Variable.cs +++ b/src/main/csharp/io/swagger/Model/Variable.cs @@ -14,7 +14,7 @@ namespace IO.Swagger.Model /// /// [DataContract] - public class Variable : IEquatable + public class Variable : IEquatable { /// /// Initializes a new instance of the class. diff --git a/src/main/csharp/io/swagger/Model/VariableCategory.cs b/src/main/csharp/io/swagger/Model/VariableCategory.cs index 7b66363..43ba502 100644 --- a/src/main/csharp/io/swagger/Model/VariableCategory.cs +++ b/src/main/csharp/io/swagger/Model/VariableCategory.cs @@ -14,7 +14,7 @@ namespace IO.Swagger.Model /// /// [DataContract] - public class VariableCategory : IEquatable + public class VariableCategory : IEquatable { /// /// Initializes a new instance of the class. diff --git a/src/main/csharp/io/swagger/Model/VariableUserSource.cs b/src/main/csharp/io/swagger/Model/VariableUserSource.cs index bc84614..2edbb5d 100644 --- a/src/main/csharp/io/swagger/Model/VariableUserSource.cs +++ b/src/main/csharp/io/swagger/Model/VariableUserSource.cs @@ -14,7 +14,7 @@ namespace IO.Swagger.Model /// /// [DataContract] - public class VariableUserSource : IEquatable + public class VariableUserSource : IEquatable { /// /// Initializes a new instance of the class. diff --git a/src/main/csharp/io/swagger/Model/Vote.cs b/src/main/csharp/io/swagger/Model/Vote.cs index da39e90..0d3ca5b 100644 --- a/src/main/csharp/io/swagger/Model/Vote.cs +++ b/src/main/csharp/io/swagger/Model/Vote.cs @@ -14,7 +14,7 @@ namespace IO.Swagger.Model /// /// [DataContract] - public class Vote : IEquatable + public class Vote : IEquatable { /// /// Initializes a new instance of the class.