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\SecurityCommandCenter\Resource;
19
20use Google\Service\SecurityCommandCenter\GoogleCloudSecuritycenterV1BigQueryExport;
21use Google\Service\SecurityCommandCenter\ListBigQueryExportsResponse;
22use Google\Service\SecurityCommandCenter\SecuritycenterEmpty;
23
24/**
25 * The "bigQueryExports" collection of methods.
26 * Typical usage is:
27 *  <code>
28 *   $securitycenterService = new Google\Service\SecurityCommandCenter(...);
29 *   $bigQueryExports = $securitycenterService->bigQueryExports;
30 *  </code>
31 */
32class FoldersBigQueryExports extends \Google\Service\Resource
33{
34  /**
35   * Creates a big query export. (bigQueryExports.create)
36   *
37   * @param string $parent Required. Resource name of the new big query export's
38   * parent. Its format is "organizations/[organization_id]",
39   * "folders/[folder_id]", or "projects/[project_id]".
40   * @param GoogleCloudSecuritycenterV1BigQueryExport $postBody
41   * @param array $optParams Optional parameters.
42   *
43   * @opt_param string bigQueryExportId Required. Unique identifier provided by
44   * the client within the parent scope. It must consist of lower case letters,
45   * numbers, and hyphen, with the first character a letter, the last a letter or
46   * a number, and a 63 character maximum.
47   * @return GoogleCloudSecuritycenterV1BigQueryExport
48   */
49  public function create($parent, GoogleCloudSecuritycenterV1BigQueryExport $postBody, $optParams = [])
50  {
51    $params = ['parent' => $parent, 'postBody' => $postBody];
52    $params = array_merge($params, $optParams);
53    return $this->call('create', [$params], GoogleCloudSecuritycenterV1BigQueryExport::class);
54  }
55  /**
56   * Deletes an existing big query export. (bigQueryExports.delete)
57   *
58   * @param string $name Required. Name of the big query export to delete. Its
59   * format is organizations/{organization}/bigQueryExports/{export_id},
60   * folders/{folder}/bigQueryExports/{export_id}, or
61   * projects/{project}/bigQueryExports/{export_id}
62   * @param array $optParams Optional parameters.
63   * @return SecuritycenterEmpty
64   */
65  public function delete($name, $optParams = [])
66  {
67    $params = ['name' => $name];
68    $params = array_merge($params, $optParams);
69    return $this->call('delete', [$params], SecuritycenterEmpty::class);
70  }
71  /**
72   * Gets a big query export. (bigQueryExports.get)
73   *
74   * @param string $name Required. Name of the big query export to retrieve. Its
75   * format is organizations/{organization}/bigQueryExports/{export_id},
76   * folders/{folder}/bigQueryExports/{export_id}, or
77   * projects/{project}/bigQueryExports/{export_id}
78   * @param array $optParams Optional parameters.
79   * @return GoogleCloudSecuritycenterV1BigQueryExport
80   */
81  public function get($name, $optParams = [])
82  {
83    $params = ['name' => $name];
84    $params = array_merge($params, $optParams);
85    return $this->call('get', [$params], GoogleCloudSecuritycenterV1BigQueryExport::class);
86  }
87  /**
88   * Lists BigQuery exports. Note that when requesting BigQuery exports at a given
89   * level all exports under that level are also returned e.g. if requesting
90   * BigQuery exports under a folder, then all BigQuery exports immediately under
91   * the folder plus the ones created under the projects within the folder are
92   * returned. (bigQueryExports.listFoldersBigQueryExports)
93   *
94   * @param string $parent Required. The parent, which owns the collection of
95   * BigQuery exports. Its format is "organizations/[organization_id]",
96   * "folders/[folder_id]", "projects/[project_id]".
97   * @param array $optParams Optional parameters.
98   *
99   * @opt_param int pageSize The maximum number of configs to return. The service
100   * may return fewer than this value. If unspecified, at most 10 configs will be
101   * returned. The maximum value is 1000; values above 1000 will be coerced to
102   * 1000.
103   * @opt_param string pageToken A page token, received from a previous
104   * `ListBigQueryExports` call. Provide this to retrieve the subsequent page.
105   * When paginating, all other parameters provided to `ListBigQueryExports` must
106   * match the call that provided the page token.
107   * @return ListBigQueryExportsResponse
108   */
109  public function listFoldersBigQueryExports($parent, $optParams = [])
110  {
111    $params = ['parent' => $parent];
112    $params = array_merge($params, $optParams);
113    return $this->call('list', [$params], ListBigQueryExportsResponse::class);
114  }
115  /**
116   * Updates a BigQuery export. (bigQueryExports.patch)
117   *
118   * @param string $name The relative resource name of this export. See:
119   * https://cloud.google.com/apis/design/resource_names#relative_resource_name.
120   * Example format: "organizations/{organization_id}/bigQueryExports/{export_id}"
121   * Example format: "folders/{folder_id}/bigQueryExports/{export_id}" Example
122   * format: "projects/{project_id}/bigQueryExports/{export_id}" This field is
123   * provided in responses, and is ignored when provided in create requests.
124   * @param GoogleCloudSecuritycenterV1BigQueryExport $postBody
125   * @param array $optParams Optional parameters.
126   *
127   * @opt_param string updateMask The list of fields to be updated. If empty all
128   * mutable fields will be updated.
129   * @return GoogleCloudSecuritycenterV1BigQueryExport
130   */
131  public function patch($name, GoogleCloudSecuritycenterV1BigQueryExport $postBody, $optParams = [])
132  {
133    $params = ['name' => $name, 'postBody' => $postBody];
134    $params = array_merge($params, $optParams);
135    return $this->call('patch', [$params], GoogleCloudSecuritycenterV1BigQueryExport::class);
136  }
137}
138
139// Adding a class alias for backwards compatibility with the previous class name.
140class_alias(FoldersBigQueryExports::class, 'Google_Service_SecurityCommandCenter_Resource_FoldersBigQueryExports');
141