|
| 1 | +/** |
| 2 | +* Copyright 2018 IBM Corp. All Rights Reserved. |
| 3 | +* |
| 4 | +* Licensed under the Apache License, Version 2.0 (the "License"); |
| 5 | +* you may not use this file except in compliance with the License. |
| 6 | +* You may obtain a copy of the License at |
| 7 | +* |
| 8 | +* http://www.apache.org/licenses/LICENSE-2.0 |
| 9 | +* |
| 10 | +* Unless required by applicable law or agreed to in writing, software |
| 11 | +* distributed under the License is distributed on an "AS IS" BASIS, |
| 12 | +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 13 | +* See the License for the specific language governing permissions and |
| 14 | +* limitations under the License. |
| 15 | +* |
| 16 | +*/ |
| 17 | + |
| 18 | +using System.Runtime.Serialization; |
| 19 | +using Newtonsoft.Json; |
| 20 | +using Newtonsoft.Json.Converters; |
| 21 | + |
| 22 | +namespace IBM.WatsonDeveloperCloud.Discovery.v1.Model |
| 23 | +{ |
| 24 | + /// <summary> |
| 25 | + /// Object containing details of the stored credentials. |
| 26 | + /// |
| 27 | + /// Obtain credentials for your source from the administrator of the source. |
| 28 | + /// </summary> |
| 29 | + public class CredentialDetails : BaseModel |
| 30 | + { |
| 31 | + /// <summary> |
| 32 | + /// The authentication method for this credentials definition. The **credential_type** specified must be |
| 33 | + /// supported by the **source_type**. The following combinations are possible: |
| 34 | + /// |
| 35 | + /// - `\"source_type\": \"box\"` - valid `credential_type`s: `oauth2` |
| 36 | + /// - `\"source_type\": \"salesforce\"` - valid `credential_type`s: `username_password` |
| 37 | + /// - `\"source_type\": \"sharepoint\"` - valid `credential_type`s: `saml`. |
| 38 | + /// </summary> |
| 39 | + /// <value> |
| 40 | + /// The authentication method for this credentials definition. The **credential_type** specified must be |
| 41 | + /// supported by the **source_type**. The following combinations are possible: |
| 42 | + /// |
| 43 | + /// - `\"source_type\": \"box\"` - valid `credential_type`s: `oauth2` |
| 44 | + /// - `\"source_type\": \"salesforce\"` - valid `credential_type`s: `username_password` |
| 45 | + /// - `\"source_type\": \"sharepoint\"` - valid `credential_type`s: `saml`. |
| 46 | + /// </value> |
| 47 | + [JsonConverter(typeof(StringEnumConverter))] |
| 48 | + public enum CredentialTypeEnum |
| 49 | + { |
| 50 | + |
| 51 | + /// <summary> |
| 52 | + /// Enum OAUTH2 for oauth2 |
| 53 | + /// </summary> |
| 54 | + [EnumMember(Value = "oauth2")] |
| 55 | + OAUTH2, |
| 56 | + |
| 57 | + /// <summary> |
| 58 | + /// Enum SAML for saml |
| 59 | + /// </summary> |
| 60 | + [EnumMember(Value = "saml")] |
| 61 | + SAML, |
| 62 | + |
| 63 | + /// <summary> |
| 64 | + /// Enum USERNAME_PASSWORD for username_password |
| 65 | + /// </summary> |
| 66 | + [EnumMember(Value = "username_password")] |
| 67 | + USERNAME_PASSWORD |
| 68 | + } |
| 69 | + |
| 70 | + /// <summary> |
| 71 | + /// The authentication method for this credentials definition. The **credential_type** specified must be |
| 72 | + /// supported by the **source_type**. The following combinations are possible: |
| 73 | + /// |
| 74 | + /// - `\"source_type\": \"box\"` - valid `credential_type`s: `oauth2` |
| 75 | + /// - `\"source_type\": \"salesforce\"` - valid `credential_type`s: `username_password` |
| 76 | + /// - `\"source_type\": \"sharepoint\"` - valid `credential_type`s: `saml`. |
| 77 | + /// </summary> |
| 78 | + /// <value> |
| 79 | + /// The authentication method for this credentials definition. The **credential_type** specified must be |
| 80 | + /// supported by the **source_type**. The following combinations are possible: |
| 81 | + /// |
| 82 | + /// - `\"source_type\": \"box\"` - valid `credential_type`s: `oauth2` |
| 83 | + /// - `\"source_type\": \"salesforce\"` - valid `credential_type`s: `username_password` |
| 84 | + /// - `\"source_type\": \"sharepoint\"` - valid `credential_type`s: `saml`. |
| 85 | + /// </value> |
| 86 | + [JsonProperty("credential_type", NullValueHandling = NullValueHandling.Ignore)] |
| 87 | + public CredentialTypeEnum? CredentialType { get; set; } |
| 88 | + /// <summary> |
| 89 | + /// The **client_id** of the source that these credentials connect to. Only valid, and required, with a |
| 90 | + /// **credential_type** of `oauth2`. |
| 91 | + /// </summary> |
| 92 | + /// <value> |
| 93 | + /// The **client_id** of the source that these credentials connect to. Only valid, and required, with a |
| 94 | + /// **credential_type** of `oauth2`. |
| 95 | + /// </value> |
| 96 | + [JsonProperty("client_id", NullValueHandling = NullValueHandling.Ignore)] |
| 97 | + public string ClientId { get; set; } |
| 98 | + /// <summary> |
| 99 | + /// The **enterprise_id** of the Box site that these credentials connect to. Only valid, and required, with a |
| 100 | + /// **source_type** of `box`. |
| 101 | + /// </summary> |
| 102 | + /// <value> |
| 103 | + /// The **enterprise_id** of the Box site that these credentials connect to. Only valid, and required, with a |
| 104 | + /// **source_type** of `box`. |
| 105 | + /// </value> |
| 106 | + [JsonProperty("enterprise_id", NullValueHandling = NullValueHandling.Ignore)] |
| 107 | + public string EnterpriseId { get; set; } |
| 108 | + /// <summary> |
| 109 | + /// The **url** of the source that these credentials connect to. Only valid, and required, with a |
| 110 | + /// **credential_type** of `username_password`. |
| 111 | + /// </summary> |
| 112 | + /// <value> |
| 113 | + /// The **url** of the source that these credentials connect to. Only valid, and required, with a |
| 114 | + /// **credential_type** of `username_password`. |
| 115 | + /// </value> |
| 116 | + [JsonProperty("url", NullValueHandling = NullValueHandling.Ignore)] |
| 117 | + public string Url { get; set; } |
| 118 | + /// <summary> |
| 119 | + /// The **username** of the source that these credentials connect to. Only valid, and required, with a |
| 120 | + /// **credential_type** of `saml` and `username_password`. |
| 121 | + /// </summary> |
| 122 | + /// <value> |
| 123 | + /// The **username** of the source that these credentials connect to. Only valid, and required, with a |
| 124 | + /// **credential_type** of `saml` and `username_password`. |
| 125 | + /// </value> |
| 126 | + [JsonProperty("username", NullValueHandling = NullValueHandling.Ignore)] |
| 127 | + public string Username { get; set; } |
| 128 | + /// <summary> |
| 129 | + /// The **organization_url** of the source that these credentials connect to. Only valid, and required, with a |
| 130 | + /// **credential_type** of `saml`. |
| 131 | + /// </summary> |
| 132 | + /// <value> |
| 133 | + /// The **organization_url** of the source that these credentials connect to. Only valid, and required, with a |
| 134 | + /// **credential_type** of `saml`. |
| 135 | + /// </value> |
| 136 | + [JsonProperty("organization_url", NullValueHandling = NullValueHandling.Ignore)] |
| 137 | + public string OrganizationUrl { get; set; } |
| 138 | + /// <summary> |
| 139 | + /// The **site_collection.path** of the source that these credentials connect to. Only valid, and required, with |
| 140 | + /// a **source_type** of `sharepoint`. |
| 141 | + /// </summary> |
| 142 | + /// <value> |
| 143 | + /// The **site_collection.path** of the source that these credentials connect to. Only valid, and required, with |
| 144 | + /// a **source_type** of `sharepoint`. |
| 145 | + /// </value> |
| 146 | + [JsonProperty("site_collection.path", NullValueHandling = NullValueHandling.Ignore)] |
| 147 | + public string SiteCollectionPath { get; set; } |
| 148 | + /// <summary> |
| 149 | + /// The **client_secret** of the source that these credentials connect to. Only valid, and required, with a |
| 150 | + /// **credential_type** of `oauth2`. This value is never returned and is only used when creating or modifying |
| 151 | + /// **credentials**. |
| 152 | + /// </summary> |
| 153 | + /// <value> |
| 154 | + /// The **client_secret** of the source that these credentials connect to. Only valid, and required, with a |
| 155 | + /// **credential_type** of `oauth2`. This value is never returned and is only used when creating or modifying |
| 156 | + /// **credentials**. |
| 157 | + /// </value> |
| 158 | + [JsonProperty("client_secret", NullValueHandling = NullValueHandling.Ignore)] |
| 159 | + public string ClientSecret { get; set; } |
| 160 | + /// <summary> |
| 161 | + /// The **public_key_id** of the source that these credentials connect to. Only valid, and required, with a |
| 162 | + /// **credential_type** of `oauth2`. This value is never returned and is only used when creating or modifying |
| 163 | + /// **credentials**. |
| 164 | + /// </summary> |
| 165 | + /// <value> |
| 166 | + /// The **public_key_id** of the source that these credentials connect to. Only valid, and required, with a |
| 167 | + /// **credential_type** of `oauth2`. This value is never returned and is only used when creating or modifying |
| 168 | + /// **credentials**. |
| 169 | + /// </value> |
| 170 | + [JsonProperty("public_key_id", NullValueHandling = NullValueHandling.Ignore)] |
| 171 | + public string PublicKeyId { get; set; } |
| 172 | + /// <summary> |
| 173 | + /// The **private_key** of the source that these credentials connect to. Only valid, and required, with a |
| 174 | + /// **credential_type** of `oauth2`. This value is never returned and is only used when creating or modifying |
| 175 | + /// **credentials**. |
| 176 | + /// </summary> |
| 177 | + /// <value> |
| 178 | + /// The **private_key** of the source that these credentials connect to. Only valid, and required, with a |
| 179 | + /// **credential_type** of `oauth2`. This value is never returned and is only used when creating or modifying |
| 180 | + /// **credentials**. |
| 181 | + /// </value> |
| 182 | + [JsonProperty("private_key", NullValueHandling = NullValueHandling.Ignore)] |
| 183 | + public string PrivateKey { get; set; } |
| 184 | + /// <summary> |
| 185 | + /// The **passphrase** of the source that these credentials connect to. Only valid, and required, with a |
| 186 | + /// **credential_type** of `oauth2`. This value is never returned and is only used when creating or modifying |
| 187 | + /// **credentials**. |
| 188 | + /// </summary> |
| 189 | + /// <value> |
| 190 | + /// The **passphrase** of the source that these credentials connect to. Only valid, and required, with a |
| 191 | + /// **credential_type** of `oauth2`. This value is never returned and is only used when creating or modifying |
| 192 | + /// **credentials**. |
| 193 | + /// </value> |
| 194 | + [JsonProperty("passphrase", NullValueHandling = NullValueHandling.Ignore)] |
| 195 | + public string Passphrase { get; set; } |
| 196 | + /// <summary> |
| 197 | + /// The **password** of the source that these credentials connect to. Only valid, and required, with |
| 198 | + /// **credential_type**s of `saml` and `username_password`. |
| 199 | + /// |
| 200 | + /// **Note:** When used with a **source_type** of `salesforce`, the password consists of the Salesforce password |
| 201 | + /// and a valid Salesforce security token concatenated. This value is never returned and is only used when |
| 202 | + /// creating or modifying **credentials**. |
| 203 | + /// </summary> |
| 204 | + /// <value> |
| 205 | + /// The **password** of the source that these credentials connect to. Only valid, and required, with |
| 206 | + /// **credential_type**s of `saml` and `username_password`. |
| 207 | + /// |
| 208 | + /// **Note:** When used with a **source_type** of `salesforce`, the password consists of the Salesforce password |
| 209 | + /// and a valid Salesforce security token concatenated. This value is never returned and is only used when |
| 210 | + /// creating or modifying **credentials**. |
| 211 | + /// </value> |
| 212 | + [JsonProperty("password", NullValueHandling = NullValueHandling.Ignore)] |
| 213 | + public string Password { get; set; } |
| 214 | + } |
| 215 | + |
| 216 | +} |
0 commit comments