|
1 | 1 | /**
|
2 |
| -* (C) Copyright IBM Corp. 2019, 2021. |
| 2 | +* (C) Copyright IBM Corp. 2021. |
3 | 3 | *
|
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
5 | 5 | * you may not use this file except in compliance with the License.
|
@@ -5141,12 +5141,10 @@ private void OnListCredentialsResponse(RESTConnector.Request req, RESTConnector.
|
5141 | 5141 | /// <param name="credentialDetails">Object containing details of the stored credentials.
|
5142 | 5142 | ///
|
5143 | 5143 | /// Obtain credentials for your source from the administrator of the source. (optional)</param>
|
5144 |
| - /// <param name="status">The current status of this set of credentials. `connected` indicates that the |
5145 |
| - /// credentials are available to use with the source configuration of a collection. `invalid` refers to the |
5146 |
| - /// credentials (for example, the password provided has expired) and must be corrected before they can be used |
5147 |
| - /// with a collection. (optional)</param> |
| 5144 | + /// <param name="status">Object that contains details about the status of the authentication process. |
| 5145 | + /// (optional)</param> |
5148 | 5146 | /// <returns><see cref="ModelCredentials" />ModelCredentials</returns>
|
5149 |
| - public bool CreateCredentials(Callback<ModelCredentials> callback, string environmentId, string sourceType = null, CredentialDetails credentialDetails = null, string status = null) |
| 5147 | + public bool CreateCredentials(Callback<ModelCredentials> callback, string environmentId, string sourceType = null, CredentialDetails credentialDetails = null, StatusDetails status = null) |
5150 | 5148 | {
|
5151 | 5149 | if (callback == null)
|
5152 | 5150 | throw new ArgumentNullException("`callback` is required for `CreateCredentials`");
|
@@ -5186,8 +5184,8 @@ public bool CreateCredentials(Callback<ModelCredentials> callback, string enviro
|
5186 | 5184 | bodyObject["source_type"] = sourceType;
|
5187 | 5185 | if (credentialDetails != null)
|
5188 | 5186 | bodyObject["credential_details"] = JToken.FromObject(credentialDetails);
|
5189 |
| - if (!string.IsNullOrEmpty(status)) |
5190 |
| - bodyObject["status"] = status; |
| 5187 | + if (status != null) |
| 5188 | + bodyObject["status"] = JToken.FromObject(status); |
5191 | 5189 | req.Send = Encoding.UTF8.GetBytes(JsonConvert.SerializeObject(bodyObject));
|
5192 | 5190 |
|
5193 | 5191 | req.OnResponse = OnCreateCredentialsResponse;
|
@@ -5323,12 +5321,10 @@ private void OnGetCredentialsResponse(RESTConnector.Request req, RESTConnector.R
|
5323 | 5321 | /// <param name="credentialDetails">Object containing details of the stored credentials.
|
5324 | 5322 | ///
|
5325 | 5323 | /// Obtain credentials for your source from the administrator of the source. (optional)</param>
|
5326 |
| - /// <param name="status">The current status of this set of credentials. `connected` indicates that the |
5327 |
| - /// credentials are available to use with the source configuration of a collection. `invalid` refers to the |
5328 |
| - /// credentials (for example, the password provided has expired) and must be corrected before they can be used |
5329 |
| - /// with a collection. (optional)</param> |
| 5324 | + /// <param name="status">Object that contains details about the status of the authentication process. |
| 5325 | + /// (optional)</param> |
5330 | 5326 | /// <returns><see cref="ModelCredentials" />ModelCredentials</returns>
|
5331 |
| - public bool UpdateCredentials(Callback<ModelCredentials> callback, string environmentId, string credentialId, string sourceType = null, CredentialDetails credentialDetails = null, string status = null) |
| 5327 | + public bool UpdateCredentials(Callback<ModelCredentials> callback, string environmentId, string credentialId, string sourceType = null, CredentialDetails credentialDetails = null, StatusDetails status = null) |
5332 | 5328 | {
|
5333 | 5329 | if (callback == null)
|
5334 | 5330 | throw new ArgumentNullException("`callback` is required for `UpdateCredentials`");
|
@@ -5370,8 +5366,8 @@ public bool UpdateCredentials(Callback<ModelCredentials> callback, string enviro
|
5370 | 5366 | bodyObject["source_type"] = sourceType;
|
5371 | 5367 | if (credentialDetails != null)
|
5372 | 5368 | bodyObject["credential_details"] = JToken.FromObject(credentialDetails);
|
5373 |
| - if (!string.IsNullOrEmpty(status)) |
5374 |
| - bodyObject["status"] = status; |
| 5369 | + if (status != null) |
| 5370 | + bodyObject["status"] = JToken.FromObject(status); |
5375 | 5371 | req.Send = Encoding.UTF8.GetBytes(JsonConvert.SerializeObject(bodyObject));
|
5376 | 5372 |
|
5377 | 5373 | req.OnResponse = OnUpdateCredentialsResponse;
|
|
0 commit comments