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\Dns\Resource; 19 20use Google\Service\Dns\ManagedZoneOperationsListResponse; 21use Google\Service\Dns\Operation; 22 23/** 24 * The "managedZoneOperations" collection of methods. 25 * Typical usage is: 26 * <code> 27 * $dnsService = new Google\Service\Dns(...); 28 * $managedZoneOperations = $dnsService->managedZoneOperations; 29 * </code> 30 */ 31class ManagedZoneOperations extends \Google\Service\Resource 32{ 33 /** 34 * Fetches the representation of an existing Operation. 35 * (managedZoneOperations.get) 36 * 37 * @param string $project Identifies the project addressed by this request. 38 * @param string $location Specifies the location of the resource. This 39 * information will be used for routing and will be part of the resource name. 40 * @param string $managedZone Identifies the managed zone addressed by this 41 * request. 42 * @param string $operation Identifies the operation addressed by this request 43 * (ID of the operation). 44 * @param array $optParams Optional parameters. 45 * 46 * @opt_param string clientOperationId For mutating operation requests only. An 47 * optional identifier specified by the client. Must be unique for operation 48 * resources in the Operations collection. 49 * @return Operation 50 */ 51 public function get($project, $location, $managedZone, $operation, $optParams = []) 52 { 53 $params = ['project' => $project, 'location' => $location, 'managedZone' => $managedZone, 'operation' => $operation]; 54 $params = array_merge($params, $optParams); 55 return $this->call('get', [$params], Operation::class); 56 } 57 /** 58 * Enumerates Operations for the given ManagedZone. 59 * (managedZoneOperations.listManagedZoneOperations) 60 * 61 * @param string $project Identifies the project addressed by this request. 62 * @param string $location Specifies the location of the resource. This 63 * information will be used for routing and will be part of the resource name. 64 * @param string $managedZone Identifies the managed zone addressed by this 65 * request. 66 * @param array $optParams Optional parameters. 67 * 68 * @opt_param int maxResults Optional. Maximum number of results to be returned. 69 * If unspecified, the server decides how many results to return. 70 * @opt_param string pageToken Optional. A tag returned by a previous list 71 * request that was truncated. Use this parameter to continue a previous list 72 * request. 73 * @opt_param string sortBy Sorting criterion. The only supported values are 74 * START_TIME and ID. 75 * @return ManagedZoneOperationsListResponse 76 */ 77 public function listManagedZoneOperations($project, $location, $managedZone, $optParams = []) 78 { 79 $params = ['project' => $project, 'location' => $location, 'managedZone' => $managedZone]; 80 $params = array_merge($params, $optParams); 81 return $this->call('list', [$params], ManagedZoneOperationsListResponse::class); 82 } 83} 84 85// Adding a class alias for backwards compatibility with the previous class name. 86class_alias(ManagedZoneOperations::class, 'Google_Service_Dns_Resource_ManagedZoneOperations'); 87