source: vendor/google/apiclient-services/src/Assuredworkloads/Resource/OrganizationsLocationsWorkloadsViolations.php

Last change on this file was e3d4e0a, checked in by Vlado 222039 <vlado.popovski@…>, 3 weeks ago

Upload project files

  • Property mode set to 100644
File size: 4.7 KB
Line 
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\Assuredworkloads\Resource;
19
20use Google\Service\Assuredworkloads\GoogleCloudAssuredworkloadsV1AcknowledgeViolationRequest;
21use Google\Service\Assuredworkloads\GoogleCloudAssuredworkloadsV1AcknowledgeViolationResponse;
22use Google\Service\Assuredworkloads\GoogleCloudAssuredworkloadsV1ListViolationsResponse;
23use Google\Service\Assuredworkloads\GoogleCloudAssuredworkloadsV1Violation;
24
25/**
26 * The "violations" collection of methods.
27 * Typical usage is:
28 * <code>
29 * $assuredworkloadsService = new Google\Service\Assuredworkloads(...);
30 * $violations = $assuredworkloadsService->organizations_locations_workloads_violations;
31 * </code>
32 */
33class OrganizationsLocationsWorkloadsViolations extends \Google\Service\Resource
34{
35 /**
36 * Acknowledges an existing violation. By acknowledging a violation, users
37 * acknowledge the existence of a compliance violation in their workload and
38 * decide to ignore it due to a valid business justification. Acknowledgement is
39 * a permanent operation and it cannot be reverted. (violations.acknowledge)
40 *
41 * @param string $name Required. The resource name of the Violation to
42 * acknowledge. Format: organizations/{organization}/locations/{location}/worklo
43 * ads/{workload}/violations/{violation}
44 * @param GoogleCloudAssuredworkloadsV1AcknowledgeViolationRequest $postBody
45 * @param array $optParams Optional parameters.
46 * @return GoogleCloudAssuredworkloadsV1AcknowledgeViolationResponse
47 * @throws \Google\Service\Exception
48 */
49 public function acknowledge($name, GoogleCloudAssuredworkloadsV1AcknowledgeViolationRequest $postBody, $optParams = [])
50 {
51 $params = ['name' => $name, 'postBody' => $postBody];
52 $params = array_merge($params, $optParams);
53 return $this->call('acknowledge', [$params], GoogleCloudAssuredworkloadsV1AcknowledgeViolationResponse::class);
54 }
55 /**
56 * Retrieves Assured Workload Violation based on ID. (violations.get)
57 *
58 * @param string $name Required. The resource name of the Violation to fetch
59 * (ie. Violation.name). Format: organizations/{organization}/locations/{locatio
60 * n}/workloads/{workload}/violations/{violation}
61 * @param array $optParams Optional parameters.
62 * @return GoogleCloudAssuredworkloadsV1Violation
63 * @throws \Google\Service\Exception
64 */
65 public function get($name, $optParams = [])
66 {
67 $params = ['name' => $name];
68 $params = array_merge($params, $optParams);
69 return $this->call('get', [$params], GoogleCloudAssuredworkloadsV1Violation::class);
70 }
71 /**
72 * Lists the Violations in the AssuredWorkload Environment. Callers may also
73 * choose to read across multiple Workloads as per
74 * [AIP-159](https://google.aip.dev/159) by using '-' (the hyphen or dash
75 * character) as a wildcard character instead of workload-id in the parent.
76 * Format `organizations/{org_id}/locations/{location}/workloads/-`
77 * (violations.listOrganizationsLocationsWorkloadsViolations)
78 *
79 * @param string $parent Required. The Workload name. Format
80 * `organizations/{org_id}/locations/{location}/workloads/{workload}`.
81 * @param array $optParams Optional parameters.
82 *
83 * @opt_param string filter Optional. A custom filter for filtering by the
84 * Violations properties.
85 * @opt_param string interval.endTime The end of the time window.
86 * @opt_param string interval.startTime The start of the time window.
87 * @opt_param int pageSize Optional. Page size.
88 * @opt_param string pageToken Optional. Page token returned from previous
89 * request.
90 * @return GoogleCloudAssuredworkloadsV1ListViolationsResponse
91 * @throws \Google\Service\Exception
92 */
93 public function listOrganizationsLocationsWorkloadsViolations($parent, $optParams = [])
94 {
95 $params = ['parent' => $parent];
96 $params = array_merge($params, $optParams);
97 return $this->call('list', [$params], GoogleCloudAssuredworkloadsV1ListViolationsResponse::class);
98 }
99}
100
101// Adding a class alias for backwards compatibility with the previous class name.
102class_alias(OrganizationsLocationsWorkloadsViolations::class, 'Google_Service_Assuredworkloads_Resource_OrganizationsLocationsWorkloadsViolations');
Note: See TracBrowser for help on using the repository browser.