<commit_before><?php
/**
 * @author @jenschude <<EMAIL>>
 */

namespace Commercetools\Core\Request\Categories\Command;

use Commercetools\Core\Model\Common\Context;
use Commercetools\Core\Model\Common\LocalizedString;
use Commercetools\Core\Request\AbstractAction;

/**
 * @package Commercetools\Core\Request\Categories\Command
 * @link https://docs.commercetools.com/http-api-projects-products.html#set-asset-key
 * @method string getAction()
 * @method CategorySetAssetKeyAction setAction(string $action = null)
 * @method string getAssetId()
 * @method CategorySetAssetKeyAction setAssetId(string $assetId = null)
 * @method string getAssetKey()
 * @method CategorySetAssetKeyAction setAssetKey(string $assetKey = null)
 * @method LocalizedString getName()
 * @method CategorySetAssetKeyAction setName(LocalizedString $name = null)
 */
class CategorySetAssetKeyAction extends AbstractAction
{
    public function fieldDefinitions()
    {
        return [
            'action' => [static::TYPE => 'string'],
            'assetId' => [static::TYPE => 'string'],
            'assetKey' => [static::TYPE => 'string'],
            'name' => [static::TYPE => LocalizedString::class],
        ];
    }

    /**
     * @param array $data
     * @param Context|callable $context
     */
    public function __construct(array $data = [], $context = null)
    {
        parent::__construct($data, $context);
        $this->setAction('changeAssetName');
    }

    /**
     * @param string $assetId<commit_msg>WIP: fix category set asset key action<commit_after><?php
/**
 * @author @jenschude <<EMAIL>>
 */

namespace Commercetools\Core\Request\Categories\Command;

use Commercetools\Core\Model\Common\Context;
use Commercetools\Core\Model\Common\LocalizedString;
use Commercetools\Core\Request\AbstractAction;

/**
 * @package Commercetools\Core\Request\Categories\Command
 * @link https://docs.commercetools.com/http-api-projects-products.html#set-asset-key
 * @method string getAction()
 * @method CategorySetAssetKeyAction setAction(string $action = null)
 * @method string getAssetId()
 * @method CategorySetAssetKeyAction setAssetId(string $assetId = null)
 * @method string getAssetKey()
 * @method CategorySetAssetKeyAction setAssetKey(string $assetKey = null)
 * @method LocalizedString getName()
 * @method CategorySetAssetKeyAction setName(LocalizedString $name = null)
 */
class CategorySetAssetKeyAction extends AbstractAction
{
    public function fieldDefinitions()
    {
        return [
            'action' => [static::TYPE => 'string'],
            'assetId' => [static::TYPE => 'string'],
            'assetKey' => [static::TYPE => 'string'],
            'name' => [static::TYPE => LocalizedString::class],
        ];
    }

    /**
     * @param array $data
     * @param Context|callable $context
     */
    public function __construct(array $data = [], $context = null)
    {
        parent::__construct($data, $context);
        $this->setAction('setAssetKey');
    }

    /**
     * @param string $assetId
{'fraction_non_alphanumeric': 0.13728084684088654, 'fraction_numerical': 0.0, 'mean_word_length': 3.732394366197183, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 25, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2496646', 'n_tokens_mistral': 891, 'n_tokens_neox': 882, 'n_words': 177}