aws-sdk-connectparticipant 1.19.0 → 1.36.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -13,6 +13,7 @@ module Aws::ConnectParticipant
13
13
 
14
14
  include Seahorse::Model
15
15
 
16
+ ARN = Shapes::StringShape.new(name: 'ARN')
16
17
  AccessDeniedException = Shapes::StructureShape.new(name: 'AccessDeniedException')
17
18
  ArtifactId = Shapes::StringShape.new(name: 'ArtifactId')
18
19
  ArtifactStatus = Shapes::StringShape.new(name: 'ArtifactStatus')
@@ -37,6 +38,8 @@ module Aws::ConnectParticipant
37
38
  ContentType = Shapes::StringShape.new(name: 'ContentType')
38
39
  CreateParticipantConnectionRequest = Shapes::StructureShape.new(name: 'CreateParticipantConnectionRequest')
39
40
  CreateParticipantConnectionResponse = Shapes::StructureShape.new(name: 'CreateParticipantConnectionResponse')
41
+ DescribeViewRequest = Shapes::StructureShape.new(name: 'DescribeViewRequest')
42
+ DescribeViewResponse = Shapes::StructureShape.new(name: 'DescribeViewResponse')
40
43
  DisconnectParticipantRequest = Shapes::StructureShape.new(name: 'DisconnectParticipantRequest')
41
44
  DisconnectParticipantResponse = Shapes::StructureShape.new(name: 'DisconnectParticipantResponse')
42
45
  DisplayName = Shapes::StringShape.new(name: 'DisplayName')
@@ -50,6 +53,7 @@ module Aws::ConnectParticipant
50
53
  Item = Shapes::StructureShape.new(name: 'Item')
51
54
  MaxResults = Shapes::IntegerShape.new(name: 'MaxResults')
52
55
  Message = Shapes::StringShape.new(name: 'Message')
56
+ MessageMetadata = Shapes::StructureShape.new(name: 'MessageMetadata')
53
57
  MostRecent = Shapes::IntegerShape.new(name: 'MostRecent')
54
58
  NextToken = Shapes::StringShape.new(name: 'NextToken')
55
59
  NonEmptyClientToken = Shapes::StringShape.new(name: 'NonEmptyClientToken')
@@ -59,6 +63,11 @@ module Aws::ConnectParticipant
59
63
  PreSignedAttachmentUrl = Shapes::StringShape.new(name: 'PreSignedAttachmentUrl')
60
64
  PreSignedConnectionUrl = Shapes::StringShape.new(name: 'PreSignedConnectionUrl')
61
65
  Reason = Shapes::StringShape.new(name: 'Reason')
66
+ Receipt = Shapes::StructureShape.new(name: 'Receipt')
67
+ Receipts = Shapes::ListShape.new(name: 'Receipts')
68
+ ResourceId = Shapes::StringShape.new(name: 'ResourceId')
69
+ ResourceNotFoundException = Shapes::StructureShape.new(name: 'ResourceNotFoundException')
70
+ ResourceType = Shapes::StringShape.new(name: 'ResourceType')
62
71
  ScanDirection = Shapes::StringShape.new(name: 'ScanDirection')
63
72
  SendEventRequest = Shapes::StructureShape.new(name: 'SendEventRequest')
64
73
  SendEventResponse = Shapes::StructureShape.new(name: 'SendEventResponse')
@@ -77,6 +86,16 @@ module Aws::ConnectParticipant
77
86
  UploadMetadataSignedHeadersValue = Shapes::StringShape.new(name: 'UploadMetadataSignedHeadersValue')
78
87
  UploadMetadataUrl = Shapes::StringShape.new(name: 'UploadMetadataUrl')
79
88
  ValidationException = Shapes::StructureShape.new(name: 'ValidationException')
