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\ListJobMessagesResponse;
21
22/**
23 * The "messages" collection of methods.
24 * Typical usage is:
25 *  <code>
26 *   $dataflowService = new Google\Service\Dataflow(...);
27 *   $messages = $dataflowService->messages;
28 *  </code>
29 */
30class ProjectsLocationsJobsMessages extends \Google\Service\Resource
31{
32  /**
33   * Request the job status. To request the status of a job, we recommend using
34   * `projects.locations.jobs.messages.list` with a [regional endpoint]
35   * (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints). Using
36   * `projects.jobs.messages.list` is not recommended, as you can only request the
37   * status of jobs that are running in `us-central1`.
38   * (messages.listProjectsLocationsJobsMessages)
39   *
40   * @param string $projectId A project id.
41   * @param string $location The [regional endpoint]
42   * (https://cloud.google.com/dataflow/docs/concepts/regional-endpoints) that
43   * contains the job specified by job_id.
44   * @param string $jobId The job to get messages about.
45   * @param array $optParams Optional parameters.
46   *
47   * @opt_param string endTime Return only messages with timestamps < end_time.
48   * The default is now (i.e. return up to the latest messages available).
49   * @opt_param string minimumImportance Filter to only get messages with
50   * importance >= level
51   * @opt_param int pageSize If specified, determines the maximum number of
52   * messages to return. If unspecified, the service may choose an appropriate
53   * default, or may return an arbitrarily large number of results.
54   * @opt_param string pageToken If supplied, this should be the value of
55   * next_page_token returned by an earlier call. This will cause the next page of
56   * results to be returned.
57   * @opt_param string startTime If specified, return only messages with
58   * timestamps >= start_time. The default is the job creation time (i.e.
59   * beginning of messages).
60   * @return ListJobMessagesResponse
61   */
62  public function listProjectsLocationsJobsMessages($projectId, $location, $jobId, $optParams = [])
63  {
64    $params = ['projectId' => $projectId, 'location' => $location, 'jobId' => $jobId];
65    $params = array_merge($params, $optParams);
66    return $this->call('list', [$params], ListJobMessagesResponse::class);
67  }
68}
69
70// Adding a class alias for backwards compatibility with the previous class name.
71class_alias(ProjectsLocationsJobsMessages::class, 'Google_Service_Dataflow_Resource_ProjectsLocationsJobsMessages');
72