public function rename($params, $optParams = [])
    {
        return $this->sendRequest(['cloudId', 'publicId', 'newPublicId'], [
            'restAction' => 'update',
            'uri' => '/c/<cloudId>/o/<publicId>/rename/o/<newPublicId>',
            'params' => $params,
            'getParams' => $optParams,
        ], function ($response) use ($params) {
            if ($response->data && !isset($response->data['cloudId'])) {
                $response->data['cloudId'] = $this->client->getParam($params, 'cloudId');
            }

            return isset($response->data) ? new Image($response->data) : $response;
        });
    }
public function rename($params, $optParams = [])
    {
        return $this->sendRequest(['cloudId', 'publicId', 'newPublicId'], [
            'restAction' => 'update',
            'uri' => '/c/<cloudId>/o/<publicId>/rename/o/<newPublicId>',
            'params' => $params,
            'getParams' => $optParams,
        ], function ($response) use ($params) {
            if ($response->data && !isset($response->data['cloudId'])) {
                $response->data['cloudId'] = $this->client->getParam($params, 'cloudId');
            }

            return isset($response->data) ? new Image($response->data) : $response;
        });
    }
public function rename ( $ params , $ optParams = [ ] ) { return $ this -> sendRequest ( [ 'cloudId' , 'publicId' , 'newPublicId' ] , [ 'restAction' => 'update' , 'uri' => '/c/<cloudId>/o/<publicId>/rename/o/<newPublicId>' , 'params' => $ params , 'getParams' => $ optParams , ] , function ( $ response ) use ( $ params ) { if ( $ response -> data && ! isset ( $ response -> data [ 'cloudId' ] ) ) { $ response -> data [ 'cloudId' ] = $ this -> client -> getParam ( $ params , 'cloudId' ) ; } return isset ( $ response -> data ) ? new Image ( $ response -> data ) : $ response ; } ) ; }
Renames the ID of an image.

@param array $params Required API parameters

<li>cloudId - cloud ID
<li>publicId - image ID
<li>newPublicId - new image ID
@param array $optParams Optional API parameters

@return Image|Response
Renames the ID of an image .