89
+ View = Shapes::StructureShape.new(name: 'View')
90
+ ViewAction = Shapes::StringShape.new(name: 'ViewAction')
91
+ ViewActions = Shapes::ListShape.new(name: 'ViewActions')
92
+ ViewContent = Shapes::StructureShape.new(name: 'ViewContent')
93
+ ViewId = Shapes::StringShape.new(name: 'ViewId')
94
+ ViewInputSchema = Shapes::StringShape.new(name: 'ViewInputSchema')
95
+ ViewName = Shapes::StringShape.new(name: 'ViewName')
96
+ ViewTemplate = Shapes::StringShape.new(name: 'ViewTemplate')
97
+ ViewToken = Shapes::StringShape.new(name: 'ViewToken')
98
+ ViewVersion = Shapes::IntegerShape.new(name: 'ViewVersion')
80
99
  Websocket = Shapes::StructureShape.new(name: 'Websocket')
81
100
 
82
101
  AccessDeniedException.add_member(:message, Shapes::ShapeRef.new(shape: Message, required: true, location_name: "Message"))
@@ -108,7 +127,7 @@ module Aws::ConnectParticipant
108
127
 
109
128
  ConnectionTypeList.member = Shapes::ShapeRef.new(shape: ConnectionType)
110
129
 
111
- CreateParticipantConnectionRequest.add_member(:type, Shapes::ShapeRef.new(shape: ConnectionTypeList, required: true, location_name: "Type"))
130
+ CreateParticipantConnectionRequest.add_member(:type, Shapes::ShapeRef.new(shape: ConnectionTypeList, location_name: "Type"))
112
131
  CreateParticipantConnectionRequest.add_member(:participant_token, Shapes::ShapeRef.new(shape: ParticipantToken, required: true, location: "header", location_name: "X-Amz-Bearer"))
113
132
  CreateParticipantConnectionRequest.add_member(:connect_participant, Shapes::ShapeRef.new(shape: Bool, location_name: "ConnectParticipant"))
114
133
  CreateParticipantConnectionRequest.struct_class = Types::CreateParticipantConnectionRequest
@@ -117,6 +136,13 @@ module Aws::ConnectParticipant
117
136
  CreateParticipantConnectionResponse.add_member(:connection_credentials, Shapes::ShapeRef.new(shape: ConnectionCredentials, location_name: "ConnectionCredentials"))
118
137
  CreateParticipantConnectionResponse.struct_class = Types::CreateParticipantConnectionResponse
119
138
 
139
+ DescribeViewRequest.add_member(:view_token, Shapes::ShapeRef.new(shape: ViewToken, required: true, location: "uri", location_name: "ViewToken"))
140
+ DescribeViewRequest.add_member(:connection_token, Shapes::ShapeRef.new(shape: ParticipantToken, required: true, location: "header", location_name: "X-Amz-Bearer"))
141
+ DescribeViewRequest.struct_class = Types::DescribeViewRequest
142
+
143
+ DescribeViewResponse.add_member(:view, Shapes::ShapeRef.new(shape: View, location_name: "View"))
144
+ DescribeViewResponse.struct_class = Types::DescribeViewResponse
145
+
120
146
  DisconnectParticipantRequest.add_member(:client_token, Shapes::ShapeRef.new(shape: ClientToken, location_name: "ClientToken", metadata: {"idempotencyToken"=>true}))
121
147
  DisconnectParticipantRequest.add_member(:connection_token, Shapes::ShapeRef.new(shape: ParticipantToken, required: true, location: "header", location_name: "X-Amz-Bearer"))
122
148
  DisconnectParticipantRequest.struct_class = Types::DisconnectParticipantRequest
@@ -157,8 +183,27 @@ module Aws::ConnectParticipant
157
183
  Item.add_member(:display_name, Shapes::ShapeRef.new(shape: DisplayName, location_name: "DisplayName"))
158
184
  Item.add_member(:participant_role, Shapes::ShapeRef.new(shape: ParticipantRole, location_name: "ParticipantRole"))
159
185
  Item.add_member(:attachments, Shapes::ShapeRef.new(shape: Attachments, location_name: "Attachments"))
186
+ Item.add_member(:message_metadata, Shapes::ShapeRef.new(shape: MessageMetadata, location_name: "MessageMetadata"))
187
+ Item.add_member(:related_contact_id, Shapes::ShapeRef.new(shape: ContactId, location_name: "RelatedContactId"))
188
+ Item.add_member(:contact_id, Shapes::ShapeRef.new(shape: ContactId, location_name: "ContactId"))
160
189
  Item.struct_class = Types::Item
