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\Compute\Resource; 19 20use Google\Service\Compute\Operation; 21use Google\Service\Compute\OperationList; 22 23/** 24 * The "globalOrganizationOperations" collection of methods. 25 * Typical usage is: 26 * <code> 27 * $computeService = new Google\Service\Compute(...); 28 * $globalOrganizationOperations = $computeService->globalOrganizationOperations; 29 * </code> 30 */ 31class GlobalOrganizationOperations extends \Google\Service\Resource 32{ 33 /** 34 * Deletes the specified Operations resource. 35 * (globalOrganizationOperations.delete) 36 * 37 * @param string $operation Name of the Operations resource to delete. 38 * @param array $optParams Optional parameters. 39 * 40 * @opt_param string parentId Parent ID for this request. 41 */ 42 public function delete($operation, $optParams = []) 43 { 44 $params = ['operation' => $operation]; 45 $params = array_merge($params, $optParams); 46 return $this->call('delete', [$params]); 47 } 48 /** 49 * Retrieves the specified Operations resource. Gets a list of operations by 50 * making a `list()` request. (globalOrganizationOperations.get) 51 * 52 * @param string $operation Name of the Operations resource to return. 53 * @param array $optParams Optional parameters. 54 * 55 * @opt_param string parentId Parent ID for this request. 56 * @return Operation 57 */ 58 public function get($operation, $optParams = []) 59 { 60 $params = ['operation' => $operation]; 61 $params = array_merge($params, $optParams); 62 return $this->call('get', [$params], Operation::class); 63 } 64 /** 65 * Retrieves a list of Operation resources contained within the specified 66 * organization. (globalOrganizationOperations.listGlobalOrganizationOperations) 67 * 68 * @param array $optParams Optional parameters. 69 * 70 * @opt_param string filter A filter expression that filters resources listed in 71 * the response. The expression must specify the field name, an operator, and 72 * the value that you want to use for filtering. The value must be a string, a 73 * number, or a boolean. The operator must be either `=`, `!=`, `>`, `<`, `<=`, 74 * `>=` or `:`. For example, if you are filtering Compute Engine instances, you 75 * can exclude instances named `example-instance` by specifying `name != 76 * example-instance`. The `:` operator can be used with string fields to match 77 * substrings. For non-string fields it is equivalent to the `=` operator. The 78 * `:*` comparison can be used to test whether a key has been defined. For 79 * example, to find all objects with `owner` label use: ``` labels.owner:* ``` 80 * You can also filter nested fields. For example, you could specify 81 * `scheduling.automaticRestart = false` to include instances only if they are 82 * not scheduled for automatic restarts. You can use filtering on nested fields 83 * to filter based on resource labels. To filter on multiple expressions, 84 * provide each separate expression within parentheses. For example: ``` 85 * (scheduling.automaticRestart = true) (cpuPlatform = "Intel Skylake") ``` By 86 * default, each expression is an `AND` expression. However, you can include 87 * `AND` and `OR` expressions explicitly. For example: ``` (cpuPlatform = "Intel 88 * Skylake") OR (cpuPlatform = "Intel Broadwell") AND 89 * (scheduling.automaticRestart = true) ``` 90 * @opt_param string maxResults The maximum number of results per page that 91 * should be returned. If the number of available results is larger than 92 * `maxResults`, Compute Engine returns a `nextPageToken` that can be used to 93 * get the next page of results in subsequent list requests. Acceptable values 94 * are `0` to `500`, inclusive. (Default: `500`) 95 * @opt_param string orderBy Sorts list results by a certain order. By default, 96 * results are returned in alphanumerical order based on the resource name. You 97 * can also sort results in descending order based on the creation timestamp 98 * using `orderBy="creationTimestamp desc"`. This sorts results based on the 99 * `creationTimestamp` field in reverse chronological order (newest result 100 * first). Use this to sort resources like operations so that the newest 101 * operation is returned first. Currently, only sorting by `name` or 102 * `creationTimestamp desc` is supported. 103 * @opt_param string pageToken Specifies a page token to use. Set `pageToken` to 104 * the `nextPageToken` returned by a previous list request to get the next page 105 * of results. 106 * @opt_param string parentId Parent ID for this request. 107 * @opt_param bool returnPartialSuccess Opt-in for partial success behavior 108 * which provides partial results in case of failure. The default value is 109 * false. 110 * @return OperationList 111 */ 112 public function listGlobalOrganizationOperations($optParams = []) 113 { 114 $params = []; 115 $params = array_merge($params, $optParams); 116 return $this->call('list', [$params], OperationList::class); 117 } 118} 119 120// Adding a class alias for backwards compatibility with the previous class name. 121class_alias(GlobalOrganizationOperations::class, 'Google_Service_Compute_Resource_GlobalOrganizationOperations'); 122