[e3d4e0a] | 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 |
|
---|
| 18 | namespace Google\Service\NetworkSecurity\Resource;
|
---|
| 19 |
|
---|
| 20 | use Google\Service\NetworkSecurity\ListTlsInspectionPoliciesResponse;
|
---|
| 21 | use Google\Service\NetworkSecurity\Operation;
|
---|
| 22 | use Google\Service\NetworkSecurity\TlsInspectionPolicy;
|
---|
| 23 |
|
---|
| 24 | /**
|
---|
| 25 | * The "tlsInspectionPolicies" collection of methods.
|
---|
| 26 | * Typical usage is:
|
---|
| 27 | * <code>
|
---|
| 28 | * $networksecurityService = new Google\Service\NetworkSecurity(...);
|
---|
| 29 | * $tlsInspectionPolicies = $networksecurityService->projects_locations_tlsInspectionPolicies;
|
---|
| 30 | * </code>
|
---|
| 31 | */
|
---|
| 32 | class ProjectsLocationsTlsInspectionPolicies extends \Google\Service\Resource
|
---|
| 33 | {
|
---|
| 34 | /**
|
---|
| 35 | * Creates a new TlsInspectionPolicy in a given project and location.
|
---|
| 36 | * (tlsInspectionPolicies.create)
|
---|
| 37 | *
|
---|
| 38 | * @param string $parent Required. The parent resource of the
|
---|
| 39 | * TlsInspectionPolicy. Must be in the format
|
---|
| 40 | * `projects/{project}/locations/{location}`.
|
---|
| 41 | * @param TlsInspectionPolicy $postBody
|
---|
| 42 | * @param array $optParams Optional parameters.
|
---|
| 43 | *
|
---|
| 44 | * @opt_param string tlsInspectionPolicyId Required. Short name of the
|
---|
| 45 | * TlsInspectionPolicy resource to be created. This value should be 1-63
|
---|
| 46 | * characters long, containing only letters, numbers, hyphens, and underscores,
|
---|
| 47 | * and should not start with a number. E.g. "tls_inspection_policy1".
|
---|
| 48 | * @return Operation
|
---|
| 49 | * @throws \Google\Service\Exception
|
---|
| 50 | */
|
---|
| 51 | public function create($parent, TlsInspectionPolicy $postBody, $optParams = [])
|
---|
| 52 | {
|
---|
| 53 | $params = ['parent' => $parent, 'postBody' => $postBody];
|
---|
| 54 | $params = array_merge($params, $optParams);
|
---|
| 55 | return $this->call('create', [$params], Operation::class);
|
---|
| 56 | }
|
---|
| 57 | /**
|
---|
| 58 | * Deletes a single TlsInspectionPolicy. (tlsInspectionPolicies.delete)
|
---|
| 59 | *
|
---|
| 60 | * @param string $name Required. A name of the TlsInspectionPolicy to delete.
|
---|
| 61 | * Must be in the format `projects/{project}/locations/{location}/tlsInspectionP
|
---|
| 62 | * olicies/{tls_inspection_policy}`.
|
---|
| 63 | * @param array $optParams Optional parameters.
|
---|
| 64 | *
|
---|
| 65 | * @opt_param bool force If set to true, any rules for this TlsInspectionPolicy
|
---|
| 66 | * will also be deleted. (Otherwise, the request will only work if the
|
---|
| 67 | * TlsInspectionPolicy has no rules.)
|
---|
| 68 | * @return Operation
|
---|
| 69 | * @throws \Google\Service\Exception
|
---|
| 70 | */
|
---|
| 71 | public function delete($name, $optParams = [])
|
---|
| 72 | {
|
---|
| 73 | $params = ['name' => $name];
|
---|
| 74 | $params = array_merge($params, $optParams);
|
---|
| 75 | return $this->call('delete', [$params], Operation::class);
|
---|
| 76 | }
|
---|
| 77 | /**
|
---|
| 78 | * Gets details of a single TlsInspectionPolicy. (tlsInspectionPolicies.get)
|
---|
| 79 | *
|
---|
| 80 | * @param string $name Required. A name of the TlsInspectionPolicy to get. Must
|
---|
| 81 | * be in the format `projects/{project}/locations/{location}/tlsInspectionPolici
|
---|
| 82 | * es/{tls_inspection_policy}`.
|
---|
| 83 | * @param array $optParams Optional parameters.
|
---|
| 84 | * @return TlsInspectionPolicy
|
---|
| 85 | * @throws \Google\Service\Exception
|
---|
| 86 | */
|
---|
| 87 | public function get($name, $optParams = [])
|
---|
| 88 | {
|
---|
| 89 | $params = ['name' => $name];
|
---|
| 90 | $params = array_merge($params, $optParams);
|
---|
| 91 | return $this->call('get', [$params], TlsInspectionPolicy::class);
|
---|
| 92 | }
|
---|
| 93 | /**
|
---|
| 94 | * Lists TlsInspectionPolicies in a given project and location.
|
---|
| 95 | * (tlsInspectionPolicies.listProjectsLocationsTlsInspectionPolicies)
|
---|
| 96 | *
|
---|
| 97 | * @param string $parent Required. The project and location from which the
|
---|
| 98 | * TlsInspectionPolicies should be listed, specified in the format
|
---|
| 99 | * `projects/{project}/locations/{location}`.
|
---|
| 100 | * @param array $optParams Optional parameters.
|
---|
| 101 | *
|
---|
| 102 | * @opt_param int pageSize Maximum number of TlsInspectionPolicies to return per
|
---|
| 103 | * call.
|
---|
| 104 | * @opt_param string pageToken The value returned by the last
|
---|
| 105 | * 'ListTlsInspectionPoliciesResponse' Indicates that this is a continuation of
|
---|
| 106 | * a prior 'ListTlsInspectionPolicies' call, and that the system should return
|
---|
| 107 | * the next page of data.
|
---|
| 108 | * @return ListTlsInspectionPoliciesResponse
|
---|
| 109 | * @throws \Google\Service\Exception
|
---|
| 110 | */
|
---|
| 111 | public function listProjectsLocationsTlsInspectionPolicies($parent, $optParams = [])
|
---|
| 112 | {
|
---|
| 113 | $params = ['parent' => $parent];
|
---|
| 114 | $params = array_merge($params, $optParams);
|
---|
| 115 | return $this->call('list', [$params], ListTlsInspectionPoliciesResponse::class);
|
---|
| 116 | }
|
---|
| 117 | /**
|
---|
| 118 | * Updates the parameters of a single TlsInspectionPolicy.
|
---|
| 119 | * (tlsInspectionPolicies.patch)
|
---|
| 120 | *
|
---|
| 121 | * @param string $name Required. Name of the resource. Name is of the form proje
|
---|
| 122 | * cts/{project}/locations/{location}/tlsInspectionPolicies/{tls_inspection_poli
|
---|
| 123 | * cy} tls_inspection_policy should match the
|
---|
| 124 | * pattern:(^[a-z]([a-z0-9-]{0,61}[a-z0-9])?$).
|
---|
| 125 | * @param TlsInspectionPolicy $postBody
|
---|
| 126 | * @param array $optParams Optional parameters.
|
---|
| 127 | *
|
---|
| 128 | * @opt_param string updateMask Optional. Field mask is used to specify the
|
---|
| 129 | * fields to be overwritten in the TlsInspectionPolicy resource by the update.
|
---|
| 130 | * The fields specified in the update_mask are relative to the resource, not the
|
---|
| 131 | * full request. A field will be overwritten if it is in the mask. If the user
|
---|
| 132 | * does not provide a mask then all fields will be overwritten.
|
---|
| 133 | * @return Operation
|
---|
| 134 | * @throws \Google\Service\Exception
|
---|
| 135 | */
|
---|
| 136 | public function patch($name, TlsInspectionPolicy $postBody, $optParams = [])
|
---|
| 137 | {
|
---|
| 138 | $params = ['name' => $name, 'postBody' => $postBody];
|
---|
| 139 | $params = array_merge($params, $optParams);
|
---|
| 140 | return $this->call('patch', [$params], Operation::class);
|
---|
| 141 | }
|
---|
| 142 | }
|
---|
| 143 |
|
---|
| 144 | // Adding a class alias for backwards compatibility with the previous class name.
|
---|
| 145 | class_alias(ProjectsLocationsTlsInspectionPolicies::class, 'Google_Service_NetworkSecurity_Resource_ProjectsLocationsTlsInspectionPolicies');
|
---|