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

     1  // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
     2  
     3  package account
     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/request"
    11  	"github.com/aavshr/aws-sdk-go/private/protocol"
    12  	"github.com/aavshr/aws-sdk-go/private/protocol/restjson"
    13  )
    14  
    15  const opDeleteAlternateContact = "DeleteAlternateContact"
    16  
    17  // DeleteAlternateContactRequest generates a "aws/request.Request" representing the
    18  // client's request for the DeleteAlternateContact operation. The "output" return
    19  // value will be populated with the request's response once the request completes
    20  // successfully.
    21  //
    22  // Use "Send" method on the returned Request to send the API call to the service.
    23  // the "output" return value is not valid until after Send returns without error.
    24  //
    25  // See DeleteAlternateContact for more information on using the DeleteAlternateContact
    26  // API call, and error handling.
    27  //
    28  // This method is useful when you want to inject custom logic or configuration
    29  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
    30  //
    31  //
    32  //    // Example sending a request using the DeleteAlternateContactRequest method.
    33  //    req, resp := client.DeleteAlternateContactRequest(params)
    34  //
    35  //    err := req.Send()
    36  //    if err == nil { // resp is now filled
    37  //        fmt.Println(resp)
    38  //    }
    39  //
    40  // See also, https://docs.aws.amazon.com/goto/WebAPI/account-2021-02-01/DeleteAlternateContact
    41  func (c *Account) DeleteAlternateContactRequest(input *DeleteAlternateContactInput) (req *request.Request, output *DeleteAlternateContactOutput) {
    42  	op := &request.Operation{
    43  		Name:       opDeleteAlternateContact,
    44  		HTTPMethod: "POST",
    45  		HTTPPath:   "/deleteAlternateContact",
    46  	}
    47  
    48  	if input == nil {
    49  		input = &DeleteAlternateContactInput{}
    50  	}
    51  
    52  	output = &DeleteAlternateContactOutput{}
    53  	req = c.newRequest(op, input, output)
    54  	req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
    55  	return
    56  }
    57  
    58  // DeleteAlternateContact API operation for AWS Account.
    59  //
    60  // Deletes the specified alternate contact from an Amazon Web Services account.
    61  //
    62  // For complete details about how to use the alternate contact operations, see
    63  // Access or updating the alternate contacts (https://docs.aws.amazon.com/accounts/latest/reference/manage-acct-update-contact.html).
    64  //
    65  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
    66  // with awserr.Error's Code and Message methods to get detailed information about
    67  // the error.
    68  //
    69  // See the AWS API reference guide for AWS Account's
    70  // API operation DeleteAlternateContact for usage and error information.
    71  //
    72  // Returned Error Types:
    73  //   * ResourceNotFoundException
    74  //   The operation failed because it specified a resource that can't be found.
    75  //
    76  //   * ValidationException
    77  //   The operation failed because one of the input parameters was invalid.
    78  //
    79  //   * AccessDeniedException
    80  //   The operation failed because the calling identity doesn't have the minimum
    81  //   required permissions.
    82  //
    83  //   * TooManyRequestsException
    84  //   The operation failed because it was called too frequently and exceeded a
    85  //   throttle limit.
    86  //
    87  //   * InternalServerException
    88  //   The operation failed because of an error internal to Amazon Web Services.
    89  //   Try your operation again later.
    90  //
    91  // See also, https://docs.aws.amazon.com/goto/WebAPI/account-2021-02-01/DeleteAlternateContact
    92  func (c *Account) DeleteAlternateContact(input *DeleteAlternateContactInput) (*DeleteAlternateContactOutput, error) {
    93  	req, out := c.DeleteAlternateContactRequest(input)
    94  	return out, req.Send()
    95  }
    96  
    97  // DeleteAlternateContactWithContext is the same as DeleteAlternateContact with the addition of
    98  // the ability to pass a context and additional request options.
    99  //
   100  // See DeleteAlternateContact for details on how to use this API operation.
   101  //
   102  // The context must be non-nil and will be used for request cancellation. If
   103  // the context is nil a panic will occur. In the future the SDK may create
   104  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
   105  // for more information on using Contexts.
   106  func (c *Account) DeleteAlternateContactWithContext(ctx aws.Context, input *DeleteAlternateContactInput, opts ...request.Option) (*DeleteAlternateContactOutput, error) {
   107  	req, out := c.DeleteAlternateContactRequest(input)
   108  	req.SetContext(ctx)
   109  	req.ApplyOptions(opts...)
   110  	return out, req.Send()
   111  }
   112  
   113  const opGetAlternateContact = "GetAlternateContact"
   114  
   115  // GetAlternateContactRequest generates a "aws/request.Request" representing the
   116  // client's request for the GetAlternateContact operation. The "output" return
   117  // value will be populated with the request's response once the request completes
   118  // successfully.
   119  //
   120  // Use "Send" method on the returned Request to send the API call to the service.
   121  // the "output" return value is not valid until after Send returns without error.
   122  //
   123  // See GetAlternateContact for more information on using the GetAlternateContact
   124  // API call, and error handling.
   125  //
   126  // This method is useful when you want to inject custom logic or configuration
   127  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
   128  //
   129  //
   130  //    // Example sending a request using the GetAlternateContactRequest method.
   131  //    req, resp := client.GetAlternateContactRequest(params)
   132  //
   133  //    err := req.Send()
   134  //    if err == nil { // resp is now filled
   135  //        fmt.Println(resp)
   136  //    }
   137  //
   138  // See also, https://docs.aws.amazon.com/goto/WebAPI/account-2021-02-01/GetAlternateContact
   139  func (c *Account) GetAlternateContactRequest(input *GetAlternateContactInput) (req *request.Request, output *GetAlternateContactOutput) {
   140  	op := &request.Operation{
   141  		Name:       opGetAlternateContact,
   142  		HTTPMethod: "POST",
   143  		HTTPPath:   "/getAlternateContact",
   144  	}
   145  
   146  	if input == nil {
   147  		input = &GetAlternateContactInput{}
   148  	}
   149  
   150  	output = &GetAlternateContactOutput{}
   151  	req = c.newRequest(op, input, output)
   152  	return
   153  }
   154  
   155  // GetAlternateContact API operation for AWS Account.
   156  //
   157  // Retrieves the specified alternate contact attached to an Amazon Web Services
   158  // account.
   159  //
   160  // For complete details about how to use the alternate contact operations, see
   161  // Access or updating the alternate contacts (https://docs.aws.amazon.com/accounts/latest/reference/manage-acct-update-contact.html).
   162  //
   163  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
   164  // with awserr.Error's Code and Message methods to get detailed information about
   165  // the error.
   166  //
   167  // See the AWS API reference guide for AWS Account's
   168  // API operation GetAlternateContact for usage and error information.
   169  //
   170  // Returned Error Types:
   171  //   * ResourceNotFoundException
   172  //   The operation failed because it specified a resource that can't be found.
   173  //
   174  //   * ValidationException
   175  //   The operation failed because one of the input parameters was invalid.
   176  //
   177  //   * AccessDeniedException
   178  //   The operation failed because the calling identity doesn't have the minimum
   179  //   required permissions.
   180  //
   181  //   * TooManyRequestsException
   182  //   The operation failed because it was called too frequently and exceeded a
   183  //   throttle limit.
   184  //
   185  //   * InternalServerException
   186  //   The operation failed because of an error internal to Amazon Web Services.
   187  //   Try your operation again later.
   188  //
   189  // See also, https://docs.aws.amazon.com/goto/WebAPI/account-2021-02-01/GetAlternateContact
   190  func (c *Account) GetAlternateContact(input *GetAlternateContactInput) (*GetAlternateContactOutput, error) {
   191  	req, out := c.GetAlternateContactRequest(input)
   192  	return out, req.Send()
   193  }
   194  
   195  // GetAlternateContactWithContext is the same as GetAlternateContact with the addition of
   196  // the ability to pass a context and additional request options.
   197  //
   198  // See GetAlternateContact for details on how to use this API operation.
   199  //
   200  // The context must be non-nil and will be used for request cancellation. If
   201  // the context is nil a panic will occur. In the future the SDK may create
   202  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
   203  // for more information on using Contexts.
   204  func (c *Account) GetAlternateContactWithContext(ctx aws.Context, input *GetAlternateContactInput, opts ...request.Option) (*GetAlternateContactOutput, error) {
   205  	req, out := c.GetAlternateContactRequest(input)
   206  	req.SetContext(ctx)
   207  	req.ApplyOptions(opts...)
   208  	return out, req.Send()
   209  }
   210  
   211  const opPutAlternateContact = "PutAlternateContact"
   212  
   213  // PutAlternateContactRequest generates a "aws/request.Request" representing the
   214  // client's request for the PutAlternateContact operation. The "output" return
   215  // value will be populated with the request's response once the request completes
   216  // successfully.
   217  //
   218  // Use "Send" method on the returned Request to send the API call to the service.
   219  // the "output" return value is not valid until after Send returns without error.
   220  //
   221  // See PutAlternateContact for more information on using the PutAlternateContact
   222  // API call, and error handling.
   223  //
   224  // This method is useful when you want to inject custom logic or configuration
   225  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
   226  //
   227  //
   228  //    // Example sending a request using the PutAlternateContactRequest method.
   229  //    req, resp := client.PutAlternateContactRequest(params)
   230  //
   231  //    err := req.Send()
   232  //    if err == nil { // resp is now filled
   233  //        fmt.Println(resp)
   234  //    }
   235  //
   236  // See also, https://docs.aws.amazon.com/goto/WebAPI/account-2021-02-01/PutAlternateContact
   237  func (c *Account) PutAlternateContactRequest(input *PutAlternateContactInput) (req *request.Request, output *PutAlternateContactOutput) {
   238  	op := &request.Operation{
   239  		Name:       opPutAlternateContact,
   240  		HTTPMethod: "POST",
   241  		HTTPPath:   "/putAlternateContact",
   242  	}
   243  
   244  	if input == nil {
   245  		input = &PutAlternateContactInput{}
   246  	}
   247  
   248  	output = &PutAlternateContactOutput{}
   249  	req = c.newRequest(op, input, output)
   250  	req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
   251  	return
   252  }
   253  
   254  // PutAlternateContact API operation for AWS Account.
   255  //
   256  // Modifies the specified alternate contact attached to an Amazon Web Services
   257  // account.
   258  //
   259  // For complete details about how to use the alternate contact operations, see
   260  // Access or updating the alternate contacts (https://docs.aws.amazon.com/accounts/latest/reference/manage-acct-update-contact.html).
   261  //
   262  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
   263  // with awserr.Error's Code and Message methods to get detailed information about
   264  // the error.
   265  //
   266  // See the AWS API reference guide for AWS Account's
   267  // API operation PutAlternateContact for usage and error information.
   268  //
   269  // Returned Error Types:
   270  //   * ValidationException
   271  //   The operation failed because one of the input parameters was invalid.
   272  //
   273  //   * AccessDeniedException
   274  //   The operation failed because the calling identity doesn't have the minimum
   275  //   required permissions.
   276  //
   277  //   * TooManyRequestsException
   278  //   The operation failed because it was called too frequently and exceeded a
   279  //   throttle limit.
   280  //
   281  //   * InternalServerException
   282  //   The operation failed because of an error internal to Amazon Web Services.
   283  //   Try your operation again later.
   284  //
   285  // See also, https://docs.aws.amazon.com/goto/WebAPI/account-2021-02-01/PutAlternateContact
   286  func (c *Account) PutAlternateContact(input *PutAlternateContactInput) (*PutAlternateContactOutput, error) {
   287  	req, out := c.PutAlternateContactRequest(input)
   288  	return out, req.Send()
   289  }
   290  
   291  // PutAlternateContactWithContext is the same as PutAlternateContact with the addition of
   292  // the ability to pass a context and additional request options.
   293  //
   294  // See PutAlternateContact for details on how to use this API operation.
   295  //
   296  // The context must be non-nil and will be used for request cancellation. If
   297  // the context is nil a panic will occur. In the future the SDK may create
   298  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
   299  // for more information on using Contexts.
   300  func (c *Account) PutAlternateContactWithContext(ctx aws.Context, input *PutAlternateContactInput, opts ...request.Option) (*PutAlternateContactOutput, error) {
   301  	req, out := c.PutAlternateContactRequest(input)
   302  	req.SetContext(ctx)
   303  	req.ApplyOptions(opts...)
   304  	return out, req.Send()
   305  }
   306  
   307  // The operation failed because the calling identity doesn't have the minimum
   308  // required permissions.
   309  type AccessDeniedException struct {
   310  	_            struct{}                  `type:"structure"`
   311  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
   312  
   313  	Message_ *string `locationName:"message" type:"string"`
   314  }
   315  
   316  // String returns the string representation.
   317  //
   318  // API parameter values that are decorated as "sensitive" in the API will not
   319  // be included in the string output. The member name will be present, but the
   320  // value will be replaced with "sensitive".
   321  func (s AccessDeniedException) String() string {
   322  	return awsutil.Prettify(s)
   323  }
   324  
   325  // GoString returns the string representation.
   326  //
   327  // API parameter values that are decorated as "sensitive" in the API will not
   328  // be included in the string output. The member name will be present, but the
   329  // value will be replaced with "sensitive".
   330  func (s AccessDeniedException) GoString() string {
   331  	return s.String()
   332  }
   333  
   334  func newErrorAccessDeniedException(v protocol.ResponseMetadata) error {
   335  	return &AccessDeniedException{
   336  		RespMetadata: v,
   337  	}
   338  }
   339  
   340  // Code returns the exception type name.
   341  func (s *AccessDeniedException) Code() string {
   342  	return "AccessDeniedException"
   343  }
   344  
   345  // Message returns the exception's message.
   346  func (s *AccessDeniedException) Message() string {
   347  	if s.Message_ != nil {
   348  		return *s.Message_
   349  	}
   350  	return ""
   351  }
   352  
   353  // OrigErr always returns nil, satisfies awserr.Error interface.
   354  func (s *AccessDeniedException) OrigErr() error {
   355  	return nil
   356  }
   357  
   358  func (s *AccessDeniedException) Error() string {
   359  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
   360  }
   361  
   362  // Status code returns the HTTP status code for the request's response error.
   363  func (s *AccessDeniedException) StatusCode() int {
   364  	return s.RespMetadata.StatusCode
   365  }
   366  
   367  // RequestID returns the service's response RequestID for request.
   368  func (s *AccessDeniedException) RequestID() string {
   369  	return s.RespMetadata.RequestID
   370  }
   371  
   372  // A structure that contains the details of an alternate contact associated
   373  // with an Amazon Web Services account
   374  type AlternateContact struct {
   375  	_ struct{} `type:"structure"`
   376  
   377  	// The type of alternate contact.
   378  	AlternateContactType *string `type:"string" enum:"AlternateContactType"`
   379  
   380  	// The email address associated with this alternate contact.
   381  	//
   382  	// EmailAddress is a sensitive parameter and its value will be
   383  	// replaced with "sensitive" in string returned by AlternateContact's
   384  	// String and GoString methods.
   385  	EmailAddress *string `min:"1" type:"string" sensitive:"true"`
   386  
   387  	// The name associated with this alternate contact.
   388  	//
   389  	// Name is a sensitive parameter and its value will be
   390  	// replaced with "sensitive" in string returned by AlternateContact's
   391  	// String and GoString methods.
   392  	Name *string `min:"1" type:"string" sensitive:"true"`
   393  
   394  	// The phone number associated with this alternate contact.
   395  	//
   396  	// PhoneNumber is a sensitive parameter and its value will be
   397  	// replaced with "sensitive" in string returned by AlternateContact's
   398  	// String and GoString methods.
   399  	PhoneNumber *string `min:"1" type:"string" sensitive:"true"`
   400  
   401  	// The title associated with this alternate contact.
   402  	//
   403  	// Title is a sensitive parameter and its value will be
   404  	// replaced with "sensitive" in string returned by AlternateContact's
   405  	// String and GoString methods.
   406  	Title *string `min:"1" type:"string" sensitive:"true"`
   407  }
   408  
   409  // String returns the string representation.
   410  //
   411  // API parameter values that are decorated as "sensitive" in the API will not
   412  // be included in the string output. The member name will be present, but the
   413  // value will be replaced with "sensitive".
   414  func (s AlternateContact) String() string {
   415  	return awsutil.Prettify(s)
   416  }
   417  
   418  // GoString returns the string representation.
   419  //
   420  // API parameter values that are decorated as "sensitive" in the API will not
   421  // be included in the string output. The member name will be present, but the
   422  // value will be replaced with "sensitive".
   423  func (s AlternateContact) GoString() string {
   424  	return s.String()
   425  }
   426  
   427  // SetAlternateContactType sets the AlternateContactType field's value.
   428  func (s *AlternateContact) SetAlternateContactType(v string) *AlternateContact {
   429  	s.AlternateContactType = &v
   430  	return s
   431  }
   432  
   433  // SetEmailAddress sets the EmailAddress field's value.
   434  func (s *AlternateContact) SetEmailAddress(v string) *AlternateContact {
   435  	s.EmailAddress = &v
   436  	return s
   437  }
   438  
   439  // SetName sets the Name field's value.
   440  func (s *AlternateContact) SetName(v string) *AlternateContact {
   441  	s.Name = &v
   442  	return s
   443  }
   444  
   445  // SetPhoneNumber sets the PhoneNumber field's value.
   446  func (s *AlternateContact) SetPhoneNumber(v string) *AlternateContact {
   447  	s.PhoneNumber = &v
   448  	return s
   449  }
   450  
   451  // SetTitle sets the Title field's value.
   452  func (s *AlternateContact) SetTitle(v string) *AlternateContact {
   453  	s.Title = &v
   454  	return s
   455  }
   456  
   457  type DeleteAlternateContactInput struct {
   458  	_ struct{} `type:"structure"`
   459  
   460  	// Specifies the 12 digit account ID number of the Amazon Web Services account
   461  	// that you want to access or modify with this operation.
   462  	//
   463  	// If you do not specify this parameter, it defaults to the Amazon Web Services
   464  	// account of the identity used to call the operation.
   465  	//
   466  	// To use this parameter, the caller must be an identity in the organization's
   467  	// management account (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html#account)
   468  	// or a delegated administrator account, and the specified account ID must be
   469  	// a member account in the same organization. The organization must have all
   470  	// features enabled (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html),
   471  	// and the organization must have trusted access (https://docs.aws.amazon.com/organizations/latest/userguide/using-orgs-trusted-access.html)
   472  	// enabled for the Account Management service, and optionally a delegated admin
   473  	// (https://docs.aws.amazon.com/organizations/latest/userguide/using-orgs-delegated-admin.html)
   474  	// account assigned.
   475  	//
   476  	// The management account can't specify its own AccountId; it must call the
   477  	// operation in standalone context by not including the AccountId parameter.
   478  	//
   479  	// To call this operation on an account that is not a member of an organization,
   480  	// then don't specify this parameter, and call the operation using an identity
   481  	// belonging to the account whose contacts you wish to retrieve or modify.
   482  	AccountId *string `type:"string"`
   483  
   484  	// Specifies which of the alternate contacts to delete.
   485  	//
   486  	// AlternateContactType is a required field
   487  	AlternateContactType *string `type:"string" required:"true" enum:"AlternateContactType"`
   488  }
   489  
   490  // String returns the string representation.
   491  //
   492  // API parameter values that are decorated as "sensitive" in the API will not
   493  // be included in the string output. The member name will be present, but the
   494  // value will be replaced with "sensitive".
   495  func (s DeleteAlternateContactInput) String() string {
   496  	return awsutil.Prettify(s)
   497  }
   498  
   499  // GoString returns the string representation.
   500  //
   501  // API parameter values that are decorated as "sensitive" in the API will not
   502  // be included in the string output. The member name will be present, but the
   503  // value will be replaced with "sensitive".
   504  func (s DeleteAlternateContactInput) GoString() string {
   505  	return s.String()
   506  }
   507  
   508  // Validate inspects the fields of the type to determine if they are valid.
   509  func (s *DeleteAlternateContactInput) Validate() error {
   510  	invalidParams := request.ErrInvalidParams{Context: "DeleteAlternateContactInput"}
   511  	if s.AlternateContactType == nil {
   512  		invalidParams.Add(request.NewErrParamRequired("AlternateContactType"))
   513  	}
   514  
   515  	if invalidParams.Len() > 0 {
   516  		return invalidParams
   517  	}
   518  	return nil
   519  }
   520  
   521  // SetAccountId sets the AccountId field's value.
   522  func (s *DeleteAlternateContactInput) SetAccountId(v string) *DeleteAlternateContactInput {
   523  	s.AccountId = &v
   524  	return s
   525  }
   526  
   527  // SetAlternateContactType sets the AlternateContactType field's value.
   528  func (s *DeleteAlternateContactInput) SetAlternateContactType(v string) *DeleteAlternateContactInput {
   529  	s.AlternateContactType = &v
   530  	return s
   531  }
   532  
   533  type DeleteAlternateContactOutput struct {
   534  	_ struct{} `type:"structure" nopayload:"true"`
   535  }
   536  
   537  // String returns the string representation.
   538  //
   539  // API parameter values that are decorated as "sensitive" in the API will not
   540  // be included in the string output. The member name will be present, but the
   541  // value will be replaced with "sensitive".
   542  func (s DeleteAlternateContactOutput) String() string {
   543  	return awsutil.Prettify(s)
   544  }
   545  
   546  // GoString returns the string representation.
   547  //
   548  // API parameter values that are decorated as "sensitive" in the API will not
   549  // be included in the string output. The member name will be present, but the
   550  // value will be replaced with "sensitive".
   551  func (s DeleteAlternateContactOutput) GoString() string {
   552  	return s.String()
   553  }
   554  
   555  type GetAlternateContactInput struct {
   556  	_ struct{} `type:"structure"`
   557  
   558  	// Specifies the 12 digit account ID number of the Amazon Web Services account
   559  	// that you want to access or modify with this operation.
   560  	//
   561  	// If you do not specify this parameter, it defaults to the Amazon Web Services
   562  	// account of the identity used to call the operation.
   563  	//
   564  	// To use this parameter, the caller must be an identity in the organization's
   565  	// management account (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html#account)
   566  	// or a delegated administrator account, and the specified account ID must be
   567  	// a member account in the same organization. The organization must have all
   568  	// features enabled (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html),
   569  	// and the organization must have trusted access (https://docs.aws.amazon.com/organizations/latest/userguide/using-orgs-trusted-access.html)
   570  	// enabled for the Account Management service, and optionally a delegated admin
   571  	// (https://docs.aws.amazon.com/organizations/latest/userguide/using-orgs-delegated-admin.html)
   572  	// account assigned.
   573  	//
   574  	// The management account can't specify its own AccountId; it must call the
   575  	// operation in standalone context by not including the AccountId parameter.
   576  	//
   577  	// To call this operation on an account that is not a member of an organization,
   578  	// then don't specify this parameter, and call the operation using an identity
   579  	// belonging to the account whose contacts you wish to retrieve or modify.
   580  	AccountId *string `type:"string"`
   581  
   582  	// Specifies which alternate contact you want to retrieve.
   583  	//
   584  	// AlternateContactType is a required field
   585  	AlternateContactType *string `type:"string" required:"true" enum:"AlternateContactType"`
   586  }
   587  
   588  // String returns the string representation.
   589  //
   590  // API parameter values that are decorated as "sensitive" in the API will not
   591  // be included in the string output. The member name will be present, but the
   592  // value will be replaced with "sensitive".
   593  func (s GetAlternateContactInput) String() string {
   594  	return awsutil.Prettify(s)
   595  }
   596  
   597  // GoString returns the string representation.
   598  //
   599  // API parameter values that are decorated as "sensitive" in the API will not
   600  // be included in the string output. The member name will be present, but the
   601  // value will be replaced with "sensitive".
   602  func (s GetAlternateContactInput) GoString() string {
   603  	return s.String()
   604  }
   605  
   606  // Validate inspects the fields of the type to determine if they are valid.
   607  func (s *GetAlternateContactInput) Validate() error {
   608  	invalidParams := request.ErrInvalidParams{Context: "GetAlternateContactInput"}
   609  	if s.AlternateContactType == nil {
   610  		invalidParams.Add(request.NewErrParamRequired("AlternateContactType"))
   611  	}
   612  
   613  	if invalidParams.Len() > 0 {
   614  		return invalidParams
   615  	}
   616  	return nil
   617  }
   618  
   619  // SetAccountId sets the AccountId field's value.
   620  func (s *GetAlternateContactInput) SetAccountId(v string) *GetAlternateContactInput {
   621  	s.AccountId = &v
   622  	return s
   623  }
   624  
   625  // SetAlternateContactType sets the AlternateContactType field's value.
   626  func (s *GetAlternateContactInput) SetAlternateContactType(v string) *GetAlternateContactInput {
   627  	s.AlternateContactType = &v
   628  	return s
   629  }
   630  
   631  type GetAlternateContactOutput struct {
   632  	_ struct{} `type:"structure"`
   633  
   634  	// A structure that contains the details for the specified alternate contact.
   635  	AlternateContact *AlternateContact `type:"structure"`
   636  }
   637  
   638  // String returns the string representation.
   639  //
   640  // API parameter values that are decorated as "sensitive" in the API will not
   641  // be included in the string output. The member name will be present, but the
   642  // value will be replaced with "sensitive".
   643  func (s GetAlternateContactOutput) String() string {
   644  	return awsutil.Prettify(s)
   645  }
   646  
   647  // GoString returns the string representation.
   648  //
   649  // API parameter values that are decorated as "sensitive" in the API will not
   650  // be included in the string output. The member name will be present, but the
   651  // value will be replaced with "sensitive".
   652  func (s GetAlternateContactOutput) GoString() string {
   653  	return s.String()
   654  }
   655  
   656  // SetAlternateContact sets the AlternateContact field's value.
   657  func (s *GetAlternateContactOutput) SetAlternateContact(v *AlternateContact) *GetAlternateContactOutput {
   658  	s.AlternateContact = v
   659  	return s
   660  }
   661  
   662  // The operation failed because of an error internal to Amazon Web Services.
   663  // Try your operation again later.
   664  type InternalServerException struct {
   665  	_            struct{}                  `type:"structure"`
   666  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
   667  
   668  	Message_ *string `locationName:"message" type:"string"`
   669  }
   670  
   671  // String 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 InternalServerException) String() string {
   677  	return awsutil.Prettify(s)
   678  }
   679  
   680  // GoString returns the string representation.
   681  //
   682  // API parameter values that are decorated as "sensitive" in the API will not
   683  // be included in the string output. The member name will be present, but the
   684  // value will be replaced with "sensitive".
   685  func (s InternalServerException) GoString() string {
   686  	return s.String()
   687  }
   688  
   689  func newErrorInternalServerException(v protocol.ResponseMetadata) error {
   690  	return &InternalServerException{
   691  		RespMetadata: v,
   692  	}
   693  }
   694  
   695  // Code returns the exception type name.
   696  func (s *InternalServerException) Code() string {
   697  	return "InternalServerException"
   698  }
   699  
   700  // Message returns the exception's message.
   701  func (s *InternalServerException) Message() string {
   702  	if s.Message_ != nil {
   703  		return *s.Message_
   704  	}
   705  	return ""
   706  }
   707  
   708  // OrigErr always returns nil, satisfies awserr.Error interface.
   709  func (s *InternalServerException) OrigErr() error {
   710  	return nil
   711  }
   712  
   713  func (s *InternalServerException) Error() string {
   714  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
   715  }
   716  
   717  // Status code returns the HTTP status code for the request's response error.
   718  func (s *InternalServerException) StatusCode() int {
   719  	return s.RespMetadata.StatusCode
   720  }
   721  
   722  // RequestID returns the service's response RequestID for request.
   723  func (s *InternalServerException) RequestID() string {
   724  	return s.RespMetadata.RequestID
   725  }
   726  
   727  type PutAlternateContactInput struct {
   728  	_ struct{} `type:"structure"`
   729  
   730  	// Specifies the 12 digit account ID number of the Amazon Web Services account
   731  	// that you want to access or modify with this operation.
   732  	//
   733  	// If you do not specify this parameter, it defaults to the Amazon Web Services
   734  	// account of the identity used to call the operation.
   735  	//
   736  	// To use this parameter, the caller must be an identity in the organization's
   737  	// management account (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_getting-started_concepts.html#account)
   738  	// or a delegated administrator account, and the specified account ID must be
   739  	// a member account in the same organization. The organization must have all
   740  	// features enabled (https://docs.aws.amazon.com/organizations/latest/userguide/orgs_manage_org_support-all-features.html),
   741  	// and the organization must have trusted access (https://docs.aws.amazon.com/organizations/latest/userguide/using-orgs-trusted-access.html)
   742  	// enabled for the Account Management service, and optionally a delegated admin
   743  	// (https://docs.aws.amazon.com/organizations/latest/userguide/using-orgs-delegated-admin.html)
   744  	// account assigned.
   745  	//
   746  	// The management account can't specify its own AccountId; it must call the
   747  	// operation in standalone context by not including the AccountId parameter.
   748  	//
   749  	// To call this operation on an account that is not a member of an organization,
   750  	// then don't specify this parameter, and call the operation using an identity
   751  	// belonging to the account whose contacts you wish to retrieve or modify.
   752  	AccountId *string `type:"string"`
   753  
   754  	// Specifies which alternate contact you want to create or update.
   755  	//
   756  	// AlternateContactType is a required field
   757  	AlternateContactType *string `type:"string" required:"true" enum:"AlternateContactType"`
   758  
   759  	// Specifies an email address for the alternate contact.
   760  	//
   761  	// EmailAddress is a sensitive parameter and its value will be
   762  	// replaced with "sensitive" in string returned by PutAlternateContactInput's
   763  	// String and GoString methods.
   764  	//
   765  	// EmailAddress is a required field
   766  	EmailAddress *string `min:"1" type:"string" required:"true" sensitive:"true"`
   767  
   768  	// Specifies a name for the alternate contact.
   769  	//
   770  	// Name is a sensitive parameter and its value will be
   771  	// replaced with "sensitive" in string returned by PutAlternateContactInput's
   772  	// String and GoString methods.
   773  	//
   774  	// Name is a required field
   775  	Name *string `min:"1" type:"string" required:"true" sensitive:"true"`
   776  
   777  	// Specifies a phone number for the alternate contact.
   778  	//
   779  	// PhoneNumber is a sensitive parameter and its value will be
   780  	// replaced with "sensitive" in string returned by PutAlternateContactInput's
   781  	// String and GoString methods.
   782  	//
   783  	// PhoneNumber is a required field
   784  	PhoneNumber *string `min:"1" type:"string" required:"true" sensitive:"true"`
   785  
   786  	// Specifies a title for the alternate contact.
   787  	//
   788  	// Title is a sensitive parameter and its value will be
   789  	// replaced with "sensitive" in string returned by PutAlternateContactInput's
   790  	// String and GoString methods.
   791  	//
   792  	// Title is a required field
   793  	Title *string `min:"1" type:"string" required:"true" sensitive:"true"`
   794  }
   795  
   796  // String returns the string representation.
   797  //
   798  // API parameter values that are decorated as "sensitive" in the API will not
   799  // be included in the string output. The member name will be present, but the
   800  // value will be replaced with "sensitive".
   801  func (s PutAlternateContactInput) String() string {
   802  	return awsutil.Prettify(s)
   803  }
   804  
   805  // GoString returns the string representation.
   806  //
   807  // API parameter values that are decorated as "sensitive" in the API will not
   808  // be included in the string output. The member name will be present, but the
   809  // value will be replaced with "sensitive".
   810  func (s PutAlternateContactInput) GoString() string {
   811  	return s.String()
   812  }
   813  
   814  // Validate inspects the fields of the type to determine if they are valid.
   815  func (s *PutAlternateContactInput) Validate() error {
   816  	invalidParams := request.ErrInvalidParams{Context: "PutAlternateContactInput"}
   817  	if s.AlternateContactType == nil {
   818  		invalidParams.Add(request.NewErrParamRequired("AlternateContactType"))
   819  	}
   820  	if s.EmailAddress == nil {
   821  		invalidParams.Add(request.NewErrParamRequired("EmailAddress"))
   822  	}
   823  	if s.EmailAddress != nil && len(*s.EmailAddress) < 1 {
   824  		invalidParams.Add(request.NewErrParamMinLen("EmailAddress", 1))
   825  	}
   826  	if s.Name == nil {
   827  		invalidParams.Add(request.NewErrParamRequired("Name"))
   828  	}
   829  	if s.Name != nil && len(*s.Name) < 1 {
   830  		invalidParams.Add(request.NewErrParamMinLen("Name", 1))
   831  	}
   832  	if s.PhoneNumber == nil {
   833  		invalidParams.Add(request.NewErrParamRequired("PhoneNumber"))
   834  	}
   835  	if s.PhoneNumber != nil && len(*s.PhoneNumber) < 1 {
   836  		invalidParams.Add(request.NewErrParamMinLen("PhoneNumber", 1))
   837  	}
   838  	if s.Title == nil {
   839  		invalidParams.Add(request.NewErrParamRequired("Title"))
   840  	}
   841  	if s.Title != nil && len(*s.Title) < 1 {
   842  		invalidParams.Add(request.NewErrParamMinLen("Title", 1))
   843  	}
   844  
   845  	if invalidParams.Len() > 0 {
   846  		return invalidParams
   847  	}
   848  	return nil
   849  }
   850  
   851  // SetAccountId sets the AccountId field's value.
   852  func (s *PutAlternateContactInput) SetAccountId(v string) *PutAlternateContactInput {
   853  	s.AccountId = &v
   854  	return s
   855  }
   856  
   857  // SetAlternateContactType sets the AlternateContactType field's value.
   858  func (s *PutAlternateContactInput) SetAlternateContactType(v string) *PutAlternateContactInput {
   859  	s.AlternateContactType = &v
   860  	return s
   861  }
   862  
   863  // SetEmailAddress sets the EmailAddress field's value.
   864  func (s *PutAlternateContactInput) SetEmailAddress(v string) *PutAlternateContactInput {
   865  	s.EmailAddress = &v
   866  	return s
   867  }
   868  
   869  // SetName sets the Name field's value.
   870  func (s *PutAlternateContactInput) SetName(v string) *PutAlternateContactInput {
   871  	s.Name = &v
   872  	return s
   873  }
   874  
   875  // SetPhoneNumber sets the PhoneNumber field's value.
   876  func (s *PutAlternateContactInput) SetPhoneNumber(v string) *PutAlternateContactInput {
   877  	s.PhoneNumber = &v
   878  	return s
   879  }
   880  
   881  // SetTitle sets the Title field's value.
   882  func (s *PutAlternateContactInput) SetTitle(v string) *PutAlternateContactInput {
   883  	s.Title = &v
   884  	return s
   885  }
   886  
   887  type PutAlternateContactOutput struct {
   888  	_ struct{} `type:"structure" nopayload:"true"`
   889  }
   890  
   891  // String returns the string representation.
   892  //
   893  // API parameter values that are decorated as "sensitive" in the API will not
   894  // be included in the string output. The member name will be present, but the
   895  // value will be replaced with "sensitive".
   896  func (s PutAlternateContactOutput) String() string {
   897  	return awsutil.Prettify(s)
   898  }
   899  
   900  // GoString returns the string representation.
   901  //
   902  // API parameter values that are decorated as "sensitive" in the API will not
   903  // be included in the string output. The member name will be present, but the
   904  // value will be replaced with "sensitive".
   905  func (s PutAlternateContactOutput) GoString() string {
   906  	return s.String()
   907  }
   908  
   909  // The operation failed because it specified a resource that can't be found.
   910  type ResourceNotFoundException struct {
   911  	_            struct{}                  `type:"structure"`
   912  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
   913  
   914  	Message_ *string `locationName:"message" type:"string"`
   915  }
   916  
   917  // String returns the string representation.
   918  //
   919  // API parameter values that are decorated as "sensitive" in the API will not
   920  // be included in the string output. The member name will be present, but the
   921  // value will be replaced with "sensitive".
   922  func (s ResourceNotFoundException) String() string {
   923  	return awsutil.Prettify(s)
   924  }
   925  
   926  // GoString returns the string representation.
   927  //
   928  // API parameter values that are decorated as "sensitive" in the API will not
   929  // be included in the string output. The member name will be present, but the
   930  // value will be replaced with "sensitive".
   931  func (s ResourceNotFoundException) GoString() string {
   932  	return s.String()
   933  }
   934  
   935  func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error {
   936  	return &ResourceNotFoundException{
   937  		RespMetadata: v,
   938  	}
   939  }
   940  
   941  // Code returns the exception type name.
   942  func (s *ResourceNotFoundException) Code() string {
   943  	return "ResourceNotFoundException"
   944  }
   945  
   946  // Message returns the exception's message.
   947  func (s *ResourceNotFoundException) Message() string {
   948  	if s.Message_ != nil {
   949  		return *s.Message_
   950  	}
   951  	return ""
   952  }
   953  
   954  // OrigErr always returns nil, satisfies awserr.Error interface.
   955  func (s *ResourceNotFoundException) OrigErr() error {
   956  	return nil
   957  }
   958  
   959  func (s *ResourceNotFoundException) Error() string {
   960  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
   961  }
   962  
   963  // Status code returns the HTTP status code for the request's response error.
   964  func (s *ResourceNotFoundException) StatusCode() int {
   965  	return s.RespMetadata.StatusCode
   966  }
   967  
   968  // RequestID returns the service's response RequestID for request.
   969  func (s *ResourceNotFoundException) RequestID() string {
   970  	return s.RespMetadata.RequestID
   971  }
   972  
   973  // The operation failed because it was called too frequently and exceeded a
   974  // throttle limit.
   975  type TooManyRequestsException struct {
   976  	_            struct{}                  `type:"structure"`
   977  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
   978  
   979  	Message_ *string `locationName:"message" type:"string"`
   980  }
   981  
   982  // String returns the string representation.
   983  //
   984  // API parameter values that are decorated as "sensitive" in the API will not
   985  // be included in the string output. The member name will be present, but the
   986  // value will be replaced with "sensitive".
   987  func (s TooManyRequestsException) String() string {
   988  	return awsutil.Prettify(s)
   989  }
   990  
   991  // GoString returns the string representation.
   992  //
   993  // API parameter values that are decorated as "sensitive" in the API will not
   994  // be included in the string output. The member name will be present, but the
   995  // value will be replaced with "sensitive".
   996  func (s TooManyRequestsException) GoString() string {
   997  	return s.String()
   998  }
   999  
  1000  func newErrorTooManyRequestsException(v protocol.ResponseMetadata) error {
  1001  	return &TooManyRequestsException{
  1002  		RespMetadata: v,
  1003  	}
  1004  }
  1005  
  1006  // Code returns the exception type name.
  1007  func (s *TooManyRequestsException) Code() string {
  1008  	return "TooManyRequestsException"
  1009  }
  1010  
  1011  // Message returns the exception's message.
  1012  func (s *TooManyRequestsException) Message() string {
  1013  	if s.Message_ != nil {
  1014  		return *s.Message_
  1015  	}
  1016  	return ""
  1017  }
  1018  
  1019  // OrigErr always returns nil, satisfies awserr.Error interface.
  1020  func (s *TooManyRequestsException) OrigErr() error {
  1021  	return nil
  1022  }
  1023  
  1024  func (s *TooManyRequestsException) Error() string {
  1025  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  1026  }
  1027  
  1028  // Status code returns the HTTP status code for the request's response error.
  1029  func (s *TooManyRequestsException) StatusCode() int {
  1030  	return s.RespMetadata.StatusCode
  1031  }
  1032  
  1033  // RequestID returns the service's response RequestID for request.
  1034  func (s *TooManyRequestsException) RequestID() string {
  1035  	return s.RespMetadata.RequestID
  1036  }
  1037  
  1038  // The operation failed because one of the input parameters was invalid.
  1039  type ValidationException struct {
  1040  	_            struct{}                  `type:"structure"`
  1041  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  1042  
  1043  	Message_ *string `locationName:"message" type:"string"`
  1044  }
  1045  
  1046  // String returns the string representation.
  1047  //
  1048  // API parameter values that are decorated as "sensitive" in the API will not
  1049  // be included in the string output. The member name will be present, but the
  1050  // value will be replaced with "sensitive".
  1051  func (s ValidationException) String() string {
  1052  	return awsutil.Prettify(s)
  1053  }
  1054  
  1055  // GoString returns the string representation.
  1056  //
  1057  // API parameter values that are decorated as "sensitive" in the API will not
  1058  // be included in the string output. The member name will be present, but the
  1059  // value will be replaced with "sensitive".
  1060  func (s ValidationException) GoString() string {
  1061  	return s.String()
  1062  }
  1063  
  1064  func newErrorValidationException(v protocol.ResponseMetadata) error {
  1065  	return &ValidationException{
  1066  		RespMetadata: v,
  1067  	}
  1068  }
  1069  
  1070  // Code returns the exception type name.
  1071  func (s *ValidationException) Code() string {
  1072  	return "ValidationException"
  1073  }
  1074  
  1075  // Message returns the exception's message.
  1076  func (s *ValidationException) Message() string {
  1077  	if s.Message_ != nil {
  1078  		return *s.Message_
  1079  	}
  1080  	return ""
  1081  }
  1082  
  1083  // OrigErr always returns nil, satisfies awserr.Error interface.
  1084  func (s *ValidationException) OrigErr() error {
  1085  	return nil
  1086  }
  1087  
  1088  func (s *ValidationException) Error() string {
  1089  	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
  1090  }
  1091  
  1092  // Status code returns the HTTP status code for the request's response error.
  1093  func (s *ValidationException) StatusCode() int {
  1094  	return s.RespMetadata.StatusCode
  1095  }
  1096  
  1097  // RequestID returns the service's response RequestID for request.
  1098  func (s *ValidationException) RequestID() string {
  1099  	return s.RespMetadata.RequestID
  1100  }
  1101  
  1102  const (
  1103  	// AlternateContactTypeBilling is a AlternateContactType enum value
  1104  	AlternateContactTypeBilling = "BILLING"
  1105  
  1106  	// AlternateContactTypeOperations is a AlternateContactType enum value
  1107  	AlternateContactTypeOperations = "OPERATIONS"
  1108  
  1109  	// AlternateContactTypeSecurity is a AlternateContactType enum value
  1110  	AlternateContactTypeSecurity = "SECURITY"
  1111  )
  1112  
  1113  // AlternateContactType_Values returns all elements of the AlternateContactType enum
  1114  func AlternateContactType_Values() []string {
  1115  	return []string{
  1116  		AlternateContactTypeBilling,
  1117  		AlternateContactTypeOperations,
  1118  		AlternateContactTypeSecurity,
  1119  	}
  1120  }