161
190
 
191
+ MessageMetadata.add_member(:message_id, Shapes::ShapeRef.new(shape: ChatItemId, location_name: "MessageId"))
192
+ MessageMetadata.add_member(:receipts, Shapes::ShapeRef.new(shape: Receipts, location_name: "Receipts"))
193
+ MessageMetadata.struct_class = Types::MessageMetadata
194
+
195
+ Receipt.add_member(:delivered_timestamp, Shapes::ShapeRef.new(shape: Instant, location_name: "DeliveredTimestamp"))
196
+ Receipt.add_member(:read_timestamp, Shapes::ShapeRef.new(shape: Instant, location_name: "ReadTimestamp"))
197
+ Receipt.add_member(:recipient_participant_id, Shapes::ShapeRef.new(shape: ParticipantId, location_name: "RecipientParticipantId"))
198
+ Receipt.struct_class = Types::Receipt
199
+
200
+ Receipts.member = Shapes::ShapeRef.new(shape: Receipt)
201
+
202
+ ResourceNotFoundException.add_member(:message, Shapes::ShapeRef.new(shape: Message, location_name: "Message"))
203
+ ResourceNotFoundException.add_member(:resource_id, Shapes::ShapeRef.new(shape: ResourceId, location_name: "ResourceId"))
204
+ ResourceNotFoundException.add_member(:resource_type, Shapes::ShapeRef.new(shape: ResourceType, location_name: "ResourceType"))
205
+ ResourceNotFoundException.struct_class = Types::ResourceNotFoundException
206
+
162
207
  SendEventRequest.add_member(:content_type, Shapes::ShapeRef.new(shape: ChatContentType, required: true, location_name: "ContentType"))
163
208
  SendEventRequest.add_member(:content, Shapes::ShapeRef.new(shape: ChatContent, location_name: "Content"))
164
209
  SendEventRequest.add_member(:client_token, Shapes::ShapeRef.new(shape: ClientToken, location_name: "ClientToken", metadata: {"idempotencyToken"=>true}))
@@ -214,6 +259,20 @@ module Aws::ConnectParticipant
214
259
  ValidationException.add_member(:message, Shapes::ShapeRef.new(shape: Reason, required: true, location_name: "Message"))
215
260
  ValidationException.struct_class = Types::ValidationException
216
261
 
262
+ View.add_member(:id, Shapes::ShapeRef.new(shape: ViewId, location_name: "Id"))
263
+ View.add_member(:arn, Shapes::ShapeRef.new(shape: ARN, location_name: "Arn"))
264
+ View.add_member(:name, Shapes::ShapeRef.new(shape: ViewName, location_name: "Name"))
265
+ View.add_member(:version, Shapes::ShapeRef.new(shape: ViewVersion, location_name: "Version"))
266
+ View.add_member(:content, Shapes::ShapeRef.new(shape: ViewContent, location_name: "Content"))
267
+ View.struct_class = Types::View
268
+
269
+ ViewActions.member = Shapes::ShapeRef.new(shape: ViewAction)
270
+
271
+ ViewContent.add_member(:input_schema, Shapes::ShapeRef.new(shape: ViewInputSchema, location_name: "InputSchema"))
272
+ ViewContent.add_member(:template, Shapes::ShapeRef.new(shape: ViewTemplate, location_name: "Template"))
273
+ ViewContent.add_member(:actions, Shapes::ShapeRef.new(shape: ViewActions, location_name: "Actions"))
274
+ ViewContent.struct_class = Types::ViewContent
275
+
217
276
  Websocket.add_member(:url, Shapes::ShapeRef.new(shape: PreSignedConnectionUrl, location_name: "Url"))
218
277
  Websocket.add_member(:connection_expiry, Shapes::ShapeRef.new(shape: ISO8601Datetime, location_name: "ConnectionExpiry"))
219
278
  Websocket.struct_class = Types::Websocket
@@ -263,6 +322,19 @@ module Aws::ConnectParticipant
263
322
  o.errors << Shapes::ShapeRef.new(shape: ValidationException)
264
323
  end)
265
324
 
