Skip to content

Commit b0eb16f

Browse files
committed
Support API CopyDentryByNodeId.
1 parent b2ff7b9 commit b0eb16f

File tree

10 files changed

+839
-0
lines changed

10 files changed

+839
-0
lines changed

aliding-20230426/ChangeLog.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
1+
2025-11-20 Version: 2.38.0
2+
- Support API CopyDentryByNodeId.
3+
4+
15
2025-11-20 Version: 2.37.2
26
- Generated php 2023-04-26 for aliding.
37

aliding-20230426/src/Aliding.php

Lines changed: 107 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,11 @@
143143
use AlibabaCloud\SDK\Aliding\V20230426\Models\CommitFileResponse;
144144
use AlibabaCloud\SDK\Aliding\V20230426\Models\CommitFileShrinkHeaders;
145145
use AlibabaCloud\SDK\Aliding\V20230426\Models\CommitFileShrinkRequest;
146+
use AlibabaCloud\SDK\Aliding\V20230426\Models\CopyDentryByNodeIdHeaders;
147+
use AlibabaCloud\SDK\Aliding\V20230426\Models\CopyDentryByNodeIdRequest;
148+
use AlibabaCloud\SDK\Aliding\V20230426\Models\CopyDentryByNodeIdResponse;
149+
use AlibabaCloud\SDK\Aliding\V20230426\Models\CopyDentryByNodeIdShrinkHeaders;
150+
use AlibabaCloud\SDK\Aliding\V20230426\Models\CopyDentryByNodeIdShrinkRequest;
146151
use AlibabaCloud\SDK\Aliding\V20230426\Models\CopyDentryHeaders;
147152
use AlibabaCloud\SDK\Aliding\V20230426\Models\CopyDentryRequest;
148153
use AlibabaCloud\SDK\Aliding\V20230426\Models\CopyDentryResponse;
@@ -4077,6 +4082,108 @@ public function copyDentry($request)
40774082
return $this->copyDentryWithOptions($request, $headers, $runtime);
40784083
}
40794084

