/// <summary> /// Validate the object. /// </summary> /// <exception cref="ValidationException"> /// Thrown if validation fails /// </exception> public virtual void Validate() { if (PrivateLinkServiceConnectionState != null) { PrivateLinkServiceConnectionState.Validate(); } }
internal PrivateEndpointConnectionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, ProvisioningState?provisioningState, PrivateEndpoint privateEndpoint, IReadOnlyList <string> groupIds, PrivateLinkServiceConnectionState privateLinkServiceConnectionState) : base(id, name, resourceType, systemData) { ProvisioningState = provisioningState; PrivateEndpoint = privateEndpoint; GroupIds = groupIds; PrivateLinkServiceConnectionState = privateLinkServiceConnectionState; }
internal PrivateEndpointConnectionData(ResourceIdentifier id, string name, ResourceType type, SystemData systemData, string location, IReadOnlyDictionary <string, string> tags, string etag, SubResource privateEndpoint, PrivateLinkServiceConnectionState privateLinkServiceConnectionState, PrivateEndpointConnectionProvisioningState?provisioningState) : base(id, name, type, systemData, location, tags) { Etag = etag; PrivateEndpoint = privateEndpoint; PrivateLinkServiceConnectionState = privateLinkServiceConnectionState; ProvisioningState = provisioningState; }
PrivateLinkService.Update.IWithPrivateEndpointConnectionSettings PrivateLinkService.Update.IWithPrivateEndpointConnectionSettings.WithPrivateLinkServiceConnetionState(string status, string description, string actionRequired) { privateConnectionState = new PrivateLinkServiceConnectionState( status: status, description: description, actionsRequired: actionRequired); return(this); }
internal PrivateEndpointConnectionReference(string id, string name, string type, ProvisioningState?provisioningState, PrivateEndpoint privateEndpoint, PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { Id = id; Name = name; Type = type; ProvisioningState = provisioningState; PrivateEndpoint = privateEndpoint; PrivateLinkServiceConnectionState = privateLinkServiceConnectionState; }
internal ApplicationGatewayPrivateEndpointConnectionData(string id, string name, string etag, string resourceType, PrivateEndpointData privateEndpoint, PrivateLinkServiceConnectionState privateLinkServiceConnectionState, ProvisioningState?provisioningState, string linkIdentifier) : base(id) { Name = name; Etag = etag; ResourceType = resourceType; PrivateEndpoint = privateEndpoint; PrivateLinkServiceConnectionState = privateLinkServiceConnectionState; ProvisioningState = provisioningState; LinkIdentifier = linkIdentifier; }
internal PrivateEndpointConnectionData(string id, string name, string type, string etag, PrivateEndpointData privateEndpoint, PrivateLinkServiceConnectionState privateLinkServiceConnectionState, ProvisioningState?provisioningState, string linkIdentifier) : base(id) { Name = name; Type = type; Etag = etag; PrivateEndpoint = privateEndpoint; PrivateLinkServiceConnectionState = privateLinkServiceConnectionState; ProvisioningState = provisioningState; LinkIdentifier = linkIdentifier; }
internal static PrivateEndpointConnectionData DeserializePrivateEndpointConnectionData(JsonElement element) { Optional <ETag> etag = default; Optional <AzureLocation> location = default; Optional <IReadOnlyDictionary <string, string> > tags = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; SystemData systemData = default; Optional <SubResource> privateEndpoint = default; Optional <PrivateLinkServiceConnectionState> privateLinkServiceConnectionState = default; Optional <PrivateEndpointConnectionProvisioningState> provisioningState = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("etag")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } etag = new ETag(property.Value.GetString()); continue; } if (property.NameEquals("location")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } location = new AzureLocation(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("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; } if (property.NameEquals("systemData")) { systemData = JsonSerializer.Deserialize <SystemData>(property.Value.ToString()); continue; } if (property.NameEquals("properties")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } foreach (var property0 in property.Value.EnumerateObject()) { if (property0.NameEquals("privateEndpoint")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } privateEndpoint = JsonSerializer.Deserialize <SubResource>(property0.Value.ToString()); continue; } if (property0.NameEquals("privateLinkServiceConnectionState")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } privateLinkServiceConnectionState = PrivateLinkServiceConnectionState.DeserializePrivateLinkServiceConnectionState(property0.Value); continue; } if (property0.NameEquals("provisioningState")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } provisioningState = new PrivateEndpointConnectionProvisioningState(property0.Value.GetString()); continue; } } continue; } } return(new PrivateEndpointConnectionData(id, name, type, systemData, Optional.ToNullable(location), Optional.ToDictionary(tags), Optional.ToNullable(etag), privateEndpoint, privateLinkServiceConnectionState.Value, Optional.ToNullable(provisioningState))); }
internal PrivateEndpointConnectionData(ResourceIdentifier id, string name, ResourceType resourceType, SystemData systemData, SubResource privateEndpoint, PrivateLinkServiceConnectionState privateLinkServiceConnectionState, PrivateEndpointConnectionProvisioningState?provisioningState) : base(id, name, resourceType, systemData) { PrivateEndpoint = privateEndpoint; PrivateLinkServiceConnectionState = privateLinkServiceConnectionState; ProvisioningState = provisioningState; }
/// <summary> /// Update the state of specified private endpoint connection associated with /// the container registry. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group to which the container registry belongs. /// </param> /// <param name='registryName'> /// The name of the container registry. /// </param> /// <param name='privateEndpointConnectionName'> /// The name of the private endpoint connection. /// </param> /// <param name='privateEndpoint'> /// The resource of private endpoint. /// </param> /// <param name='privateLinkServiceConnectionState'> /// A collection of information about the state of the connection between /// service consumer and provider. /// </param> public static PrivateEndpointConnection CreateOrUpdate(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string registryName, string privateEndpointConnectionName, PrivateEndpoint privateEndpoint = default(PrivateEndpoint), PrivateLinkServiceConnectionState privateLinkServiceConnectionState = default(PrivateLinkServiceConnectionState)) { return(operations.CreateOrUpdateAsync(resourceGroupName, registryName, privateEndpointConnectionName, privateEndpoint, privateLinkServiceConnectionState).GetAwaiter().GetResult()); }
/// <summary> /// Update the state of specified private endpoint connection associated with /// the container registry. /// </summary> /// <param name='operations'> /// The operations group for this extension method. /// </param> /// <param name='resourceGroupName'> /// The name of the resource group to which the container registry belongs. /// </param> /// <param name='registryName'> /// The name of the container registry. /// </param> /// <param name='privateEndpointConnectionName'> /// The name of the private endpoint connection. /// </param> /// <param name='privateEndpoint'> /// The resource of private endpoint. /// </param> /// <param name='privateLinkServiceConnectionState'> /// A collection of information about the state of the connection between /// service consumer and provider. /// </param> /// <param name='cancellationToken'> /// The cancellation token. /// </param> public static async System.Threading.Tasks.Task <PrivateEndpointConnection> BeginCreateOrUpdateAsync(this IPrivateEndpointConnectionsOperations operations, string resourceGroupName, string registryName, string privateEndpointConnectionName, PrivateEndpoint privateEndpoint = default(PrivateEndpoint), PrivateLinkServiceConnectionState privateLinkServiceConnectionState = default(PrivateLinkServiceConnectionState), CancellationToken cancellationToken = default(CancellationToken)) { using (var _result = await operations.BeginCreateOrUpdateWithHttpMessagesAsync(resourceGroupName, registryName, privateEndpointConnectionName, privateEndpoint, privateLinkServiceConnectionState, null, cancellationToken).ConfigureAwait(false)) { return(_result.Body); } }
internal PrivateEndpointConnection(string id, string name, string type, PrivateEndpoint privateEndpoint, PrivateLinkServiceConnectionState privateLinkServiceConnectionState, string provisioningState) : base(id, name, type) { PrivateEndpoint = privateEndpoint; PrivateLinkServiceConnectionState = privateLinkServiceConnectionState; ProvisioningState = provisioningState; }
internal static PrivateEndpointConnectionData DeserializePrivateEndpointConnectionData(JsonElement element) { Optional <SystemData> systemData = default; ResourceIdentifier id = default; string name = default; ResourceType type = default; Optional <ProvisioningState> provisioningState = default; Optional <PrivateEndpoint> privateEndpoint = default; Optional <IReadOnlyList <string> > groupIds = default; Optional <PrivateLinkServiceConnectionState> privateLinkServiceConnectionState = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("systemData")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } systemData = JsonSerializer.Deserialize <SystemData>(property.Value.ToString()); 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; } if (property.NameEquals("properties")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } foreach (var property0 in property.Value.EnumerateObject()) { if (property0.NameEquals("provisioningState")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } provisioningState = new ProvisioningState(property0.Value.GetString()); continue; } if (property0.NameEquals("privateEndpoint")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } privateEndpoint = PrivateEndpoint.DeserializePrivateEndpoint(property0.Value); continue; } if (property0.NameEquals("groupIds")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } List <string> array = new List <string>(); foreach (var item in property0.Value.EnumerateArray()) { array.Add(item.GetString()); } groupIds = array; continue; } if (property0.NameEquals("privateLinkServiceConnectionState")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } privateLinkServiceConnectionState = PrivateLinkServiceConnectionState.DeserializePrivateLinkServiceConnectionState(property0.Value); continue; } } continue; } } return(new PrivateEndpointConnectionData(id, name, type, systemData, Optional.ToNullable(provisioningState), privateEndpoint.Value, Optional.ToList(groupIds), privateLinkServiceConnectionState.Value)); }
internal PrivateEndpointConnectionItem(PrivateEndpoint privateEndpoint, PrivateLinkServiceConnectionState privateLinkServiceConnectionState, PrivateEndpointConnectionProvisioningState?provisioningState) { PrivateEndpoint = privateEndpoint; PrivateLinkServiceConnectionState = privateLinkServiceConnectionState; ProvisioningState = provisioningState; }
private void ResetPrivateEndpointConnectionParams() { privateConnectionName = null; privateEndpointInner = null; privateConnectionState = null; }
public virtual async Task <Response <PrivateEndpointConnection> > PutAsync(string resourceGroupName, string accountName, string privateEndpointConnectionName, PrivateEndpoint privateEndpoint = null, PrivateLinkServiceConnectionState privateLinkServiceConnectionState = null, CancellationToken cancellationToken = default) { using var scope = _clientDiagnostics.CreateScope("PrivateEndpointConnectionsClient.Put"); scope.Start(); try { return(await RestClient.PutAsync(resourceGroupName, accountName, privateEndpointConnectionName, privateEndpoint, privateLinkServiceConnectionState, cancellationToken).ConfigureAwait(false)); } catch (Exception e) { scope.Failed(e); throw; } }
internal PrivateEndpointConnectionData(ResourceIdentifier id, string name, ResourceType type, ProvisioningState?provisioningState, WritableSubResource privateEndpoint, PrivateLinkServiceConnectionState privateLinkServiceConnectionState) : base(id, name, type) { ProvisioningState = provisioningState; PrivateEndpoint = privateEndpoint; PrivateLinkServiceConnectionState = privateLinkServiceConnectionState; }
public AzureHDInsightPrivateLinkServiceConnectionState(PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { Status = privateLinkServiceConnectionState.Status; Description = privateLinkServiceConnectionState.Description; ActionsRequired = privateLinkServiceConnectionState.ActionsRequired; }
internal static ApplicationGatewayPrivateEndpointConnectionData DeserializeApplicationGatewayPrivateEndpointConnectionData(JsonElement element) { Optional <string> name = default; Optional <string> etag = default; Optional <string> type = default; ResourceIdentifier id = default; Optional <PrivateEndpointData> privateEndpoint = default; Optional <PrivateLinkServiceConnectionState> privateLinkServiceConnectionState = default; Optional <ProvisioningState> provisioningState = default; Optional <string> linkIdentifier = default; foreach (var property in element.EnumerateObject()) { if (property.NameEquals("name")) { name = property.Value.GetString(); continue; } if (property.NameEquals("etag")) { etag = property.Value.GetString(); continue; } if (property.NameEquals("type")) { type = property.Value.GetString(); continue; } if (property.NameEquals("id")) { id = property.Value.GetString(); continue; } if (property.NameEquals("properties")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } foreach (var property0 in property.Value.EnumerateObject()) { if (property0.NameEquals("privateEndpoint")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } privateEndpoint = PrivateEndpointData.DeserializePrivateEndpointData(property0.Value); continue; } if (property0.NameEquals("privateLinkServiceConnectionState")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } privateLinkServiceConnectionState = PrivateLinkServiceConnectionState.DeserializePrivateLinkServiceConnectionState(property0.Value); continue; } if (property0.NameEquals("provisioningState")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } provisioningState = new ProvisioningState(property0.Value.GetString()); continue; } if (property0.NameEquals("linkIdentifier")) { linkIdentifier = property0.Value.GetString(); continue; } } continue; } } return(new ApplicationGatewayPrivateEndpointConnectionData(id, name.Value, etag.Value, type.Value, privateEndpoint.Value, privateLinkServiceConnectionState.Value, Optional.ToNullable(provisioningState), linkIdentifier.Value)); }
internal static PrivateEndpointConnectionData DeserializePrivateEndpointConnectionData(JsonElement element) { ResourceIdentifier id = default; string name = default; ResourceType type = default; SystemData systemData = default; Optional <ProvisioningState> provisioningState = default; Optional <WritableSubResource> privateEndpoint = default; Optional <PrivateLinkServiceConnectionState> privateLinkServiceConnectionState = default; foreach (var property in element.EnumerateObject()) { 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; } if (property.NameEquals("systemData")) { systemData = JsonSerializer.Deserialize <SystemData>(property.Value.ToString()); continue; } if (property.NameEquals("properties")) { if (property.Value.ValueKind == JsonValueKind.Null) { property.ThrowNonNullablePropertyIsNull(); continue; } foreach (var property0 in property.Value.EnumerateObject()) { if (property0.NameEquals("provisioningState")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } provisioningState = new ProvisioningState(property0.Value.GetString()); continue; } if (property0.NameEquals("privateEndpoint")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } privateEndpoint = JsonSerializer.Deserialize <WritableSubResource>(property0.Value.ToString()); continue; } if (property0.NameEquals("privateLinkServiceConnectionState")) { if (property0.Value.ValueKind == JsonValueKind.Null) { property0.ThrowNonNullablePropertyIsNull(); continue; } privateLinkServiceConnectionState = PrivateLinkServiceConnectionState.DeserializePrivateLinkServiceConnectionState(property0.Value); continue; } } continue; } } return(new PrivateEndpointConnectionData(id, name, type, systemData, Optional.ToNullable(provisioningState), privateEndpoint, privateLinkServiceConnectionState.Value)); }
public PSPrivateLinkServiceConnectionState(PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { this.Status = privateLinkServiceConnectionState?.Status; this.Description = privateLinkServiceConnectionState?.Description; this.ActionsRequired = privateLinkServiceConnectionState?.ActionsRequired; }
internal static PSPrivateLinkServiceConnectionState CreateFromPrivateLinkServiceConnectionState(PrivateLinkServiceConnectionState privateLinkServiceConnectionState) { if (privateLinkServiceConnectionState == null) { return(null); } return(new PSPrivateLinkServiceConnectionState( privateLinkServiceConnectionState.Status, privateLinkServiceConnectionState.Description, privateLinkServiceConnectionState.ActionRequired)); }