public PSPrivateEndpointConnection(
     string id,
     string name,
     PrivateEndpointConnectionProvisioningState provisioningState,
     PSPrivateEndpoint privateEndpoint,
     PSPrivateLinkServiceConnectionState privateLinkServiceConnectionState)
 {
     Id   = id;
     Name = name;
     ProvisioningState = provisioningState;
     PrivateEndpoint   = privateEndpoint;
     PrivateLinkServiceConnectionState = privateLinkServiceConnectionState;
 }
        internal static PSPrivateEndpointConnection CreateFromPrivateEndpointConnection(PrivateEndpointConnection privateEndpointConnection)
        {
            if (privateEndpointConnection == null)
            {
                return(null);
            }

            return(new PSPrivateEndpointConnection(
                       privateEndpointConnection.Id,
                       privateEndpointConnection.Name,
                       privateEndpointConnection.ProvisioningState,
                       PSPrivateEndpoint.CreateFromPrivateEndpoint(privateEndpointConnection.PrivateEndpoint),
                       PSPrivateLinkServiceConnectionState.CreateFromPrivateLinkServiceConnectionState(privateEndpointConnection.PrivateLinkServiceConnectionState)));
        }