internal static WorkspaceUpdateParameters DeserializeWorkspaceUpdateParameters(JsonElement element) { Optional <IDictionary <string, string> > tags = default; Optional <WorkspaceIdentity> identity = default; foreach (var property in element.EnumerateObject()) { 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("identity")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } identity = WorkspaceIdentity.DeserializeWorkspaceIdentity(property.Value); continue; } } return(new WorkspaceUpdateParameters(Optional.ToDictionary(tags), identity.Value)); }
internal Workspace(string id, string name, string type, string location, IReadOnlyDictionary <string, string> tags, string eTag, WorkspaceIdentity identity, string provisioningState, DateTimeOffset?createTime, string version, LinkedServiceReference defaultStorage, LinkedServiceReference defaultSqlServer, IReadOnlyDictionary <string, object> additionalProperties) : base(id, name, type, location, tags, eTag) { Identity = identity; ProvisioningState = provisioningState; CreateTime = createTime; Version = version; DefaultStorage = defaultStorage; DefaultSqlServer = defaultSqlServer; AdditionalProperties = additionalProperties ?? new Dictionary <string, object>(); }
internal WorkspaceUpdateParameters(IReadOnlyDictionary <string, string> tags, WorkspaceIdentity identity) { Tags = tags; Identity = identity; }