1<?php
2/*
3 * Copyright 2014 Google Inc.
4 *
5 * Licensed under the Apache License, Version 2.0 (the "License"); you may not
6 * use this file except in compliance with the License. You may obtain a copy of
7 * the License at
8 *
9 * http://www.apache.org/licenses/LICENSE-2.0
10 *
11 * Unless required by applicable law or agreed to in writing, software
12 * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
13 * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
14 * License for the specific language governing permissions and limitations under
15 * the License.
16 */
17
18namespace Google\Service\Dataflow\Resource;
19
20use Google\Service\Dataflow\GetDebugConfigRequest;
21use Google\Service\Dataflow\GetDebugConfigResponse;
22use Google\Service\Dataflow\SendDebugCaptureRequest;
23use Google\Service\Dataflow\SendDebugCaptureResponse;
24
25/**
26 * The "debug" collection of methods.
27 * Typical usage is:
28 *  <code>
29 *   $dataflowService = new Google\Service\Dataflow(...);
30 *   $debug = $dataflowService->debug;
31 *  </code>
32 */
33class ProjectsLocationsJobsDebug extends \Google\Service\Resource
34{
35  /**
36   * Get encoded debug configuration for component. Not cacheable.
37   * (debug.getConfig)
38   *
39   * @param string $projectId The project id.
40   * @param string $location The [regional endpoint]
41   * (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that
42   * contains the job specified by job_id.
43   * @param string $jobId The job id.
44   * @param GetDebugConfigRequest $postBody
45   * @param array $optParams Optional parameters.
46   * @return GetDebugConfigResponse
47   */
48  public function getConfig($projectId, $location, $jobId, GetDebugConfigRequest $postBody, $optParams = [])
49  {
50    $params = ['projectId' => $projectId, 'location' => $location, 'jobId' => $jobId, 'postBody' => $postBody];
51    $params = array_merge($params, $optParams);
52    return $this->call('getConfig', [$params], GetDebugConfigResponse::class);
53  }
54  /**
55   * Send encoded debug capture data for component. (debug.sendCapture)
56   *
57   * @param string $projectId The project id.
58   * @param string $location The [regional endpoint]
59   * (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that
60   * contains the job specified by job_id.
61   * @param string $jobId The job id.
62   * @param SendDebugCaptureRequest $postBody
63   * @param array $optParams Optional parameters.
64   * @return SendDebugCaptureResponse
65   */
66  public function sendCapture($projectId, $location, $jobId, SendDebugCaptureRequest $postBody, $optParams = [])
67  {
68    $params = ['projectId' => $projectId, 'location' => $location, 'jobId' => $jobId, 'postBody' => $postBody];
69    $params = array_merge($params, $optParams);
70    return $this->call('sendCapture', [$params], SendDebugCaptureResponse::class);
71  }
72}
73
74// Adding a class alias for backwards compatibility with the previous class name.
75class_alias(ProjectsLocationsJobsDebug::class, 'Google_Service_Dataflow_Resource_ProjectsLocationsJobsDebug');
76