source: vendor/google/apiclient-services/src/CloudHealthcare/Resource/ProjectsLocationsDatasetsConsentStoresAttributeDefinitions.php@ e3d4e0a

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

Upload project files

  • Property mode set to 100644
File size: 6.2 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\CloudHealthcare\Resource;
19
20use Google\Service\CloudHealthcare\AttributeDefinition;
21use Google\Service\CloudHealthcare\HealthcareEmpty;
22use Google\Service\CloudHealthcare\ListAttributeDefinitionsResponse;
23
24/**
25 * The "attributeDefinitions" collection of methods.
26 * Typical usage is:
27 * <code>
28 * $healthcareService = new Google\Service\CloudHealthcare(...);
29 * $attributeDefinitions = $healthcareService->projects_locations_datasets_consentStores_attributeDefinitions;
30 * </code>
31 */
32class ProjectsLocationsDatasetsConsentStoresAttributeDefinitions extends \Google\Service\Resource
33{
34 /**
35 * Creates a new Attribute definition in the parent consent store.
36 * (attributeDefinitions.create)
37 *
38 * @param string $parent Required. The name of the consent store that this
39 * Attribute definition belongs to.
40 * @param AttributeDefinition $postBody
41 * @param array $optParams Optional parameters.
42 *
43 * @opt_param string attributeDefinitionId Required. The ID of the Attribute
44 * definition to create. The string must match the following regex: `_a-
45 * zA-Z{0,255}` and must not be a reserved keyword within the Common Expression
46 * Language as listed on https://github.com/google/cel-
47 * spec/blob/master/doc/langdef.md.
48 * @return AttributeDefinition
49 * @throws \Google\Service\Exception
50 */
51 public function create($parent, AttributeDefinition $postBody, $optParams = [])
52 {
53 $params = ['parent' => $parent, 'postBody' => $postBody];
54 $params = array_merge($params, $optParams);
55 return $this->call('create', [$params], AttributeDefinition::class);
56 }
57 /**
58 * Deletes the specified Attribute definition. Fails if the Attribute definition
59 * is referenced by any User data mapping, or the latest revision of any
60 * Consent. (attributeDefinitions.delete)
61 *
62 * @param string $name Required. The resource name of the Attribute definition
63 * to delete. To preserve referential integrity, Attribute definitions
64 * referenced by a User data mapping or the latest revision of a Consent cannot
65 * be deleted.
66 * @param array $optParams Optional parameters.
67 * @return HealthcareEmpty
68 * @throws \Google\Service\Exception
69 */
70 public function delete($name, $optParams = [])
71 {
72 $params = ['name' => $name];
73 $params = array_merge($params, $optParams);
74 return $this->call('delete', [$params], HealthcareEmpty::class);
75 }
76 /**
77 * Gets the specified Attribute definition. (attributeDefinitions.get)
78 *
79 * @param string $name Required. The resource name of the Attribute definition
80 * to get.
81 * @param array $optParams Optional parameters.
82 * @return AttributeDefinition
83 * @throws \Google\Service\Exception
84 */
85 public function get($name, $optParams = [])
86 {
87 $params = ['name' => $name];
88 $params = array_merge($params, $optParams);
89 return $this->call('get', [$params], AttributeDefinition::class);
90 }
91 /**
92 * Lists the Attribute definitions in the specified consent store. (attributeDef
93 * initions.listProjectsLocationsDatasetsConsentStoresAttributeDefinitions)
94 *
95 * @param string $parent Required. Name of the consent store to retrieve
96 * Attribute definitions from.
97 * @param array $optParams Optional parameters.
98 *
99 * @opt_param string filter Optional. Restricts the attributes returned to those
100 * matching a filter. The only field available for filtering is `category`. For
101 * example, `filter=category=\"REQUEST\"`.
102 * @opt_param int pageSize Optional. Limit on the number of Attribute
103 * definitions to return in a single response. If not specified, 100 is used.
104 * May not be larger than 1000.
105 * @opt_param string pageToken Optional. Token to retrieve the next page of
106 * results or empty to get the first page.
107 * @return ListAttributeDefinitionsResponse
108 * @throws \Google\Service\Exception
109 */
110 public function listProjectsLocationsDatasetsConsentStoresAttributeDefinitions($parent, $optParams = [])
111 {
112 $params = ['parent' => $parent];
113 $params = array_merge($params, $optParams);
114 return $this->call('list', [$params], ListAttributeDefinitionsResponse::class);
115 }
116 /**
117 * Updates the specified Attribute definition. (attributeDefinitions.patch)
118 *
119 * @param string $name Identifier. Resource name of the Attribute definition, of
120 * the form `projects/{project_id}/locations/{location_id}/datasets/{dataset_id}
121 * /consentStores/{consent_store_id}/attributeDefinitions/{attribute_definition_
122 * id}`. Cannot be changed after creation.
123 * @param AttributeDefinition $postBody
124 * @param array $optParams Optional parameters.
125 *
126 * @opt_param string updateMask Required. The update mask that applies to the
127 * resource. For the `FieldMask` definition, see
128 * https://developers.google.com/protocol-
129 * buffers/docs/reference/google.protobuf#fieldmask. Only the `description`,
130 * `allowed_values`, `consent_default_values` and `data_mapping_default_value`
131 * fields can be updated. The updated `allowed_values` must contain all values
132 * from the previous `allowed_values`.
133 * @return AttributeDefinition
134 * @throws \Google\Service\Exception
135 */
136 public function patch($name, AttributeDefinition $postBody, $optParams = [])
137 {
138 $params = ['name' => $name, 'postBody' => $postBody];
139 $params = array_merge($params, $optParams);
140 return $this->call('patch', [$params], AttributeDefinition::class);
141 }
142}
143
144// Adding a class alias for backwards compatibility with the previous class name.
145class_alias(ProjectsLocationsDatasetsConsentStoresAttributeDefinitions::class, 'Google_Service_CloudHealthcare_Resource_ProjectsLocationsDatasetsConsentStoresAttributeDefinitions');
Note: See TracBrowser for help on using the repository browser.