Debian Codegraph @

service/kinesisvideosignalingchannels/api.go

raw
1 // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
2
3 package kinesisvideosignalingchannels
4
5 import (
6 "fmt"
7
8 "github.com/aws/aws-sdk-go/aws"
9 "github.com/aws/aws-sdk-go/aws/awsutil"
10 "github.com/aws/aws-sdk-go/aws/request"
11 "github.com/aws/aws-sdk-go/private/protocol"
12 )
13
14 const opGetIceServerConfig = "GetIceServerConfig"
15
16 // GetIceServerConfigRequest generates a "aws/request.Request" representing the
17 // client's request for the GetIceServerConfig operation. The "output" return
18 // value will be populated with the request's response once the request completes
19 // successfully.
20 //
21 // Use "Send" method on the returned Request to send the API call to the service.
22 // the "output" return value is not valid until after Send returns without error.
23 //
24 // See GetIceServerConfig for more information on using the GetIceServerConfig
25 // API call, and error handling.
26 //
27 // This method is useful when you want to inject custom logic or configuration
28 // into the SDK's request lifecycle. Such as custom headers, or retry logic.
29 //
30 // // Example sending a request using the GetIceServerConfigRequest method.
31 // req, resp := client.GetIceServerConfigRequest(params)
32 //
33 // err := req.Send()
34 // if err == nil { // resp is now filled
35 // fmt.Println(resp)
36 // }
37 //
38 // See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-video-signaling-2019-12-04/GetIceServerConfig
39 func (c *KinesisVideoSignalingChannels) GetIceServerConfigRequest(input *GetIceServerConfigInput) (req *request.Request, output *GetIceServerConfigOutput) {
40 op := &request.Operation{
41 Name: opGetIceServerConfig,
42 HTTPMethod: "POST",
43 HTTPPath: "/v1/get-ice-server-config",
44 }
45
46 if input == nil {
47 input = &GetIceServerConfigInput{}
48 }
49
50 output = &GetIceServerConfigOutput{}
51 req = c.newRequest(op, input, output)
52 return
53 }
54
55 // GetIceServerConfig API operation for Amazon Kinesis Video Signaling Channels.
56 //
57 // Gets the Interactive Connectivity Establishment (ICE) server configuration
58 // information, including URIs, username, and password which can be used to
59 // configure the WebRTC connection. The ICE component uses this configuration
60 // information to setup the WebRTC connection, including authenticating with
61 // the Traversal Using Relays around NAT (TURN) relay server.
62 //
63 // TURN is a protocol that is used to improve the connectivity of peer-to-peer
64 // applications. By providing a cloud-based relay service, TURN ensures that
65 // a connection can be established even when one or more peers are incapable
66 // of a direct peer-to-peer connection. For more information, see A REST API
67 // For Access To TURN Services (https://tools.ietf.org/html/draft-uberti-rtcweb-turn-rest-00).
68 //
69 // You can invoke this API to establish a fallback mechanism in case either
70 // of the peers is unable to establish a direct peer-to-peer connection over
71 // a signaling channel. You must specify either a signaling channel ARN or the
72 // client ID in order to invoke this API.
73 //
74 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
75 // with awserr.Error's Code and Message methods to get detailed information about
76 // the error.
77 //
78 // See the AWS API reference guide for Amazon Kinesis Video Signaling Channels's
79 // API operation GetIceServerConfig for usage and error information.
80 //
81 // Returned Error Types:
82 //
83 // - InvalidClientException
84 // The specified client is invalid.
85 //
86 // - SessionExpiredException
87 // If the client session is expired. Once the client is connected, the session
88 // is valid for 45 minutes. Client should reconnect to the channel to continue
89 // sending/receiving messages.
90 //
91 // - ClientLimitExceededException
92 // Your request was throttled because you have exceeded the limit of allowed
93 // client calls. Try making the call later.
94 //
95 // - ResourceNotFoundException
96 // The specified resource is not found.
97 //
98 // - InvalidArgumentException
99 // The value for this input parameter is invalid.
100 //
101 // - NotAuthorizedException
102 // The caller is not authorized to perform this operation.
103 //
104 // See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-video-signaling-2019-12-04/GetIceServerConfig
105 func (c *KinesisVideoSignalingChannels) GetIceServerConfig(input *GetIceServerConfigInput) (*GetIceServerConfigOutput, error) {
106 req, out := c.GetIceServerConfigRequest(input)
107 return out, req.Send()
108 }
109
110 // GetIceServerConfigWithContext is the same as GetIceServerConfig with the addition of
111 // the ability to pass a context and additional request options.
112 //
113 // See GetIceServerConfig for details on how to use this API operation.
114 //
115 // The context must be non-nil and will be used for request cancellation. If
116 // the context is nil a panic will occur. In the future the SDK may create
117 // sub-contexts for http.Requests. See https://golang.org/pkg/context/
118 // for more information on using Contexts.
119 func (c *KinesisVideoSignalingChannels) GetIceServerConfigWithContext(ctx aws.Context, input *GetIceServerConfigInput, opts ...request.Option) (*GetIceServerConfigOutput, error) {
120 req, out := c.GetIceServerConfigRequest(input)
121 req.SetContext(ctx)
122 req.ApplyOptions(opts...)
123 return out, req.Send()
124 }
125
126 const opSendAlexaOfferToMaster = "SendAlexaOfferToMaster"
127
128 // SendAlexaOfferToMasterRequest generates a "aws/request.Request" representing the
129 // client's request for the SendAlexaOfferToMaster operation. The "output" return
130 // value will be populated with the request's response once the request completes
131 // successfully.
132 //
133 // Use "Send" method on the returned Request to send the API call to the service.
134 // the "output" return value is not valid until after Send returns without error.
135 //
136 // See SendAlexaOfferToMaster for more information on using the SendAlexaOfferToMaster
137 // API call, and error handling.
138 //
139 // This method is useful when you want to inject custom logic or configuration
140 // into the SDK's request lifecycle. Such as custom headers, or retry logic.
141 //
142 // // Example sending a request using the SendAlexaOfferToMasterRequest method.
143 // req, resp := client.SendAlexaOfferToMasterRequest(params)
144 //
145 // err := req.Send()
146 // if err == nil { // resp is now filled
147 // fmt.Println(resp)
148 // }
149 //
150 // See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-video-signaling-2019-12-04/SendAlexaOfferToMaster
151 func (c *KinesisVideoSignalingChannels) SendAlexaOfferToMasterRequest(input *SendAlexaOfferToMasterInput) (req *request.Request, output *SendAlexaOfferToMasterOutput) {
152 op := &request.Operation{
153 Name: opSendAlexaOfferToMaster,
154 HTTPMethod: "POST",
155 HTTPPath: "/v1/send-alexa-offer-to-master",
156 }
157
158 if input == nil {
159 input = &SendAlexaOfferToMasterInput{}
160 }
161
162 output = &SendAlexaOfferToMasterOutput{}
163 req = c.newRequest(op, input, output)
164 return
165 }
166
167 // SendAlexaOfferToMaster API operation for Amazon Kinesis Video Signaling Channels.
168 //
169 // This API allows you to connect WebRTC-enabled devices with Alexa display
170 // devices. When invoked, it sends the Alexa Session Description Protocol (SDP)
171 // offer to the master peer. The offer is delivered as soon as the master is
172 // connected to the specified signaling channel. This API returns the SDP answer
173 // from the connected master. If the master is not connected to the signaling
174 // channel, redelivery requests are made until the message expires.
175 //
176 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
177 // with awserr.Error's Code and Message methods to get detailed information about
178 // the error.
179 //
180 // See the AWS API reference guide for Amazon Kinesis Video Signaling Channels's
181 // API operation SendAlexaOfferToMaster for usage and error information.
182 //
183 // Returned Error Types:
184 //
185 // - ClientLimitExceededException
186 // Your request was throttled because you have exceeded the limit of allowed
187 // client calls. Try making the call later.
188 //
189 // - ResourceNotFoundException
190 // The specified resource is not found.
191 //
192 // - InvalidArgumentException
193 // The value for this input parameter is invalid.
194 //
195 // - NotAuthorizedException
196 // The caller is not authorized to perform this operation.
197 //
198 // See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-video-signaling-2019-12-04/SendAlexaOfferToMaster
199 func (c *KinesisVideoSignalingChannels) SendAlexaOfferToMaster(input *SendAlexaOfferToMasterInput) (*SendAlexaOfferToMasterOutput, error) {
200 req, out := c.SendAlexaOfferToMasterRequest(input)
201 return out, req.Send()
202 }
203
204 // SendAlexaOfferToMasterWithContext is the same as SendAlexaOfferToMaster with the addition of
205 // the ability to pass a context and additional request options.
206 //
207 // See SendAlexaOfferToMaster for details on how to use this API operation.
208 //
209 // The context must be non-nil and will be used for request cancellation. If
210 // the context is nil a panic will occur. In the future the SDK may create
211 // sub-contexts for http.Requests. See https://golang.org/pkg/context/
212 // for more information on using Contexts.
213 func (c *KinesisVideoSignalingChannels) SendAlexaOfferToMasterWithContext(ctx aws.Context, input *SendAlexaOfferToMasterInput, opts ...request.Option) (*SendAlexaOfferToMasterOutput, error) {
214 req, out := c.SendAlexaOfferToMasterRequest(input)
215 req.SetContext(ctx)
216 req.ApplyOptions(opts...)
217 return out, req.Send()
218 }
219
220 // Your request was throttled because you have exceeded the limit of allowed
221 // client calls. Try making the call later.
222 type ClientLimitExceededException struct {
223 _ struct{} `type:"structure"`
224 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
225
226 Message_ *string `locationName:"Message" type:"string"`
227 }
228
229 // String returns the string representation.
230 //
231 // API parameter values that are decorated as "sensitive" in the API will not
232 // be included in the string output. The member name will be present, but the
233 // value will be replaced with "sensitive".
234 func (s ClientLimitExceededException) String() string {
235 return awsutil.Prettify(s)
236 }
237
238 // GoString returns the string representation.
239 //
240 // API parameter values that are decorated as "sensitive" in the API will not
241 // be included in the string output. The member name will be present, but the
242 // value will be replaced with "sensitive".
243 func (s ClientLimitExceededException) GoString() string {
244 return s.String()
245 }
246
247 func newErrorClientLimitExceededException(v protocol.ResponseMetadata) error {
248 return &ClientLimitExceededException{
249 RespMetadata: v,
250 }
251 }
252
253 // Code returns the exception type name.
254 func (s *ClientLimitExceededException) Code() string {
255 return "ClientLimitExceededException"
256 }
257
258 // Message returns the exception's message.
259 func (s *ClientLimitExceededException) Message() string {
260 if s.Message_ != nil {
261 return *s.Message_
262 }
263 return ""
264 }
265
266 // OrigErr always returns nil, satisfies awserr.Error interface.
267 func (s *ClientLimitExceededException) OrigErr() error {
268 return nil
269 }
270
271 func (s *ClientLimitExceededException) Error() string {
272 return fmt.Sprintf("%s: %s", s.Code(), s.Message())
273 }
274
275 // Status code returns the HTTP status code for the request's response error.
276 func (s *ClientLimitExceededException) StatusCode() int {
277 return s.RespMetadata.StatusCode
278 }
279
280 // RequestID returns the service's response RequestID for request.
281 func (s *ClientLimitExceededException) RequestID() string {
282 return s.RespMetadata.RequestID
283 }
284
285 type GetIceServerConfigInput struct {
286 _ struct{} `type:"structure"`
287
288 // The ARN of the signaling channel to be used for the peer-to-peer connection
289 // between configured peers.
290 //
291 // ChannelARN is a required field
292 ChannelARN *string `min:"1" type:"string" required:"true"`
293
294 // Unique identifier for the viewer. Must be unique within the signaling channel.
295 ClientId *string `min:"1" type:"string"`
296
297 // Specifies the desired service. Currently, TURN is the only valid value.
298 Service *string `type:"string" enum:"Service"`
299
300 // An optional user ID to be associated with the credentials.
301 Username *string `min:"1" type:"string"`
302 }
303
304 // String returns the string representation.
305 //
306 // API parameter values that are decorated as "sensitive" in the API will not
307 // be included in the string output. The member name will be present, but the
308 // value will be replaced with "sensitive".
309 func (s GetIceServerConfigInput) String() string {
310 return awsutil.Prettify(s)
311 }
312
313 // GoString returns the string representation.
314 //
315 // API parameter values that are decorated as "sensitive" in the API will not
316 // be included in the string output. The member name will be present, but the
317 // value will be replaced with "sensitive".
318 func (s GetIceServerConfigInput) GoString() string {
319 return s.String()
320 }
321
322 // Validate inspects the fields of the type to determine if they are valid.
323 func (s *GetIceServerConfigInput) Validate() error {
324 invalidParams := request.ErrInvalidParams{Context: "GetIceServerConfigInput"}
325 if s.ChannelARN == nil {
326 invalidParams.Add(request.NewErrParamRequired("ChannelARN"))
327 }
328 if s.ChannelARN != nil && len(*s.ChannelARN) < 1 {
329 invalidParams.Add(request.NewErrParamMinLen("ChannelARN", 1))
330 }
331 if s.ClientId != nil && len(*s.ClientId) < 1 {
332 invalidParams.Add(request.NewErrParamMinLen("ClientId", 1))
333 }
334 if s.Username != nil && len(*s.Username) < 1 {
335 invalidParams.Add(request.NewErrParamMinLen("Username", 1))
336 }
337
338 if invalidParams.Len() > 0 {
339 return invalidParams
340 }
341 return nil
342 }
343
344 // SetChannelARN sets the ChannelARN field's value.
345 func (s *GetIceServerConfigInput) SetChannelARN(v string) *GetIceServerConfigInput {
346 s.ChannelARN = &v
347 return s
348 }
349
350 // SetClientId sets the ClientId field's value.
351 func (s *GetIceServerConfigInput) SetClientId(v string) *GetIceServerConfigInput {
352 s.ClientId = &v
353 return s
354 }
355
356 // SetService sets the Service field's value.
357 func (s *GetIceServerConfigInput) SetService(v string) *GetIceServerConfigInput {
358 s.Service = &v
359 return s
360 }
361
362 // SetUsername sets the Username field's value.
363 func (s *GetIceServerConfigInput) SetUsername(v string) *GetIceServerConfigInput {
364 s.Username = &v
365 return s
366 }
367
368 type GetIceServerConfigOutput struct {
369 _ struct{} `type:"structure"`
370
371 // The list of ICE server information objects.
372 IceServerList []*IceServer `type:"list"`
373 }
374
375 // String returns the string representation.
376 //
377 // API parameter values that are decorated as "sensitive" in the API will not
378 // be included in the string output. The member name will be present, but the
379 // value will be replaced with "sensitive".
380 func (s GetIceServerConfigOutput) String() string {
381 return awsutil.Prettify(s)
382 }
383
384 // GoString returns the string representation.
385 //
386 // API parameter values that are decorated as "sensitive" in the API will not
387 // be included in the string output. The member name will be present, but the
388 // value will be replaced with "sensitive".
389 func (s GetIceServerConfigOutput) GoString() string {
390 return s.String()
391 }
392
393 // SetIceServerList sets the IceServerList field's value.
394 func (s *GetIceServerConfigOutput) SetIceServerList(v []*IceServer) *GetIceServerConfigOutput {
395 s.IceServerList = v
396 return s
397 }
398
399 // A structure for the ICE server connection data.
400 type IceServer struct {
401 _ struct{} `type:"structure"`
402
403 // A password to login to the ICE server.
404 Password *string `min:"1" type:"string"`
405
406 // The period of time, in seconds, during which the username and password are
407 // valid.
408 Ttl *int64 `min:"30" type:"integer"`
409
410 // An array of URIs, in the form specified in the I-D.petithuguenin-behave-turn-uris
411 // (https://tools.ietf.org/html/draft-petithuguenin-behave-turn-uris-03) spec.
412 // These URIs provide the different addresses and/or protocols that can be used
413 // to reach the TURN server.
414 Uris []*string `type:"list"`
415
416 // A username to login to the ICE server.
417 Username *string `min:"1" type:"string"`
418 }
419
420 // String returns the string representation.
421 //
422 // API parameter values that are decorated as "sensitive" in the API will not
423 // be included in the string output. The member name will be present, but the
424 // value will be replaced with "sensitive".
425 func (s IceServer) String() string {
426 return awsutil.Prettify(s)
427 }
428
429 // GoString returns the string representation.
430 //
431 // API parameter values that are decorated as "sensitive" in the API will not
432 // be included in the string output. The member name will be present, but the
433 // value will be replaced with "sensitive".
434 func (s IceServer) GoString() string {
435 return s.String()
436 }
437
438 // SetPassword sets the Password field's value.
439 func (s *IceServer) SetPassword(v string) *IceServer {
440 s.Password = &v
441 return s
442 }
443
444 // SetTtl sets the Ttl field's value.
445 func (s *IceServer) SetTtl(v int64) *IceServer {
446 s.Ttl = &v
447 return s
448 }
449
450 // SetUris sets the Uris field's value.
451 func (s *IceServer) SetUris(v []*string) *IceServer {
452 s.Uris = v
453 return s
454 }
455
456 // SetUsername sets the Username field's value.
457 func (s *IceServer) SetUsername(v string) *IceServer {
458 s.Username = &v
459 return s
460 }
461
462 // The value for this input parameter is invalid.
463 type InvalidArgumentException struct {
464 _ struct{} `type:"structure"`
465 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
466
467 Message_ *string `locationName:"Message" type:"string"`
468 }
469
470 // String returns the string representation.
471 //
472 // API parameter values that are decorated as "sensitive" in the API will not
473 // be included in the string output. The member name will be present, but the
474 // value will be replaced with "sensitive".
475 func (s InvalidArgumentException) String() string {
476 return awsutil.Prettify(s)
477 }
478
479 // GoString returns the string representation.
480 //
481 // API parameter values that are decorated as "sensitive" in the API will not
482 // be included in the string output. The member name will be present, but the
483 // value will be replaced with "sensitive".
484 func (s InvalidArgumentException) GoString() string {
485 return s.String()
486 }
487
488 func newErrorInvalidArgumentException(v protocol.ResponseMetadata) error {
489 return &InvalidArgumentException{
490 RespMetadata: v,
491 }
492 }
493
494 // Code returns the exception type name.
495 func (s *InvalidArgumentException) Code() string {
496 return "InvalidArgumentException"
497 }
498
499 // Message returns the exception's message.
500 func (s *InvalidArgumentException) Message() string {
501 if s.Message_ != nil {
502 return *s.Message_
503 }
504 return ""
505 }
506
507 // OrigErr always returns nil, satisfies awserr.Error interface.
508 func (s *InvalidArgumentException) OrigErr() error {
509 return nil
510 }
511
512 func (s *InvalidArgumentException) Error() string {
513 return fmt.Sprintf("%s: %s", s.Code(), s.Message())
514 }
515
516 // Status code returns the HTTP status code for the request's response error.
517 func (s *InvalidArgumentException) StatusCode() int {
518 return s.RespMetadata.StatusCode
519 }
520
521 // RequestID returns the service's response RequestID for request.
522 func (s *InvalidArgumentException) RequestID() string {
523 return s.RespMetadata.RequestID
524 }
525
526 // The specified client is invalid.
527 type InvalidClientException struct {
528 _ struct{} `type:"structure"`
529 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
530
531 Message_ *string `locationName:"message" type:"string"`
532 }
533
534 // String returns the string representation.
535 //
536 // API parameter values that are decorated as "sensitive" in the API will not
537 // be included in the string output. The member name will be present, but the
538 // value will be replaced with "sensitive".
539 func (s InvalidClientException) String() string {
540 return awsutil.Prettify(s)
541 }
542
543 // GoString returns the string representation.
544 //
545 // API parameter values that are decorated as "sensitive" in the API will not
546 // be included in the string output. The member name will be present, but the
547 // value will be replaced with "sensitive".
548 func (s InvalidClientException) GoString() string {
549 return s.String()
550 }
551
552 func newErrorInvalidClientException(v protocol.ResponseMetadata) error {
553 return &InvalidClientException{
554 RespMetadata: v,
555 }
556 }
557
558 // Code returns the exception type name.
559 func (s *InvalidClientException) Code() string {
560 return "InvalidClientException"
561 }
562
563 // Message returns the exception's message.
564 func (s *InvalidClientException) Message() string {
565 if s.Message_ != nil {
566 return *s.Message_
567 }
568 return ""
569 }
570
571 // OrigErr always returns nil, satisfies awserr.Error interface.
572 func (s *InvalidClientException) OrigErr() error {
573 return nil
574 }
575
576 func (s *InvalidClientException) Error() string {
577 return fmt.Sprintf("%s: %s", s.Code(), s.Message())
578 }
579
580 // Status code returns the HTTP status code for the request's response error.
581 func (s *InvalidClientException) StatusCode() int {
582 return s.RespMetadata.StatusCode
583 }
584
585 // RequestID returns the service's response RequestID for request.
586 func (s *InvalidClientException) RequestID() string {
587 return s.RespMetadata.RequestID
588 }
589
590 // The caller is not authorized to perform this operation.
591 type NotAuthorizedException struct {
592 _ struct{} `type:"structure"`
593 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
594
595 Message_ *string `locationName:"Message" type:"string"`
596 }
597
598 // String returns the string representation.
599 //
600 // API parameter values that are decorated as "sensitive" in the API will not
601 // be included in the string output. The member name will be present, but the
602 // value will be replaced with "sensitive".
603 func (s NotAuthorizedException) String() string {
604 return awsutil.Prettify(s)
605 }
606
607 // GoString returns the string representation.
608 //
609 // API parameter values that are decorated as "sensitive" in the API will not
610 // be included in the string output. The member name will be present, but the
611 // value will be replaced with "sensitive".
612 func (s NotAuthorizedException) GoString() string {
613 return s.String()
614 }
615
616 func newErrorNotAuthorizedException(v protocol.ResponseMetadata) error {
617 return &NotAuthorizedException{
618 RespMetadata: v,
619 }
620 }
621
622 // Code returns the exception type name.
623 func (s *NotAuthorizedException) Code() string {
624 return "NotAuthorizedException"
625 }
626
627 // Message returns the exception's message.
628 func (s *NotAuthorizedException) Message() string {
629 if s.Message_ != nil {
630 return *s.Message_
631 }
632 return ""
633 }
634
635 // OrigErr always returns nil, satisfies awserr.Error interface.
636 func (s *NotAuthorizedException) OrigErr() error {
637 return nil
638 }
639
640 func (s *NotAuthorizedException) Error() string {
641 return fmt.Sprintf("%s: %s", s.Code(), s.Message())
642 }
643
644 // Status code returns the HTTP status code for the request's response error.
645 func (s *NotAuthorizedException) StatusCode() int {
646 return s.RespMetadata.StatusCode
647 }
648
649 // RequestID returns the service's response RequestID for request.
650 func (s *NotAuthorizedException) RequestID() string {
651 return s.RespMetadata.RequestID
652 }
653
654 // The specified resource is not found.
655 type ResourceNotFoundException struct {
656 _ struct{} `type:"structure"`
657 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
658
659 Message_ *string `locationName:"Message" type:"string"`
660 }
661
662 // String returns the string representation.
663 //
664 // API parameter values that are decorated as "sensitive" in the API will not
665 // be included in the string output. The member name will be present, but the
666 // value will be replaced with "sensitive".
667 func (s ResourceNotFoundException) String() string {
668 return awsutil.Prettify(s)
669 }
670
671 // GoString returns the string representation.
672 //
673 // API parameter values that are decorated as "sensitive" in the API will not
674 // be included in the string output. The member name will be present, but the
675 // value will be replaced with "sensitive".
676 func (s ResourceNotFoundException) GoString() string {
677 return s.String()
678 }
679
680 func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error {
681 return &ResourceNotFoundException{
682 RespMetadata: v,
683 }
684 }
685
686 // Code returns the exception type name.
687 func (s *ResourceNotFoundException) Code() string {
688 return "ResourceNotFoundException"
689 }
690
691 // Message returns the exception's message.
692 func (s *ResourceNotFoundException) Message() string {
693 if s.Message_ != nil {
694 return *s.Message_
695 }
696 return ""
697 }
698
699 // OrigErr always returns nil, satisfies awserr.Error interface.
700 func (s *ResourceNotFoundException) OrigErr() error {
701 return nil
702 }
703
704 func (s *ResourceNotFoundException) Error() string {
705 return fmt.Sprintf("%s: %s", s.Code(), s.Message())
706 }
707
708 // Status code returns the HTTP status code for the request's response error.
709 func (s *ResourceNotFoundException) StatusCode() int {
710 return s.RespMetadata.StatusCode
711 }
712
713 // RequestID returns the service's response RequestID for request.
714 func (s *ResourceNotFoundException) RequestID() string {
715 return s.RespMetadata.RequestID
716 }
717
718 type SendAlexaOfferToMasterInput struct {
719 _ struct{} `type:"structure"`
720
721 // The ARN of the signaling channel by which Alexa and the master peer communicate.
722 //
723 // ChannelARN is a required field
724 ChannelARN *string `min:"1" type:"string" required:"true"`
725
726 // The base64-encoded SDP offer content.
727 //
728 // MessagePayload is a required field
729 MessagePayload *string `min:"1" type:"string" required:"true"`
730
731 // The unique identifier for the sender client.
732 //
733 // SenderClientId is a required field
734 SenderClientId *string `min:"1" type:"string" required:"true"`
735 }
736
737 // String returns the string representation.
738 //
739 // API parameter values that are decorated as "sensitive" in the API will not
740 // be included in the string output. The member name will be present, but the
741 // value will be replaced with "sensitive".
742 func (s SendAlexaOfferToMasterInput) String() string {
743 return awsutil.Prettify(s)
744 }
745
746 // GoString returns the string representation.
747 //
748 // API parameter values that are decorated as "sensitive" in the API will not
749 // be included in the string output. The member name will be present, but the
750 // value will be replaced with "sensitive".
751 func (s SendAlexaOfferToMasterInput) GoString() string {
752 return s.String()
753 }
754
755 // Validate inspects the fields of the type to determine if they are valid.
756 func (s *SendAlexaOfferToMasterInput) Validate() error {
757 invalidParams := request.ErrInvalidParams{Context: "SendAlexaOfferToMasterInput"}
758 if s.ChannelARN == nil {
759 invalidParams.Add(request.NewErrParamRequired("ChannelARN"))
760 }
761 if s.ChannelARN != nil && len(*s.ChannelARN) < 1 {
762 invalidParams.Add(request.NewErrParamMinLen("ChannelARN", 1))
763 }
764 if s.MessagePayload == nil {
765 invalidParams.Add(request.NewErrParamRequired("MessagePayload"))
766 }
767 if s.MessagePayload != nil && len(*s.MessagePayload) < 1 {
768 invalidParams.Add(request.NewErrParamMinLen("MessagePayload", 1))
769 }
770 if s.SenderClientId == nil {
771 invalidParams.Add(request.NewErrParamRequired("SenderClientId"))
772 }
773 if s.SenderClientId != nil && len(*s.SenderClientId) < 1 {
774 invalidParams.Add(request.NewErrParamMinLen("SenderClientId", 1))
775 }
776
777 if invalidParams.Len() > 0 {
778 return invalidParams
779 }
780 return nil
781 }
782
783 // SetChannelARN sets the ChannelARN field's value.
784 func (s *SendAlexaOfferToMasterInput) SetChannelARN(v string) *SendAlexaOfferToMasterInput {
785 s.ChannelARN = &v
786 return s
787 }
788
789 // SetMessagePayload sets the MessagePayload field's value.
790 func (s *SendAlexaOfferToMasterInput) SetMessagePayload(v string) *SendAlexaOfferToMasterInput {
791 s.MessagePayload = &v
792 return s
793 }
794
795 // SetSenderClientId sets the SenderClientId field's value.
796 func (s *SendAlexaOfferToMasterInput) SetSenderClientId(v string) *SendAlexaOfferToMasterInput {
797 s.SenderClientId = &v
798 return s
799 }
800
801 type SendAlexaOfferToMasterOutput struct {
802 _ struct{} `type:"structure"`
803
804 // The base64-encoded SDP answer content.
805 Answer *string `min:"1" type:"string"`
806 }
807
808 // String returns the string representation.
809 //
810 // API parameter values that are decorated as "sensitive" in the API will not
811 // be included in the string output. The member name will be present, but the
812 // value will be replaced with "sensitive".
813 func (s SendAlexaOfferToMasterOutput) String() string {
814 return awsutil.Prettify(s)
815 }
816
817 // GoString returns the string representation.
818 //
819 // API parameter values that are decorated as "sensitive" in the API will not
820 // be included in the string output. The member name will be present, but the
821 // value will be replaced with "sensitive".
822 func (s SendAlexaOfferToMasterOutput) GoString() string {
823 return s.String()
824 }
825
826 // SetAnswer sets the Answer field's value.
827 func (s *SendAlexaOfferToMasterOutput) SetAnswer(v string) *SendAlexaOfferToMasterOutput {
828 s.Answer = &v
829 return s
830 }
831
832 // If the client session is expired. Once the client is connected, the session
833 // is valid for 45 minutes. Client should reconnect to the channel to continue
834 // sending/receiving messages.
835 type SessionExpiredException struct {
836 _ struct{} `type:"structure"`
837 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
838
839 Message_ *string `locationName:"message" type:"string"`
840 }
841
842 // String returns the string representation.
843 //
844 // API parameter values that are decorated as "sensitive" in the API will not
845 // be included in the string output. The member name will be present, but the
846 // value will be replaced with "sensitive".
847 func (s SessionExpiredException) String() string {
848 return awsutil.Prettify(s)
849 }
850
851 // GoString returns the string representation.
852 //
853 // API parameter values that are decorated as "sensitive" in the API will not
854 // be included in the string output. The member name will be present, but the
855 // value will be replaced with "sensitive".
856 func (s SessionExpiredException) GoString() string {
857 return s.String()
858 }
859
860 func newErrorSessionExpiredException(v protocol.ResponseMetadata) error {
861 return &SessionExpiredException{
862 RespMetadata: v,
863 }
864 }
865
866 // Code returns the exception type name.
867 func (s *SessionExpiredException) Code() string {
868 return "SessionExpiredException"
869 }
870
871 // Message returns the exception's message.
872 func (s *SessionExpiredException) Message() string {
873 if s.Message_ != nil {
874 return *s.Message_
875 }
876 return ""
877 }
878
879 // OrigErr always returns nil, satisfies awserr.Error interface.
880 func (s *SessionExpiredException) OrigErr() error {
881 return nil
882 }
883
884 func (s *SessionExpiredException) Error() string {
885 return fmt.Sprintf("%s: %s", s.Code(), s.Message())
886 }
887
888 // Status code returns the HTTP status code for the request's response error.
889 func (s *SessionExpiredException) StatusCode() int {
890 return s.RespMetadata.StatusCode
891 }
892
893 // RequestID returns the service's response RequestID for request.
894 func (s *SessionExpiredException) RequestID() string {
895 return s.RespMetadata.RequestID
896 }
897
898 const (
899 // ServiceTurn is a Service enum value
900 ServiceTurn = "TURN"
901 )
902
903 // Service_Values returns all elements of the Service enum
904 func Service_Values() []string {
905 return []string{
906 ServiceTurn,
907 }
908 }