@@ -45,7 +45,11 @@ public function __construct(
4545 */
4646 public function get (array $ args ): array
4747 {
48- $ operationResponse = $ this ->gapicClient ->resumeOperation ($ args ['name ' ]);
48+ if (isset ($ args ['method ' ])) {
49+ $ operationResponse = $ this ->gapicClient ->resumeOperation ($ args ['name ' ], $ args ['method ' ]);
50+ } else {
51+ $ operationResponse = $ this ->gapicClient ->resumeOperation ($ args ['name ' ]);
52+ }
4953
5054 return $ this ->operationResponseToArray ($ operationResponse );
5155 }
@@ -56,10 +60,11 @@ public function get(array $args): array
5660 */
5761 public function cancel (array $ args ): array
5862 {
59- $ operationResponse = $ this ->gapicClient ->resumeOperation (
60- $ args ['name ' ],
61- $ args ['method ' ] ?? null
62- );
63+ if (isset ($ args ['method ' ])) {
64+ $ operationResponse = $ this ->gapicClient ->resumeOperation ($ args ['name ' ], $ args ['method ' ]);
65+ } else {
66+ $ operationResponse = $ this ->gapicClient ->resumeOperation ($ args ['name ' ]);
67+ }
6368 $ operationResponse ->cancel ();
6469
6570 return $ this ->operationResponseToArray ($ operationResponse );
@@ -71,10 +76,11 @@ public function cancel(array $args): array
7176 */
7277 public function delete (array $ args ): array
7378 {
74- $ operationResponse = $ this ->gapicClient ->resumeOperation (
75- $ args ['name ' ],
76- $ args ['method ' ] ?? null
77- );
79+ if (isset ($ args ['method ' ])) {
80+ $ operationResponse = $ this ->gapicClient ->resumeOperation ($ args ['name ' ], $ args ['method ' ]);
81+ } else {
82+ $ operationResponse = $ this ->gapicClient ->resumeOperation ($ args ['name ' ]);
83+ }
7884 $ operationResponse ->cancel ();
7985
8086 return $ this ->operationResponseToArray ($ operationResponse );
0 commit comments