Ejemplo n.º 1
0
        internal static ResponseMessageEnvelopeRemotePrivateEndpointConnection DeserializeResponseMessageEnvelopeRemotePrivateEndpointConnection(JsonElement element)
        {
            Optional <string> location = default;
            Optional <IReadOnlyDictionary <string, string> > tags = default;
            Optional <ArmPlan> plan = default;
            Optional <RemotePrivateEndpointConnection> properties = default;
            Optional <SkuDescription>          sku      = default;
            Optional <string>                  status   = default;
            Optional <ErrorEntity>             error    = default;
            Optional <ManagedServiceIdentity>  identity = default;
            Optional <IReadOnlyList <string> > zones    = default;
            ResourceIdentifier                 id       = default;
            string       name = default;
            ResourceType type = default;

            foreach (var property in element.EnumerateObject())
            {
                if (property.NameEquals("location"))
                {
                    location = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("tags"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    Dictionary <string, string> dictionary = new Dictionary <string, string>();
                    foreach (var property0 in property.Value.EnumerateObject())
                    {
                        dictionary.Add(property0.Name, property0.Value.GetString());
                    }
                    tags = dictionary;
                    continue;
                }
                if (property.NameEquals("plan"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    plan = ArmPlan.DeserializeArmPlan(property.Value);
                    continue;
                }
                if (property.NameEquals("properties"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    properties = RemotePrivateEndpointConnection.DeserializeRemotePrivateEndpointConnection(property.Value);
                    continue;
                }
                if (property.NameEquals("sku"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    sku = SkuDescription.DeserializeSkuDescription(property.Value);
                    continue;
                }
                if (property.NameEquals("status"))
                {
                    status = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("error"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    error = ErrorEntity.DeserializeErrorEntity(property.Value);
                    continue;
                }
                if (property.NameEquals("identity"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    identity = ManagedServiceIdentity.DeserializeManagedServiceIdentity(property.Value);
                    continue;
                }
                if (property.NameEquals("zones"))
                {
                    if (property.Value.ValueKind == JsonValueKind.Null)
                    {
                        property.ThrowNonNullablePropertyIsNull();
                        continue;
                    }
                    List <string> array = new List <string>();
                    foreach (var item in property.Value.EnumerateArray())
                    {
                        array.Add(item.GetString());
                    }
                    zones = array;
                    continue;
                }
                if (property.NameEquals("id"))
                {
                    id = new ResourceIdentifier(property.Value.GetString());
                    continue;
                }
                if (property.NameEquals("name"))
                {
                    name = property.Value.GetString();
                    continue;
                }
                if (property.NameEquals("type"))
                {
                    type = property.Value.GetString();
                    continue;
                }
            }
            return(new ResponseMessageEnvelopeRemotePrivateEndpointConnection(id, name, type, location.Value, Optional.ToDictionary(tags), plan.Value, properties.Value, sku.Value, status.Value, error.Value, identity.Value, Optional.ToList(zones)));
        }
Ejemplo n.º 2
0
 internal SitePatchResource(ResourceIdentifier id, string name, ResourceType type, string kind, ManagedServiceIdentity identity, string state, IReadOnlyList <string> hostNames, string repositorySiteName, UsageState?usageState, bool?enabled, IReadOnlyList <string> enabledHostNames, SiteAvailabilityState?availabilityState, IList <HostNameSslState> hostNameSslStates, string serverFarmId, bool?reserved, bool?isXenon, bool?hyperV, DateTimeOffset?lastModifiedTimeUtc, SiteConfig siteConfig, IReadOnlyList <string> trafficManagerHostNames, bool?scmSiteAlsoStopped, string targetSwapSlot, HostingEnvironmentProfile hostingEnvironmentProfile, bool?clientAffinityEnabled, bool?clientCertEnabled, ClientCertMode?clientCertMode, string clientCertExclusionPaths, bool?hostNamesDisabled, string customDomainVerificationId, string outboundIpAddresses, string possibleOutboundIpAddresses, int?containerSize, int?dailyMemoryTimeQuota, DateTimeOffset?suspendedTill, int?maxNumberOfWorkers, CloningInfo cloningInfo, string resourceGroup, bool?isDefaultContainer, string defaultHostName, SlotSwapStatus slotSwapStatus, bool?httpsOnly, RedundancyMode?redundancyMode, Guid?inProgressOperationId, bool?storageAccountRequired, string keyVaultReferenceIdentity, string virtualNetworkSubnetId) : base(id, name, type, kind)
 {
     Identity                    = identity;
     State                       = state;
     HostNames                   = hostNames;
     RepositorySiteName          = repositorySiteName;
     UsageState                  = usageState;
     Enabled                     = enabled;
     EnabledHostNames            = enabledHostNames;
     AvailabilityState           = availabilityState;
     HostNameSslStates           = hostNameSslStates;
     ServerFarmId                = serverFarmId;
     Reserved                    = reserved;
     IsXenon                     = isXenon;
     HyperV                      = hyperV;
     LastModifiedTimeUtc         = lastModifiedTimeUtc;
     SiteConfig                  = siteConfig;
     TrafficManagerHostNames     = trafficManagerHostNames;
     ScmSiteAlsoStopped          = scmSiteAlsoStopped;
     TargetSwapSlot              = targetSwapSlot;
     HostingEnvironmentProfile   = hostingEnvironmentProfile;
     ClientAffinityEnabled       = clientAffinityEnabled;
     ClientCertEnabled           = clientCertEnabled;
     ClientCertMode              = clientCertMode;
     ClientCertExclusionPaths    = clientCertExclusionPaths;
     HostNamesDisabled           = hostNamesDisabled;
     CustomDomainVerificationId  = customDomainVerificationId;
     OutboundIpAddresses         = outboundIpAddresses;
     PossibleOutboundIpAddresses = possibleOutboundIpAddresses;
     ContainerSize               = containerSize;
     DailyMemoryTimeQuota        = dailyMemoryTimeQuota;
     SuspendedTill               = suspendedTill;
     MaxNumberOfWorkers          = maxNumberOfWorkers;
     CloningInfo                 = cloningInfo;
     ResourceGroup               = resourceGroup;
     IsDefaultContainer          = isDefaultContainer;
     DefaultHostName             = defaultHostName;
     SlotSwapStatus              = slotSwapStatus;
     HttpsOnly                   = httpsOnly;
     RedundancyMode              = redundancyMode;
     InProgressOperationId       = inProgressOperationId;
     StorageAccountRequired      = storageAccountRequired;
     KeyVaultReferenceIdentity   = keyVaultReferenceIdentity;
     VirtualNetworkSubnetId      = virtualNetworkSubnetId;
 }
Ejemplo n.º 3
0
 internal ResponseMessageEnvelopeRemotePrivateEndpointConnection(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, string location, IReadOnlyDictionary <string, string> tags, ArmPlan plan, RemotePrivateEndpointConnection properties, SkuDescription sku, string status, ResponseError error, ManagedServiceIdentity identity, IReadOnlyList <string> zones) : base(id, name, resourceType, systemData)
 {
     Location   = location;
     Tags       = tags;
     Plan       = plan;
     Properties = properties;
     Sku        = sku;
     Status     = status;
     Error      = error;
     Identity   = identity;
     Zones      = zones;
 }