/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
- namespace Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801
- {
- using Microsoft.Azure.PowerShell.Cmdlets.Functions.Runtime.PowerShell;
-
- /// <summary>Source control configuration for an app.</summary>
- [System.ComponentModel.TypeConverter(typeof(SiteSourceControlTypeConverter))]
- public partial class SiteSourceControl
- {
-
- /// <summary>
- /// <c>AfterDeserializeDictionary</c> will be called after the deserialization has finished, allowing customization of the
- /// object before it is returned. Implement this method in a partial class to enable this behavior
- /// </summary>
- /// <param name="content">The global::System.Collections.IDictionary content that should be used.</param>
-
- partial void AfterDeserializeDictionary(global::System.Collections.IDictionary content);
-
- /// <summary>
- /// <c>AfterDeserializePSObject</c> will be called after the deserialization has finished, allowing customization of the object
- /// before it is returned. Implement this method in a partial class to enable this behavior
- /// </summary>
- /// <param name="content">The global::System.Management.Automation.PSObject content that should be used.</param>
-
- partial void AfterDeserializePSObject(global::System.Management.Automation.PSObject content);
-
- /// <summary>
- /// <c>BeforeDeserializeDictionary</c> will be called before the deserialization has commenced, allowing complete customization
- /// of the object before it is deserialized.
- /// If you wish to disable the default deserialization entirely, return <c>true</c> in the <see "returnNow" /> output parameter.
- /// Implement this method in a partial class to enable this behavior.
- /// </summary>
- /// <param name="content">The global::System.Collections.IDictionary content that should be used.</param>
- /// <param name="returnNow">Determines if the rest of the serialization should be processed, or if the method should return
- /// instantly.</param>
-
- partial void BeforeDeserializeDictionary(global::System.Collections.IDictionary content, ref bool returnNow);
-
- /// <summary>
- /// <c>BeforeDeserializePSObject</c> will be called before the deserialization has commenced, allowing complete customization
- /// of the object before it is deserialized.
- /// If you wish to disable the default deserialization entirely, return <c>true</c> in the <see "returnNow" /> output parameter.
- /// Implement this method in a partial class to enable this behavior.
- /// </summary>
- /// <param name="content">The global::System.Management.Automation.PSObject content that should be used.</param>
- /// <param name="returnNow">Determines if the rest of the serialization should be processed, or if the method should return
- /// instantly.</param>
-
- partial void BeforeDeserializePSObject(global::System.Management.Automation.PSObject content, ref bool returnNow);
-
- /// <summary>
- /// Deserializes a <see cref="global::System.Collections.IDictionary" /> into an instance of <see cref="Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.SiteSourceControl"
- /// />.
- /// </summary>
- /// <param name="content">The global::System.Collections.IDictionary content that should be used.</param>
- /// <returns>
- /// an instance of <see cref="Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.ISiteSourceControl" />.
- /// </returns>
- public static Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.ISiteSourceControl DeserializeFromDictionary(global::System.Collections.IDictionary content)
- {
- return new SiteSourceControl(content);
- }
-
- /// <summary>
- /// Deserializes a <see cref="global::System.Management.Automation.PSObject" /> into an instance of <see cref="Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.SiteSourceControl"
- /// />.
- /// </summary>
- /// <param name="content">The global::System.Management.Automation.PSObject content that should be used.</param>
- /// <returns>
- /// an instance of <see cref="Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.ISiteSourceControl" />.
- /// </returns>
- public static Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.ISiteSourceControl DeserializeFromPSObject(global::System.Management.Automation.PSObject content)
- {
- return new SiteSourceControl(content);
- }
-
- /// <summary>
- /// Creates a new instance of <see cref="SiteSourceControl" />, deserializing the content from a json string.
- /// </summary>
- /// <param name="jsonText">a string containing a JSON serialized instance of this model.</param>
- /// <returns>an instance of the <see cref="className" /> model class.</returns>
- public static Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.ISiteSourceControl FromJsonString(string jsonText) => FromJson(Microsoft.Azure.PowerShell.Cmdlets.Functions.Runtime.Json.JsonNode.Parse(jsonText));
-
- /// <summary>
- /// Deserializes a <see cref="global::System.Collections.IDictionary" /> into a new instance of <see cref="Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.SiteSourceControl"
- /// />.
- /// </summary>
- /// <param name="content">The global::System.Collections.IDictionary content that should be used.</param>
- internal SiteSourceControl(global::System.Collections.IDictionary content)
- {
- bool returnNow = false;
- BeforeDeserializeDictionary(content, ref returnNow);
- if (returnNow)
- {
- return;
- }
- // actually deserialize
- ((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);
- ((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);
- ((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);
- ((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);
- ((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);
- ((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);
- ((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)));
- ((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)));
- ((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)));
- ((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);
- AfterDeserializeDictionary(content);
- }
-
- /// <summary>
- /// Deserializes a <see cref="global::System.Management.Automation.PSObject" /> into a new instance of <see cref="Microsoft.Azure.PowerShell.Cmdlets.Functions.Models.Api20190801.SiteSourceControl"
- /// />.
- /// </summary>
- /// <param name="content">The global::System.Management.Automation.PSObject content that should be used.</param>
- internal SiteSourceControl(global::System.Management.Automation.PSObject content)
- {
- bool returnNow = false;
- BeforeDeserializePSObject(content, ref returnNow);
- if (returnNow)
- {
- return;
- }
- // actually deserialize
- ((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);
- ((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);
- ((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);
- ((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);
- ((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);
- ((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);
- ((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)));
- ((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)));
- ((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)));
- ((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);
- AfterDeserializePSObject(content);
- }
-
- /// <summary>Serializes this instance to a json string.</summary>
-
- /// <returns>a <see cref="System.String" /> containing this model serialized to JSON text.</returns>
- public string ToJsonString() => ToJson(null, Microsoft.Azure.PowerShell.Cmdlets.Functions.Runtime.SerializationMode.IncludeAll)?.ToString();
- }
- /// Source control configuration for an app.
- [System.ComponentModel.TypeConverter(typeof(SiteSourceControlTypeConverter))]
- public partial interface ISiteSourceControl
-
- {
-
- }
- }