function clusterInfo = hCreateClusterInfo(clusterID, masterSubnetID, clusterName, ...
    maxNumberOfWorkers, matlabReleaseVersion, isResizable, hasGpu, ...
    vpcID, numberOfWorkers, clusterHeadNodeDNSName, peerLookupUri, ...
    numberOfAvailableWorkers, SSLCertificate, hostingProvider, ...
    clusterSharedState, clusterState, terminationPolicy, terminationDuration, expiresOn)
% This function is effectively a builder for parallel.internal.cloud.ClusterInfo
% with MATLAB-compatible datatypes.

%   Copyright 2020 The MathWorks, Inc.

    clusterInfo = parallel.internal.cloud.ClusterInfo();
    clusterInfo.ClusterID = clusterID;
    clusterInfo.MasterSubnetID = masterSubnetID;
    clusterInfo.ClusterName = clusterName;
    clusterInfo.JobManagerName = clusterName;
    clusterInfo.MaxNumberOfWorkers = maxNumberOfWorkers;
    clusterInfo.MatlabReleaseVersion = matlabReleaseVersion;
    clusterInfo.IsResizable = isResizable;
    clusterInfo.HasGpu = hasGpu;
    clusterInfo.VpcID = vpcID;
    clusterInfo.NumberOfWorkers = numberOfWorkers;
    clusterInfo.ClusterHeadNodeDNSName = clusterHeadNodeDNSName;
    clusterInfo.PeerLookupUri = peerLookupUri;
    clusterInfo.NumberOfAvailableWorkers = numberOfAvailableWorkers;
    if ~isempty(SSLCertificate) % Fails to build if empty.
        clusterInfo.SSLCertificate = SSLCertificate;
    end
    clusterInfo.HostingProvider = hostingProvider;
    clusterInfo.ClusterSharedState = clusterSharedState;
    clusterInfo.ClusterState = clusterState;
    clusterInfo.TerminationPolicy = terminationPolicy;
    clusterInfo.TerminationDuration = terminationDuration;
    clusterInfo.ExpiresOn = expiresOn;
end
