src

Go monorepo.
git clone git://code.dwrz.net/src
Log | Files | Refs

errors.go (2961B)


      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 	ErrorCodeOverride *string
     16 
     17 	noSmithyDocumentSerde
     18 }
     19 
     20 func (e *InvalidRequestException) Error() string {
     21 	return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
     22 }
     23 func (e *InvalidRequestException) ErrorMessage() string {
     24 	if e.Message == nil {
     25 		return ""
     26 	}
     27 	return *e.Message
     28 }
     29 func (e *InvalidRequestException) ErrorCode() string {
     30 	if e == nil || e.ErrorCodeOverride == nil {
     31 		return "InvalidRequestException"
     32 	}
     33 	return *e.ErrorCodeOverride
     34 }
     35 func (e *InvalidRequestException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
     36 
     37 // The specified resource doesn't exist.
     38 type ResourceNotFoundException struct {
     39 	Message *string
     40 
     41 	ErrorCodeOverride *string
     42 
     43 	noSmithyDocumentSerde
     44 }
     45 
     46 func (e *ResourceNotFoundException) Error() string {
     47 	return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
     48 }
     49 func (e *ResourceNotFoundException) ErrorMessage() string {
     50 	if e.Message == nil {
     51 		return ""
     52 	}
     53 	return *e.Message
     54 }
     55 func (e *ResourceNotFoundException) ErrorCode() string {
     56 	if e == nil || e.ErrorCodeOverride == nil {
     57 		return "ResourceNotFoundException"
     58 	}
     59 	return *e.ErrorCodeOverride
     60 }
     61 func (e *ResourceNotFoundException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
     62 
     63 // Indicates that the request is being made too frequently and is more than what
     64 // the server can handle.
     65 type TooManyRequestsException struct {
     66 	Message *string
     67 
     68 	ErrorCodeOverride *string
     69 
     70 	noSmithyDocumentSerde
     71 }
     72 
     73 func (e *TooManyRequestsException) Error() string {
     74 	return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
     75 }
     76 func (e *TooManyRequestsException) ErrorMessage() string {
     77 	if e.Message == nil {
     78 		return ""
     79 	}
     80 	return *e.Message
     81 }
     82 func (e *TooManyRequestsException) ErrorCode() string {
     83 	if e == nil || e.ErrorCodeOverride == nil {
     84 		return "TooManyRequestsException"
     85 	}
     86 	return *e.ErrorCodeOverride
     87 }
     88 func (e *TooManyRequestsException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }
     89 
     90 // Indicates that the request is not authorized. This can happen due to an invalid
     91 // access token in the request.
     92 type UnauthorizedException struct {
     93 	Message *string
     94 
     95 	ErrorCodeOverride *string
     96 
     97 	noSmithyDocumentSerde
     98 }
     99 
    100 func (e *UnauthorizedException) Error() string {
    101 	return fmt.Sprintf("%s: %s", e.ErrorCode(), e.ErrorMessage())
    102 }
    103 func (e *UnauthorizedException) ErrorMessage() string {
    104 	if e.Message == nil {
    105 		return ""
    106 	}
    107 	return *e.Message
    108 }
    109 func (e *UnauthorizedException) ErrorCode() string {
    110 	if e == nil || e.ErrorCodeOverride == nil {
    111 		return "UnauthorizedException"
    112 	}
    113 	return *e.ErrorCodeOverride
    114 }
    115 func (e *UnauthorizedException) ErrorFault() smithy.ErrorFault { return smithy.FaultClient }