github.com/aavshr/aws-sdk-go@v1.41.3/service/sso/api.go (about)

     1  // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
     2  
     3  package sso
     4  
     5  import (
     6  	"fmt"
     7  
     8  	"github.com/aavshr/aws-sdk-go/aws"
     9  	"github.com/aavshr/aws-sdk-go/aws/awsutil"
    10  	"github.com/aavshr/aws-sdk-go/aws/credentials"
    11  	"github.com/aavshr/aws-sdk-go/aws/request"
    12  	"github.com/aavshr/aws-sdk-go/private/protocol"
    13  	"github.com/aavshr/aws-sdk-go/private/protocol/restjson"
    14  )
    15  
    16  const opGetRoleCredentials = "GetRoleCredentials"
    17  
    18  // GetRoleCredentialsRequest generates a "aws/request.Request" representing the
    19  // client's request for the GetRoleCredentials operation. The "output" return
    20  // value will be populated with the request's response once the request completes
    21  // successfully.
    22  //
    23  // Use "Send" method on the returned Request to send the API call to the service.
    24  // the "output" return value is not valid until after Send returns without error.
    25  //
    26  // See GetRoleCredentials for more information on using the GetRoleCredentials
    27  // API call, and error handling.
    28  //
    29  // This method is useful when you want to inject custom logic or configuration
    30  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
    31  //
    32  //
    33  //    // Example sending a request using the GetRoleCredentialsRequest method.
    34  //    req, resp := client.GetRoleCredentialsRequest(params)
    35  //
    36  //    err := req.Send()
    37  //    if err == nil { // resp is now filled
    38  //        fmt.Println(resp)
    39  //    }
    40  //
    41  // See also, https://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/GetRoleCredentials
    42  func (c *SSO) GetRoleCredentialsRequest(input *GetRoleCredentialsInput) (req *request.Request, output *GetRoleCredentialsOutput) {
    43  	op := &request.Operation{
    44  		Name:       opGetRoleCredentials,
    45  		HTTPMethod: "GET",
    46  		HTTPPath:   "/federation/credentials",
    47  	}
    48  
    49  	if input == nil {
    50  		input = &GetRoleCredentialsInput{}
    51  	}
    52  
    53  	output = &GetRoleCredentialsOutput{}
    54  	req = c.newRequest(op, input, output)
    55  	req.Config.Credentials = credentials.AnonymousCredentials
    56  	return
    57  }
    58  
    59  // GetRoleCredentials API operation for AWS Single Sign-On.
    60  //
    61  // Returns the STS short-term credentials for a given role name that is assigned
    62  // to the user.
    63  //
    64  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
    65  // with awserr.Error's Code and Message methods to get detailed information about
    66  // the error.
    67  //
    68  // See the AWS API reference guide for AWS Single Sign-On's
    69  // API operation GetRoleCredentials for usage and error information.
    70  //
    71  // Returned Error Types:
    72  //   * InvalidRequestException
    73  //   Indicates that a problem occurred with the input to the request. For example,
    74  //   a required parameter might be missing or out of range.
    75  //
    76  //   * UnauthorizedException
    77  //   Indicates that the request is not authorized. This can happen due to an invalid
    78  //   access token in the request.
    79  //
    80  //   * TooManyRequestsException
    81  //   Indicates that the request is being made too frequently and is more than
    82  //   what the server can handle.
    83  //
    84  //   * ResourceNotFoundException
    85  //   The specified resource doesn't exist.
    86  //
    87  // See also, https://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/GetRoleCredentials
    88  func (c *SSO) GetRoleCredentials(input *GetRoleCredentialsInput) (*GetRoleCredentialsOutput, error) {
    89  	req, out := c.GetRoleCredentialsRequest(input)
    90  	return out, req.Send()
    91  }
    92  
    93  // GetRoleCredentialsWithContext is the same as GetRoleCredentials with the addition of
    94  // the ability to pass a context and additional request options.
    95  //
    96  // See GetRoleCredentials for details on how to use this API operation.
    97  //
    98  // The context must be non-nil and will be used for request cancellation. If
    99  // the context is nil a panic will occur. In the future the SDK may create
   100  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
   101  // for more information on using Contexts.
   102  func (c *SSO) GetRoleCredentialsWithContext(ctx aws.Context, input *GetRoleCredentialsInput, opts ...request.Option) (*GetRoleCredentialsOutput, error) {
   103  	req, out := c.GetRoleCredentialsRequest(input)
   104  	req.SetContext(ctx)
   105  	req.ApplyOptions(opts...)
   106  	return out, req.Send()
   107  }
   108  
   109  const opListAccountRoles = "ListAccountRoles"
   110  
   111  // ListAccountRolesRequest generates a "aws/request.Request" representing the
   112  // client's request for the ListAccountRoles operation. The "output" return
   113  // value will be populated with the request's response once the request completes
   114  // successfully.
   115  //
   116  // Use "Send" method on the returned Request to send the API call to the service.
   117  // the "output" return value is not valid until after Send returns without error.
   118  //
   119  // See ListAccountRoles for more information on using the ListAccountRoles
   120  // API call, and error handling.
   121  //
   122  // This method is useful when you want to inject custom logic or configuration
   123  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
   124  //
   125  //
   126  //    // Example sending a request using the ListAccountRolesRequest method.
   127  //    req, resp := client.ListAccountRolesRequest(params)
   128  //
   129  //    err := req.Send()
   130  //    if err == nil { // resp is now filled
   131  //        fmt.Println(resp)
   132  //    }
   133  //
   134  // See also, https://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/ListAccountRoles
   135  func (c *SSO) ListAccountRolesRequest(input *ListAccountRolesInput) (req *request.Request, output *ListAccountRolesOutput) {
   136  	op := &request.Operation{
   137  		Name:       opListAccountRoles,
   138  		HTTPMethod: "GET",
   139  		HTTPPath:   "/assignment/roles",
   140  		Paginator: &request.Paginator{
   141  			InputTokens:     []string{"nextToken"},
   142  			OutputTokens:    []string{"nextToken"},
   143  			LimitToken:      "maxResults",
   144  			TruncationToken: "",
   145  		},
   146  	}
   147  
   148  	if input == nil {
   149  		input = &ListAccountRolesInput{}
   150  	}
   151  
   152  	output = &ListAccountRolesOutput{}
   153  	req = c.newRequest(op, input, output)
   154  	req.Config.Credentials = credentials.AnonymousCredentials
   155  	return
   156  }
   157  
   158  // ListAccountRoles API operation for AWS Single Sign-On.
   159  //
   160  // Lists all roles that are assigned to the user for a given AWS account.
   161  //
   162  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
   163  // with awserr.Error's Code and Message methods to get detailed information about
   164  // the error.
   165  //
   166  // See the AWS API reference guide for AWS Single Sign-On's
   167  // API operation ListAccountRoles for usage and error information.
   168  //
   169  // Returned Error Types:
   170  //   * InvalidRequestException
   171  //   Indicates that a problem occurred with the input to the request. For example,
   172  //   a required parameter might be missing or out of range.
   173  //
   174  //   * UnauthorizedException
   175  //   Indicates that the request is not authorized. This can happen due to an invalid
   176  //   access token in the request.
   177  //
   178  //   * TooManyRequestsException
   179  //   Indicates that the request is being made too frequently and is more than
   180  //   what the server can handle.
   181  //
   182  //   * ResourceNotFoundException
   183  //   The specified resource doesn't exist.
   184  //
   185  // See also, https://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/ListAccountRoles
   186  func (c *SSO) ListAccountRoles(input *ListAccountRolesInput) (*ListAccountRolesOutput, error) {
   187  	req, out := c.ListAccountRolesRequest(input)
   188  	return out, req.Send()
   189  }
   190  
   191  // ListAccountRolesWithContext is the same as ListAccountRoles with the addition of
   192  // the ability to pass a context and additional request options.
   193  //
   194  // See ListAccountRoles for details on how to use this API operation.
   195  //
   196  // The context must be non-nil and will be used for request cancellation. If
   197  // the context is nil a panic will occur. In the future the SDK may create
   198  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
   199  // for more information on using Contexts.
   200  func (c *SSO) ListAccountRolesWithContext(ctx aws.Context, input *ListAccountRolesInput, opts ...request.Option) (*ListAccountRolesOutput, error) {
   201  	req, out := c.ListAccountRolesRequest(input)
   202  	req.SetContext(ctx)
   203  	req.ApplyOptions(opts...)
   204  	return out, req.Send()
   205  }
   206  
   207  // ListAccountRolesPages iterates over the pages of a ListAccountRoles operation,
   208  // calling the "fn" function with the response data for each page. To stop
   209  // iterating, return false from the fn function.
   210  //
   211  // See ListAccountRoles method for more information on how to use this operation.
   212  //
   213  // Note: This operation can generate multiple requests to a service.
   214  //
   215  //    // Example iterating over at most 3 pages of a ListAccountRoles operation.
   216  //    pageNum := 0
   217  //    err := client.ListAccountRolesPages(params,
   218  //        func(page *sso.ListAccountRolesOutput, lastPage bool) bool {
   219  //            pageNum++
   220  //            fmt.Println(page)
   221  //            return pageNum <= 3
   222  //        })
   223  //
   224  func (c *SSO) ListAccountRolesPages(input *ListAccountRolesInput, fn func(*ListAccountRolesOutput, bool) bool) error {
   225  	return c.ListAccountRolesPagesWithContext(aws.BackgroundContext(), input, fn)
   226  }
   227  
   228  // ListAccountRolesPagesWithContext same as ListAccountRolesPages except
   229  // it takes a Context and allows setting request options on the pages.
   230  //
   231  // The context must be non-nil and will be used for request cancellation. If
   232  // the context is nil a panic will occur. In the future the SDK may create
   233  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
   234  // for more information on using Contexts.
   235  func (c *SSO) ListAccountRolesPagesWithContext(ctx aws.Context, input *ListAccountRolesInput, fn func(*ListAccountRolesOutput, bool) bool, opts ...request.Option) error {
   236  	p := request.Pagination{
   237  		NewRequest: func() (*request.Request, error) {
   238  			var inCpy *ListAccountRolesInput
   239  			if input != nil {
   240  				tmp := *input
   241  				inCpy = &tmp
   242  			}
   243  			req, _ := c.ListAccountRolesRequest(inCpy)
   244  			req.SetContext(ctx)
   245  			req.ApplyOptions(opts...)
   246  			return req, nil
   247  		},
   248  	}
   249  
   250  	for p.Next() {
   251  		if !fn(p.Page().(*ListAccountRolesOutput), !p.HasNextPage()) {
   252  			break
   253  		}
   254  	}
   255  
   256  	return p.Err()
   257  }
   258  
   259  const opListAccounts = "ListAccounts"
   260  
   261  // ListAccountsRequest generates a "aws/request.Request" representing the
   262  // client's request for the ListAccounts operation. The "output" return
   263  // value will be populated with the request's response once the request completes
   264  // successfully.
   265  //
   266  // Use "Send" method on the returned Request to send the API call to the service.
   267  // the "output" return value is not valid until after Send returns without error.
   268  //
   269  // See ListAccounts for more information on using the ListAccounts
   270  // API call, and error handling.
   271  //
   272  // This method is useful when you want to inject custom logic or configuration
   273  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
   274  //
   275  //
   276  //    // Example sending a request using the ListAccountsRequest method.
   277  //    req, resp := client.ListAccountsRequest(params)
   278  //
   279  //    err := req.Send()
   280  //    if err == nil { // resp is now filled
   281  //        fmt.Println(resp)
   282  //    }
   283  //
   284  // See also, https://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/ListAccounts
   285  func (c *SSO) ListAccountsRequest(input *ListAccountsInput) (req *request.Request, output *ListAccountsOutput) {
   286  	op := &request.Operation{
   287  		Name:       opListAccounts,
   288  		HTTPMethod: "GET",
   289  		HTTPPath:   "/assignment/accounts",
   290  		Paginator: &request.Paginator{
   291  			InputTokens:     []string{"nextToken"},
   292  			OutputTokens:    []string{"nextToken"},
   293  			LimitToken:      "maxResults",
   294  			TruncationToken: "",
   295  		},
   296  	}
   297  
   298  	if input == nil {
   299  		input = &ListAccountsInput{}
   300  	}
   301  
   302  	output = &ListAccountsOutput{}
   303  	req = c.newRequest(op, input, output)
   304  	req.Config.Credentials = credentials.AnonymousCredentials
   305  	return
   306  }
   307  
   308  // ListAccounts API operation for AWS Single Sign-On.
   309  //
   310  // Lists all AWS accounts assigned to the user. These AWS accounts are assigned
   311  // by the administrator of the account. For more information, see Assign User
   312  // Access (https://docs.aws.amazon.com/singlesignon/latest/userguide/useraccess.html#assignusers)
   313  // in the AWS SSO User Guide. This operation returns a paginated response.
   314  //
   315  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
   316  // with awserr.Error's Code and Message methods to get detailed information about
   317  // the error.
   318  //
   319  // See the AWS API reference guide for AWS Single Sign-On's
   320  // API operation ListAccounts for usage and error information.
   321  //
   322  // Returned Error Types:
   323  //   * InvalidRequestException
   324  //   Indicates that a problem occurred with the input to the request. For example,
   325  //   a required parameter might be missing or out of range.
   326  //
   327  //   * UnauthorizedException
   328  //   Indicates that the request is not authorized. This can happen due to an invalid
   329  //   access token in the request.
   330  //
   331  //   * TooManyRequestsException
   332  //   Indicates that the request is being made too frequently and is more than
   333  //   what the server can handle.
   334  //
   335  //   * ResourceNotFoundException
   336  //   The specified resource doesn't exist.
   337  //
   338  // See also, https://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/ListAccounts
   339  func (c *SSO) ListAccounts(input *ListAccountsInput) (*ListAccountsOutput, error) {
   340  	req, out := c.ListAccountsRequest(input)
   341  	return out, req.Send()
   342  }
   343  
   344  // ListAccountsWithContext is the same as ListAccounts with the addition of
   345  // the ability to pass a context and additional request options.
   346  //
   347  // See ListAccounts for details on how to use this API operation.
   348  //
   349  // The context must be non-nil and will be used for request cancellation. If
   350  // the context is nil a panic will occur. In the future the SDK may create
   351  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
   352  // for more information on using Contexts.
   353  func (c *SSO) ListAccountsWithContext(ctx aws.Context, input *ListAccountsInput, opts ...request.Option) (*ListAccountsOutput, error) {
   354  	req, out := c.ListAccountsRequest(input)
   355  	req.SetContext(ctx)
   356  	req.ApplyOptions(opts...)
   357  	return out, req.Send()
   358  }
   359  
   360  // ListAccountsPages iterates over the pages of a ListAccounts operation,
   361  // calling the "fn" function with the response data for each page. To stop
   362  // iterating, return false from the fn function.
   363  //
   364  // See ListAccounts method for more information on how to use this operation.
   365  //
   366  // Note: This operation can generate multiple requests to a service.
   367  //
   368  //    // Example iterating over at most 3 pages of a ListAccounts operation.
   369  //    pageNum := 0
   370  //    err := client.ListAccountsPages(params,
   371  //        func(page *sso.ListAccountsOutput, lastPage bool) bool {
   372  //            pageNum++
   373  //            fmt.Println(page)
   374  //            return pageNum <= 3
   375  //        })
   376  //
   377  func (c *SSO) ListAccountsPages(input *ListAccountsInput, fn func(*ListAccountsOutput, bool) bool) error {
   378  	return c.ListAccountsPagesWithContext(aws.BackgroundContext(), input, fn)
   379  }
   380  
   381  // ListAccountsPagesWithContext same as ListAccountsPages except
   382  // it takes a Context and allows setting request options on the pages.
   383  //
   384  // The context must be non-nil and will be used for request cancellation. If
   385  // the context is nil a panic will occur. In the future the SDK may create
   386  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
   387  // for more information on using Contexts.
   388  func (c *SSO) ListAccountsPagesWithContext(ctx aws.Context, input *ListAccountsInput, fn func(*ListAccountsOutput, bool) bool, opts ...request.Option) error {
   389  	p := request.Pagination{
   390  		NewRequest: func() (*request.Request, error) {
   391  			var inCpy *ListAccountsInput
   392  			if input != nil {
   393  				tmp := *input
   394  				inCpy = &tmp
   395  			}
   396  			req, _ := c.ListAccountsRequest(inCpy)
   397  			req.SetContext(ctx)
   398  			req.ApplyOptions(opts...)
   399  			return req, nil
   400  		},
   401  	}
   402  
   403  	for p.Next() {
   404  		if !fn(p.Page().(*ListAccountsOutput), !p.HasNextPage()) {
   405  			break
   406  		}
   407  	}
   408  
   409  	return p.Err()
   410  }
   411  
   412  const opLogout = "Logout"
   413  
   414  // LogoutRequest generates a "aws/request.Request" representing the
   415  // client's request for the Logout operation. The "output" return
   416  // value will be populated with the request's response once the request completes
   417  // successfully.
   418  //
   419  // Use "Send" method on the returned Request to send the API call to the service.
   420  // the "output" return value is not valid until after Send returns without error.
   421  //
   422  // See Logout for more information on using the Logout
   423  // API call, and error handling.
   424  //
   425  // This method is useful when you want to inject custom logic or configuration
   426  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
   427  //
   428  //
   429  //    // Example sending a request using the LogoutRequest method.
   430  //    req, resp := client.LogoutRequest(params)
   431  //
   432  //    err := req.Send()
   433  //    if err == nil { // resp is now filled
   434  //        fmt.Println(resp)
   435  //    }
   436  //
   437  // See also, https://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/Logout
   438  func (c *SSO) LogoutRequest(input *LogoutInput) (req *request.Request, output *LogoutOutput) {
   439  	op := &request.Operation{
   440  		Name:       opLogout,
   441  		HTTPMethod: "POST",
   442  		HTTPPath:   "/logout",
   443  	}
   444  
   445  	if input == nil {
   446  		input = &LogoutInput{}
   447  	}
   448  
   449  	output = &LogoutOutput{}
   450  	req = c.newRequest(op, input, output)
   451  	req.Config.Credentials = credentials.AnonymousCredentials
   452  	req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
   453  	return
   454  }
   455  
   456  // Logout API operation for AWS Single Sign-On.
   457  //
   458  // Removes the client- and server-side session that is associated with the user.
   459  //
   460  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
   461  // with awserr.Error's Code and Message methods to get detailed information about
   462  // the error.
   463  //
   464  // See the AWS API reference guide for AWS Single Sign-On's
   465  // API operation Logout for usage and error information.
   466  //
   467  // Returned Error Types:
   468  //   * InvalidRequestException
   469  //   Indicates that a problem occurred with the input to the request. For example,
   470  //   a required parameter might be missing or out of range.
   471  //
   472  //   * UnauthorizedException
   473  //   Indicates that the request is not authorized. This can happen due to an invalid
   474  //   access token in the request.
   475  //
   476  //   * TooManyRequestsException
   477  //   Indicates that the request is being made too frequently and is more than
   478  //   what the server can handle.
   479  //
   480  // See also, https://docs.aws.amazon.com/goto/WebAPI/sso-2019-06-10/Logout
   481  func (c *SSO) Logout(input *LogoutInput) (*LogoutOutput, error) {
   482  	req, out := c.LogoutRequest(input)
   483  	return out, req.Send()
   484  }
   485  
   486  // LogoutWithContext is the same as Logout with the addition of
   487  // the ability to pass a context and additional request options.
   488  //
   489  // See Logout for details on how to use this API operation.
   490  //
   491  // The context must be non-nil and will be used for request cancellation. If
   492  // the context is nil a panic will occur. In the future the SDK may create
   493  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
   494  // for more information on using Contexts.
   495  func (c *SSO) LogoutWithContext(ctx aws.Context, input *LogoutInput, opts ...request.Option) (*LogoutOutput, error) {
   496  	req, out := c.LogoutRequest(input)
   497  	req.SetContext(ctx)
   498  	req.ApplyOptions(opts...)
   499  	return out, req.Send()
   500  }
   501  
   502  // Provides information about your AWS account.
   503  type AccountInfo struct {
   504  	_ struct{} `type:"structure"`
   505  
   506  	// The identifier of the AWS account that is assigned to the user.
   507  	AccountId *string `locationName:"accountId" type:"string"`
   508  
   509  	// The display name of the AWS account that is assigned to the user.
   510  	AccountName *string `locationName:"accountName" type:"string"`
   511  
   512  	// The email address of the AWS account that is assigned to the user.
   513  	EmailAddress *string `locationName:"emailAddress" min:"1" type:"string"`
   514  }
   515  
   516  // String returns the string representation.
   517  //
   518  // API parameter values that are decorated as "sensitive" in the API will not
   519  // be included in the string output. The member name will be present, but the
   520  // value will be replaced with "sensitive".
   521  func (s AccountInfo) String() string {
   522  	return awsutil.Prettify(s)
   523  }
   524  
   525  // GoString returns the string representation.
   526  //
   527  // API parameter values that are decorated as "sensitive" in the API will not
   528  // be included in the string output. The member name will be present, but the
   529  // value will be replaced with "sensitive".
   530  func (s AccountInfo) GoString() string {
   531  	return s.String()
   532  }
   533  
   534  // SetAccountId sets the AccountId field's value.
   535  func (s *AccountInfo) SetAccountId(v string) *AccountInfo {
   536  	s.AccountId = &v
   537  	return s
   538  }
   539  
   540  // SetAccountName sets the AccountName field's value.
   541  func (s *AccountInfo) SetAccountName(v string) *AccountInfo {
   542  	s.AccountName = &v
   543  	return s
   544  }
   545  
   546  // SetEmailAddress sets the EmailAddress field's value.
   547  func (s *AccountInfo) SetEmailAddress(v string) *AccountInfo {
   548  	s.EmailAddress = &v
   549  	return s
   550  }
   551  
   552  type GetRoleCredentialsInput struct {
   553  	_ struct{} `type:"structure" nopayload:"true"`
   554  
   555  	// The token issued by the CreateToken API call. For more information, see CreateToken
   556  	// (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html)
   557  	// in the AWS SSO OIDC API Reference Guide.
   558  	//
   559  	// AccessToken is a sensitive parameter and its value will be
   560  	// replaced with "sensitive" in string returned by GetRoleCredentialsInput's
   561  	// String and GoString methods.
   562  	//
   563  	// AccessToken is a required field
   564  	AccessToken *string `location:"header" locationName:"x-amz-sso_bearer_token" type:"string" required:"true" sensitive:"true"`
   565  
   566  	// The identifier for the AWS account that is assigned to the user.
   567  	//
   568  	// AccountId is a required field
   569  	AccountId *string `location:"querystring" locationName:"account_id" type:"string" required:"true"`
   570  
   571  	// The friendly name of the role that is assigned to the user.
   572  	//
   573  	// RoleName is a required field
   574  	RoleName *string `location:"querystring" locationName:"role_name" type:"string" required:"true"`
   575  }
   576  
   577  // String returns the string representation.
   578  //
   579  // API parameter values that are decorated as "sensitive" in the API will not
   580  // be included in the string output. The member name will be present, but the
   581  // value will be replaced with "sensitive".
   582  func (s GetRoleCredentialsInput) String() string {
   583  	return awsutil.Prettify(s)
   584  }
   585  
   586  // GoString returns the string representation.
   587  //
   588  // API parameter values that are decorated as "sensitive" in the API will not
   589  // be included in the string output. The member name will be present, but the
   590  // value will be replaced with "sensitive".
   591  func (s GetRoleCredentialsInput) GoString() string {
   592  	return s.String()
   593  }
   594  
   595  // Validate inspects the fields of the type to determine if they are valid.
   596  func (s *GetRoleCredentialsInput) Validate() error {
   597  	invalidParams := request.ErrInvalidParams{Context: "GetRoleCredentialsInput"}
   598  	if s.AccessToken == nil {
   599  		invalidParams.Add(request.NewErrParamRequired("AccessToken"))
   600  	}
   601  	if s.AccountId == nil {
   602  		invalidParams.Add(request.NewErrParamRequired("AccountId"))
   603  	}
   604  	if s.RoleName == nil {
   605  		invalidParams.Add(request.NewErrParamRequired("RoleName"))
   606  	}
   607  
   608  	if invalidParams.Len() > 0 {
   609  		return invalidParams
   610  	}
   611  	return nil
   612  }
   613  
   614  // SetAccessToken sets the AccessToken field's value.
   615  func (s *GetRoleCredentialsInput) SetAccessToken(v string) *GetRoleCredentialsInput {
   616  	s.AccessToken = &v
   617  	return s
   618  }
   619  
   620  // SetAccountId sets the AccountId field's value.
   621  func (s *GetRoleCredentialsInput) SetAccountId(v string) *GetRoleCredentialsInput {
   622  	s.AccountId = &v
   623  	return s
   624  }
   625  
   626  // SetRoleName sets the RoleName field's value.
   627  func (s *GetRoleCredentialsInput) SetRoleName(v string) *GetRoleCredentialsInput {
   628  	s.RoleName = &v
   629  	return s
   630  }
   631  
   632  type GetRoleCredentialsOutput struct {
   633  	_ struct{} `type:"structure"`
   634  
   635  	// The credentials for the role that is assigned to the user.
   636  	RoleCredentials *RoleCredentials `locationName:"roleCredentials" type:"structure"`
   637  }
   638  
   639  // String returns the string representation.
   640  //
   641  // API parameter values that are decorated as "sensitive" in the API will not
   642  // be included in the string output. The member name will be present, but the
   643  // value will be replaced with "sensitive".
   644  func (s GetRoleCredentialsOutput) String() string {
   645  	return awsutil.Prettify(s)
   646  }
   647  
   648  // GoString returns the string representation.
   649  //
   650  // API parameter values that are decorated as "sensitive" in the API will not
   651  // be included in the string output. The member name will be present, but the
   652  // value will be replaced with "sensitive".
   653  func (s GetRoleCredentialsOutput) GoString() string {
   654  	return s.String()
   655  }
   656  
   657  // SetRoleCredentials sets the RoleCredentials field's value.
   658  func (s *GetRoleCredentialsOutput) SetRoleCredentials(v *RoleCredentials) *GetRoleCredentialsOutput {
   659  	s.RoleCredentials = v
   660  	return s
   661  }
   662  
   663  // Indicates that a problem occurred with the input to the request. For example,
   664  // a required parameter might be missing or out of range.
   665  type InvalidRequestException struct {
   666  	_            struct{}                  `type:"structure"`
   667  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
   668  
   669  	Message_ *string `locationName:"message" type:"string"`
   670  }
   671  
   672  // String returns the string representation.
   673  //
   674  // API parameter values that are decorated as "sensitive" in the API will not
   675  // be included in the string output. The member name will be present, but the
   676  // value will be replaced with "sensitive".
   677  func (s InvalidRequestException) String() string {
   678  	return awsutil.Prettify(s)
   679  }
   680  
   681  // GoString returns the string representation.
   682  //
   683  // API parameter values that are decorated as "sensitive" in the API will not
   684  // be included in the string output. The member name will be present, but the
   685  // value will be replaced with "sensitive".
   686  func (s InvalidRequestException) GoString() string {
   687  	return s.String()
   688  }
   689  
   690  func newErrorInvalidRequestException(v protocol.ResponseMetadata) error {
   691  	return &InvalidRequestException{
   692  		RespMetadata: v,
   693  	}
   694  }
   695  
   696  // Code returns the exception type name.
   697  func (s *InvalidRequestException) Code() string {
   698  	return "InvalidRequestException"
   699  }
   700  
   701  // Message returns the exception's message.
   702  func (s *InvalidRequestException) Message() string {
   703  	if s.Message_ != nil {
   704  		return *s.Message_
   705  	}
   706  	return ""
   707  }
   708  
   709  // OrigErr always returns nil, satisfies awserr.Error interface.
   710  func (s *InvalidRequestException) OrigErr() error {
   711  	return nil
   712  }
   713  
   714  func (s *InvalidRequestException) Error() string {
   715  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
   716  }
   717  
   718  // Status code returns the HTTP status code for the request's response error.
   719  func (s *InvalidRequestException) StatusCode() int {
   720  	return s.RespMetadata.StatusCode
   721  }
   722  
   723  // RequestID returns the service's response RequestID for request.
   724  func (s *InvalidRequestException) RequestID() string {
   725  	return s.RespMetadata.RequestID
   726  }
   727  
   728  type ListAccountRolesInput struct {
   729  	_ struct{} `type:"structure" nopayload:"true"`
   730  
   731  	// The token issued by the CreateToken API call. For more information, see CreateToken
   732  	// (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html)
   733  	// in the AWS SSO OIDC API Reference Guide.
   734  	//
   735  	// AccessToken is a sensitive parameter and its value will be
   736  	// replaced with "sensitive" in string returned by ListAccountRolesInput's
   737  	// String and GoString methods.
   738  	//
   739  	// AccessToken is a required field
   740  	AccessToken *string `location:"header" locationName:"x-amz-sso_bearer_token" type:"string" required:"true" sensitive:"true"`
   741  
   742  	// The identifier for the AWS account that is assigned to the user.
   743  	//
   744  	// AccountId is a required field
   745  	AccountId *string `location:"querystring" locationName:"account_id" type:"string" required:"true"`
   746  
   747  	// The number of items that clients can request per page.
   748  	MaxResults *int64 `location:"querystring" locationName:"max_result" min:"1" type:"integer"`
   749  
   750  	// The page token from the previous response output when you request subsequent
   751  	// pages.
   752  	NextToken *string `location:"querystring" locationName:"next_token" type:"string"`
   753  }
   754  
   755  // String returns the string representation.
   756  //
   757  // API parameter values that are decorated as "sensitive" in the API will not
   758  // be included in the string output. The member name will be present, but the
   759  // value will be replaced with "sensitive".
   760  func (s ListAccountRolesInput) String() string {
   761  	return awsutil.Prettify(s)
   762  }
   763  
   764  // GoString returns the string representation.
   765  //
   766  // API parameter values that are decorated as "sensitive" in the API will not
   767  // be included in the string output. The member name will be present, but the
   768  // value will be replaced with "sensitive".
   769  func (s ListAccountRolesInput) GoString() string {
   770  	return s.String()
   771  }
   772  
   773  // Validate inspects the fields of the type to determine if they are valid.
   774  func (s *ListAccountRolesInput) Validate() error {
   775  	invalidParams := request.ErrInvalidParams{Context: "ListAccountRolesInput"}
   776  	if s.AccessToken == nil {
   777  		invalidParams.Add(request.NewErrParamRequired("AccessToken"))
   778  	}
   779  	if s.AccountId == nil {
   780  		invalidParams.Add(request.NewErrParamRequired("AccountId"))
   781  	}
   782  	if s.MaxResults != nil && *s.MaxResults < 1 {
   783  		invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
   784  	}
   785  
   786  	if invalidParams.Len() > 0 {
   787  		return invalidParams
   788  	}
   789  	return nil
   790  }
   791  
   792  // SetAccessToken sets the AccessToken field's value.
   793  func (s *ListAccountRolesInput) SetAccessToken(v string) *ListAccountRolesInput {
   794  	s.AccessToken = &v
   795  	return s
   796  }
   797  
   798  // SetAccountId sets the AccountId field's value.
   799  func (s *ListAccountRolesInput) SetAccountId(v string) *ListAccountRolesInput {
   800  	s.AccountId = &v
   801  	return s
   802  }
   803  
   804  // SetMaxResults sets the MaxResults field's value.
   805  func (s *ListAccountRolesInput) SetMaxResults(v int64) *ListAccountRolesInput {
   806  	s.MaxResults = &v
   807  	return s
   808  }
   809  
   810  // SetNextToken sets the NextToken field's value.
   811  func (s *ListAccountRolesInput) SetNextToken(v string) *ListAccountRolesInput {
   812  	s.NextToken = &v
   813  	return s
   814  }
   815  
   816  type ListAccountRolesOutput struct {
   817  	_ struct{} `type:"structure"`
   818  
   819  	// The page token client that is used to retrieve the list of accounts.
   820  	NextToken *string `locationName:"nextToken" type:"string"`
   821  
   822  	// A paginated response with the list of roles and the next token if more results
   823  	// are available.
   824  	RoleList []*RoleInfo `locationName:"roleList" type:"list"`
   825  }
   826  
   827  // String returns the string representation.
   828  //
   829  // API parameter values that are decorated as "sensitive" in the API will not
   830  // be included in the string output. The member name will be present, but the
   831  // value will be replaced with "sensitive".
   832  func (s ListAccountRolesOutput) String() string {
   833  	return awsutil.Prettify(s)
   834  }
   835  
   836  // GoString returns the string representation.
   837  //
   838  // API parameter values that are decorated as "sensitive" in the API will not
   839  // be included in the string output. The member name will be present, but the
   840  // value will be replaced with "sensitive".
   841  func (s ListAccountRolesOutput) GoString() string {
   842  	return s.String()
   843  }
   844  
   845  // SetNextToken sets the NextToken field's value.
   846  func (s *ListAccountRolesOutput) SetNextToken(v string) *ListAccountRolesOutput {
   847  	s.NextToken = &v
   848  	return s
   849  }
   850  
   851  // SetRoleList sets the RoleList field's value.
   852  func (s *ListAccountRolesOutput) SetRoleList(v []*RoleInfo) *ListAccountRolesOutput {
   853  	s.RoleList = v
   854  	return s
   855  }
   856  
   857  type ListAccountsInput struct {
   858  	_ struct{} `type:"structure" nopayload:"true"`
   859  
   860  	// The token issued by the CreateToken API call. For more information, see CreateToken
   861  	// (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html)
   862  	// in the AWS SSO OIDC API Reference Guide.
   863  	//
   864  	// AccessToken is a sensitive parameter and its value will be
   865  	// replaced with "sensitive" in string returned by ListAccountsInput's
   866  	// String and GoString methods.
   867  	//
   868  	// AccessToken is a required field
   869  	AccessToken *string `location:"header" locationName:"x-amz-sso_bearer_token" type:"string" required:"true" sensitive:"true"`
   870  
   871  	// This is the number of items clients can request per page.
   872  	MaxResults *int64 `location:"querystring" locationName:"max_result" min:"1" type:"integer"`
   873  
   874  	// (Optional) When requesting subsequent pages, this is the page token from
   875  	// the previous response output.
   876  	NextToken *string `location:"querystring" locationName:"next_token" type:"string"`
   877  }
   878  
   879  // String returns the string representation.
   880  //
   881  // API parameter values that are decorated as "sensitive" in the API will not
   882  // be included in the string output. The member name will be present, but the
   883  // value will be replaced with "sensitive".
   884  func (s ListAccountsInput) String() string {
   885  	return awsutil.Prettify(s)
   886  }
   887  
   888  // GoString returns the string representation.
   889  //
   890  // API parameter values that are decorated as "sensitive" in the API will not
   891  // be included in the string output. The member name will be present, but the
   892  // value will be replaced with "sensitive".
   893  func (s ListAccountsInput) GoString() string {
   894  	return s.String()
   895  }
   896  
   897  // Validate inspects the fields of the type to determine if they are valid.
   898  func (s *ListAccountsInput) Validate() error {
   899  	invalidParams := request.ErrInvalidParams{Context: "ListAccountsInput"}
   900  	if s.AccessToken == nil {
   901  		invalidParams.Add(request.NewErrParamRequired("AccessToken"))
   902  	}
   903  	if s.MaxResults != nil && *s.MaxResults < 1 {
   904  		invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
   905  	}
   906  
   907  	if invalidParams.Len() > 0 {
   908  		return invalidParams
   909  	}
   910  	return nil
   911  }
   912  
   913  // SetAccessToken sets the AccessToken field's value.
   914  func (s *ListAccountsInput) SetAccessToken(v string) *ListAccountsInput {
   915  	s.AccessToken = &v
   916  	return s
   917  }
   918  
   919  // SetMaxResults sets the MaxResults field's value.
   920  func (s *ListAccountsInput) SetMaxResults(v int64) *ListAccountsInput {
   921  	s.MaxResults = &v
   922  	return s
   923  }
   924  
   925  // SetNextToken sets the NextToken field's value.
   926  func (s *ListAccountsInput) SetNextToken(v string) *ListAccountsInput {
   927  	s.NextToken = &v
   928  	return s
   929  }
   930  
   931  type ListAccountsOutput struct {
   932  	_ struct{} `type:"structure"`
   933  
   934  	// A paginated response with the list of account information and the next token
   935  	// if more results are available.
   936  	AccountList []*AccountInfo `locationName:"accountList" type:"list"`
   937  
   938  	// The page token client that is used to retrieve the list of accounts.
   939  	NextToken *string `locationName:"nextToken" type:"string"`
   940  }
   941  
   942  // String returns the string representation.
   943  //
   944  // API parameter values that are decorated as "sensitive" in the API will not
   945  // be included in the string output. The member name will be present, but the
   946  // value will be replaced with "sensitive".
   947  func (s ListAccountsOutput) String() string {
   948  	return awsutil.Prettify(s)
   949  }
   950  
   951  // GoString returns the string representation.
   952  //
   953  // API parameter values that are decorated as "sensitive" in the API will not
   954  // be included in the string output. The member name will be present, but the
   955  // value will be replaced with "sensitive".
   956  func (s ListAccountsOutput) GoString() string {
   957  	return s.String()
   958  }
   959  
   960  // SetAccountList sets the AccountList field's value.
   961  func (s *ListAccountsOutput) SetAccountList(v []*AccountInfo) *ListAccountsOutput {
   962  	s.AccountList = v
   963  	return s
   964  }
   965  
   966  // SetNextToken sets the NextToken field's value.
   967  func (s *ListAccountsOutput) SetNextToken(v string) *ListAccountsOutput {
   968  	s.NextToken = &v
   969  	return s
   970  }
   971  
   972  type LogoutInput struct {
   973  	_ struct{} `type:"structure" nopayload:"true"`
   974  
   975  	// The token issued by the CreateToken API call. For more information, see CreateToken
   976  	// (https://docs.aws.amazon.com/singlesignon/latest/OIDCAPIReference/API_CreateToken.html)
   977  	// in the AWS SSO OIDC API Reference Guide.
   978  	//
   979  	// AccessToken is a sensitive parameter and its value will be
   980  	// replaced with "sensitive" in string returned by LogoutInput's
   981  	// String and GoString methods.
   982  	//
   983  	// AccessToken is a required field
   984  	AccessToken *string `location:"header" locationName:"x-amz-sso_bearer_token" type:"string" required:"true" sensitive:"true"`
   985  }
   986  
   987  // String returns the string representation.
   988  //
   989  // API parameter values that are decorated as "sensitive" in the API will not
   990  // be included in the string output. The member name will be present, but the
   991  // value will be replaced with "sensitive".
   992  func (s LogoutInput) String() string {
   993  	return awsutil.Prettify(s)
   994  }
   995  
   996  // GoString returns the string representation.
   997  //
   998  // API parameter values that are decorated as "sensitive" in the API will not
   999  // be included in the string output. The member name will be present, but the
  1000  // value will be replaced with "sensitive".
  1001  func (s LogoutInput) GoString() string {
  1002  	return s.String()
  1003  }
  1004  
  1005  // Validate inspects the fields of the type to determine if they are valid.
  1006  func (s *LogoutInput) Validate() error {
  1007  	invalidParams := request.ErrInvalidParams{Context: "LogoutInput"}
  1008  	if s.AccessToken == nil {
  1009  		invalidParams.Add(request.NewErrParamRequired("AccessToken"))
  1010  	}
  1011  
  1012  	if invalidParams.Len() > 0 {
  1013  		return invalidParams
  1014  	}
  1015  	return nil
  1016  }
  1017  
  1018  // SetAccessToken sets the AccessToken field's value.
  1019  func (s *LogoutInput) SetAccessToken(v string) *LogoutInput {
  1020  	s.AccessToken = &v
  1021  	return s
  1022  }
  1023  
  1024  type LogoutOutput struct {
  1025  	_ struct{} `type:"structure" nopayload:"true"`
  1026  }
  1027  
  1028  // String returns the string representation.
  1029  //
  1030  // API parameter values that are decorated as "sensitive" in the API will not
  1031  // be included in the string output. The member name will be present, but the
  1032  // value will be replaced with "sensitive".
  1033  func (s LogoutOutput) String() string {
  1034  	return awsutil.Prettify(s)
  1035  }
  1036  
  1037  // GoString returns the string representation.
  1038  //
  1039  // API parameter values that are decorated as "sensitive" in the API will not
  1040  // be included in the string output. The member name will be present, but the
  1041  // value will be replaced with "sensitive".
  1042  func (s LogoutOutput) GoString() string {
  1043  	return s.String()
  1044  }
  1045  
  1046  // The specified resource doesn't exist.
  1047  type ResourceNotFoundException struct {
  1048  	_            struct{}                  `type:"structure"`
  1049  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  1050  
  1051  	Message_ *string `locationName:"message" type:"string"`
  1052  }
  1053  
  1054  // String returns the string representation.
  1055  //
  1056  // API parameter values that are decorated as "sensitive" in the API will not
  1057  // be included in the string output. The member name will be present, but the
  1058  // value will be replaced with "sensitive".
  1059  func (s ResourceNotFoundException) String() string {
  1060  	return awsutil.Prettify(s)
  1061  }
  1062  
  1063  // GoString returns the string representation.
  1064  //
  1065  // API parameter values that are decorated as "sensitive" in the API will not
  1066  // be included in the string output. The member name will be present, but the
  1067  // value will be replaced with "sensitive".
  1068  func (s ResourceNotFoundException) GoString() string {
  1069  	return s.String()
  1070  }
  1071  
  1072  func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error {
  1073  	return &ResourceNotFoundException{
  1074  		RespMetadata: v,
  1075  	}
  1076  }
  1077  
  1078  // Code returns the exception type name.
  1079  func (s *ResourceNotFoundException) Code() string {
  1080  	return "ResourceNotFoundException"
  1081  }
  1082  
  1083  // Message returns the exception's message.
  1084  func (s *ResourceNotFoundException) Message() string {
  1085  	if s.Message_ != nil {
  1086  		return *s.Message_
  1087  	}
  1088  	return ""
  1089  }
  1090  
  1091  // OrigErr always returns nil, satisfies awserr.Error interface.
  1092  func (s *ResourceNotFoundException) OrigErr() error {
  1093  	return nil
  1094  }
  1095  
  1096  func (s *ResourceNotFoundException) Error() string {
  1097  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  1098  }
  1099  
  1100  // Status code returns the HTTP status code for the request's response error.
  1101  func (s *ResourceNotFoundException) StatusCode() int {
  1102  	return s.RespMetadata.StatusCode
  1103  }
  1104  
  1105  // RequestID returns the service's response RequestID for request.
  1106  func (s *ResourceNotFoundException) RequestID() string {
  1107  	return s.RespMetadata.RequestID
  1108  }
  1109  
  1110  // Provides information about the role credentials that are assigned to the
  1111  // user.
  1112  type RoleCredentials struct {
  1113  	_ struct{} `type:"structure"`
  1114  
  1115  	// The identifier used for the temporary security credentials. For more information,
  1116  	// see Using Temporary Security Credentials to Request Access to AWS Resources
  1117  	// (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html)
  1118  	// in the AWS IAM User Guide.
  1119  	AccessKeyId *string `locationName:"accessKeyId" type:"string"`
  1120  
  1121  	// The date on which temporary security credentials expire.
  1122  	Expiration *int64 `locationName:"expiration" type:"long"`
  1123  
  1124  	// The key that is used to sign the request. For more information, see Using
  1125  	// Temporary Security Credentials to Request Access to AWS Resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html)
  1126  	// in the AWS IAM User Guide.
  1127  	//
  1128  	// SecretAccessKey is a sensitive parameter and its value will be
  1129  	// replaced with "sensitive" in string returned by RoleCredentials's
  1130  	// String and GoString methods.
  1131  	SecretAccessKey *string `locationName:"secretAccessKey" type:"string" sensitive:"true"`
  1132  
  1133  	// The token used for temporary credentials. For more information, see Using
  1134  	// Temporary Security Credentials to Request Access to AWS Resources (https://docs.aws.amazon.com/IAM/latest/UserGuide/id_credentials_temp_use-resources.html)
  1135  	// in the AWS IAM User Guide.
  1136  	//
  1137  	// SessionToken is a sensitive parameter and its value will be
  1138  	// replaced with "sensitive" in string returned by RoleCredentials's
  1139  	// String and GoString methods.
  1140  	SessionToken *string `locationName:"sessionToken" type:"string" sensitive:"true"`
  1141  }
  1142  
  1143  // String returns the string representation.
  1144  //
  1145  // API parameter values that are decorated as "sensitive" in the API will not
  1146  // be included in the string output. The member name will be present, but the
  1147  // value will be replaced with "sensitive".
  1148  func (s RoleCredentials) String() string {
  1149  	return awsutil.Prettify(s)
  1150  }
  1151  
  1152  // GoString returns the string representation.
  1153  //
  1154  // API parameter values that are decorated as "sensitive" in the API will not
  1155  // be included in the string output. The member name will be present, but the
  1156  // value will be replaced with "sensitive".
  1157  func (s RoleCredentials) GoString() string {
  1158  	return s.String()
  1159  }
  1160  
  1161  // SetAccessKeyId sets the AccessKeyId field's value.
  1162  func (s *RoleCredentials) SetAccessKeyId(v string) *RoleCredentials {
  1163  	s.AccessKeyId = &v
  1164  	return s
  1165  }
  1166  
  1167  // SetExpiration sets the Expiration field's value.
  1168  func (s *RoleCredentials) SetExpiration(v int64) *RoleCredentials {
  1169  	s.Expiration = &v
  1170  	return s
  1171  }
  1172  
  1173  // SetSecretAccessKey sets the SecretAccessKey field's value.
  1174  func (s *RoleCredentials) SetSecretAccessKey(v string) *RoleCredentials {
  1175  	s.SecretAccessKey = &v
  1176  	return s
  1177  }
  1178  
  1179  // SetSessionToken sets the SessionToken field's value.
  1180  func (s *RoleCredentials) SetSessionToken(v string) *RoleCredentials {
  1181  	s.SessionToken = &v
  1182  	return s
  1183  }
  1184  
  1185  // Provides information about the role that is assigned to the user.
  1186  type RoleInfo struct {
  1187  	_ struct{} `type:"structure"`
  1188  
  1189  	// The identifier of the AWS account assigned to the user.
  1190  	AccountId *string `locationName:"accountId" type:"string"`
  1191  
  1192  	// The friendly name of the role that is assigned to the user.
  1193  	RoleName *string `locationName:"roleName" type:"string"`
  1194  }
  1195  
  1196  // String returns the string representation.
  1197  //
  1198  // API parameter values that are decorated as "sensitive" in the API will not
  1199  // be included in the string output. The member name will be present, but the
  1200  // value will be replaced with "sensitive".
  1201  func (s RoleInfo) String() string {
  1202  	return awsutil.Prettify(s)
  1203  }
  1204  
  1205  // GoString returns the string representation.
  1206  //
  1207  // API parameter values that are decorated as "sensitive" in the API will not
  1208  // be included in the string output. The member name will be present, but the
  1209  // value will be replaced with "sensitive".
  1210  func (s RoleInfo) GoString() string {
  1211  	return s.String()
  1212  }
  1213  
  1214  // SetAccountId sets the AccountId field's value.
  1215  func (s *RoleInfo) SetAccountId(v string) *RoleInfo {
  1216  	s.AccountId = &v
  1217  	return s
  1218  }
  1219  
  1220  // SetRoleName sets the RoleName field's value.
  1221  func (s *RoleInfo) SetRoleName(v string) *RoleInfo {
  1222  	s.RoleName = &v
  1223  	return s
  1224  }
  1225  
  1226  // Indicates that the request is being made too frequently and is more than
  1227  // what the server can handle.
  1228  type TooManyRequestsException struct {
  1229  	_            struct{}                  `type:"structure"`
  1230  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  1231  
  1232  	Message_ *string `locationName:"message" type:"string"`
  1233  }
  1234  
  1235  // String returns the string representation.
  1236  //
  1237  // API parameter values that are decorated as "sensitive" in the API will not
  1238  // be included in the string output. The member name will be present, but the
  1239  // value will be replaced with "sensitive".
  1240  func (s TooManyRequestsException) String() string {
  1241  	return awsutil.Prettify(s)
  1242  }
  1243  
  1244  // GoString returns the string representation.
  1245  //
  1246  // API parameter values that are decorated as "sensitive" in the API will not
  1247  // be included in the string output. The member name will be present, but the
  1248  // value will be replaced with "sensitive".
  1249  func (s TooManyRequestsException) GoString() string {
  1250  	return s.String()
  1251  }
  1252  
  1253  func newErrorTooManyRequestsException(v protocol.ResponseMetadata) error {
  1254  	return &TooManyRequestsException{
  1255  		RespMetadata: v,
  1256  	}
  1257  }
  1258  
  1259  // Code returns the exception type name.
  1260  func (s *TooManyRequestsException) Code() string {
  1261  	return "TooManyRequestsException"
  1262  }
  1263  
  1264  // Message returns the exception's message.
  1265  func (s *TooManyRequestsException) Message() string {
  1266  	if s.Message_ != nil {
  1267  		return *s.Message_
  1268  	}
  1269  	return ""
  1270  }
  1271  
  1272  // OrigErr always returns nil, satisfies awserr.Error interface.
  1273  func (s *TooManyRequestsException) OrigErr() error {
  1274  	return nil
  1275  }
  1276  
  1277  func (s *TooManyRequestsException) Error() string {
  1278  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  1279  }
  1280  
  1281  // Status code returns the HTTP status code for the request's response error.
  1282  func (s *TooManyRequestsException) StatusCode() int {
  1283  	return s.RespMetadata.StatusCode
  1284  }
  1285  
  1286  // RequestID returns the service's response RequestID for request.
  1287  func (s *TooManyRequestsException) RequestID() string {
  1288  	return s.RespMetadata.RequestID
  1289  }
  1290  
  1291  // Indicates that the request is not authorized. This can happen due to an invalid
  1292  // access token in the request.
  1293  type UnauthorizedException struct {
  1294  	_            struct{}                  `type:"structure"`
  1295  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  1296  
  1297  	Message_ *string `locationName:"message" type:"string"`
  1298  }
  1299  
  1300  // String returns the string representation.
  1301  //
  1302  // API parameter values that are decorated as "sensitive" in the API will not
  1303  // be included in the string output. The member name will be present, but the
  1304  // value will be replaced with "sensitive".
  1305  func (s UnauthorizedException) String() string {
  1306  	return awsutil.Prettify(s)
  1307  }
  1308  
  1309  // GoString returns the string representation.
  1310  //
  1311  // API parameter values that are decorated as "sensitive" in the API will not
  1312  // be included in the string output. The member name will be present, but the
  1313  // value will be replaced with "sensitive".
  1314  func (s UnauthorizedException) GoString() string {
  1315  	return s.String()
  1316  }
  1317  
  1318  func newErrorUnauthorizedException(v protocol.ResponseMetadata) error {
  1319  	return &UnauthorizedException{
  1320  		RespMetadata: v,
  1321  	}
  1322  }
  1323  
  1324  // Code returns the exception type name.
  1325  func (s *UnauthorizedException) Code() string {
  1326  	return "UnauthorizedException"
  1327  }
  1328  
  1329  // Message returns the exception's message.
  1330  func (s *UnauthorizedException) Message() string {
  1331  	if s.Message_ != nil {
  1332  		return *s.Message_
  1333  	}
  1334  	return ""
  1335  }
  1336  
  1337  // OrigErr always returns nil, satisfies awserr.Error interface.
  1338  func (s *UnauthorizedException) OrigErr() error {
  1339  	return nil
  1340  }
  1341  
  1342  func (s *UnauthorizedException) Error() string {
  1343  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  1344  }
  1345  
  1346  // Status code returns the HTTP status code for the request's response error.
  1347  func (s *UnauthorizedException) StatusCode() int {
  1348  	return s.RespMetadata.StatusCode
  1349  }
  1350  
  1351  // RequestID returns the service's response RequestID for request.
  1352  func (s *UnauthorizedException) RequestID() string {
  1353  	return s.RespMetadata.RequestID
  1354  }