mirror of
https://github.com/crmeb/CRMEB.git
synced 2026-11-01 15:31:03 +00:00
69 lines
2.0 KiB
PHP
69 lines
2.0 KiB
PHP
// Code generated by protoc-gen-volcengine-sdk
|
|
// source: updateDenyConfig
|
|
// DO NOT EDIT!
|
|
<?php
|
|
require('../../vendor/autoload.php');
|
|
|
|
$client = Volc\Service\Live\Live::getInstance();
|
|
$client->setAccessKey('');
|
|
$client->setSecretKey('==');
|
|
|
|
$request = new Volc\Service\Live\Models\Request\UpdateDenyConfigRequest();
|
|
$request->setVhost("");
|
|
$request->setDomain("");
|
|
$detail1 = new Volc\Service\Live\Models\Business\DenyConfigDetail();
|
|
$detail2 = new Volc\Service\Live\Models\Business\DenyConfigDetail();
|
|
$detail1->setRegion("");
|
|
$ProType_encode2 = json_encode(array("",""));
|
|
$ProType_decode2 = json_decode($ProType_encode2,true);
|
|
$setProType=array();
|
|
$setProType[0] = "";
|
|
$setFmtType=array();
|
|
$setFmtType[0] = "";
|
|
$setAllowList=array();
|
|
$setAllowList[0] = "";
|
|
$setDenyList=array();
|
|
$setDenyList[0] = "";
|
|
$detail2->setProType($setProType);
|
|
$detail2->setFmtType($setFmtType);
|
|
$detail2->setDenyList($setDenyList);
|
|
$detail2->setAllowList($setAllowList);
|
|
$details = array(new Volc\Service\Live\Models\Business\DenyConfigDetail());
|
|
$details[0] = $detail2;
|
|
$request->setDenyConfigList($details);
|
|
|
|
|
|
$response = new Volc\Service\Live\Models\Response\UpdateDenyConfigResponse();
|
|
try {
|
|
$response = $client->updateDenyConfig($request);
|
|
} catch (Exception $e) {
|
|
echo $e, "\n";
|
|
} catch (Throwable $e) {
|
|
echo $e, "\n";
|
|
}
|
|
if ($response != null && $response->getResponseMetadata() != null && $response->getResponseMetadata()->getError() != null) {
|
|
echo $response->getResponseMetadata()->getError()->serializeToJsonString(), "\n";
|
|
} else {
|
|
echo $response->serializeToJsonString(), "\n";
|
|
}
|
|
|
|
function objectToArray($d) {
|
|
if (is_object($d)) {
|
|
// Gets the properties of the given object
|
|
// with get_object_vars function
|
|
$d = get_object_vars($d);
|
|
}
|
|
|
|
if (is_array($d)) {
|
|
/*
|
|
* Return array converted to object
|
|
* Using __FUNCTION__ (Magic constant)
|
|
* for recursive call
|
|
*/
|
|
return array_map(__FUNCTION__, $d);
|
|
}
|
|
else {
|
|
// Return array
|
|
return $d;
|
|
}
|
|
} |