4085+
/**
4086+
* 通过NodeId创建知识库节点副本.
4087+
*
4088+
* @param tmpReq - CopyDentryByNodeIdRequest
4089+
* @param tmpHeader - CopyDentryByNodeIdHeaders
4090+
* @param runtime - runtime options for this request RuntimeOptions
4091+
*
4092+
* @returns CopyDentryByNodeIdResponse
4093+
*
4094+
* @param CopyDentryByNodeIdRequest $tmpReq
4095+
* @param CopyDentryByNodeIdHeaders $tmpHeader
4096+
* @param RuntimeOptions $runtime
4097+
*
4098+
* @return CopyDentryByNodeIdResponse
4099+
*/
4100+
public function copyDentryByNodeIdWithOptions($tmpReq, $tmpHeader, $runtime)
4101+
{
4102+
$tmpReq->validate();
4103+
$request = new CopyDentryByNodeIdShrinkRequest([]);
4104+
Utils::convert($tmpReq, $request);
4105+
$headers = new CopyDentryByNodeIdShrinkHeaders([]);
4106+
Utils::convert($tmpHeader, $headers);
4107+
if (null !== $tmpHeader->accountContext) {
4108+
$headers->accountContextShrink = Utils::arrayToStringWithSpecifiedStyle($tmpHeader->accountContext, 'AccountContext', 'json');
4109+
}
4110+
4111+
if (null !== $tmpReq->tenantContext) {
4112+
$request->tenantContextShrink = Utils::arrayToStringWithSpecifiedStyle($tmpReq->tenantContext, 'TenantContext', 'json');
4113+
}
4114+
4115+
$body = [];
4116+
if (null !== $request->dentryUuid) {
4117+
@$body['DentryUuid'] = $request->dentryUuid;
4118+
}
4119+
4120+
if (null !== $request->name) {
4121+
@$body['Name'] = $request->name;
4122+
}
4123+
4124+
if (null !== $request->tenantContextShrink) {
4125+
@$body['TenantContext'] = $request->tenantContextShrink;
4126+
}
4127+
4128+
if (null !== $request->toNextNodeId) {
4129+
@$body['ToNextNodeId'] = $request->toNextNodeId;
4130+
}
4131+
4132+
if (null !== $request->toParentNodeId) {
4133+
@$body['ToParentNodeId'] = $request->toParentNodeId;
4134+
}
4135+
4136+
if (null !== $request->toPrevNodeId) {
4137+
@$body['ToPrevNodeId'] = $request->toPrevNodeId;
4138+
}
4139+
4140+
$realHeaders = [];
4141+
if (null !== $headers->commonHeaders) {
4142+
$realHeaders = $headers->commonHeaders;
4143+
}
4144+
4145+
if (null !== $headers->accountContextShrink) {
4146+
@$realHeaders['AccountContext'] = json_encode($headers->accountContextShrink, \JSON_UNESCAPED_UNICODE + \JSON_UNESCAPED_SLASHES);
4147+
}
4148+
4149+
$req = new OpenApiRequest([
4150+
'headers' => $realHeaders,
4151+
'body' => Utils::parseToMap($body),
4152+
]);
4153+
$params = new Params([
4154+
'action' => 'CopyDentryByNodeId',
4155+
'version' => '2023-04-26',
4156+
'protocol' => 'HTTPS',
4157+
'pathname' => '/dingtalk/v2/documents/copyDentryByNodeId',
4158+
'method' => 'POST',
4159+
'authType' => 'AK',
4160+
'style' => 'ROA',
4161+
'reqBodyType' => 'formData',
4162+
'bodyType' => 'json',
4163+
]);
4164+
4165+
return CopyDentryByNodeIdResponse::fromMap($this->callApi($params, $req, $runtime));
4166+
}
4167+
4168+
/**
4169+
* 通过NodeId创建知识库节点副本.
4170+
*
4171+
* @param request - CopyDentryByNodeIdRequest
4172+
*
4173+
* @returns CopyDentryByNodeIdResponse
4174+
*
4175+
* @param CopyDentryByNodeIdRequest $request
4176+
*
4177+
* @return CopyDentryByNodeIdResponse
4178+
*/
4179+
public function copyDentryByNodeId($request)
4180+
{
4181+
$runtime = new RuntimeOptions([]);
4182+
$headers = new CopyDentryByNodeIdHeaders([]);
4183+
4184+
return $this->copyDentryByNodeIdWithOptions($request, $headers, $runtime);
4185+
}
4186+
40804187
/**
40814188
* @param tmpReq - CreateAlidingAssistantRequest
40824189
* @param tmpHeader - CreateAlidingAssistantHeaders
Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
<?php
2+
3+
// This file is auto-generated, don't edit it. Thanks.
4+
5+
namespace AlibabaCloud\SDK\Aliding\V20230426\Models;
6+
7+
use AlibabaCloud\Dara\Model;
8+
use AlibabaCloud\SDK\Aliding\V20230426\Models\CopyDentryByNodeIdHeaders\accountContext;
9+
10+
class CopyDentryByNodeIdHeaders extends Model
11+
{
12+
/**
13+
* @var string[]
14+
*/
15+
public $commonHeaders;
16+
17+
/**
18+
* @var accountContext
19+
*/
20+
public $accountContext;
21+
protected $_name = [
22+
'commonHeaders' => 'commonHeaders',
23+
'accountContext' => 'AccountContext',
24+
];
25+
26+
public function validate()
27+
{
28+
if (\is_array($this->commonHeaders)) {
29+
Model::validateArray($this->commonHeaders);
30+
}
31+
if (null !== $this->accountContext) {
32+
$this->accountContext->validate();
33+
}
34+
parent::validate();
35+
}
36+
37+
public function toArray($noStream = false)
38+
{
39+
$res = [];
40+
if (null !== $this->commonHeaders) {
41+
if (\is_array($this->commonHeaders)) {
42+
$res['commonHeaders'] = [];
43+
foreach ($this->commonHeaders as $key1 => $value1) {
44+
$res['commonHeaders'][$key1] = $value1;
45+
}
46+
}
47+
}
48+
49+
if (null !== $this->accountContext) {
50+
$res['AccountContext'] = null !== $this->accountContext ? $this->accountContext->toArray($noStream) : $this->accountContext;
51+
}
52+
53+
return $res;
54+
}
55+
56+
public function toMap($noStream = false)
57+
{
58+
return $this->toArray($noStream);
59+
}
60+
61+
public static function fromMap($map = [])
62+
{
63+
$model = new self();
64+
if (isset($map['commonHeaders'])) {
65+
if (!empty($map['commonHeaders'])) {
66+
$model->commonHeaders = [];
67+
foreach ($map['commonHeaders'] as $key1 => $value1) {
68+
$model->commonHeaders[$key1] = $value1;
69+
}
70+
}
71+
}
72+
73+
if (isset($map['AccountContext'])) {
74+
$model->accountContext = accountContext::fromMap($map['AccountContext']);
75+
}
76+
77+
return $model;
78+
}
79+
}
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
<?php
2+
3+
// This file is auto-generated, don't edit it. Thanks.
4+
5+
namespace AlibabaCloud\SDK\Aliding\V20230426\Models\CopyDentryByNodeIdHeaders;
6+
7+
use AlibabaCloud\Dara\Model;
8+
9+
class accountContext extends Model
10+
{
11+
/**
12+
* @var string
13+
*/
14+
public $accountId;
15+
protected $_name = [
16+
'accountId' => 'accountId',
17+
];
18+
19+
public function validate()
20+
{
21+
parent::validate();
22+
}
23+
24+
public function toArray($noStream = false)
25+
{
26+
$res = [];
27+
if (null !== $this->accountId) {
28+
$res['accountId'] = $this->accountId;
29+
}
30+
31+
return $res;
32+
}
33+
34+
public function toMap($noStream = false)
35+
{
36+
return $this->toArray($noStream);
37+
}
38+
39+
public static function fromMap($map = [])
40+
{
41+
$model = new self();
42+
if (isset($map['accountId'])) {
43+
$model->accountId = $map['accountId'];
44+
}
45+
46+
return $model;
47+
}
48+
}
Lines changed: 122 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,122 @@
1+
<?php
2+
3+
// This file is auto-generated, don't edit it. Thanks.
4+
5+
namespace AlibabaCloud\SDK\Aliding\V20230426\Models;
6+
7+
use AlibabaCloud\Dara\Model;
8+
use AlibabaCloud\SDK\Aliding\V20230426\Models\CopyDentryByNodeIdRequest\tenantContext;
9+
10+
class CopyDentryByNodeIdRequest extends Model
11+
{
12+
/**
13+
* @var string
14+
*/
15+
public $dentryUuid;
16+
17+
/**
18+
* @var string
19+
*/
20+
public $name;
21+
22+
/**
23+
* @var tenantContext
24+
*/
25+
public $tenantContext;
26+
27+
/**
28+
* @var string
29+
*/
30+
public $toNextNodeId;
31+
32+
/**
33+
* @var string
34+
*/
35+
public $toParentNodeId;
36+
37+
/**
38+
* @var string
39+
*/
40+
public $toPrevNodeId;
41+
protected $_name = [
42+
'dentryUuid' => 'DentryUuid',
43+
'name' => 'Name',
44+
'tenantContext' => 'TenantContext',
45+
'toNextNodeId' => 'ToNextNodeId',
46+
'toParentNodeId' => 'ToParentNodeId',
47+
'toPrevNodeId' => 'ToPrevNodeId',
48+
];
49+
50+
public function validate()
51+
{
52+
if (null !== $this->tenantContext) {
53+
$this->tenantContext->validate();
54+
}
55+
parent::validate();
56+
}
57+
58+
public function toArray($noStream = false)
59+
{
60+
$res = [];
61+
if (null !== $this->dentryUuid) {
62+
$res['DentryUuid'] = $this->dentryUuid;
63+
}
64+
65+
if (null !== $this->name) {
66+
$res['Name'] = $this->name;
67+
}
68+
69+
if (null !== $this->tenantContext) {
70+
$res['TenantContext'] = null !== $this->tenantContext ? $this->tenantContext->toArray($noStream) : $this->tenantContext;
71+
}
72+
73+
if (null !== $this->toNextNodeId) {
74+
$res['ToNextNodeId'] = $this->toNextNodeId;
75+
}
76+
77+
if (null !== $this->toParentNodeId) {
78+
$res['ToParentNodeId'] = $this->toParentNodeId;
79+
}
80+
81+
if (null !== $this->toPrevNodeId) {
82+
$res['ToPrevNodeId'] = $this->toPrevNodeId;
83+
}
84+
85+
return $res;
86+
}
87+
88+
public function toMap($noStream = false)
89+
{
90+
return $this->toArray($noStream);
91+
}
92+
93+
public static function fromMap($map = [])
94+
{
95+
$model = new self();
96+
if (isset($map['DentryUuid'])) {
97+
$model->dentryUuid = $map['DentryUuid'];
98+
}
99+
100+
if (isset($map['Name'])) {
101+
$model->name = $map['Name'];
102+
}
103+
104+
if (isset($map['TenantContext'])) {
105+
$model->tenantContext = tenantContext::fromMap($map['TenantContext']);
106+
}
107+
108+
if (isset($map['ToNextNodeId'])) {
109+
$model->toNextNodeId = $map['ToNextNodeId'];
110+
}
111+
112+
if (isset($map['ToParentNodeId'])) {
113+
$model->toParentNodeId = $map['ToParentNodeId'];
114+
}
115+
116+
if (isset($map['ToPrevNodeId'])) {
117+
$model->toPrevNodeId = $map['ToPrevNodeId'];
118+
}
119+
120+
return $model;
121+
}
122+
}

0 commit comments

Comments
 (0)