Assets/Watson/Scripts/Services/RetrieveAndRank/RetrieveAndRank.cs
/// <summary>
/// Deletes the configuration for a cluster. Before you delete the configuration, delete any collections that point to it.
/// </summary>
/// <param name="callback"></param>
/// <param name="clusterID">The name of the configuration to delete.</param>
/// <param name="configID">Cluster ID for the configuration.</param>
/// <param name="customData"></param>
/// <returns></returns>
Deletes the configuration for a cluster. Before you delete the configuration, delete any collections that point to it.
Deletes the configuration for a cluster . Before you delete the configuration delete any collections that point to it .
public bool DeleteClusterConfig(OnDeleteClusterConfig callback, string clusterID, string configID, string customData = default(string))
        {
            if (callback == null)
                throw new ArgumentNullException("callback");
            if (string.IsNullOrEmpty(clusterID))
                throw new ArgumentNullException("clusterID to is required!");
            if (string.IsNullOrEmpty(configID))
                throw new ArgumentNullException("configID to be deleted is required!");
            if (configID == Config.Instance.GetVariableValue("RetrieveAndRank_IntegrationTestClusterConfigID"))
                throw new WatsonException("You cannot delete the example cluster config!");
            DeleteClusterConfigRequest req = new DeleteClusterConfigRequest();
            req.Callback = callback;
            req.Data = customData;
            req.ClusterID = clusterID;
            req.ConfigID = configID;
            req.Timeout = REQUEST_TIMEOUT;
            req.Delete = true;
            RESTConnector connector = RESTConnector.GetConnector(SERVICE_ID, string.Format(SERVICE_CLUSTER_CONFIG, clusterID, configID));
            if (connector == null)
                return false;
            req.OnResponse = OnDeleteClusterConfigResponse;
            return connector.Send(req);
        }
public bool DeleteClusterConfig ( OnDeleteClusterConfig callback , string clusterID , string configID , string customData = default ( string ) ) { if ( callback == null ) throw new ArgumentNullException ( " " ) ; if ( string . IsNullOrEmpty ( clusterID ) ) throw new ArgumentNullException ( " " ) ; if ( string . IsNullOrEmpty ( configID ) ) throw new ArgumentNullException ( " " ) ; if ( configID == Config . Instance . GetVariableValue ( " " ) ) throw new WatsonException ( " " ) ; DeleteClusterConfigRequest req = new DeleteClusterConfigRequest ( ) ; req . Callback = callback ; req . Data = customData ; req . ClusterID = clusterID ; req . ConfigID = configID ; req . Timeout = REQUEST_TIMEOUT ; req . Delete = true ; RESTConnector connector = RESTConnector . GetConnector ( SERVICE_ID , string . Format ( SERVICE_CLUSTER_CONFIG , clusterID , configID ) ) ; if ( connector == null ) return false ; req . OnResponse = OnDeleteClusterConfigResponse ; return connector . Send ( req ) ; }
Deletes the configuration for a cluster.
Deletes the configuration for a cluster .
None
callback
OnDeleteClusterConfig
None
clusterID
string
The name of the configuration to delete.
The name of the configuration to delete .
configID
string
Cluster ID for the configuration.
Cluster ID for the configuration .
customData
string
None