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\OSConfig\Resource; 19 20use Google\Service\OSConfig\ListOSPolicyAssignmentReportsResponse; 21use Google\Service\OSConfig\OSPolicyAssignmentReport; 22 23/** 24 * The "reports" collection of methods. 25 * Typical usage is: 26 * <code> 27 * $osconfigService = new Google\Service\OSConfig(...); 28 * $reports = $osconfigService->reports; 29 * </code> 30 */ 31class ProjectsLocationsInstancesOsPolicyAssignmentsReports extends \Google\Service\Resource 32{ 33 /** 34 * Get the OS policy asssignment report for the specified Compute Engine VM 35 * instance. (reports.get) 36 * 37 * @param string $name Required. API resource name for OS policy assignment 38 * report. Format: `/projects/{project}/locations/{location}/instances/{instance 39 * }/osPolicyAssignments/{assignment}/report` For `{project}`, either `project- 40 * number` or `project-id` can be provided. For `{instance_id}`, either Compute 41 * Engine `instance-id` or `instance-name` can be provided. For 42 * `{assignment_id}`, the OSPolicyAssignment id must be provided. 43 * @param array $optParams Optional parameters. 44 * @return OSPolicyAssignmentReport 45 */ 46 public function get($name, $optParams = []) 47 { 48 $params = ['name' => $name]; 49 $params = array_merge($params, $optParams); 50 return $this->call('get', [$params], OSPolicyAssignmentReport::class); 51 } 52 /** 53 * List OS policy asssignment reports for all Compute Engine VM instances in the 54 * specified zone. 55 * (reports.listProjectsLocationsInstancesOsPolicyAssignmentsReports) 56 * 57 * @param string $parent Required. The parent resource name. Format: `projects/{ 58 * project}/locations/{location}/instances/{instance}/osPolicyAssignments/{assig 59 * nment}/reports` For `{project}`, either `project-number` or `project-id` can 60 * be provided. For `{instance}`, either `instance-name`, `instance-id`, or `-` 61 * can be provided. If '-' is provided, the response will include 62 * OSPolicyAssignmentReports for all instances in the project/location. For 63 * `{assignment}`, either `assignment-id` or `-` can be provided. If '-' is 64 * provided, the response will include OSPolicyAssignmentReports for all 65 * OSPolicyAssignments in the project/location. Either {instance} or 66 * {assignment} must be `-`. For example: `projects/{project}/locations/{locatio 67 * n}/instances/{instance}/osPolicyAssignments/-/reports` returns all reports 68 * for the instance 69 * `projects/{project}/locations/{location}/instances/-/osPolicyAssignments 70 * /{assignment-id}/reports` returns all the reports for the given assignment 71 * across all instances. `projects/{project}/locations/{location}/instances/-/os 72 * PolicyAssignments/-/reports` returns all the reports for all assignments 73 * across all instances. 74 * @param array $optParams Optional parameters. 75 * 76 * @opt_param string filter If provided, this field specifies the criteria that 77 * must be met by the `OSPolicyAssignmentReport` API resource that is included 78 * in the response. 79 * @opt_param int pageSize The maximum number of results to return. 80 * @opt_param string pageToken A pagination token returned from a previous call 81 * to the `ListOSPolicyAssignmentReports` method that indicates where this 82 * listing should continue from. 83 * @return ListOSPolicyAssignmentReportsResponse 84 */ 85 public function listProjectsLocationsInstancesOsPolicyAssignmentsReports($parent, $optParams = []) 86 { 87 $params = ['parent' => $parent]; 88 $params = array_merge($params, $optParams); 89 return $this->call('list', [$params], ListOSPolicyAssignmentReportsResponse::class); 90 } 91} 92 93// Adding a class alias for backwards compatibility with the previous class name. 94class_alias(ProjectsLocationsInstancesOsPolicyAssignmentsReports::class, 'Google_Service_OSConfig_Resource_ProjectsLocationsInstancesOsPolicyAssignmentsReports'); 95