PageRenderTime 39ms CodeModel.GetById 9ms RepoModel.GetById 0ms app.codeStats 0ms

/Amazon.ElasticBeanstalk/Model/UpdateConfigurationTemplateResult.cs

https://bitbucket.org/mdavid/aws-sdk-for-net
C# | 370 lines | 157 code | 39 blank | 174 comment | 6 complexity | c5b093e2254b0c80595450f06d4b37ce MD5 | raw file
  1. /*
  2. * Copyright 2010-2012 Amazon.com, Inc. or its affiliates. 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. * A copy of the License is located at
  7. *
  8. * http://aws.amazon.com/apache2.0
  9. *
  10. * or in the "license" file accompanying this file. This file is distributed
  11. * on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either
  12. * express or implied. See the License for the specific language governing
  13. * permissions and limitations under the License.
  14. */
  15. using System;
  16. using System.Collections.Generic;
  17. using System.Xml.Serialization;
  18. using System.Text;
  19. using System.IO;
  20. namespace Amazon.ElasticBeanstalk.Model
  21. {
  22. /// <summary>
  23. /// <para> Describes the settings for a configuration set. </para>
  24. /// </summary>
  25. public class UpdateConfigurationTemplateResult
  26. {
  27. private string solutionStackName;
  28. private string applicationName;
  29. private string templateName;
  30. private string description;
  31. private string environmentName;
  32. private string deploymentStatus;
  33. private DateTime? dateCreated;
  34. private DateTime? dateUpdated;
  35. private List<ConfigurationOptionSetting> optionSettings = new List<ConfigurationOptionSetting>();
  36. /// <summary>
  37. /// The name of the solution stack this configuration set uses.
  38. ///
  39. /// <para>
  40. /// <b>Constraints:</b>
  41. /// <list type="definition">
  42. /// <item>
  43. /// <term>Length</term>
  44. /// <description>0 - 100</description>
  45. /// </item>
  46. /// </list>
  47. /// </para>
  48. /// </summary>
  49. public string SolutionStackName
  50. {
  51. get { return this.solutionStackName; }
  52. set { this.solutionStackName = value; }
  53. }
  54. /// <summary>
  55. /// Sets the SolutionStackName property
  56. /// </summary>
  57. /// <param name="solutionStackName">The value to set for the SolutionStackName property </param>
  58. /// <returns>this instance</returns>
  59. public UpdateConfigurationTemplateResult WithSolutionStackName(string solutionStackName)
  60. {
  61. this.solutionStackName = solutionStackName;
  62. return this;
  63. }
  64. // Check to see if SolutionStackName property is set
  65. internal bool IsSetSolutionStackName()
  66. {
  67. return this.solutionStackName != null;
  68. }
  69. /// <summary>
  70. /// The name of the application associated with this configuration set.
  71. ///
  72. /// <para>
  73. /// <b>Constraints:</b>
  74. /// <list type="definition">
  75. /// <item>
  76. /// <term>Length</term>
  77. /// <description>1 - 100</description>
  78. /// </item>
  79. /// </list>
  80. /// </para>
  81. /// </summary>
  82. public string ApplicationName
  83. {
  84. get { return this.applicationName; }
  85. set { this.applicationName = value; }
  86. }
  87. /// <summary>
  88. /// Sets the ApplicationName property
  89. /// </summary>
  90. /// <param name="applicationName">The value to set for the ApplicationName property </param>
  91. /// <returns>this instance</returns>
  92. public UpdateConfigurationTemplateResult WithApplicationName(string applicationName)
  93. {
  94. this.applicationName = applicationName;
  95. return this;
  96. }
  97. // Check to see if ApplicationName property is set
  98. internal bool IsSetApplicationName()
  99. {
  100. return this.applicationName != null;
  101. }
  102. /// <summary>
  103. /// If not <c>null</c>, the name of the configuration template for this configuration set.
  104. ///
  105. /// <para>
  106. /// <b>Constraints:</b>
  107. /// <list type="definition">
  108. /// <item>
  109. /// <term>Length</term>
  110. /// <description>1 - 100</description>
  111. /// </item>
  112. /// </list>
  113. /// </para>
  114. /// </summary>
  115. public string TemplateName
  116. {
  117. get { return this.templateName; }
  118. set { this.templateName = value; }
  119. }
  120. /// <summary>
  121. /// Sets the TemplateName property
  122. /// </summary>
  123. /// <param name="templateName">The value to set for the TemplateName property </param>
  124. /// <returns>this instance</returns>
  125. public UpdateConfigurationTemplateResult WithTemplateName(string templateName)
  126. {
  127. this.templateName = templateName;
  128. return this;
  129. }
  130. // Check to see if TemplateName property is set
  131. internal bool IsSetTemplateName()
  132. {
  133. return this.templateName != null;
  134. }
  135. /// <summary>
  136. /// Describes this configuration set.
  137. ///
  138. /// <para>
  139. /// <b>Constraints:</b>
  140. /// <list type="definition">
  141. /// <item>
  142. /// <term>Length</term>
  143. /// <description>0 - 200</description>
  144. /// </item>
  145. /// </list>
  146. /// </para>
  147. /// </summary>
  148. public string Description
  149. {
  150. get { return this.description; }
  151. set { this.description = value; }
  152. }
  153. /// <summary>
  154. /// Sets the Description property
  155. /// </summary>
  156. /// <param name="description">The value to set for the Description property </param>
  157. /// <returns>this instance</returns>
  158. public UpdateConfigurationTemplateResult WithDescription(string description)
  159. {
  160. this.description = description;
  161. return this;
  162. }
  163. // Check to see if Description property is set
  164. internal bool IsSetDescription()
  165. {
  166. return this.description != null;
  167. }
  168. /// <summary>
  169. /// If not <c>null</c>, the name of the environment for this configuration set.
  170. ///
  171. /// <para>
  172. /// <b>Constraints:</b>
  173. /// <list type="definition">
  174. /// <item>
  175. /// <term>Length</term>
  176. /// <description>4 - 23</description>
  177. /// </item>
  178. /// </list>
  179. /// </para>
  180. /// </summary>
  181. public string EnvironmentName
  182. {
  183. get { return this.environmentName; }
  184. set { this.environmentName = value; }
  185. }
  186. /// <summary>
  187. /// Sets the EnvironmentName property
  188. /// </summary>
  189. /// <param name="environmentName">The value to set for the EnvironmentName property </param>
  190. /// <returns>this instance</returns>
  191. public UpdateConfigurationTemplateResult WithEnvironmentName(string environmentName)
  192. {
  193. this.environmentName = environmentName;
  194. return this;
  195. }
  196. // Check to see if EnvironmentName property is set
  197. internal bool IsSetEnvironmentName()
  198. {
  199. return this.environmentName != null;
  200. }
  201. /// <summary>
  202. /// If this configuration set is associated with an environment, the <c>DeploymentStatus</c> parameter indicates the deployment status of this
  203. /// configuration set: <enumValues> <value name="null"> <c>null</c>: This configuration is not associated with a running environment. </value>
  204. /// <value name="pending"> <c>pending</c>: This is a draft configuration that is not deployed to the associated environment but is in the
  205. /// process of deploying. </value> <value name="deployed"> <c>deployed</c>: This is the configuration that is currently deployed to the
  206. /// associated running environment. </value> <value name="failed"> <c>failed</c>: This is a draft configuration, that failed to successfully
  207. /// deploy. </value> </enumValues> <ul> <li> <c>null</c>: This configuration is not associated with a running environment. </li> <li>
  208. /// <c>pending</c>: This is a draft configuration that is not deployed to the associated environment but is in the process of deploying. </li>
  209. /// <li> <c>deployed</c>: This is the configuration that is currently deployed to the associated running environment. </li> <li> <c>failed</c>:
  210. /// This is a draft configuration that failed to successfully deploy. </li> </ul>
  211. ///
  212. /// <para>
  213. /// <b>Constraints:</b>
  214. /// <list type="definition">
  215. /// <item>
  216. /// <term>Allowed Values</term>
  217. /// <description>deployed, pending, failed</description>
  218. /// </item>
  219. /// </list>
  220. /// </para>
  221. /// </summary>
  222. public string DeploymentStatus
  223. {
  224. get { return this.deploymentStatus; }
  225. set { this.deploymentStatus = value; }
  226. }
  227. /// <summary>
  228. /// Sets the DeploymentStatus property
  229. /// </summary>
  230. /// <param name="deploymentStatus">The value to set for the DeploymentStatus property </param>
  231. /// <returns>this instance</returns>
  232. public UpdateConfigurationTemplateResult WithDeploymentStatus(string deploymentStatus)
  233. {
  234. this.deploymentStatus = deploymentStatus;
  235. return this;
  236. }
  237. // Check to see if DeploymentStatus property is set
  238. internal bool IsSetDeploymentStatus()
  239. {
  240. return this.deploymentStatus != null;
  241. }
  242. /// <summary>
  243. /// The date (in UTC time) when this configuration set was created.
  244. ///
  245. /// </summary>
  246. public DateTime DateCreated
  247. {
  248. get { return this.dateCreated ?? default(DateTime); }
  249. set { this.dateCreated = value; }
  250. }
  251. /// <summary>
  252. /// Sets the DateCreated property
  253. /// </summary>
  254. /// <param name="dateCreated">The value to set for the DateCreated property </param>
  255. /// <returns>this instance</returns>
  256. public UpdateConfigurationTemplateResult WithDateCreated(DateTime dateCreated)
  257. {
  258. this.dateCreated = dateCreated;
  259. return this;
  260. }
  261. // Check to see if DateCreated property is set
  262. internal bool IsSetDateCreated()
  263. {
  264. return this.dateCreated.HasValue;
  265. }
  266. /// <summary>
  267. /// The date (in UTC time) when this configuration set was last modified.
  268. ///
  269. /// </summary>
  270. public DateTime DateUpdated
  271. {
  272. get { return this.dateUpdated ?? default(DateTime); }
  273. set { this.dateUpdated = value; }
  274. }
  275. /// <summary>
  276. /// Sets the DateUpdated property
  277. /// </summary>
  278. /// <param name="dateUpdated">The value to set for the DateUpdated property </param>
  279. /// <returns>this instance</returns>
  280. public UpdateConfigurationTemplateResult WithDateUpdated(DateTime dateUpdated)
  281. {
  282. this.dateUpdated = dateUpdated;
  283. return this;
  284. }
  285. // Check to see if DateUpdated property is set
  286. internal bool IsSetDateUpdated()
  287. {
  288. return this.dateUpdated.HasValue;
  289. }
  290. /// <summary>
  291. /// A list of the configuration options and their values in this configuration set.
  292. ///
  293. /// </summary>
  294. public List<ConfigurationOptionSetting> OptionSettings
  295. {
  296. get { return this.optionSettings; }
  297. set { this.optionSettings = value; }
  298. }
  299. /// <summary>
  300. /// Adds elements to the OptionSettings collection
  301. /// </summary>
  302. /// <param name="optionSettings">The values to add to the OptionSettings collection </param>
  303. /// <returns>this instance</returns>
  304. public UpdateConfigurationTemplateResult WithOptionSettings(params ConfigurationOptionSetting[] optionSettings)
  305. {
  306. foreach (ConfigurationOptionSetting element in optionSettings)
  307. {
  308. this.optionSettings.Add(element);
  309. }
  310. return this;
  311. }
  312. /// <summary>
  313. /// Adds elements to the OptionSettings collection
  314. /// </summary>
  315. /// <param name="optionSettings">The values to add to the OptionSettings collection </param>
  316. /// <returns>this instance</returns>
  317. public UpdateConfigurationTemplateResult WithOptionSettings(IEnumerable<ConfigurationOptionSetting> optionSettings)
  318. {
  319. foreach (ConfigurationOptionSetting element in optionSettings)
  320. {
  321. this.optionSettings.Add(element);
  322. }
  323. return this;
  324. }
  325. // Check to see if OptionSettings property is set
  326. internal bool IsSetOptionSettings()
  327. {
  328. return this.optionSettings.Count > 0;
  329. }
  330. }
  331. }