public function delete($params, $optParams = [])
    {
        if ($params instanceof Cloud) {
            $params = $params->id;
        }

        return $this->sendRequest([], [
            'restAction' => 'delete',
            'restId' => $params,
            'getParams' => $optParams,
        ], function ($response) {
            return $response->success;
        });
    }
public function delete($params, $optParams = [])
    {
        if ($params instanceof Cloud) {
            $params = $params->id;
        }

        return $this->sendRequest([], [
            'restAction' => 'delete',
            'restId' => $params,
            'getParams' => $optParams,
        ], function ($response) {
            return $response->success;
        });
    }
public function delete ( $ params , $ optParams = [ ] ) { if ( $ params instanceof Cloud ) { $ params = $ params -> id ; } return $ this -> sendRequest ( [ ] , [ 'restAction' => 'delete' , 'restId' => $ params , 'getParams' => $ optParams , ] , function ( $ response ) { return $ response -> success ; } ) ; }
Deletes a cloud.

@param Cloud|string $params    Cloud object or Cloud ID
@param array        $optParams Optional API parameters

@return bool
Deletes a cloud .