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

https://github.com/Azure/azure-powershell · C# · 142 lines · 56 code · 18 blank · 68 comment · 2 complexity · dc056e9cd2b2eed55df5324976b1f6e5 MD5 · raw file

  1. namespace Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801
  2. {
  3. using Microsoft.Azure.PowerShell.Cmdlets.Functions.Runtime.PowerShell;
  4. /// <summary>StaticSiteUserInvitationRequestResource resource specific properties</summary>
  5. [System.ComponentModel.TypeConverter(typeof(StaticSiteUserInvitationRequestResourcePropertiesTypeConverter))]
  6. public partial class StaticSiteUserInvitationRequestResourceProperties
  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.StaticSiteUserInvitationRequestResourceProperties"
  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.IStaticSiteUserInvitationRequestResourceProperties"
  47. /// />.
  48. /// </returns>
  49. public static Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.IStaticSiteUserInvitationRequestResourceProperties DeserializeFromDictionary(global::System.Collections.IDictionary content)
  50. {
  51. return new StaticSiteUserInvitationRequestResourceProperties(content);
  52. }
  53. /// <summary>
  54. /// Deserializes a <see cref="global::System.Management.Automation.PSObject" /> into an instance of <see cref="Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.StaticSiteUserInvitationRequestResourceProperties"
  55. /// />.
  56. /// </summary>
  57. /// <param name="content">The global::System.Management.Automation.PSObject content that should be used.</param>
  58. /// <returns>
  59. /// an instance of <see cref="Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.IStaticSiteUserInvitationRequestResourceProperties"
  60. /// />.
  61. /// </returns>
  62. public static Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.IStaticSiteUserInvitationRequestResourceProperties DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
  63. {
  64. return new StaticSiteUserInvitationRequestResourceProperties(content);
  65. }
  66. /// <summary>
  67. /// Creates a new instance of <see cref="StaticSiteUserInvitationRequestResourceProperties" />, deserializing the content
  68. /// from a json string.
  69. /// </summary>
  70. /// <param name="jsonText">a string containing a JSON serialized instance of this model.</param>
  71. /// <returns>an instance of the <see cref="className" /> model class.</returns>
  72. public static Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.IStaticSiteUserInvitationRequestResourceProperties FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Functions.Runtime.Json.JsonNode.Parse(jsonText));
  73. /// <summary>
  74. /// Deserializes a <see cref="global::System.Collections.IDictionary" /> into a new instance of <see cref="Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.StaticSiteUserInvitationRequestResourceProperties"
  75. /// />.
  76. /// </summary>
  77. /// <param name="content">The global::System.Collections.IDictionary content that should be used.</param>
  78. internal StaticSiteUserInvitationRequestResourceProperties(global::System.Collections.IDictionary content)
  79. {
  80. bool returnNow = false;
  81. BeforeDeserializeDictionary(content, ref returnNow);
  82. if (returnNow)
  83. {
  84. return;
  85. }
  86. // actually deserialize
  87. ((Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.IStaticSiteUserInvitationRequestResourcePropertiesInternal)this).Domain = (string) content.GetValueForProperty("Domain",((Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.IStaticSiteUserInvitationRequestResourcePropertiesInternal)this).Domain, global::System.Convert.ToString);
  88. ((Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.IStaticSiteUserInvitationRequestResourcePropertiesInternal)this).NumHoursToExpiration = (int?) content.GetValueForProperty("NumHoursToExpiration",((Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.IStaticSiteUserInvitationRequestResourcePropertiesInternal)this).NumHoursToExpiration, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int)));
  89. ((Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.IStaticSiteUserInvitationRequestResourcePropertiesInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.IStaticSiteUserInvitationRequestResourcePropertiesInternal)this).Provider, global::System.Convert.ToString);
  90. ((Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.IStaticSiteUserInvitationRequestResourcePropertiesInternal)this).Role = (string) content.GetValueForProperty("Role",((Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.IStaticSiteUserInvitationRequestResourcePropertiesInternal)this).Role, global::System.Convert.ToString);
  91. ((Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.IStaticSiteUserInvitationRequestResourcePropertiesInternal)this).UserDetail = (string) content.GetValueForProperty("UserDetail",((Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.IStaticSiteUserInvitationRequestResourcePropertiesInternal)this).UserDetail, global::System.Convert.ToString);
  92. AfterDeserializeDictionary(content);
  93. }
  94. /// <summary>
  95. /// Deserializes a <see cref="global::System.Management.Automation.PSObject" /> into a new instance of <see cref="Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.StaticSiteUserInvitationRequestResourceProperties"
  96. /// />.
  97. /// </summary>
  98. /// <param name="content">The global::System.Management.Automation.PSObject content that should be used.</param>
  99. internal StaticSiteUserInvitationRequestResourceProperties(global::System.Management.Automation.PSObject content)
  100. {
  101. bool returnNow = false;
  102. BeforeDeserializePSObject(content, ref returnNow);
  103. if (returnNow)
  104. {
  105. return;
  106. }
  107. // actually deserialize
  108. ((Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.IStaticSiteUserInvitationRequestResourcePropertiesInternal)this).Domain = (string) content.GetValueForProperty("Domain",((Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.IStaticSiteUserInvitationRequestResourcePropertiesInternal)this).Domain, global::System.Convert.ToString);
  109. ((Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.IStaticSiteUserInvitationRequestResourcePropertiesInternal)this).NumHoursToExpiration = (int?) content.GetValueForProperty("NumHoursToExpiration",((Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.IStaticSiteUserInvitationRequestResourcePropertiesInternal)this).NumHoursToExpiration, (__y)=> (int) global::System.Convert.ChangeType(__y, typeof(int)));
  110. ((Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.IStaticSiteUserInvitationRequestResourcePropertiesInternal)this).Provider = (string) content.GetValueForProperty("Provider",((Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.IStaticSiteUserInvitationRequestResourcePropertiesInternal)this).Provider, global::System.Convert.ToString);
  111. ((Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.IStaticSiteUserInvitationRequestResourcePropertiesInternal)this).Role = (string) content.GetValueForProperty("Role",((Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.IStaticSiteUserInvitationRequestResourcePropertiesInternal)this).Role, global::System.Convert.ToString);
  112. ((Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.IStaticSiteUserInvitationRequestResourcePropertiesInternal)this).UserDetail = (string) content.GetValueForProperty("UserDetail",((Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.IStaticSiteUserInvitationRequestResourcePropertiesInternal)this).UserDetail, global::System.Convert.ToString);
  113. AfterDeserializePSObject(content);
  114. }
  115. /// <summary>Serializes this instance to a json string.</summary>
  116. /// <returns>a <see cref="System.String" /> containing this model serialized to JSON text.</returns>
  117. public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Functions.Runtime.SerializationMode.IncludeAll)?.ToString();
  118. }
  119. /// StaticSiteUserInvitationRequestResource resource specific properties
  120. [System.ComponentModel.TypeConverter(typeof(StaticSiteUserInvitationRequestResourcePropertiesTypeConverter))]
  121. public partial interface IStaticSiteUserInvitationRequestResourceProperties
  122. {
  123. }
  124. }