google-apis-essentialcontacts_v1 0.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.yardopts +13 -0
- data/CHANGELOG.md +7 -0
- data/LICENSE.md +202 -0
- data/OVERVIEW.md +96 -0
- data/lib/google-apis-essentialcontacts_v1.rb +15 -0
- data/lib/google/apis/essentialcontacts_v1.rb +36 -0
- data/lib/google/apis/essentialcontacts_v1/classes.rb +186 -0
- data/lib/google/apis/essentialcontacts_v1/gem_version.rb +28 -0
- data/lib/google/apis/essentialcontacts_v1/representations.rb +100 -0
- data/lib/google/apis/essentialcontacts_v1/service.rb +859 -0
- metadata +76 -0
@@ -0,0 +1,28 @@
|
|
1
|
+
# Copyright 2020 Google LLC
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
module Google
|
16
|
+
module Apis
|
17
|
+
module EssentialcontactsV1
|
18
|
+
# Version of the google-apis-essentialcontacts_v1 gem
|
19
|
+
GEM_VERSION = "0.1.0"
|
20
|
+
|
21
|
+
# Version of the code generator used to generate this client
|
22
|
+
GENERATOR_VERSION = "0.2.0"
|
23
|
+
|
24
|
+
# Revision of the discovery document this client was generated from
|
25
|
+
REVISION = "20210421"
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
@@ -0,0 +1,100 @@
|
|
1
|
+
# Copyright 2020 Google LLC
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require 'date'
|
16
|
+
require 'google/apis/core/base_service'
|
17
|
+
require 'google/apis/core/json_representation'
|
18
|
+
require 'google/apis/core/hashable'
|
19
|
+
require 'google/apis/errors'
|
20
|
+
|
21
|
+
module Google
|
22
|
+
module Apis
|
23
|
+
module EssentialcontactsV1
|
24
|
+
|
25
|
+
class GoogleCloudEssentialcontactsV1ComputeContactsResponse
|
26
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
27
|
+
|
28
|
+
include Google::Apis::Core::JsonObjectSupport
|
29
|
+
end
|
30
|
+
|
31
|
+
class GoogleCloudEssentialcontactsV1Contact
|
32
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
33
|
+
|
34
|
+
include Google::Apis::Core::JsonObjectSupport
|
35
|
+
end
|
36
|
+
|
37
|
+
class GoogleCloudEssentialcontactsV1ListContactsResponse
|
38
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
39
|
+
|
40
|
+
include Google::Apis::Core::JsonObjectSupport
|
41
|
+
end
|
42
|
+
|
43
|
+
class GoogleCloudEssentialcontactsV1SendTestMessageRequest
|
44
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
45
|
+
|
46
|
+
include Google::Apis::Core::JsonObjectSupport
|
47
|
+
end
|
48
|
+
|
49
|
+
class GoogleProtobufEmpty
|
50
|
+
class Representation < Google::Apis::Core::JsonRepresentation; end
|
51
|
+
|
52
|
+
include Google::Apis::Core::JsonObjectSupport
|
53
|
+
end
|
54
|
+
|
55
|
+
class GoogleCloudEssentialcontactsV1ComputeContactsResponse
|
56
|
+
# @private
|
57
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
58
|
+
collection :contacts, as: 'contacts', class: Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1Contact, decorator: Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1Contact::Representation
|
59
|
+
|
60
|
+
property :next_page_token, as: 'nextPageToken'
|
61
|
+
end
|
62
|
+
end
|
63
|
+
|
64
|
+
class GoogleCloudEssentialcontactsV1Contact
|
65
|
+
# @private
|
66
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
67
|
+
property :email, as: 'email'
|
68
|
+
property :language_tag, as: 'languageTag'
|
69
|
+
property :name, as: 'name'
|
70
|
+
collection :notification_category_subscriptions, as: 'notificationCategorySubscriptions'
|
71
|
+
property :validate_time, as: 'validateTime'
|
72
|
+
property :validation_state, as: 'validationState'
|
73
|
+
end
|
74
|
+
end
|
75
|
+
|
76
|
+
class GoogleCloudEssentialcontactsV1ListContactsResponse
|
77
|
+
# @private
|
78
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
79
|
+
collection :contacts, as: 'contacts', class: Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1Contact, decorator: Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1Contact::Representation
|
80
|
+
|
81
|
+
property :next_page_token, as: 'nextPageToken'
|
82
|
+
end
|
83
|
+
end
|
84
|
+
|
85
|
+
class GoogleCloudEssentialcontactsV1SendTestMessageRequest
|
86
|
+
# @private
|
87
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
88
|
+
collection :contacts, as: 'contacts'
|
89
|
+
property :notification_category, as: 'notificationCategory'
|
90
|
+
end
|
91
|
+
end
|
92
|
+
|
93
|
+
class GoogleProtobufEmpty
|
94
|
+
# @private
|
95
|
+
class Representation < Google::Apis::Core::JsonRepresentation
|
96
|
+
end
|
97
|
+
end
|
98
|
+
end
|
99
|
+
end
|
100
|
+
end
|
@@ -0,0 +1,859 @@
|
|
1
|
+
# Copyright 2020 Google LLC
|
2
|
+
#
|
3
|
+
# Licensed under the Apache License, Version 2.0 (the "License");
|
4
|
+
# you may not use this file except in compliance with the License.
|
5
|
+
# You may obtain a copy of the License at
|
6
|
+
#
|
7
|
+
# http://www.apache.org/licenses/LICENSE-2.0
|
8
|
+
#
|
9
|
+
# Unless required by applicable law or agreed to in writing, software
|
10
|
+
# distributed under the License is distributed on an "AS IS" BASIS,
|
11
|
+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
12
|
+
# See the License for the specific language governing permissions and
|
13
|
+
# limitations under the License.
|
14
|
+
|
15
|
+
require 'google/apis/core/base_service'
|
16
|
+
require 'google/apis/core/json_representation'
|
17
|
+
require 'google/apis/core/hashable'
|
18
|
+
require 'google/apis/errors'
|
19
|
+
|
20
|
+
module Google
|
21
|
+
module Apis
|
22
|
+
module EssentialcontactsV1
|
23
|
+
# Essential Contacts API
|
24
|
+
#
|
25
|
+
#
|
26
|
+
#
|
27
|
+
# @example
|
28
|
+
# require 'google/apis/essentialcontacts_v1'
|
29
|
+
#
|
30
|
+
# Essentialcontacts = Google::Apis::EssentialcontactsV1 # Alias the module
|
31
|
+
# service = Essentialcontacts::EssentialcontactsService.new
|
32
|
+
#
|
33
|
+
# @see https://cloud.google.com/essentialcontacts/docs/
|
34
|
+
class EssentialcontactsService < Google::Apis::Core::BaseService
|
35
|
+
# @return [String]
|
36
|
+
# API key. Your API key identifies your project and provides you with API access,
|
37
|
+
# quota, and reports. Required unless you provide an OAuth 2.0 token.
|
38
|
+
attr_accessor :key
|
39
|
+
|
40
|
+
# @return [String]
|
41
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
42
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
43
|
+
attr_accessor :quota_user
|
44
|
+
|
45
|
+
def initialize
|
46
|
+
super('https://essentialcontacts.googleapis.com/', '',
|
47
|
+
client_name: 'google-apis-essentialcontacts_v1',
|
48
|
+
client_version: Google::Apis::EssentialcontactsV1::GEM_VERSION)
|
49
|
+
@batch_path = 'batch'
|
50
|
+
end
|
51
|
+
|
52
|
+
# Lists all contacts for the resource that are subscribed to the specified
|
53
|
+
# notification categories, including contacts inherited from any parent
|
54
|
+
# resources.
|
55
|
+
# @param [String] parent
|
56
|
+
# Required. The name of the resource to compute contacts for. Format:
|
57
|
+
# organizations/`organization_id`, folders/`folder_id` or projects/`project_id`
|
58
|
+
# @param [Array<String>, String] notification_categories
|
59
|
+
# The categories of notifications to compute contacts for. If ALL is included in
|
60
|
+
# this list, contacts subscribed to any notification category will be returned.
|
61
|
+
# @param [Fixnum] page_size
|
62
|
+
# Optional. The maximum number of results to return from this request. Non-
|
63
|
+
# positive values are ignored. The presence of `next_page_token` in the response
|
64
|
+
# indicates that more results might be available. If not specified, the default
|
65
|
+
# page_size is 100.
|
66
|
+
# @param [String] page_token
|
67
|
+
# Optional. If present, retrieves the next batch of results from the preceding
|
68
|
+
# call to this method. `page_token` must be the value of `next_page_token` from
|
69
|
+
# the previous response. The values of other method parameters should be
|
70
|
+
# identical to those in the previous call.
|
71
|
+
# @param [String] fields
|
72
|
+
# Selector specifying which fields to include in a partial response.
|
73
|
+
# @param [String] quota_user
|
74
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
75
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
76
|
+
# @param [Google::Apis::RequestOptions] options
|
77
|
+
# Request-specific options
|
78
|
+
#
|
79
|
+
# @yield [result, err] Result & error if block supplied
|
80
|
+
# @yieldparam result [Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1ComputeContactsResponse] parsed result object
|
81
|
+
# @yieldparam err [StandardError] error object if request failed
|
82
|
+
#
|
83
|
+
# @return [Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1ComputeContactsResponse]
|
84
|
+
#
|
85
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
86
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
87
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
88
|
+
def compute_folder_contact(parent, notification_categories: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
89
|
+
command = make_simple_command(:get, 'v1/{+parent}/contacts:compute', options)
|
90
|
+
command.response_representation = Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1ComputeContactsResponse::Representation
|
91
|
+
command.response_class = Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1ComputeContactsResponse
|
92
|
+
command.params['parent'] = parent unless parent.nil?
|
93
|
+
command.query['notificationCategories'] = notification_categories unless notification_categories.nil?
|
94
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
95
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
96
|
+
command.query['fields'] = fields unless fields.nil?
|
97
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
98
|
+
execute_or_queue_command(command, &block)
|
99
|
+
end
|
100
|
+
|
101
|
+
# Adds a new contact for a resource.
|
102
|
+
# @param [String] parent
|
103
|
+
# Required. The resource to save this contact for. Format: organizations/`
|
104
|
+
# organization_id`, folders/`folder_id` or projects/`project_id`
|
105
|
+
# @param [Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1Contact] google_cloud_essentialcontacts_v1_contact_object
|
106
|
+
# @param [String] fields
|
107
|
+
# Selector specifying which fields to include in a partial response.
|
108
|
+
# @param [String] quota_user
|
109
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
110
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
111
|
+
# @param [Google::Apis::RequestOptions] options
|
112
|
+
# Request-specific options
|
113
|
+
#
|
114
|
+
# @yield [result, err] Result & error if block supplied
|
115
|
+
# @yieldparam result [Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1Contact] parsed result object
|
116
|
+
# @yieldparam err [StandardError] error object if request failed
|
117
|
+
#
|
118
|
+
# @return [Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1Contact]
|
119
|
+
#
|
120
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
121
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
122
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
123
|
+
def create_folder_contact(parent, google_cloud_essentialcontacts_v1_contact_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
124
|
+
command = make_simple_command(:post, 'v1/{+parent}/contacts', options)
|
125
|
+
command.request_representation = Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1Contact::Representation
|
126
|
+
command.request_object = google_cloud_essentialcontacts_v1_contact_object
|
127
|
+
command.response_representation = Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1Contact::Representation
|
128
|
+
command.response_class = Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1Contact
|
129
|
+
command.params['parent'] = parent unless parent.nil?
|
130
|
+
command.query['fields'] = fields unless fields.nil?
|
131
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
132
|
+
execute_or_queue_command(command, &block)
|
133
|
+
end
|
134
|
+
|
135
|
+
# Deletes a contact.
|
136
|
+
# @param [String] name
|
137
|
+
# Required. The name of the contact to delete. Format: organizations/`
|
138
|
+
# organization_id`/contacts/`contact_id`, folders/`folder_id`/contacts/`
|
139
|
+
# contact_id` or projects/`project_id`/contacts/`contact_id`
|
140
|
+
# @param [String] fields
|
141
|
+
# Selector specifying which fields to include in a partial response.
|
142
|
+
# @param [String] quota_user
|
143
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
144
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
145
|
+
# @param [Google::Apis::RequestOptions] options
|
146
|
+
# Request-specific options
|
147
|
+
#
|
148
|
+
# @yield [result, err] Result & error if block supplied
|
149
|
+
# @yieldparam result [Google::Apis::EssentialcontactsV1::GoogleProtobufEmpty] parsed result object
|
150
|
+
# @yieldparam err [StandardError] error object if request failed
|
151
|
+
#
|
152
|
+
# @return [Google::Apis::EssentialcontactsV1::GoogleProtobufEmpty]
|
153
|
+
#
|
154
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
155
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
156
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
157
|
+
def delete_folder_contact(name, fields: nil, quota_user: nil, options: nil, &block)
|
158
|
+
command = make_simple_command(:delete, 'v1/{+name}', options)
|
159
|
+
command.response_representation = Google::Apis::EssentialcontactsV1::GoogleProtobufEmpty::Representation
|
160
|
+
command.response_class = Google::Apis::EssentialcontactsV1::GoogleProtobufEmpty
|
161
|
+
command.params['name'] = name unless name.nil?
|
162
|
+
command.query['fields'] = fields unless fields.nil?
|
163
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
164
|
+
execute_or_queue_command(command, &block)
|
165
|
+
end
|
166
|
+
|
167
|
+
# Gets a single contact.
|
168
|
+
# @param [String] name
|
169
|
+
# Required. The name of the contact to retrieve. Format: organizations/`
|
170
|
+
# organization_id`/contacts/`contact_id`, folders/`folder_id`/contacts/`
|
171
|
+
# contact_id` or projects/`project_id`/contacts/`contact_id`
|
172
|
+
# @param [String] fields
|
173
|
+
# Selector specifying which fields to include in a partial response.
|
174
|
+
# @param [String] quota_user
|
175
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
176
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
177
|
+
# @param [Google::Apis::RequestOptions] options
|
178
|
+
# Request-specific options
|
179
|
+
#
|
180
|
+
# @yield [result, err] Result & error if block supplied
|
181
|
+
# @yieldparam result [Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1Contact] parsed result object
|
182
|
+
# @yieldparam err [StandardError] error object if request failed
|
183
|
+
#
|
184
|
+
# @return [Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1Contact]
|
185
|
+
#
|
186
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
187
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
188
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
189
|
+
def get_folder_contact(name, fields: nil, quota_user: nil, options: nil, &block)
|
190
|
+
command = make_simple_command(:get, 'v1/{+name}', options)
|
191
|
+
command.response_representation = Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1Contact::Representation
|
192
|
+
command.response_class = Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1Contact
|
193
|
+
command.params['name'] = name unless name.nil?
|
194
|
+
command.query['fields'] = fields unless fields.nil?
|
195
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
196
|
+
execute_or_queue_command(command, &block)
|
197
|
+
end
|
198
|
+
|
199
|
+
# Lists the contacts that have been set on a resource.
|
200
|
+
# @param [String] parent
|
201
|
+
# Required. The parent resource name. Format: organizations/`organization_id`,
|
202
|
+
# folders/`folder_id` or projects/`project_id`
|
203
|
+
# @param [Fixnum] page_size
|
204
|
+
# Optional. The maximum number of results to return from this request. Non-
|
205
|
+
# positive values are ignored. The presence of `next_page_token` in the response
|
206
|
+
# indicates that more results might be available. If not specified, the default
|
207
|
+
# page_size is 100.
|
208
|
+
# @param [String] page_token
|
209
|
+
# Optional. If present, retrieves the next batch of results from the preceding
|
210
|
+
# call to this method. `page_token` must be the value of `next_page_token` from
|
211
|
+
# the previous response. The values of other method parameters should be
|
212
|
+
# identical to those in the previous call.
|
213
|
+
# @param [String] fields
|
214
|
+
# Selector specifying which fields to include in a partial response.
|
215
|
+
# @param [String] quota_user
|
216
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
217
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
218
|
+
# @param [Google::Apis::RequestOptions] options
|
219
|
+
# Request-specific options
|
220
|
+
#
|
221
|
+
# @yield [result, err] Result & error if block supplied
|
222
|
+
# @yieldparam result [Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1ListContactsResponse] parsed result object
|
223
|
+
# @yieldparam err [StandardError] error object if request failed
|
224
|
+
#
|
225
|
+
# @return [Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1ListContactsResponse]
|
226
|
+
#
|
227
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
228
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
229
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
230
|
+
def list_folder_contacts(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
231
|
+
command = make_simple_command(:get, 'v1/{+parent}/contacts', options)
|
232
|
+
command.response_representation = Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1ListContactsResponse::Representation
|
233
|
+
command.response_class = Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1ListContactsResponse
|
234
|
+
command.params['parent'] = parent unless parent.nil?
|
235
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
236
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
237
|
+
command.query['fields'] = fields unless fields.nil?
|
238
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
239
|
+
execute_or_queue_command(command, &block)
|
240
|
+
end
|
241
|
+
|
242
|
+
# Updates a contact. Note: A contact's email address cannot be changed.
|
243
|
+
# @param [String] name
|
244
|
+
# The identifier for the contact. Format: `resource_type`/`resource_id`/contacts/
|
245
|
+
# `contact_id`
|
246
|
+
# @param [Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1Contact] google_cloud_essentialcontacts_v1_contact_object
|
247
|
+
# @param [String] update_mask
|
248
|
+
# Optional. The update mask applied to the resource. For the `FieldMask`
|
249
|
+
# definition, see https://developers.google.com/protocol-buffers/docs/reference/
|
250
|
+
# google.protobuf#fieldmask
|
251
|
+
# @param [String] fields
|
252
|
+
# Selector specifying which fields to include in a partial response.
|
253
|
+
# @param [String] quota_user
|
254
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
255
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
256
|
+
# @param [Google::Apis::RequestOptions] options
|
257
|
+
# Request-specific options
|
258
|
+
#
|
259
|
+
# @yield [result, err] Result & error if block supplied
|
260
|
+
# @yieldparam result [Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1Contact] parsed result object
|
261
|
+
# @yieldparam err [StandardError] error object if request failed
|
262
|
+
#
|
263
|
+
# @return [Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1Contact]
|
264
|
+
#
|
265
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
266
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
267
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
268
|
+
def patch_folder_contact(name, google_cloud_essentialcontacts_v1_contact_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
|
269
|
+
command = make_simple_command(:patch, 'v1/{+name}', options)
|
270
|
+
command.request_representation = Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1Contact::Representation
|
271
|
+
command.request_object = google_cloud_essentialcontacts_v1_contact_object
|
272
|
+
command.response_representation = Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1Contact::Representation
|
273
|
+
command.response_class = Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1Contact
|
274
|
+
command.params['name'] = name unless name.nil?
|
275
|
+
command.query['updateMask'] = update_mask unless update_mask.nil?
|
276
|
+
command.query['fields'] = fields unless fields.nil?
|
277
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
278
|
+
execute_or_queue_command(command, &block)
|
279
|
+
end
|
280
|
+
|
281
|
+
# Allows a contact admin to send a test message to contact to verify that it has
|
282
|
+
# been configured correctly.
|
283
|
+
# @param [String] resource
|
284
|
+
# Required. The name of the resource to send the test message for. All contacts
|
285
|
+
# must either be set directly on this resource or inherited from another
|
286
|
+
# resource that is an ancestor of this one. Format: organizations/`
|
287
|
+
# organization_id`, folders/`folder_id` or projects/`project_id`
|
288
|
+
# @param [Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1SendTestMessageRequest] google_cloud_essentialcontacts_v1_send_test_message_request_object
|
289
|
+
# @param [String] fields
|
290
|
+
# Selector specifying which fields to include in a partial response.
|
291
|
+
# @param [String] quota_user
|
292
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
293
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
294
|
+
# @param [Google::Apis::RequestOptions] options
|
295
|
+
# Request-specific options
|
296
|
+
#
|
297
|
+
# @yield [result, err] Result & error if block supplied
|
298
|
+
# @yieldparam result [Google::Apis::EssentialcontactsV1::GoogleProtobufEmpty] parsed result object
|
299
|
+
# @yieldparam err [StandardError] error object if request failed
|
300
|
+
#
|
301
|
+
# @return [Google::Apis::EssentialcontactsV1::GoogleProtobufEmpty]
|
302
|
+
#
|
303
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
304
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
305
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
306
|
+
def send_folder_contact_test_message(resource, google_cloud_essentialcontacts_v1_send_test_message_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
307
|
+
command = make_simple_command(:post, 'v1/{+resource}/contacts:sendTestMessage', options)
|
308
|
+
command.request_representation = Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1SendTestMessageRequest::Representation
|
309
|
+
command.request_object = google_cloud_essentialcontacts_v1_send_test_message_request_object
|
310
|
+
command.response_representation = Google::Apis::EssentialcontactsV1::GoogleProtobufEmpty::Representation
|
311
|
+
command.response_class = Google::Apis::EssentialcontactsV1::GoogleProtobufEmpty
|
312
|
+
command.params['resource'] = resource unless resource.nil?
|
313
|
+
command.query['fields'] = fields unless fields.nil?
|
314
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
315
|
+
execute_or_queue_command(command, &block)
|
316
|
+
end
|
317
|
+
|
318
|
+
# Lists all contacts for the resource that are subscribed to the specified
|
319
|
+
# notification categories, including contacts inherited from any parent
|
320
|
+
# resources.
|
321
|
+
# @param [String] parent
|
322
|
+
# Required. The name of the resource to compute contacts for. Format:
|
323
|
+
# organizations/`organization_id`, folders/`folder_id` or projects/`project_id`
|
324
|
+
# @param [Array<String>, String] notification_categories
|
325
|
+
# The categories of notifications to compute contacts for. If ALL is included in
|
326
|
+
# this list, contacts subscribed to any notification category will be returned.
|
327
|
+
# @param [Fixnum] page_size
|
328
|
+
# Optional. The maximum number of results to return from this request. Non-
|
329
|
+
# positive values are ignored. The presence of `next_page_token` in the response
|
330
|
+
# indicates that more results might be available. If not specified, the default
|
331
|
+
# page_size is 100.
|
332
|
+
# @param [String] page_token
|
333
|
+
# Optional. If present, retrieves the next batch of results from the preceding
|
334
|
+
# call to this method. `page_token` must be the value of `next_page_token` from
|
335
|
+
# the previous response. The values of other method parameters should be
|
336
|
+
# identical to those in the previous call.
|
337
|
+
# @param [String] fields
|
338
|
+
# Selector specifying which fields to include in a partial response.
|
339
|
+
# @param [String] quota_user
|
340
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
341
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
342
|
+
# @param [Google::Apis::RequestOptions] options
|
343
|
+
# Request-specific options
|
344
|
+
#
|
345
|
+
# @yield [result, err] Result & error if block supplied
|
346
|
+
# @yieldparam result [Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1ComputeContactsResponse] parsed result object
|
347
|
+
# @yieldparam err [StandardError] error object if request failed
|
348
|
+
#
|
349
|
+
# @return [Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1ComputeContactsResponse]
|
350
|
+
#
|
351
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
352
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
353
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
354
|
+
def compute_organization_contact(parent, notification_categories: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
355
|
+
command = make_simple_command(:get, 'v1/{+parent}/contacts:compute', options)
|
356
|
+
command.response_representation = Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1ComputeContactsResponse::Representation
|
357
|
+
command.response_class = Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1ComputeContactsResponse
|
358
|
+
command.params['parent'] = parent unless parent.nil?
|
359
|
+
command.query['notificationCategories'] = notification_categories unless notification_categories.nil?
|
360
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
361
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
362
|
+
command.query['fields'] = fields unless fields.nil?
|
363
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
364
|
+
execute_or_queue_command(command, &block)
|
365
|
+
end
|
366
|
+
|
367
|
+
# Adds a new contact for a resource.
|
368
|
+
# @param [String] parent
|
369
|
+
# Required. The resource to save this contact for. Format: organizations/`
|
370
|
+
# organization_id`, folders/`folder_id` or projects/`project_id`
|
371
|
+
# @param [Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1Contact] google_cloud_essentialcontacts_v1_contact_object
|
372
|
+
# @param [String] fields
|
373
|
+
# Selector specifying which fields to include in a partial response.
|
374
|
+
# @param [String] quota_user
|
375
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
376
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
377
|
+
# @param [Google::Apis::RequestOptions] options
|
378
|
+
# Request-specific options
|
379
|
+
#
|
380
|
+
# @yield [result, err] Result & error if block supplied
|
381
|
+
# @yieldparam result [Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1Contact] parsed result object
|
382
|
+
# @yieldparam err [StandardError] error object if request failed
|
383
|
+
#
|
384
|
+
# @return [Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1Contact]
|
385
|
+
#
|
386
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
387
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
388
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
389
|
+
def create_organization_contact(parent, google_cloud_essentialcontacts_v1_contact_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
390
|
+
command = make_simple_command(:post, 'v1/{+parent}/contacts', options)
|
391
|
+
command.request_representation = Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1Contact::Representation
|
392
|
+
command.request_object = google_cloud_essentialcontacts_v1_contact_object
|
393
|
+
command.response_representation = Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1Contact::Representation
|
394
|
+
command.response_class = Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1Contact
|
395
|
+
command.params['parent'] = parent unless parent.nil?
|
396
|
+
command.query['fields'] = fields unless fields.nil?
|
397
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
398
|
+
execute_or_queue_command(command, &block)
|
399
|
+
end
|
400
|
+
|
401
|
+
# Deletes a contact.
|
402
|
+
# @param [String] name
|
403
|
+
# Required. The name of the contact to delete. Format: organizations/`
|
404
|
+
# organization_id`/contacts/`contact_id`, folders/`folder_id`/contacts/`
|
405
|
+
# contact_id` or projects/`project_id`/contacts/`contact_id`
|
406
|
+
# @param [String] fields
|
407
|
+
# Selector specifying which fields to include in a partial response.
|
408
|
+
# @param [String] quota_user
|
409
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
410
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
411
|
+
# @param [Google::Apis::RequestOptions] options
|
412
|
+
# Request-specific options
|
413
|
+
#
|
414
|
+
# @yield [result, err] Result & error if block supplied
|
415
|
+
# @yieldparam result [Google::Apis::EssentialcontactsV1::GoogleProtobufEmpty] parsed result object
|
416
|
+
# @yieldparam err [StandardError] error object if request failed
|
417
|
+
#
|
418
|
+
# @return [Google::Apis::EssentialcontactsV1::GoogleProtobufEmpty]
|
419
|
+
#
|
420
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
421
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
422
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
423
|
+
def delete_organization_contact(name, fields: nil, quota_user: nil, options: nil, &block)
|
424
|
+
command = make_simple_command(:delete, 'v1/{+name}', options)
|
425
|
+
command.response_representation = Google::Apis::EssentialcontactsV1::GoogleProtobufEmpty::Representation
|
426
|
+
command.response_class = Google::Apis::EssentialcontactsV1::GoogleProtobufEmpty
|
427
|
+
command.params['name'] = name unless name.nil?
|
428
|
+
command.query['fields'] = fields unless fields.nil?
|
429
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
430
|
+
execute_or_queue_command(command, &block)
|
431
|
+
end
|
432
|
+
|
433
|
+
# Gets a single contact.
|
434
|
+
# @param [String] name
|
435
|
+
# Required. The name of the contact to retrieve. Format: organizations/`
|
436
|
+
# organization_id`/contacts/`contact_id`, folders/`folder_id`/contacts/`
|
437
|
+
# contact_id` or projects/`project_id`/contacts/`contact_id`
|
438
|
+
# @param [String] fields
|
439
|
+
# Selector specifying which fields to include in a partial response.
|
440
|
+
# @param [String] quota_user
|
441
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
442
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
443
|
+
# @param [Google::Apis::RequestOptions] options
|
444
|
+
# Request-specific options
|
445
|
+
#
|
446
|
+
# @yield [result, err] Result & error if block supplied
|
447
|
+
# @yieldparam result [Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1Contact] parsed result object
|
448
|
+
# @yieldparam err [StandardError] error object if request failed
|
449
|
+
#
|
450
|
+
# @return [Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1Contact]
|
451
|
+
#
|
452
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
453
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
454
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
455
|
+
def get_organization_contact(name, fields: nil, quota_user: nil, options: nil, &block)
|
456
|
+
command = make_simple_command(:get, 'v1/{+name}', options)
|
457
|
+
command.response_representation = Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1Contact::Representation
|
458
|
+
command.response_class = Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1Contact
|
459
|
+
command.params['name'] = name unless name.nil?
|
460
|
+
command.query['fields'] = fields unless fields.nil?
|
461
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
462
|
+
execute_or_queue_command(command, &block)
|
463
|
+
end
|
464
|
+
|
465
|
+
# Lists the contacts that have been set on a resource.
|
466
|
+
# @param [String] parent
|
467
|
+
# Required. The parent resource name. Format: organizations/`organization_id`,
|
468
|
+
# folders/`folder_id` or projects/`project_id`
|
469
|
+
# @param [Fixnum] page_size
|
470
|
+
# Optional. The maximum number of results to return from this request. Non-
|
471
|
+
# positive values are ignored. The presence of `next_page_token` in the response
|
472
|
+
# indicates that more results might be available. If not specified, the default
|
473
|
+
# page_size is 100.
|
474
|
+
# @param [String] page_token
|
475
|
+
# Optional. If present, retrieves the next batch of results from the preceding
|
476
|
+
# call to this method. `page_token` must be the value of `next_page_token` from
|
477
|
+
# the previous response. The values of other method parameters should be
|
478
|
+
# identical to those in the previous call.
|
479
|
+
# @param [String] fields
|
480
|
+
# Selector specifying which fields to include in a partial response.
|
481
|
+
# @param [String] quota_user
|
482
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
483
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
484
|
+
# @param [Google::Apis::RequestOptions] options
|
485
|
+
# Request-specific options
|
486
|
+
#
|
487
|
+
# @yield [result, err] Result & error if block supplied
|
488
|
+
# @yieldparam result [Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1ListContactsResponse] parsed result object
|
489
|
+
# @yieldparam err [StandardError] error object if request failed
|
490
|
+
#
|
491
|
+
# @return [Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1ListContactsResponse]
|
492
|
+
#
|
493
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
494
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
495
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
496
|
+
def list_organization_contacts(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
497
|
+
command = make_simple_command(:get, 'v1/{+parent}/contacts', options)
|
498
|
+
command.response_representation = Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1ListContactsResponse::Representation
|
499
|
+
command.response_class = Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1ListContactsResponse
|
500
|
+
command.params['parent'] = parent unless parent.nil?
|
501
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
502
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
503
|
+
command.query['fields'] = fields unless fields.nil?
|
504
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
505
|
+
execute_or_queue_command(command, &block)
|
506
|
+
end
|
507
|
+
|
508
|
+
# Updates a contact. Note: A contact's email address cannot be changed.
|
509
|
+
# @param [String] name
|
510
|
+
# The identifier for the contact. Format: `resource_type`/`resource_id`/contacts/
|
511
|
+
# `contact_id`
|
512
|
+
# @param [Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1Contact] google_cloud_essentialcontacts_v1_contact_object
|
513
|
+
# @param [String] update_mask
|
514
|
+
# Optional. The update mask applied to the resource. For the `FieldMask`
|
515
|
+
# definition, see https://developers.google.com/protocol-buffers/docs/reference/
|
516
|
+
# google.protobuf#fieldmask
|
517
|
+
# @param [String] fields
|
518
|
+
# Selector specifying which fields to include in a partial response.
|
519
|
+
# @param [String] quota_user
|
520
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
521
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
522
|
+
# @param [Google::Apis::RequestOptions] options
|
523
|
+
# Request-specific options
|
524
|
+
#
|
525
|
+
# @yield [result, err] Result & error if block supplied
|
526
|
+
# @yieldparam result [Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1Contact] parsed result object
|
527
|
+
# @yieldparam err [StandardError] error object if request failed
|
528
|
+
#
|
529
|
+
# @return [Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1Contact]
|
530
|
+
#
|
531
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
532
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
533
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
534
|
+
def patch_organization_contact(name, google_cloud_essentialcontacts_v1_contact_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
|
535
|
+
command = make_simple_command(:patch, 'v1/{+name}', options)
|
536
|
+
command.request_representation = Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1Contact::Representation
|
537
|
+
command.request_object = google_cloud_essentialcontacts_v1_contact_object
|
538
|
+
command.response_representation = Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1Contact::Representation
|
539
|
+
command.response_class = Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1Contact
|
540
|
+
command.params['name'] = name unless name.nil?
|
541
|
+
command.query['updateMask'] = update_mask unless update_mask.nil?
|
542
|
+
command.query['fields'] = fields unless fields.nil?
|
543
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
544
|
+
execute_or_queue_command(command, &block)
|
545
|
+
end
|
546
|
+
|
547
|
+
# Allows a contact admin to send a test message to contact to verify that it has
|
548
|
+
# been configured correctly.
|
549
|
+
# @param [String] resource
|
550
|
+
# Required. The name of the resource to send the test message for. All contacts
|
551
|
+
# must either be set directly on this resource or inherited from another
|
552
|
+
# resource that is an ancestor of this one. Format: organizations/`
|
553
|
+
# organization_id`, folders/`folder_id` or projects/`project_id`
|
554
|
+
# @param [Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1SendTestMessageRequest] google_cloud_essentialcontacts_v1_send_test_message_request_object
|
555
|
+
# @param [String] fields
|
556
|
+
# Selector specifying which fields to include in a partial response.
|
557
|
+
# @param [String] quota_user
|
558
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
559
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
560
|
+
# @param [Google::Apis::RequestOptions] options
|
561
|
+
# Request-specific options
|
562
|
+
#
|
563
|
+
# @yield [result, err] Result & error if block supplied
|
564
|
+
# @yieldparam result [Google::Apis::EssentialcontactsV1::GoogleProtobufEmpty] parsed result object
|
565
|
+
# @yieldparam err [StandardError] error object if request failed
|
566
|
+
#
|
567
|
+
# @return [Google::Apis::EssentialcontactsV1::GoogleProtobufEmpty]
|
568
|
+
#
|
569
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
570
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
571
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
572
|
+
def send_organization_contact_test_message(resource, google_cloud_essentialcontacts_v1_send_test_message_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
573
|
+
command = make_simple_command(:post, 'v1/{+resource}/contacts:sendTestMessage', options)
|
574
|
+
command.request_representation = Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1SendTestMessageRequest::Representation
|
575
|
+
command.request_object = google_cloud_essentialcontacts_v1_send_test_message_request_object
|
576
|
+
command.response_representation = Google::Apis::EssentialcontactsV1::GoogleProtobufEmpty::Representation
|
577
|
+
command.response_class = Google::Apis::EssentialcontactsV1::GoogleProtobufEmpty
|
578
|
+
command.params['resource'] = resource unless resource.nil?
|
579
|
+
command.query['fields'] = fields unless fields.nil?
|
580
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
581
|
+
execute_or_queue_command(command, &block)
|
582
|
+
end
|
583
|
+
|
584
|
+
# Lists all contacts for the resource that are subscribed to the specified
|
585
|
+
# notification categories, including contacts inherited from any parent
|
586
|
+
# resources.
|
587
|
+
# @param [String] parent
|
588
|
+
# Required. The name of the resource to compute contacts for. Format:
|
589
|
+
# organizations/`organization_id`, folders/`folder_id` or projects/`project_id`
|
590
|
+
# @param [Array<String>, String] notification_categories
|
591
|
+
# The categories of notifications to compute contacts for. If ALL is included in
|
592
|
+
# this list, contacts subscribed to any notification category will be returned.
|
593
|
+
# @param [Fixnum] page_size
|
594
|
+
# Optional. The maximum number of results to return from this request. Non-
|
595
|
+
# positive values are ignored. The presence of `next_page_token` in the response
|
596
|
+
# indicates that more results might be available. If not specified, the default
|
597
|
+
# page_size is 100.
|
598
|
+
# @param [String] page_token
|
599
|
+
# Optional. If present, retrieves the next batch of results from the preceding
|
600
|
+
# call to this method. `page_token` must be the value of `next_page_token` from
|
601
|
+
# the previous response. The values of other method parameters should be
|
602
|
+
# identical to those in the previous call.
|
603
|
+
# @param [String] fields
|
604
|
+
# Selector specifying which fields to include in a partial response.
|
605
|
+
# @param [String] quota_user
|
606
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
607
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
608
|
+
# @param [Google::Apis::RequestOptions] options
|
609
|
+
# Request-specific options
|
610
|
+
#
|
611
|
+
# @yield [result, err] Result & error if block supplied
|
612
|
+
# @yieldparam result [Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1ComputeContactsResponse] parsed result object
|
613
|
+
# @yieldparam err [StandardError] error object if request failed
|
614
|
+
#
|
615
|
+
# @return [Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1ComputeContactsResponse]
|
616
|
+
#
|
617
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
618
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
619
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
620
|
+
def compute_project_contact(parent, notification_categories: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
621
|
+
command = make_simple_command(:get, 'v1/{+parent}/contacts:compute', options)
|
622
|
+
command.response_representation = Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1ComputeContactsResponse::Representation
|
623
|
+
command.response_class = Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1ComputeContactsResponse
|
624
|
+
command.params['parent'] = parent unless parent.nil?
|
625
|
+
command.query['notificationCategories'] = notification_categories unless notification_categories.nil?
|
626
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
627
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
628
|
+
command.query['fields'] = fields unless fields.nil?
|
629
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
630
|
+
execute_or_queue_command(command, &block)
|
631
|
+
end
|
632
|
+
|
633
|
+
# Adds a new contact for a resource.
|
634
|
+
# @param [String] parent
|
635
|
+
# Required. The resource to save this contact for. Format: organizations/`
|
636
|
+
# organization_id`, folders/`folder_id` or projects/`project_id`
|
637
|
+
# @param [Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1Contact] google_cloud_essentialcontacts_v1_contact_object
|
638
|
+
# @param [String] fields
|
639
|
+
# Selector specifying which fields to include in a partial response.
|
640
|
+
# @param [String] quota_user
|
641
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
642
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
643
|
+
# @param [Google::Apis::RequestOptions] options
|
644
|
+
# Request-specific options
|
645
|
+
#
|
646
|
+
# @yield [result, err] Result & error if block supplied
|
647
|
+
# @yieldparam result [Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1Contact] parsed result object
|
648
|
+
# @yieldparam err [StandardError] error object if request failed
|
649
|
+
#
|
650
|
+
# @return [Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1Contact]
|
651
|
+
#
|
652
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
653
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
654
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
655
|
+
def create_project_contact(parent, google_cloud_essentialcontacts_v1_contact_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
656
|
+
command = make_simple_command(:post, 'v1/{+parent}/contacts', options)
|
657
|
+
command.request_representation = Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1Contact::Representation
|
658
|
+
command.request_object = google_cloud_essentialcontacts_v1_contact_object
|
659
|
+
command.response_representation = Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1Contact::Representation
|
660
|
+
command.response_class = Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1Contact
|
661
|
+
command.params['parent'] = parent unless parent.nil?
|
662
|
+
command.query['fields'] = fields unless fields.nil?
|
663
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
664
|
+
execute_or_queue_command(command, &block)
|
665
|
+
end
|
666
|
+
|
667
|
+
# Deletes a contact.
|
668
|
+
# @param [String] name
|
669
|
+
# Required. The name of the contact to delete. Format: organizations/`
|
670
|
+
# organization_id`/contacts/`contact_id`, folders/`folder_id`/contacts/`
|
671
|
+
# contact_id` or projects/`project_id`/contacts/`contact_id`
|
672
|
+
# @param [String] fields
|
673
|
+
# Selector specifying which fields to include in a partial response.
|
674
|
+
# @param [String] quota_user
|
675
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
676
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
677
|
+
# @param [Google::Apis::RequestOptions] options
|
678
|
+
# Request-specific options
|
679
|
+
#
|
680
|
+
# @yield [result, err] Result & error if block supplied
|
681
|
+
# @yieldparam result [Google::Apis::EssentialcontactsV1::GoogleProtobufEmpty] parsed result object
|
682
|
+
# @yieldparam err [StandardError] error object if request failed
|
683
|
+
#
|
684
|
+
# @return [Google::Apis::EssentialcontactsV1::GoogleProtobufEmpty]
|
685
|
+
#
|
686
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
687
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
688
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
689
|
+
def delete_project_contact(name, fields: nil, quota_user: nil, options: nil, &block)
|
690
|
+
command = make_simple_command(:delete, 'v1/{+name}', options)
|
691
|
+
command.response_representation = Google::Apis::EssentialcontactsV1::GoogleProtobufEmpty::Representation
|
692
|
+
command.response_class = Google::Apis::EssentialcontactsV1::GoogleProtobufEmpty
|
693
|
+
command.params['name'] = name unless name.nil?
|
694
|
+
command.query['fields'] = fields unless fields.nil?
|
695
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
696
|
+
execute_or_queue_command(command, &block)
|
697
|
+
end
|
698
|
+
|
699
|
+
# Gets a single contact.
|
700
|
+
# @param [String] name
|
701
|
+
# Required. The name of the contact to retrieve. Format: organizations/`
|
702
|
+
# organization_id`/contacts/`contact_id`, folders/`folder_id`/contacts/`
|
703
|
+
# contact_id` or projects/`project_id`/contacts/`contact_id`
|
704
|
+
# @param [String] fields
|
705
|
+
# Selector specifying which fields to include in a partial response.
|
706
|
+
# @param [String] quota_user
|
707
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
708
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
709
|
+
# @param [Google::Apis::RequestOptions] options
|
710
|
+
# Request-specific options
|
711
|
+
#
|
712
|
+
# @yield [result, err] Result & error if block supplied
|
713
|
+
# @yieldparam result [Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1Contact] parsed result object
|
714
|
+
# @yieldparam err [StandardError] error object if request failed
|
715
|
+
#
|
716
|
+
# @return [Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1Contact]
|
717
|
+
#
|
718
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
719
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
720
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
721
|
+
def get_project_contact(name, fields: nil, quota_user: nil, options: nil, &block)
|
722
|
+
command = make_simple_command(:get, 'v1/{+name}', options)
|
723
|
+
command.response_representation = Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1Contact::Representation
|
724
|
+
command.response_class = Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1Contact
|
725
|
+
command.params['name'] = name unless name.nil?
|
726
|
+
command.query['fields'] = fields unless fields.nil?
|
727
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
728
|
+
execute_or_queue_command(command, &block)
|
729
|
+
end
|
730
|
+
|
731
|
+
# Lists the contacts that have been set on a resource.
|
732
|
+
# @param [String] parent
|
733
|
+
# Required. The parent resource name. Format: organizations/`organization_id`,
|
734
|
+
# folders/`folder_id` or projects/`project_id`
|
735
|
+
# @param [Fixnum] page_size
|
736
|
+
# Optional. The maximum number of results to return from this request. Non-
|
737
|
+
# positive values are ignored. The presence of `next_page_token` in the response
|
738
|
+
# indicates that more results might be available. If not specified, the default
|
739
|
+
# page_size is 100.
|
740
|
+
# @param [String] page_token
|
741
|
+
# Optional. If present, retrieves the next batch of results from the preceding
|
742
|
+
# call to this method. `page_token` must be the value of `next_page_token` from
|
743
|
+
# the previous response. The values of other method parameters should be
|
744
|
+
# identical to those in the previous call.
|
745
|
+
# @param [String] fields
|
746
|
+
# Selector specifying which fields to include in a partial response.
|
747
|
+
# @param [String] quota_user
|
748
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
749
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
750
|
+
# @param [Google::Apis::RequestOptions] options
|
751
|
+
# Request-specific options
|
752
|
+
#
|
753
|
+
# @yield [result, err] Result & error if block supplied
|
754
|
+
# @yieldparam result [Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1ListContactsResponse] parsed result object
|
755
|
+
# @yieldparam err [StandardError] error object if request failed
|
756
|
+
#
|
757
|
+
# @return [Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1ListContactsResponse]
|
758
|
+
#
|
759
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
760
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
761
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
762
|
+
def list_project_contacts(parent, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
|
763
|
+
command = make_simple_command(:get, 'v1/{+parent}/contacts', options)
|
764
|
+
command.response_representation = Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1ListContactsResponse::Representation
|
765
|
+
command.response_class = Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1ListContactsResponse
|
766
|
+
command.params['parent'] = parent unless parent.nil?
|
767
|
+
command.query['pageSize'] = page_size unless page_size.nil?
|
768
|
+
command.query['pageToken'] = page_token unless page_token.nil?
|
769
|
+
command.query['fields'] = fields unless fields.nil?
|
770
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
771
|
+
execute_or_queue_command(command, &block)
|
772
|
+
end
|
773
|
+
|
774
|
+
# Updates a contact. Note: A contact's email address cannot be changed.
|
775
|
+
# @param [String] name
|
776
|
+
# The identifier for the contact. Format: `resource_type`/`resource_id`/contacts/
|
777
|
+
# `contact_id`
|
778
|
+
# @param [Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1Contact] google_cloud_essentialcontacts_v1_contact_object
|
779
|
+
# @param [String] update_mask
|
780
|
+
# Optional. The update mask applied to the resource. For the `FieldMask`
|
781
|
+
# definition, see https://developers.google.com/protocol-buffers/docs/reference/
|
782
|
+
# google.protobuf#fieldmask
|
783
|
+
# @param [String] fields
|
784
|
+
# Selector specifying which fields to include in a partial response.
|
785
|
+
# @param [String] quota_user
|
786
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
787
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
788
|
+
# @param [Google::Apis::RequestOptions] options
|
789
|
+
# Request-specific options
|
790
|
+
#
|
791
|
+
# @yield [result, err] Result & error if block supplied
|
792
|
+
# @yieldparam result [Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1Contact] parsed result object
|
793
|
+
# @yieldparam err [StandardError] error object if request failed
|
794
|
+
#
|
795
|
+
# @return [Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1Contact]
|
796
|
+
#
|
797
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
798
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
799
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
800
|
+
def patch_project_contact(name, google_cloud_essentialcontacts_v1_contact_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
|
801
|
+
command = make_simple_command(:patch, 'v1/{+name}', options)
|
802
|
+
command.request_representation = Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1Contact::Representation
|
803
|
+
command.request_object = google_cloud_essentialcontacts_v1_contact_object
|
804
|
+
command.response_representation = Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1Contact::Representation
|
805
|
+
command.response_class = Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1Contact
|
806
|
+
command.params['name'] = name unless name.nil?
|
807
|
+
command.query['updateMask'] = update_mask unless update_mask.nil?
|
808
|
+
command.query['fields'] = fields unless fields.nil?
|
809
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
810
|
+
execute_or_queue_command(command, &block)
|
811
|
+
end
|
812
|
+
|
813
|
+
# Allows a contact admin to send a test message to contact to verify that it has
|
814
|
+
# been configured correctly.
|
815
|
+
# @param [String] resource
|
816
|
+
# Required. The name of the resource to send the test message for. All contacts
|
817
|
+
# must either be set directly on this resource or inherited from another
|
818
|
+
# resource that is an ancestor of this one. Format: organizations/`
|
819
|
+
# organization_id`, folders/`folder_id` or projects/`project_id`
|
820
|
+
# @param [Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1SendTestMessageRequest] google_cloud_essentialcontacts_v1_send_test_message_request_object
|
821
|
+
# @param [String] fields
|
822
|
+
# Selector specifying which fields to include in a partial response.
|
823
|
+
# @param [String] quota_user
|
824
|
+
# Available to use for quota purposes for server-side applications. Can be any
|
825
|
+
# arbitrary string assigned to a user, but should not exceed 40 characters.
|
826
|
+
# @param [Google::Apis::RequestOptions] options
|
827
|
+
# Request-specific options
|
828
|
+
#
|
829
|
+
# @yield [result, err] Result & error if block supplied
|
830
|
+
# @yieldparam result [Google::Apis::EssentialcontactsV1::GoogleProtobufEmpty] parsed result object
|
831
|
+
# @yieldparam err [StandardError] error object if request failed
|
832
|
+
#
|
833
|
+
# @return [Google::Apis::EssentialcontactsV1::GoogleProtobufEmpty]
|
834
|
+
#
|
835
|
+
# @raise [Google::Apis::ServerError] An error occurred on the server and the request can be retried
|
836
|
+
# @raise [Google::Apis::ClientError] The request is invalid and should not be retried without modification
|
837
|
+
# @raise [Google::Apis::AuthorizationError] Authorization is required
|
838
|
+
def send_project_contact_test_message(resource, google_cloud_essentialcontacts_v1_send_test_message_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
|
839
|
+
command = make_simple_command(:post, 'v1/{+resource}/contacts:sendTestMessage', options)
|
840
|
+
command.request_representation = Google::Apis::EssentialcontactsV1::GoogleCloudEssentialcontactsV1SendTestMessageRequest::Representation
|
841
|
+
command.request_object = google_cloud_essentialcontacts_v1_send_test_message_request_object
|
842
|
+
command.response_representation = Google::Apis::EssentialcontactsV1::GoogleProtobufEmpty::Representation
|
843
|
+
command.response_class = Google::Apis::EssentialcontactsV1::GoogleProtobufEmpty
|
844
|
+
command.params['resource'] = resource unless resource.nil?
|
845
|
+
command.query['fields'] = fields unless fields.nil?
|
846
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
847
|
+
execute_or_queue_command(command, &block)
|
848
|
+
end
|
849
|
+
|
850
|
+
protected
|
851
|
+
|
852
|
+
def apply_command_defaults(command)
|
853
|
+
command.query['key'] = key unless key.nil?
|
854
|
+
command.query['quotaUser'] = quota_user unless quota_user.nil?
|
855
|
+
end
|
856
|
+
end
|
857
|
+
end
|
858
|
+
end
|
859
|
+
end
|