You are here

class CreateRecordParameters in TMGMT Translator Smartling 8.4

Same name and namespace in other branches
  1. 8.3 vendor/smartling/api-sdk-php/src/AuditLog/Params/CreateRecordParameters.php \Smartling\AuditLog\Params\CreateRecordParameters

Hierarchy

Expanded class hierarchy of CreateRecordParameters

9 files declare their use of CreateRecordParameters
AuditLogApi.php in vendor/smartling/api-sdk-php/src/AuditLog/AuditLogApi.php
AuditLogApiFunctionalTest.php in vendor/smartling/api-sdk-php/tests/functional/AuditLogApiFunctionalTest.php
AuditLogApiTest.php in vendor/smartling/api-sdk-php/tests/unit/AuditLogApiTest.php
BaseFlowTest.php in tests/src/Kernel/BaseFlowTest.php
DownloadFlowTest.php in tests/src/Kernel/DownloadFlowTest.php

... See full list

File

vendor/smartling/api-sdk-php/src/AuditLog/Params/CreateRecordParameters.php, line 8

Namespace

Smartling\AuditLog\Params
View source
class CreateRecordParameters extends BaseParameters {
  const ACTION_TYPE_UPLOAD = 'UPLOAD';
  const ACTION_TYPE_DOWNLOAD = 'DOWNLOAD';
  const ACTION_TYPE_CANCEL = 'CANCEL';
  const ACTION_TYPE_DELETE = 'DELETE';
  const ACTION_TYPE_LOCK_FIELDS = 'LOCK_FIELDS';
  const ACTION_TYPE_UPDATE_SETTINGS = 'UPDATE_SETTINGS';
  public function __construct() {
    $this
      ->setActionTime(time());
  }
  public function setActionTime($timeStamp) {
    if (!is_int($timeStamp)) {
      throw new InvalidArgumentException('Time value must be a timestamp.');
    }
    $this
      ->set('actionTime', date('Y-m-d\\TH:i:s\\Z', $timeStamp));
    return $this;
  }
  public function setActionType($actionType) {
    $allowedActionTypes = [
      CreateRecordParameters::ACTION_TYPE_UPLOAD,
      CreateRecordParameters::ACTION_TYPE_DOWNLOAD,
      CreateRecordParameters::ACTION_TYPE_CANCEL,
      CreateRecordParameters::ACTION_TYPE_DELETE,
      CreateRecordParameters::ACTION_TYPE_LOCK_FIELDS,
      CreateRecordParameters::ACTION_TYPE_UPDATE_SETTINGS,
    ];
    if (!in_array($actionType, $allowedActionTypes)) {
      throw new InvalidArgumentException('Allowed action types are: ' . implode(', ', $allowedActionTypes));
    }
    $this
      ->set('actionType', $actionType);
    return $this;
  }
  public function setFileUri($fileUri) {
    $this
      ->set('fileUri', (string) $fileUri);
    return $this;
  }
  public function setFileUid($fileUid) {
    $this
      ->set('fileUid', (string) $fileUid);
    return $this;
  }
  public function setSourceLocaleId($sourceLocaleId) {
    $this
      ->set('sourceLocaleId', (string) $sourceLocaleId);
    return $this;
  }
  public function setTargetLocaleIds(array $targetLocaleIds) {
    $this
      ->set('targetLocaleIds', $targetLocaleIds);
    return $this;
  }
  public function setTranslationJobUid($translationJobUid) {
    $this
      ->set('translationJobUid', (string) $translationJobUid);
    return $this;
  }
  public function setTranslationJobName($translationJobName) {
    $this
      ->set('translationJobName', (string) $translationJobName);
    return $this;
  }
  public function setTranslationJobDueDate($translationJobDueDate) {
    $this
      ->set('translationJobDueDate', (string) $translationJobDueDate);
    return $this;
  }
  public function setTranslationJobAuthorize($translationJobAuthorize) {
    $this
      ->set('translationJobAuthorize', (bool) $translationJobAuthorize);
    return $this;
  }
  public function setBatchUid($batchUid) {
    $this
      ->set('batchUid', (string) $batchUid);
    return $this;
  }
  public function setDescription($description) {
    $this
      ->set('description', (string) $description);
    return $this;
  }
  public function setClientUserId($clientUserId) {
    $this
      ->set('clientUserId', (string) $clientUserId);
    return $this;
  }
  public function setClientUserEmail($clientUserEmail) {
    $this
      ->set('clientUserEmail', (string) $clientUserEmail);
    return $this;
  }
  public function setClientUserName($clientUserName) {
    $this
      ->set('clientUserName', (string) $clientUserName);
    return $this;
  }
  public function setEnvId($envId) {
    $this
      ->set('envId', (string) $envId);
    return $this;
  }
  public function setClientData($key, $value) {
    if (empty($this->params['clientData'])) {
      $this->params['clientData'] = [];
    }
    $this->params['clientData'] += [
      $key => $value,
    ];
    return $this;
  }

}

Members

Namesort descending Modifiers Type Description Overrides
BaseParameters::$params protected property
BaseParameters::exportToArray public function @inheritdoc Overrides ParameterInterface::exportToArray 1
BaseParameters::set public function @inheritdoc Overrides ParameterInterface::set
CreateRecordParameters::ACTION_TYPE_CANCEL constant
CreateRecordParameters::ACTION_TYPE_DELETE constant
CreateRecordParameters::ACTION_TYPE_DOWNLOAD constant
CreateRecordParameters::ACTION_TYPE_LOCK_FIELDS constant
CreateRecordParameters::ACTION_TYPE_UPDATE_SETTINGS constant
CreateRecordParameters::ACTION_TYPE_UPLOAD constant
CreateRecordParameters::setActionTime public function
CreateRecordParameters::setActionType public function
CreateRecordParameters::setBatchUid public function
CreateRecordParameters::setClientData public function
CreateRecordParameters::setClientUserEmail public function
CreateRecordParameters::setClientUserId public function
CreateRecordParameters::setClientUserName public function
CreateRecordParameters::setDescription public function
CreateRecordParameters::setEnvId public function
CreateRecordParameters::setFileUid public function
CreateRecordParameters::setFileUri public function
CreateRecordParameters::setSourceLocaleId public function
CreateRecordParameters::setTargetLocaleIds public function
CreateRecordParameters::setTranslationJobAuthorize public function
CreateRecordParameters::setTranslationJobDueDate public function
CreateRecordParameters::setTranslationJobName public function
CreateRecordParameters::setTranslationJobUid public function
CreateRecordParameters::__construct public function