325
+ api.add_operation(:describe_view, Seahorse::Model::Operation.new.tap do |o|
326
+ o.name = "DescribeView"
327
+ o.http_method = "GET"
328
+ o.http_request_uri = "/participant/views/{ViewToken}"
329
+ o.input = Shapes::ShapeRef.new(shape: DescribeViewRequest)
330
+ o.output = Shapes::ShapeRef.new(shape: DescribeViewResponse)
331
+ o.errors << Shapes::ShapeRef.new(shape: AccessDeniedException)
332
+ o.errors << Shapes::ShapeRef.new(shape: InternalServerException)
333
+ o.errors << Shapes::ShapeRef.new(shape: ThrottlingException)
334
+ o.errors << Shapes::ShapeRef.new(shape: ResourceNotFoundException)
335
+ o.errors << Shapes::ShapeRef.new(shape: ValidationException)
336
+ end)
337
+
266
338
  api.add_operation(:disconnect_participant, Seahorse::Model::Operation.new.tap do |o|
267
339
  o.name = "DisconnectParticipant"
268
340
  o.http_method = "POST"
@@ -0,0 +1,66 @@
1
+ # frozen_string_literal: true
2
+
3
+ # WARNING ABOUT GENERATED CODE
4
+ #
5
+ # This file is generated. See the contributing guide for more information:
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
7
+ #
8
+ # WARNING ABOUT GENERATED CODE
9
+
10
+ module Aws::ConnectParticipant
11
+ # Endpoint parameters used to influence endpoints per request.
12
+ #
13
+ # @!attribute region
14
+ # The AWS region used to dispatch the request.
15
+ #
16
+ # @return [String]
17
+ #
18
+ # @!attribute use_dual_stack
19
+ # When true, use the dual-stack endpoint. If the configured endpoint does not support dual-stack, dispatching the request MAY return an error.
20
+ #
21
+ # @return [Boolean]
22
+ #
23
+ # @!attribute use_fips
24
+ # When true, send this request to the FIPS-compliant regional endpoint. If the configured endpoint does not have a FIPS compliant endpoint, dispatching the request will return an error.
25
+ #
26
+ # @return [Boolean]
27
+ #
28
+ # @!attribute endpoint
29
+ # Override the endpoint used to send this request
30
+ #
31
+ # @return [String]
32
+ #
33
+ EndpointParameters = Struct.new(
34
+ :region,
35
+ :use_dual_stack,
36
+ :use_fips,
37
+ :endpoint,
38
+ ) do
39
+ include Aws::Structure
40
+
41
+ # @api private
42
+ class << self
43
+ PARAM_MAP = {
44
+ 'Region' => :region,
45
+ 'UseDualStack' => :use_dual_stack,
46
+ 'UseFIPS' => :use_fips,
47
+ 'Endpoint' => :endpoint,
48
+ }.freeze
49
+ end
50
+
51
+ def initialize(options = {})
52
+ self[:region] = options[:region]
53
+ self[:use_dual_stack] = options[:use_dual_stack]
54
+ self[:use_dual_stack] = false if self[:use_dual_stack].nil?
55
+ if self[:use_dual_stack].nil?
56
+ raise ArgumentError, "Missing required EndpointParameter: :use_dual_stack"
57
+ end
58
+ self[:use_fips] = options[:use_fips]
59
+ self[:use_fips] = false if self[:use_fips].nil?
60
+ if self[:use_fips].nil?
61
+ raise ArgumentError, "Missing required EndpointParameter: :use_fips"
62
+ end
63
+ self[:endpoint] = options[:endpoint]
64
+ end
65
+ end
66
+ end
@@ -0,0 +1,57 @@
1
+ # frozen_string_literal: true
2
+
3
+ # WARNING ABOUT GENERATED CODE
4
+ #
5
+ # This file is generated. See the contributing guide for more information:
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
7
+ #
8
+ # WARNING ABOUT GENERATED CODE
9
+
10
+ module Aws::ConnectParticipant
11
+ class EndpointProvider
12
+ def resolve_endpoint(parameters)
13
+ region = parameters.region
14
+ use_dual_stack = parameters.use_dual_stack
15
+ use_fips = parameters.use_fips
16
+ endpoint = parameters.endpoint
17
+ if Aws::Endpoints::Matchers.set?(endpoint)
18
+ if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
19
+ raise ArgumentError, "Invalid Configuration: FIPS and custom endpoint are not supported"
20
+ end
21
+ if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
22
+ raise ArgumentError, "Invalid Configuration: Dualstack and custom endpoint are not supported"
23
+ end
24
+ return Aws::Endpoints::Endpoint.new(url: endpoint, headers: {}, properties: {})
25
+ end
26
+ if Aws::Endpoints::Matchers.set?(region)
27
+ if (partition_result = Aws::Endpoints::Matchers.aws_partition(region))
28
+ if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true) && Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
29
+ if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS")) && Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
30
+ return Aws::Endpoints::Endpoint.new(url: "https://participant.connect-fips.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
31
+ end
32
+ raise ArgumentError, "FIPS and DualStack are enabled, but this partition does not support one or both"
33
+ end
34
+ if Aws::Endpoints::Matchers.boolean_equals?(use_fips, true)
35
+ if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsFIPS"))
36
+ if Aws::Endpoints::Matchers.string_equals?("aws-us-gov", Aws::Endpoints::Matchers.attr(partition_result, "name"))
37
+ return Aws::Endpoints::Endpoint.new(url: "https://participant.connect.#{region}.amazonaws.com", headers: {}, properties: {})
38
+ end
39
+ return Aws::Endpoints::Endpoint.new(url: "https://participant.connect-fips.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
40
+ end
41
+ raise ArgumentError, "FIPS is enabled but this partition does not support FIPS"
42
+ end
43
+ if Aws::Endpoints::Matchers.boolean_equals?(use_dual_stack, true)
44
+ if Aws::Endpoints::Matchers.boolean_equals?(true, Aws::Endpoints::Matchers.attr(partition_result, "supportsDualStack"))
45
+ return Aws::Endpoints::Endpoint.new(url: "https://participant.connect.#{region}.#{partition_result['dualStackDnsSuffix']}", headers: {}, properties: {})
46
+ end
47
+ raise ArgumentError, "DualStack is enabled but this partition does not support DualStack"
48
+ end
49
+ return Aws::Endpoints::Endpoint.new(url: "https://participant.connect.#{region}.#{partition_result['dnsSuffix']}", headers: {}, properties: {})
50
+ end
51
+ end
52
+ raise ArgumentError, "Invalid Configuration: Missing Region"
53
+ raise ArgumentError, 'No endpoint could be resolved'
54
+
55
+ end
56
+ end
57
+ end
@@ -0,0 +1,142 @@
1
+ # frozen_string_literal: true
2
+
3
+ # WARNING ABOUT GENERATED CODE
4
+ #
5
+ # This file is generated. See the contributing guide for more information:
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
7
+ #
8
+ # WARNING ABOUT GENERATED CODE
9
+
10
+
11
+ module Aws::ConnectParticipant
12
+ # @api private
13
+ module Endpoints
14
+
15
+ class CompleteAttachmentUpload
16
+ def self.build(context)
17
+ unless context.config.regional_endpoint
18
+ endpoint = context.config.endpoint.to_s
19
+ end
20
+ Aws::ConnectParticipant::EndpointParameters.new(
21
+ region: context.config.region,
22
+ use_dual_stack: context.config.use_dualstack_endpoint,
23
+ use_fips: context.config.use_fips_endpoint,
24
+ endpoint: endpoint,
25
+ )
26
+ end
27
+ end
28
+
29
+ class CreateParticipantConnection
30
+ def self.build(context)
31
+ unless context.config.regional_endpoint
32
+ endpoint = context.config.endpoint.to_s
33
+ end
34
+ Aws::ConnectParticipant::EndpointParameters.new(
35
+ region: context.config.region,
36
+ use_dual_stack: context.config.use_dualstack_endpoint,
37
+ use_fips: context.config.use_fips_endpoint,
38
+ endpoint: endpoint,
39
+ )
40
+ end
41
+ end
42
+
43
+ class DescribeView
44
+ def self.build(context)
45
+ unless context.config.regional_endpoint
46
+ endpoint = context.config.endpoint.to_s
47
+ end
48
+ Aws::ConnectParticipant::EndpointParameters.new(
49
+ region: context.config.region,
50
+ use_dual_stack: context.config.use_dualstack_endpoint,
51
+ use_fips: context.config.use_fips_endpoint,
52
+ endpoint: endpoint,
53
+ )
54
+ end
55
+ end
56
+
57
+ class DisconnectParticipant
58
+ def self.build(context)
59
+ unless context.config.regional_endpoint
60
+ endpoint = context.config.endpoint.to_s
61
+ end
62
+ Aws::ConnectParticipant::EndpointParameters.new(
63
+ region: context.config.region,
64
+ use_dual_stack: context.config.use_dualstack_endpoint,
65
+ use_fips: context.config.use_fips_endpoint,
66
+ endpoint: endpoint,
67
+ )
68
+ end
69
+ end
70
+
71
+ class GetAttachment
72
+ def self.build(context)
73
+ unless context.config.regional_endpoint
74
+ endpoint = context.config.endpoint.to_s
75
+ end
76
+ Aws::ConnectParticipant::EndpointParameters.new(
77
+ region: context.config.region,
78
+ use_dual_stack: context.config.use_dualstack_endpoint,
79
+ use_fips: context.config.use_fips_endpoint,
80
+ endpoint: endpoint,
81
+ )
82
+ end
83
+ end
84
+
85
+ class GetTranscript
86
+ def self.build(context)
87
+ unless context.config.regional_endpoint
88
+ endpoint = context.config.endpoint.to_s
89
+ end
90
+ Aws::ConnectParticipant::EndpointParameters.new(
91
+ region: context.config.region,
92
+ use_dual_stack: context.config.use_dualstack_endpoint,
93
+ use_fips: context.config.use_fips_endpoint,
94
+ endpoint: endpoint,
95
+ )
96
+ end
97
+ end
98
+
99
+ class SendEvent
100
+ def self.build(context)
101
+ unless context.config.regional_endpoint
102
+ endpoint = context.config.endpoint.to_s
103
+ end
104
+ Aws::ConnectParticipant::EndpointParameters.new(
105
+ region: context.config.region,
106
+ use_dual_stack: context.config.use_dualstack_endpoint,
107
+ use_fips: context.config.use_fips_endpoint,
108
+ endpoint: endpoint,
109
+ )
110
+ end
111
+ end
112
+
113
+ class SendMessage
114
+ def self.build(context)
115
+ unless context.config.regional_endpoint
116
+ endpoint = context.config.endpoint.to_s
117
+ end
118
+ Aws::ConnectParticipant::EndpointParameters.new(
119
+ region: context.config.region,
120
+ use_dual_stack: context.config.use_dualstack_endpoint,
121
+ use_fips: context.config.use_fips_endpoint,
122
+ endpoint: endpoint,
123
+ )
124
+ end
125
+ end
126
+
127
+ class StartAttachmentUpload
128
+ def self.build(context)
129
+ unless context.config.regional_endpoint
130
+ endpoint = context.config.endpoint.to_s
131
+ end
132
+ Aws::ConnectParticipant::EndpointParameters.new(
133
+ region: context.config.region,
134
+ use_dual_stack: context.config.use_dualstack_endpoint,
135
+ use_fips: context.config.use_fips_endpoint,
136
+ endpoint: endpoint,
137
+ )
138
+ end
139
+ end
140
+
141
+ end
142
+ end
@@ -30,6 +30,7 @@ module Aws::ConnectParticipant
30
30
  # * {AccessDeniedException}
31
31
  # * {ConflictException}
32
32
  # * {InternalServerException}
33
+ # * {ResourceNotFoundException}
33
34
  # * {ServiceQuotaExceededException}
34
35
  # * {ThrottlingException}
35
36
  # * {ValidationException}
@@ -85,6 +86,31 @@ module Aws::ConnectParticipant
85
86
  end
86
87
  end
87
88
 
89
+ class ResourceNotFoundException < ServiceError
90
+
91
+ # @param [Seahorse::Client::RequestContext] context
92
+ # @param [String] message
93
+ # @param [Aws::ConnectParticipant::Types::ResourceNotFoundException] data
94
+ def initialize(context, message, data = Aws::EmptyStructure.new)
95
+ super(context, message, data)
96
+ end
97
+
98
+ # @return [String]
99
+ def message
100
+ @message || @data[:message]
101
+ end
102
+
103
+ # @return [String]
104
+ def resource_id
105
+ @data[:resource_id]
106
+ end
107
+
108
+ # @return [String]
109
+ def resource_type
110
+ @data[:resource_type]
111
+ end
112
+ end
113
+
88
114
  class ServiceQuotaExceededException < ServiceError
89
115
 
90
116
  # @param [Seahorse::Client::RequestContext] context
@@ -0,0 +1,86 @@
1
+ # frozen_string_literal: true
2
+
3
+ # WARNING ABOUT GENERATED CODE
4
+ #
5
+ # This file is generated. See the contributing guide for more information:
6
+ # https://github.com/aws/aws-sdk-ruby/blob/version-3/CONTRIBUTING.md
7
+ #
8
+ # WARNING ABOUT GENERATED CODE
9
+
10
+
11
+ module Aws::ConnectParticipant
12
+ module Plugins
13
+ class Endpoints < Seahorse::Client::Plugin
14
+ option(
15
+ :endpoint_provider,
16
+ doc_type: 'Aws::ConnectParticipant::EndpointProvider',
17
+ docstring: 'The endpoint provider used to resolve endpoints. Any '\
18
+ 'object that responds to `#resolve_endpoint(parameters)` '\
19
+ 'where `parameters` is a Struct similar to '\
20
+ '`Aws::ConnectParticipant::EndpointParameters`'
21
+ ) do |cfg|
22
+ Aws::ConnectParticipant::EndpointProvider.new
23
+ end
24
+
25
+ # @api private
26
+ class Handler < Seahorse::Client::Handler
27
+ def call(context)
28
+ # If endpoint was discovered, do not resolve or apply the endpoint.
29
+ unless context[:discovered_endpoint]
30
+ params = parameters_for_operation(context)
31
+ endpoint = context.config.endpoint_provider.resolve_endpoint(params)
32
+
33
+ context.http_request.endpoint = endpoint.url
34
+ apply_endpoint_headers(context, endpoint.headers)
35
+ end
36
+
37
+ context[:endpoint_params] = params
38
+ context[:auth_scheme] =
39
+ Aws::Endpoints.resolve_auth_scheme(context, endpoint)
40
+
41
+ @handler.call(context)
42
+ end
43
+
44
+ private
45
+
46
+ def apply_endpoint_headers(context, headers)
47
+ headers.each do |key, values|
48
+ value = values
49
+ .compact
50
+ .map { |s| Seahorse::Util.escape_header_list_string(s.to_s) }
51
+ .join(',')
52
+
53
+ context.http_request.headers[key] = value
54
+ end
55
+ end
56
+
57
+ def parameters_for_operation(context)
58
+ case context.operation_name
59
+ when :complete_attachment_upload
60
+ Aws::ConnectParticipant::Endpoints::CompleteAttachmentUpload.build(context)
61
+ when :create_participant_connection
62
+ Aws::ConnectParticipant::Endpoints::CreateParticipantConnection.build(context)
63
+ when :describe_view
64
+ Aws::ConnectParticipant::Endpoints::DescribeView.build(context)
65
+ when :disconnect_participant
66
+ Aws::ConnectParticipant::Endpoints::DisconnectParticipant.build(context)
67
+ when :get_attachment
68
+ Aws::ConnectParticipant::Endpoints::GetAttachment.build(context)
69
+ when :get_transcript
70
+ Aws::ConnectParticipant::Endpoints::GetTranscript.build(context)
71
+ when :send_event
72
+ Aws::ConnectParticipant::Endpoints::SendEvent.build(context)
73
+ when :send_message
74
+ Aws::ConnectParticipant::Endpoints::SendMessage.build(context)
75
+ when :start_attachment_upload
76
+ Aws::ConnectParticipant::Endpoints::StartAttachmentUpload.build(context)
77
+ end
78
+ end
79
+ end
80
+
81
+ def add_handlers(handlers, _config)
82
+ handlers.add(Handler, step: :build, priority: 75)
83
+ end
84
+ end
85
+ end
86
+ end