code.dwrz.net

Go monorepo.
Log | Files | Refs

errors.go (2581B)


      1 // Code generated by smithy-go-codegen DO NOT EDIT.
      2 
      3 package types
      4 
      5 import (
      6 	"fmt"
      7 	smithy "github.com/aws/smithy-go"
      8 )
      9 
     10 // Indicates that a problem occurred with the input to the request. For example, a
     11 // required parameter might be missing or out of range.
     12 type InvalidRequestException struct {
     13 	Message *string
     14 
     15 	noSmithyDocumentSerde
     16 }
     17 
     18 func (e *InvalidRequestException) Error() string {
     19 	return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
     20 }
     21 func (e *InvalidRequestException) ErrorMessage() string {
     22 	if e.Message == nil {
     23 		return ""
     24 	}
     25 	return *e.Message
     26 }
     27 func (e *InvalidRequestException) ErrorCode() string             { return "InvalidRequestException" }
     28 func (e *InvalidRequestException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
     29 
     30 // The specified resource doesn't exist.
     31 type ResourceNotFoundException struct {
     32 	Message *string
     33 
     34 	noSmithyDocumentSerde
     35 }
     36 
     37 func (e *ResourceNotFoundException) Error() string {
     38 	return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
     39 }
     40 func (e *ResourceNotFoundException) ErrorMessage() string {
     41 	if e.Message == nil {
     42 		return ""
     43 	}
     44 	return *e.Message
     45 }
     46 func (e *ResourceNotFoundException) ErrorCode() string             { return "ResourceNotFoundException" }
     47 func (e *ResourceNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
     48 
     49 // Indicates that the request is being made too frequently and is more than what
     50 // the server can handle.
     51 type TooManyRequestsException struct {
     52 	Message *string
     53 
     54 	noSmithyDocumentSerde
     55 }
     56 
     57 func (e *TooManyRequestsException) Error() string {
     58 	return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
     59 }
     60 func (e *TooManyRequestsException) ErrorMessage() string {
     61 	if e.Message == nil {
     62 		return ""
     63 	}
     64 	return *e.Message
     65 }
     66 func (e *TooManyRequestsException) ErrorCode() string             { return "TooManyRequestsException" }
     67 func (e *TooManyRequestsException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
     68 
     69 // Indicates that the request is not authorized. This can happen due to an invalid
     70 // access token in the request.
     71 type UnauthorizedException struct {
     72 	Message *string
     73 
     74 	noSmithyDocumentSerde
     75 }
     76 
     77 func (e *UnauthorizedException) Error() string {
     78 	return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
     79 }
     80 func (e *UnauthorizedException) ErrorMessage() string {
     81 	if e.Message == nil {
     82 		return ""
     83 	}
     84 	return *e.Message
     85 }
     86 func (e *UnauthorizedException) ErrorCode() string             { return "UnauthorizedException" }
     87 func (e *UnauthorizedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }