source: vendor/google/apiclient-services/src/Contentwarehouse/Resource/ProjectsLocationsRuleSets.php@ e3d4e0a

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

Upload project files

  • Property mode set to 100644
File size: 5.3 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\Contentwarehouse\Resource;
19
20use Google\Service\Contentwarehouse\GoogleCloudContentwarehouseV1ListRuleSetsResponse;
21use Google\Service\Contentwarehouse\GoogleCloudContentwarehouseV1RuleSet;
22use Google\Service\Contentwarehouse\GoogleCloudContentwarehouseV1UpdateRuleSetRequest;
23use Google\Service\Contentwarehouse\GoogleProtobufEmpty;
24
25/**
26 * The "ruleSets" collection of methods.
27 * Typical usage is:
28 * <code>
29 * $contentwarehouseService = new Google\Service\Contentwarehouse(...);
30 * $ruleSets = $contentwarehouseService->projects_locations_ruleSets;
31 * </code>
32 */
33class ProjectsLocationsRuleSets extends \Google\Service\Resource
34{
35 /**
36 * Creates a ruleset. (ruleSets.create)
37 *
38 * @param string $parent Required. The parent name. Format:
39 * projects/{project_number}/locations/{location}.
40 * @param GoogleCloudContentwarehouseV1RuleSet $postBody
41 * @param array $optParams Optional parameters.
42 * @return GoogleCloudContentwarehouseV1RuleSet
43 * @throws \Google\Service\Exception
44 */
45 public function create($parent, GoogleCloudContentwarehouseV1RuleSet $postBody, $optParams = [])
46 {
47 $params = ['parent' => $parent, 'postBody' => $postBody];
48 $params = array_merge($params, $optParams);
49 return $this->call('create', [$params], GoogleCloudContentwarehouseV1RuleSet::class);
50 }
51 /**
52 * Deletes a ruleset. Returns NOT_FOUND if the document does not exist.
53 * (ruleSets.delete)
54 *
55 * @param string $name Required. The name of the rule set to delete. Format:
56 * projects/{project_number}/locations/{location}/ruleSets/{rule_set_id}.
57 * @param array $optParams Optional parameters.
58 * @return GoogleProtobufEmpty
59 * @throws \Google\Service\Exception
60 */
61 public function delete($name, $optParams = [])
62 {
63 $params = ['name' => $name];
64 $params = array_merge($params, $optParams);
65 return $this->call('delete', [$params], GoogleProtobufEmpty::class);
66 }
67 /**
68 * Gets a ruleset. Returns NOT_FOUND if the ruleset does not exist.
69 * (ruleSets.get)
70 *
71 * @param string $name Required. The name of the rule set to retrieve. Format:
72 * projects/{project_number}/locations/{location}/ruleSets/{rule_set_id}.
73 * @param array $optParams Optional parameters.
74 * @return GoogleCloudContentwarehouseV1RuleSet
75 * @throws \Google\Service\Exception
76 */
77 public function get($name, $optParams = [])
78 {
79 $params = ['name' => $name];
80 $params = array_merge($params, $optParams);
81 return $this->call('get', [$params], GoogleCloudContentwarehouseV1RuleSet::class);
82 }
83 /**
84 * Lists rulesets. (ruleSets.listProjectsLocationsRuleSets)
85 *
86 * @param string $parent Required. The parent, which owns this collection of
87 * document. Format: projects/{project_number}/locations/{location}.
88 * @param array $optParams Optional parameters.
89 *
90 * @opt_param int pageSize The maximum number of rule sets to return. The
91 * service may return fewer than this value. If unspecified, at most 50 rule
92 * sets will be returned. The maximum value is 1000; values above 1000 will be
93 * coerced to 1000.
94 * @opt_param string pageToken A page token, received from a previous
95 * `ListRuleSets` call. Provide this to retrieve the subsequent page. When
96 * paginating, all other parameters provided to `ListRuleSets` must match the
97 * call that provided the page token.
98 * @return GoogleCloudContentwarehouseV1ListRuleSetsResponse
99 * @throws \Google\Service\Exception
100 */
101 public function listProjectsLocationsRuleSets($parent, $optParams = [])
102 {
103 $params = ['parent' => $parent];
104 $params = array_merge($params, $optParams);
105 return $this->call('list', [$params], GoogleCloudContentwarehouseV1ListRuleSetsResponse::class);
106 }
107 /**
108 * Updates a ruleset. Returns INVALID_ARGUMENT if the name of the ruleset is
109 * non-empty and does not equal the existing name. (ruleSets.patch)
110 *
111 * @param string $name Required. The name of the rule set to update. Format:
112 * projects/{project_number}/locations/{location}/ruleSets/{rule_set_id}.
113 * @param GoogleCloudContentwarehouseV1UpdateRuleSetRequest $postBody
114 * @param array $optParams Optional parameters.
115 * @return GoogleCloudContentwarehouseV1RuleSet
116 * @throws \Google\Service\Exception
117 */
118 public function patch($name, GoogleCloudContentwarehouseV1UpdateRuleSetRequest $postBody, $optParams = [])
119 {
120 $params = ['name' => $name, 'postBody' => $postBody];
121 $params = array_merge($params, $optParams);
122 return $this->call('patch', [$params], GoogleCloudContentwarehouseV1RuleSet::class);
123 }
124}
125
126// Adding a class alias for backwards compatibility with the previous class name.
127class_alias(ProjectsLocationsRuleSets::class, 'Google_Service_Contentwarehouse_Resource_ProjectsLocationsRuleSets');
Note: See TracBrowser for help on using the repository browser.