/src/Functions/generated/api/Models/Api20190801/SiteSourceControl.PowerShell.cs

https://github.com/Azure/azure-powershell · C# · 149 lines · 66 code · 18 blank · 65 comment · 2 complexity · 9640083ad1fa58c2ba9fefd26574df65 MD5 · raw file

  1. namespace Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801
  2. {
  3. using Microsoft.Azure.PowerShell.Cmdlets.Functions.Runtime.PowerShell;
  4. /// <summary>Source control configuration for an app.</summary>
  5. [System.ComponentModel.TypeConverter(typeof(SiteSourceControlTypeConverter))]
  6. public partial class SiteSourceControl
  7. {
  8. /// <summary>
  9. /// <c>AfterDeserializeDictionary</c> will be called after the deserialization has finished, allowing customization of the
  10. /// object before it is returned. Implement this method in a partial class to enable this behavior
  11. /// </summary>
  12. /// <param name="content">The global::System.Collections.IDictionary content that should be used.</param>
  13. partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content);
  14. /// <summary>
  15. /// <c>AfterDeserializePSObject</c> will be called after the deserialization has finished, allowing customization of the object
  16. /// before it is returned. Implement this method in a partial class to enable this behavior
  17. /// </summary>
  18. /// <param name="content">The global::System.Management.Automation.PSObject content that should be used.</param>
  19. partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content);
  20. /// <summary>
  21. /// <c>BeforeDeserializeDictionary</c> will be called before the deserialization has commenced, allowing complete customization
  22. /// of the object before it is deserialized.
  23. /// If you wish to disable the default deserialization entirely, return <c>true</c> in the <see "returnNow" /> output parameter.
  24. /// Implement this method in a partial class to enable this behavior.
  25. /// </summary>
  26. /// <param name="content">The global::System.Collections.IDictionary content that should be used.</param>
  27. /// <param name="returnNow">Determines if the rest of the serialization should be processed, or if the method should return
  28. /// instantly.</param>
  29. partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow);
  30. /// <summary>
  31. /// <c>BeforeDeserializePSObject</c> will be called before the deserialization has commenced, allowing complete customization
  32. /// of the object before it is deserialized.
  33. /// If you wish to disable the default deserialization entirely, return <c>true</c> in the <see "returnNow" /> output parameter.
  34. /// Implement this method in a partial class to enable this behavior.
  35. /// </summary>
  36. /// <param name="content">The global::System.Management.Automation.PSObject content that should be used.</param>
  37. /// <param name="returnNow">Determines if the rest of the serialization should be processed, or if the method should return
  38. /// instantly.</param>
  39. partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow);
  40. /// <summary>
  41. /// Deserializes a <see cref="global::System.Collections.IDictionary" /> into an instance of <see cref="Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.SiteSourceControl"
  42. /// />.
  43. /// </summary>
  44. /// <param name="content">The global::System.Collections.IDictionary content that should be used.</param>
  45. /// <returns>
  46. /// an instance of <see cref="Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.ISiteSourceControl" />.
  47. /// </returns>
  48. public static Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.ISiteSourceControl DeserializeFromDictionary(global::System.Collections.IDictionary content)
  49. {
  50. return new SiteSourceControl(content);
  51. }
  52. /// <summary>
  53. /// Deserializes a <see cref="global::System.Management.Automation.PSObject" /> into an instance of <see cref="Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.SiteSourceControl"
  54. /// />.
  55. /// </summary>
  56. /// <param name="content">The global::System.Management.Automation.PSObject content that should be used.</param>
  57. /// <returns>
  58. /// an instance of <see cref="Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.ISiteSourceControl" />.
  59. /// </returns>
  60. public static Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.ISiteSourceControl DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
  61. {
  62. return new SiteSourceControl(content);
  63. }
  64. /// <summary>
  65. /// Creates a new instance of <see cref="SiteSourceControl" />, deserializing the content from a json string.
  66. /// </summary>
  67. /// <param name="jsonText">a string containing a JSON serialized instance of this model.</param>
  68. /// <returns>an instance of the <see cref="className" /> model class.</returns>
  69. public static Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.ISiteSourceControl FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Functions.Runtime.Json.JsonNode.Parse(jsonText));
  70. /// <summary>
  71. /// Deserializes a <see cref="global::System.Collections.IDictionary" /> into a new instance of <see cref="Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.SiteSourceControl"
  72. /// />.
  73. /// </summary>
  74. /// <param name="content">The global::System.Collections.IDictionary content that should be used.</param>
  75. internal SiteSourceControl(global::System.Collections.IDictionary content)
  76. {
  77. bool returnNow = false;
  78. BeforeDeserializeDictionary(content, ref returnNow);
  79. if (returnNow)
  80. {
  81. return;
  82. }
  83. // actually deserialize
  84. ((Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.ISiteSourceControlInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.ISiteSourceControlProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.ISiteSourceControlInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.SiteSourceControlPropertiesTypeConverter.ConvertFrom);
  85. ((Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.IProxyOnlyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.IProxyOnlyResourceInternal)this).Name, global::System.Convert.ToString);
  86. ((Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.IProxyOnlyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.IProxyOnlyResourceInternal)this).Type, global::System.Convert.ToString);
  87. ((Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.IProxyOnlyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.IProxyOnlyResourceInternal)this).Id, global::System.Convert.ToString);
  88. ((Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.IProxyOnlyResourceInternal)this).Kind = (string) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.IProxyOnlyResourceInternal)this).Kind, global::System.Convert.ToString);
  89. ((Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.ISiteSourceControlInternal)this).Branch = (string) content.GetValueForProperty("Branch",((Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.ISiteSourceControlInternal)this).Branch, global::System.Convert.ToString);
  90. ((Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.ISiteSourceControlInternal)this).DeploymentRollbackEnabled = (bool?) content.GetValueForProperty("DeploymentRollbackEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.ISiteSourceControlInternal)this).DeploymentRollbackEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool)));
  91. ((Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.ISiteSourceControlInternal)this).IsManualIntegration = (bool?) content.GetValueForProperty("IsManualIntegration",((Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.ISiteSourceControlInternal)this).IsManualIntegration, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool)));
  92. ((Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.ISiteSourceControlInternal)this).IsMercurial = (bool?) content.GetValueForProperty("IsMercurial",((Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.ISiteSourceControlInternal)this).IsMercurial, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool)));
  93. ((Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.ISiteSourceControlInternal)this).RepoUrl = (string) content.GetValueForProperty("RepoUrl",((Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.ISiteSourceControlInternal)this).RepoUrl, global::System.Convert.ToString);
  94. AfterDeserializeDictionary(content);
  95. }
  96. /// <summary>
  97. /// Deserializes a <see cref="global::System.Management.Automation.PSObject" /> into a new instance of <see cref="Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.SiteSourceControl"
  98. /// />.
  99. /// </summary>
  100. /// <param name="content">The global::System.Management.Automation.PSObject content that should be used.</param>
  101. internal SiteSourceControl(global::System.Management.Automation.PSObject content)
  102. {
  103. bool returnNow = false;
  104. BeforeDeserializePSObject(content, ref returnNow);
  105. if (returnNow)
  106. {
  107. return;
  108. }
  109. // actually deserialize
  110. ((Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.ISiteSourceControlInternal)this).Property = (Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.ISiteSourceControlProperties) content.GetValueForProperty("Property",((Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.ISiteSourceControlInternal)this).Property, Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.SiteSourceControlPropertiesTypeConverter.ConvertFrom);
  111. ((Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.IProxyOnlyResourceInternal)this).Name = (string) content.GetValueForProperty("Name",((Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.IProxyOnlyResourceInternal)this).Name, global::System.Convert.ToString);
  112. ((Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.IProxyOnlyResourceInternal)this).Type = (string) content.GetValueForProperty("Type",((Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.IProxyOnlyResourceInternal)this).Type, global::System.Convert.ToString);
  113. ((Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.IProxyOnlyResourceInternal)this).Id = (string) content.GetValueForProperty("Id",((Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.IProxyOnlyResourceInternal)this).Id, global::System.Convert.ToString);
  114. ((Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.IProxyOnlyResourceInternal)this).Kind = (string) content.GetValueForProperty("Kind",((Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.IProxyOnlyResourceInternal)this).Kind, global::System.Convert.ToString);
  115. ((Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.ISiteSourceControlInternal)this).Branch = (string) content.GetValueForProperty("Branch",((Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.ISiteSourceControlInternal)this).Branch, global::System.Convert.ToString);
  116. ((Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.ISiteSourceControlInternal)this).DeploymentRollbackEnabled = (bool?) content.GetValueForProperty("DeploymentRollbackEnabled",((Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.ISiteSourceControlInternal)this).DeploymentRollbackEnabled, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool)));
  117. ((Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.ISiteSourceControlInternal)this).IsManualIntegration = (bool?) content.GetValueForProperty("IsManualIntegration",((Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.ISiteSourceControlInternal)this).IsManualIntegration, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool)));
  118. ((Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.ISiteSourceControlInternal)this).IsMercurial = (bool?) content.GetValueForProperty("IsMercurial",((Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.ISiteSourceControlInternal)this).IsMercurial, (__y)=> (bool) global::System.Convert.ChangeType(__y, typeof(bool)));
  119. ((Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.ISiteSourceControlInternal)this).RepoUrl = (string) content.GetValueForProperty("RepoUrl",((Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.ISiteSourceControlInternal)this).RepoUrl, global::System.Convert.ToString);
  120. AfterDeserializePSObject(content);
  121. }
  122. /// <summary>Serializes this instance to a json string.</summary>
  123. /// <returns>a <see cref="System.String" /> containing this model serialized to JSON text.</returns>
  124. public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Functions.Runtime.SerializationMode.IncludeAll)?.ToString();
  125. }
  126. /// Source control configuration for an app.
  127. [System.ComponentModel.TypeConverter(typeof(SiteSourceControlTypeConverter))]
  128. public partial interface ISiteSourceControl
  129. {
  130. }
  131. }