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

     1  // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
     2  
     3  package macie
     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/jsonrpc"
    13  )
    14  
    15  const opAssociateMemberAccount = "AssociateMemberAccount"
    16  
    17  // AssociateMemberAccountRequest generates a "aws/request.Request" representing the
    18  // client's request for the AssociateMemberAccount 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 AssociateMemberAccount for more information on using the AssociateMemberAccount
    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 AssociateMemberAccountRequest method.
    33  //    req, resp := client.AssociateMemberAccountRequest(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/macie-2017-12-19/AssociateMemberAccount
    41  func (c *Macie) AssociateMemberAccountRequest(input *AssociateMemberAccountInput) (req *request.Request, output *AssociateMemberAccountOutput) {
    42  	op := &request.Operation{
    43  		Name:       opAssociateMemberAccount,
    44  		HTTPMethod: "POST",
    45  		HTTPPath:   "/",
    46  	}
    47  
    48  	if input == nil {
    49  		input = &AssociateMemberAccountInput{}
    50  	}
    51  
    52  	output = &AssociateMemberAccountOutput{}
    53  	req = c.newRequest(op, input, output)
    54  	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
    55  	return
    56  }
    57  
    58  // AssociateMemberAccount API operation for Amazon Macie.
    59  //
    60  // Associates a specified AWS account with Amazon Macie Classic as a member
    61  // account.
    62  //
    63  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
    64  // with awserr.Error's Code and Message methods to get detailed information about
    65  // the error.
    66  //
    67  // See the AWS API reference guide for Amazon Macie's
    68  // API operation AssociateMemberAccount for usage and error information.
    69  //
    70  // Returned Error Types:
    71  //   * InvalidInputException
    72  //   The request was rejected because an invalid or out-of-range value was supplied
    73  //   for an input parameter.
    74  //
    75  //   * LimitExceededException
    76  //   The request was rejected because it attempted to create resources beyond
    77  //   the current AWS account limits. The error code describes the limit exceeded.
    78  //
    79  //   * InternalException
    80  //   Internal server error.
    81  //
    82  // See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/AssociateMemberAccount
    83  func (c *Macie) AssociateMemberAccount(input *AssociateMemberAccountInput) (*AssociateMemberAccountOutput, error) {
    84  	req, out := c.AssociateMemberAccountRequest(input)
    85  	return out, req.Send()
    86  }
    87  
    88  // AssociateMemberAccountWithContext is the same as AssociateMemberAccount with the addition of
    89  // the ability to pass a context and additional request options.
    90  //
    91  // See AssociateMemberAccount for details on how to use this API operation.
    92  //
    93  // The context must be non-nil and will be used for request cancellation. If
    94  // the context is nil a panic will occur. In the future the SDK may create
    95  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
    96  // for more information on using Contexts.
    97  func (c *Macie) AssociateMemberAccountWithContext(ctx aws.Context, input *AssociateMemberAccountInput, opts ...request.Option) (*AssociateMemberAccountOutput, error) {
    98  	req, out := c.AssociateMemberAccountRequest(input)
    99  	req.SetContext(ctx)
   100  	req.ApplyOptions(opts...)
   101  	return out, req.Send()
   102  }
   103  
   104  const opAssociateS3Resources = "AssociateS3Resources"
   105  
   106  // AssociateS3ResourcesRequest generates a "aws/request.Request" representing the
   107  // client's request for the AssociateS3Resources operation. The "output" return
   108  // value will be populated with the request's response once the request completes
   109  // successfully.
   110  //
   111  // Use "Send" method on the returned Request to send the API call to the service.
   112  // the "output" return value is not valid until after Send returns without error.
   113  //
   114  // See AssociateS3Resources for more information on using the AssociateS3Resources
   115  // API call, and error handling.
   116  //
   117  // This method is useful when you want to inject custom logic or configuration
   118  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
   119  //
   120  //
   121  //    // Example sending a request using the AssociateS3ResourcesRequest method.
   122  //    req, resp := client.AssociateS3ResourcesRequest(params)
   123  //
   124  //    err := req.Send()
   125  //    if err == nil { // resp is now filled
   126  //        fmt.Println(resp)
   127  //    }
   128  //
   129  // See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/AssociateS3Resources
   130  func (c *Macie) AssociateS3ResourcesRequest(input *AssociateS3ResourcesInput) (req *request.Request, output *AssociateS3ResourcesOutput) {
   131  	op := &request.Operation{
   132  		Name:       opAssociateS3Resources,
   133  		HTTPMethod: "POST",
   134  		HTTPPath:   "/",
   135  	}
   136  
   137  	if input == nil {
   138  		input = &AssociateS3ResourcesInput{}
   139  	}
   140  
   141  	output = &AssociateS3ResourcesOutput{}
   142  	req = c.newRequest(op, input, output)
   143  	return
   144  }
   145  
   146  // AssociateS3Resources API operation for Amazon Macie.
   147  //
   148  // Associates specified S3 resources with Amazon Macie Classic for monitoring
   149  // and data classification. If memberAccountId isn't specified, the action associates
   150  // specified S3 resources with Macie Classic for the current Macie Classic administrator
   151  // account. If memberAccountId is specified, the action associates specified
   152  // S3 resources with Macie Classic for the specified member account.
   153  //
   154  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
   155  // with awserr.Error's Code and Message methods to get detailed information about
   156  // the error.
   157  //
   158  // See the AWS API reference guide for Amazon Macie's
   159  // API operation AssociateS3Resources for usage and error information.
   160  //
   161  // Returned Error Types:
   162  //   * InvalidInputException
   163  //   The request was rejected because an invalid or out-of-range value was supplied
   164  //   for an input parameter.
   165  //
   166  //   * AccessDeniedException
   167  //   You do not have required permissions to access the requested resource.
   168  //
   169  //   * LimitExceededException
   170  //   The request was rejected because it attempted to create resources beyond
   171  //   the current AWS account limits. The error code describes the limit exceeded.
   172  //
   173  //   * InternalException
   174  //   Internal server error.
   175  //
   176  // See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/AssociateS3Resources
   177  func (c *Macie) AssociateS3Resources(input *AssociateS3ResourcesInput) (*AssociateS3ResourcesOutput, error) {
   178  	req, out := c.AssociateS3ResourcesRequest(input)
   179  	return out, req.Send()
   180  }
   181  
   182  // AssociateS3ResourcesWithContext is the same as AssociateS3Resources with the addition of
   183  // the ability to pass a context and additional request options.
   184  //
   185  // See AssociateS3Resources for details on how to use this API operation.
   186  //
   187  // The context must be non-nil and will be used for request cancellation. If
   188  // the context is nil a panic will occur. In the future the SDK may create
   189  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
   190  // for more information on using Contexts.
   191  func (c *Macie) AssociateS3ResourcesWithContext(ctx aws.Context, input *AssociateS3ResourcesInput, opts ...request.Option) (*AssociateS3ResourcesOutput, error) {
   192  	req, out := c.AssociateS3ResourcesRequest(input)
   193  	req.SetContext(ctx)
   194  	req.ApplyOptions(opts...)
   195  	return out, req.Send()
   196  }
   197  
   198  const opDisassociateMemberAccount = "DisassociateMemberAccount"
   199  
   200  // DisassociateMemberAccountRequest generates a "aws/request.Request" representing the
   201  // client's request for the DisassociateMemberAccount operation. The "output" return
   202  // value will be populated with the request's response once the request completes
   203  // successfully.
   204  //
   205  // Use "Send" method on the returned Request to send the API call to the service.
   206  // the "output" return value is not valid until after Send returns without error.
   207  //
   208  // See DisassociateMemberAccount for more information on using the DisassociateMemberAccount
   209  // API call, and error handling.
   210  //
   211  // This method is useful when you want to inject custom logic or configuration
   212  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
   213  //
   214  //
   215  //    // Example sending a request using the DisassociateMemberAccountRequest method.
   216  //    req, resp := client.DisassociateMemberAccountRequest(params)
   217  //
   218  //    err := req.Send()
   219  //    if err == nil { // resp is now filled
   220  //        fmt.Println(resp)
   221  //    }
   222  //
   223  // See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/DisassociateMemberAccount
   224  func (c *Macie) DisassociateMemberAccountRequest(input *DisassociateMemberAccountInput) (req *request.Request, output *DisassociateMemberAccountOutput) {
   225  	op := &request.Operation{
   226  		Name:       opDisassociateMemberAccount,
   227  		HTTPMethod: "POST",
   228  		HTTPPath:   "/",
   229  	}
   230  
   231  	if input == nil {
   232  		input = &DisassociateMemberAccountInput{}
   233  	}
   234  
   235  	output = &DisassociateMemberAccountOutput{}
   236  	req = c.newRequest(op, input, output)
   237  	req.Handlers.Unmarshal.Swap(jsonrpc.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
   238  	return
   239  }
   240  
   241  // DisassociateMemberAccount API operation for Amazon Macie.
   242  //
   243  // Removes the specified member account from Amazon Macie Classic.
   244  //
   245  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
   246  // with awserr.Error's Code and Message methods to get detailed information about
   247  // the error.
   248  //
   249  // See the AWS API reference guide for Amazon Macie's
   250  // API operation DisassociateMemberAccount for usage and error information.
   251  //
   252  // Returned Error Types:
   253  //   * InvalidInputException
   254  //   The request was rejected because an invalid or out-of-range value was supplied
   255  //   for an input parameter.
   256  //
   257  //   * InternalException
   258  //   Internal server error.
   259  //
   260  // See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/DisassociateMemberAccount
   261  func (c *Macie) DisassociateMemberAccount(input *DisassociateMemberAccountInput) (*DisassociateMemberAccountOutput, error) {
   262  	req, out := c.DisassociateMemberAccountRequest(input)
   263  	return out, req.Send()
   264  }
   265  
   266  // DisassociateMemberAccountWithContext is the same as DisassociateMemberAccount with the addition of
   267  // the ability to pass a context and additional request options.
   268  //
   269  // See DisassociateMemberAccount for details on how to use this API operation.
   270  //
   271  // The context must be non-nil and will be used for request cancellation. If
   272  // the context is nil a panic will occur. In the future the SDK may create
   273  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
   274  // for more information on using Contexts.
   275  func (c *Macie) DisassociateMemberAccountWithContext(ctx aws.Context, input *DisassociateMemberAccountInput, opts ...request.Option) (*DisassociateMemberAccountOutput, error) {
   276  	req, out := c.DisassociateMemberAccountRequest(input)
   277  	req.SetContext(ctx)
   278  	req.ApplyOptions(opts...)
   279  	return out, req.Send()
   280  }
   281  
   282  const opDisassociateS3Resources = "DisassociateS3Resources"
   283  
   284  // DisassociateS3ResourcesRequest generates a "aws/request.Request" representing the
   285  // client's request for the DisassociateS3Resources operation. The "output" return
   286  // value will be populated with the request's response once the request completes
   287  // successfully.
   288  //
   289  // Use "Send" method on the returned Request to send the API call to the service.
   290  // the "output" return value is not valid until after Send returns without error.
   291  //
   292  // See DisassociateS3Resources for more information on using the DisassociateS3Resources
   293  // API call, and error handling.
   294  //
   295  // This method is useful when you want to inject custom logic or configuration
   296  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
   297  //
   298  //
   299  //    // Example sending a request using the DisassociateS3ResourcesRequest method.
   300  //    req, resp := client.DisassociateS3ResourcesRequest(params)
   301  //
   302  //    err := req.Send()
   303  //    if err == nil { // resp is now filled
   304  //        fmt.Println(resp)
   305  //    }
   306  //
   307  // See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/DisassociateS3Resources
   308  func (c *Macie) DisassociateS3ResourcesRequest(input *DisassociateS3ResourcesInput) (req *request.Request, output *DisassociateS3ResourcesOutput) {
   309  	op := &request.Operation{
   310  		Name:       opDisassociateS3Resources,
   311  		HTTPMethod: "POST",
   312  		HTTPPath:   "/",
   313  	}
   314  
   315  	if input == nil {
   316  		input = &DisassociateS3ResourcesInput{}
   317  	}
   318  
   319  	output = &DisassociateS3ResourcesOutput{}
   320  	req = c.newRequest(op, input, output)
   321  	return
   322  }
   323  
   324  // DisassociateS3Resources API operation for Amazon Macie.
   325  //
   326  // Removes specified S3 resources from being monitored by Amazon Macie Classic.
   327  // If memberAccountId isn't specified, the action removes specified S3 resources
   328  // from Macie Classic for the current Macie Classic administrator account. If
   329  // memberAccountId is specified, the action removes specified S3 resources from
   330  // Macie Classic for the specified member account.
   331  //
   332  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
   333  // with awserr.Error's Code and Message methods to get detailed information about
   334  // the error.
   335  //
   336  // See the AWS API reference guide for Amazon Macie's
   337  // API operation DisassociateS3Resources for usage and error information.
   338  //
   339  // Returned Error Types:
   340  //   * InvalidInputException
   341  //   The request was rejected because an invalid or out-of-range value was supplied
   342  //   for an input parameter.
   343  //
   344  //   * AccessDeniedException
   345  //   You do not have required permissions to access the requested resource.
   346  //
   347  //   * InternalException
   348  //   Internal server error.
   349  //
   350  // See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/DisassociateS3Resources
   351  func (c *Macie) DisassociateS3Resources(input *DisassociateS3ResourcesInput) (*DisassociateS3ResourcesOutput, error) {
   352  	req, out := c.DisassociateS3ResourcesRequest(input)
   353  	return out, req.Send()
   354  }
   355  
   356  // DisassociateS3ResourcesWithContext is the same as DisassociateS3Resources with the addition of
   357  // the ability to pass a context and additional request options.
   358  //
   359  // See DisassociateS3Resources for details on how to use this API operation.
   360  //
   361  // The context must be non-nil and will be used for request cancellation. If
   362  // the context is nil a panic will occur. In the future the SDK may create
   363  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
   364  // for more information on using Contexts.
   365  func (c *Macie) DisassociateS3ResourcesWithContext(ctx aws.Context, input *DisassociateS3ResourcesInput, opts ...request.Option) (*DisassociateS3ResourcesOutput, error) {
   366  	req, out := c.DisassociateS3ResourcesRequest(input)
   367  	req.SetContext(ctx)
   368  	req.ApplyOptions(opts...)
   369  	return out, req.Send()
   370  }
   371  
   372  const opListMemberAccounts = "ListMemberAccounts"
   373  
   374  // ListMemberAccountsRequest generates a "aws/request.Request" representing the
   375  // client's request for the ListMemberAccounts operation. The "output" return
   376  // value will be populated with the request's response once the request completes
   377  // successfully.
   378  //
   379  // Use "Send" method on the returned Request to send the API call to the service.
   380  // the "output" return value is not valid until after Send returns without error.
   381  //
   382  // See ListMemberAccounts for more information on using the ListMemberAccounts
   383  // API call, and error handling.
   384  //
   385  // This method is useful when you want to inject custom logic or configuration
   386  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
   387  //
   388  //
   389  //    // Example sending a request using the ListMemberAccountsRequest method.
   390  //    req, resp := client.ListMemberAccountsRequest(params)
   391  //
   392  //    err := req.Send()
   393  //    if err == nil { // resp is now filled
   394  //        fmt.Println(resp)
   395  //    }
   396  //
   397  // See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/ListMemberAccounts
   398  func (c *Macie) ListMemberAccountsRequest(input *ListMemberAccountsInput) (req *request.Request, output *ListMemberAccountsOutput) {
   399  	op := &request.Operation{
   400  		Name:       opListMemberAccounts,
   401  		HTTPMethod: "POST",
   402  		HTTPPath:   "/",
   403  		Paginator: &request.Paginator{
   404  			InputTokens:     []string{"nextToken"},
   405  			OutputTokens:    []string{"nextToken"},
   406  			LimitToken:      "maxResults",
   407  			TruncationToken: "",
   408  		},
   409  	}
   410  
   411  	if input == nil {
   412  		input = &ListMemberAccountsInput{}
   413  	}
   414  
   415  	output = &ListMemberAccountsOutput{}
   416  	req = c.newRequest(op, input, output)
   417  	return
   418  }
   419  
   420  // ListMemberAccounts API operation for Amazon Macie.
   421  //
   422  // Lists all Amazon Macie Classic member accounts for the current Macie Classic
   423  // administrator account.
   424  //
   425  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
   426  // with awserr.Error's Code and Message methods to get detailed information about
   427  // the error.
   428  //
   429  // See the AWS API reference guide for Amazon Macie's
   430  // API operation ListMemberAccounts for usage and error information.
   431  //
   432  // Returned Error Types:
   433  //   * InternalException
   434  //   Internal server error.
   435  //
   436  //   * InvalidInputException
   437  //   The request was rejected because an invalid or out-of-range value was supplied
   438  //   for an input parameter.
   439  //
   440  // See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/ListMemberAccounts
   441  func (c *Macie) ListMemberAccounts(input *ListMemberAccountsInput) (*ListMemberAccountsOutput, error) {
   442  	req, out := c.ListMemberAccountsRequest(input)
   443  	return out, req.Send()
   444  }
   445  
   446  // ListMemberAccountsWithContext is the same as ListMemberAccounts with the addition of
   447  // the ability to pass a context and additional request options.
   448  //
   449  // See ListMemberAccounts for details on how to use this API operation.
   450  //
   451  // The context must be non-nil and will be used for request cancellation. If
   452  // the context is nil a panic will occur. In the future the SDK may create
   453  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
   454  // for more information on using Contexts.
   455  func (c *Macie) ListMemberAccountsWithContext(ctx aws.Context, input *ListMemberAccountsInput, opts ...request.Option) (*ListMemberAccountsOutput, error) {
   456  	req, out := c.ListMemberAccountsRequest(input)
   457  	req.SetContext(ctx)
   458  	req.ApplyOptions(opts...)
   459  	return out, req.Send()
   460  }
   461  
   462  // ListMemberAccountsPages iterates over the pages of a ListMemberAccounts operation,
   463  // calling the "fn" function with the response data for each page. To stop
   464  // iterating, return false from the fn function.
   465  //
   466  // See ListMemberAccounts method for more information on how to use this operation.
   467  //
   468  // Note: This operation can generate multiple requests to a service.
   469  //
   470  //    // Example iterating over at most 3 pages of a ListMemberAccounts operation.
   471  //    pageNum := 0
   472  //    err := client.ListMemberAccountsPages(params,
   473  //        func(page *macie.ListMemberAccountsOutput, lastPage bool) bool {
   474  //            pageNum++
   475  //            fmt.Println(page)
   476  //            return pageNum <= 3
   477  //        })
   478  //
   479  func (c *Macie) ListMemberAccountsPages(input *ListMemberAccountsInput, fn func(*ListMemberAccountsOutput, bool) bool) error {
   480  	return c.ListMemberAccountsPagesWithContext(aws.BackgroundContext(), input, fn)
   481  }
   482  
   483  // ListMemberAccountsPagesWithContext same as ListMemberAccountsPages except
   484  // it takes a Context and allows setting request options on the pages.
   485  //
   486  // The context must be non-nil and will be used for request cancellation. If
   487  // the context is nil a panic will occur. In the future the SDK may create
   488  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
   489  // for more information on using Contexts.
   490  func (c *Macie) ListMemberAccountsPagesWithContext(ctx aws.Context, input *ListMemberAccountsInput, fn func(*ListMemberAccountsOutput, bool) bool, opts ...request.Option) error {
   491  	p := request.Pagination{
   492  		NewRequest: func() (*request.Request, error) {
   493  			var inCpy *ListMemberAccountsInput
   494  			if input != nil {
   495  				tmp := *input
   496  				inCpy = &tmp
   497  			}
   498  			req, _ := c.ListMemberAccountsRequest(inCpy)
   499  			req.SetContext(ctx)
   500  			req.ApplyOptions(opts...)
   501  			return req, nil
   502  		},
   503  	}
   504  
   505  	for p.Next() {
   506  		if !fn(p.Page().(*ListMemberAccountsOutput), !p.HasNextPage()) {
   507  			break
   508  		}
   509  	}
   510  
   511  	return p.Err()
   512  }
   513  
   514  const opListS3Resources = "ListS3Resources"
   515  
   516  // ListS3ResourcesRequest generates a "aws/request.Request" representing the
   517  // client's request for the ListS3Resources operation. The "output" return
   518  // value will be populated with the request's response once the request completes
   519  // successfully.
   520  //
   521  // Use "Send" method on the returned Request to send the API call to the service.
   522  // the "output" return value is not valid until after Send returns without error.
   523  //
   524  // See ListS3Resources for more information on using the ListS3Resources
   525  // API call, and error handling.
   526  //
   527  // This method is useful when you want to inject custom logic or configuration
   528  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
   529  //
   530  //
   531  //    // Example sending a request using the ListS3ResourcesRequest method.
   532  //    req, resp := client.ListS3ResourcesRequest(params)
   533  //
   534  //    err := req.Send()
   535  //    if err == nil { // resp is now filled
   536  //        fmt.Println(resp)
   537  //    }
   538  //
   539  // See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/ListS3Resources
   540  func (c *Macie) ListS3ResourcesRequest(input *ListS3ResourcesInput) (req *request.Request, output *ListS3ResourcesOutput) {
   541  	op := &request.Operation{
   542  		Name:       opListS3Resources,
   543  		HTTPMethod: "POST",
   544  		HTTPPath:   "/",
   545  		Paginator: &request.Paginator{
   546  			InputTokens:     []string{"nextToken"},
   547  			OutputTokens:    []string{"nextToken"},
   548  			LimitToken:      "maxResults",
   549  			TruncationToken: "",
   550  		},
   551  	}
   552  
   553  	if input == nil {
   554  		input = &ListS3ResourcesInput{}
   555  	}
   556  
   557  	output = &ListS3ResourcesOutput{}
   558  	req = c.newRequest(op, input, output)
   559  	return
   560  }
   561  
   562  // ListS3Resources API operation for Amazon Macie.
   563  //
   564  // Lists all the S3 resources associated with Amazon Macie Classic. If memberAccountId
   565  // isn't specified, the action lists the S3 resources associated with Macie
   566  // Classic for the current Macie Classic administrator account. If memberAccountId
   567  // is specified, the action lists the S3 resources associated with Macie Classic
   568  // for the specified member account.
   569  //
   570  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
   571  // with awserr.Error's Code and Message methods to get detailed information about
   572  // the error.
   573  //
   574  // See the AWS API reference guide for Amazon Macie's
   575  // API operation ListS3Resources for usage and error information.
   576  //
   577  // Returned Error Types:
   578  //   * InvalidInputException
   579  //   The request was rejected because an invalid or out-of-range value was supplied
   580  //   for an input parameter.
   581  //
   582  //   * AccessDeniedException
   583  //   You do not have required permissions to access the requested resource.
   584  //
   585  //   * InternalException
   586  //   Internal server error.
   587  //
   588  // See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/ListS3Resources
   589  func (c *Macie) ListS3Resources(input *ListS3ResourcesInput) (*ListS3ResourcesOutput, error) {
   590  	req, out := c.ListS3ResourcesRequest(input)
   591  	return out, req.Send()
   592  }
   593  
   594  // ListS3ResourcesWithContext is the same as ListS3Resources with the addition of
   595  // the ability to pass a context and additional request options.
   596  //
   597  // See ListS3Resources for details on how to use this API operation.
   598  //
   599  // The context must be non-nil and will be used for request cancellation. If
   600  // the context is nil a panic will occur. In the future the SDK may create
   601  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
   602  // for more information on using Contexts.
   603  func (c *Macie) ListS3ResourcesWithContext(ctx aws.Context, input *ListS3ResourcesInput, opts ...request.Option) (*ListS3ResourcesOutput, error) {
   604  	req, out := c.ListS3ResourcesRequest(input)
   605  	req.SetContext(ctx)
   606  	req.ApplyOptions(opts...)
   607  	return out, req.Send()
   608  }
   609  
   610  // ListS3ResourcesPages iterates over the pages of a ListS3Resources operation,
   611  // calling the "fn" function with the response data for each page. To stop
   612  // iterating, return false from the fn function.
   613  //
   614  // See ListS3Resources method for more information on how to use this operation.
   615  //
   616  // Note: This operation can generate multiple requests to a service.
   617  //
   618  //    // Example iterating over at most 3 pages of a ListS3Resources operation.
   619  //    pageNum := 0
   620  //    err := client.ListS3ResourcesPages(params,
   621  //        func(page *macie.ListS3ResourcesOutput, lastPage bool) bool {
   622  //            pageNum++
   623  //            fmt.Println(page)
   624  //            return pageNum <= 3
   625  //        })
   626  //
   627  func (c *Macie) ListS3ResourcesPages(input *ListS3ResourcesInput, fn func(*ListS3ResourcesOutput, bool) bool) error {
   628  	return c.ListS3ResourcesPagesWithContext(aws.BackgroundContext(), input, fn)
   629  }
   630  
   631  // ListS3ResourcesPagesWithContext same as ListS3ResourcesPages except
   632  // it takes a Context and allows setting request options on the pages.
   633  //
   634  // The context must be non-nil and will be used for request cancellation. If
   635  // the context is nil a panic will occur. In the future the SDK may create
   636  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
   637  // for more information on using Contexts.
   638  func (c *Macie) ListS3ResourcesPagesWithContext(ctx aws.Context, input *ListS3ResourcesInput, fn func(*ListS3ResourcesOutput, bool) bool, opts ...request.Option) error {
   639  	p := request.Pagination{
   640  		NewRequest: func() (*request.Request, error) {
   641  			var inCpy *ListS3ResourcesInput
   642  			if input != nil {
   643  				tmp := *input
   644  				inCpy = &tmp
   645  			}
   646  			req, _ := c.ListS3ResourcesRequest(inCpy)
   647  			req.SetContext(ctx)
   648  			req.ApplyOptions(opts...)
   649  			return req, nil
   650  		},
   651  	}
   652  
   653  	for p.Next() {
   654  		if !fn(p.Page().(*ListS3ResourcesOutput), !p.HasNextPage()) {
   655  			break
   656  		}
   657  	}
   658  
   659  	return p.Err()
   660  }
   661  
   662  const opUpdateS3Resources = "UpdateS3Resources"
   663  
   664  // UpdateS3ResourcesRequest generates a "aws/request.Request" representing the
   665  // client's request for the UpdateS3Resources operation. The "output" return
   666  // value will be populated with the request's response once the request completes
   667  // successfully.
   668  //
   669  // Use "Send" method on the returned Request to send the API call to the service.
   670  // the "output" return value is not valid until after Send returns without error.
   671  //
   672  // See UpdateS3Resources for more information on using the UpdateS3Resources
   673  // API call, and error handling.
   674  //
   675  // This method is useful when you want to inject custom logic or configuration
   676  // into the SDK's request lifecycle. Such as custom headers, or retry logic.
   677  //
   678  //
   679  //    // Example sending a request using the UpdateS3ResourcesRequest method.
   680  //    req, resp := client.UpdateS3ResourcesRequest(params)
   681  //
   682  //    err := req.Send()
   683  //    if err == nil { // resp is now filled
   684  //        fmt.Println(resp)
   685  //    }
   686  //
   687  // See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/UpdateS3Resources
   688  func (c *Macie) UpdateS3ResourcesRequest(input *UpdateS3ResourcesInput) (req *request.Request, output *UpdateS3ResourcesOutput) {
   689  	op := &request.Operation{
   690  		Name:       opUpdateS3Resources,
   691  		HTTPMethod: "POST",
   692  		HTTPPath:   "/",
   693  	}
   694  
   695  	if input == nil {
   696  		input = &UpdateS3ResourcesInput{}
   697  	}
   698  
   699  	output = &UpdateS3ResourcesOutput{}
   700  	req = c.newRequest(op, input, output)
   701  	return
   702  }
   703  
   704  // UpdateS3Resources API operation for Amazon Macie.
   705  //
   706  // Updates the classification types for the specified S3 resources. If memberAccountId
   707  // isn't specified, the action updates the classification types of the S3 resources
   708  // associated with Amazon Macie Classic for the current Macie Classic administrator
   709  // account. If memberAccountId is specified, the action updates the classification
   710  // types of the S3 resources associated with Macie Classic for the specified
   711  // member account.
   712  //
   713  // Returns awserr.Error for service API and SDK errors. Use runtime type assertions
   714  // with awserr.Error's Code and Message methods to get detailed information about
   715  // the error.
   716  //
   717  // See the AWS API reference guide for Amazon Macie's
   718  // API operation UpdateS3Resources for usage and error information.
   719  //
   720  // Returned Error Types:
   721  //   * InvalidInputException
   722  //   The request was rejected because an invalid or out-of-range value was supplied
   723  //   for an input parameter.
   724  //
   725  //   * AccessDeniedException
   726  //   You do not have required permissions to access the requested resource.
   727  //
   728  //   * InternalException
   729  //   Internal server error.
   730  //
   731  // See also, https://docs.aws.amazon.com/goto/WebAPI/macie-2017-12-19/UpdateS3Resources
   732  func (c *Macie) UpdateS3Resources(input *UpdateS3ResourcesInput) (*UpdateS3ResourcesOutput, error) {
   733  	req, out := c.UpdateS3ResourcesRequest(input)
   734  	return out, req.Send()
   735  }
   736  
   737  // UpdateS3ResourcesWithContext is the same as UpdateS3Resources with the addition of
   738  // the ability to pass a context and additional request options.
   739  //
   740  // See UpdateS3Resources for details on how to use this API operation.
   741  //
   742  // The context must be non-nil and will be used for request cancellation. If
   743  // the context is nil a panic will occur. In the future the SDK may create
   744  // sub-contexts for http.Requests. See https://golang.org/pkg/context/
   745  // for more information on using Contexts.
   746  func (c *Macie) UpdateS3ResourcesWithContext(ctx aws.Context, input *UpdateS3ResourcesInput, opts ...request.Option) (*UpdateS3ResourcesOutput, error) {
   747  	req, out := c.UpdateS3ResourcesRequest(input)
   748  	req.SetContext(ctx)
   749  	req.ApplyOptions(opts...)
   750  	return out, req.Send()
   751  }
   752  
   753  // You do not have required permissions to access the requested resource.
   754  type AccessDeniedException struct {
   755  	_            struct{}                  `type:"structure"`
   756  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
   757  
   758  	Message_ *string `locationName:"message" type:"string"`
   759  
   760  	// Resource type that caused the exception
   761  	ResourceType *string `locationName:"resourceType" type:"string"`
   762  }
   763  
   764  // String 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 AccessDeniedException) String() string {
   770  	return awsutil.Prettify(s)
   771  }
   772  
   773  // GoString returns the string representation.
   774  //
   775  // API parameter values that are decorated as "sensitive" in the API will not
   776  // be included in the string output. The member name will be present, but the
   777  // value will be replaced with "sensitive".
   778  func (s AccessDeniedException) GoString() string {
   779  	return s.String()
   780  }
   781  
   782  func newErrorAccessDeniedException(v protocol.ResponseMetadata) error {
   783  	return &AccessDeniedException{
   784  		RespMetadata: v,
   785  	}
   786  }
   787  
   788  // Code returns the exception type name.
   789  func (s *AccessDeniedException) Code() string {
   790  	return "AccessDeniedException"
   791  }
   792  
   793  // Message returns the exception's message.
   794  func (s *AccessDeniedException) Message() string {
   795  	if s.Message_ != nil {
   796  		return *s.Message_
   797  	}
   798  	return ""
   799  }
   800  
   801  // OrigErr always returns nil, satisfies awserr.Error interface.
   802  func (s *AccessDeniedException) OrigErr() error {
   803  	return nil
   804  }
   805  
   806  func (s *AccessDeniedException) Error() string {
   807  	return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
   808  }
   809  
   810  // Status code returns the HTTP status code for the request's response error.
   811  func (s *AccessDeniedException) StatusCode() int {
   812  	return s.RespMetadata.StatusCode
   813  }
   814  
   815  // RequestID returns the service's response RequestID for request.
   816  func (s *AccessDeniedException) RequestID() string {
   817  	return s.RespMetadata.RequestID
   818  }
   819  
   820  type AssociateMemberAccountInput struct {
   821  	_ struct{} `type:"structure"`
   822  
   823  	// The ID of the AWS account that you want to associate with Amazon Macie Classic
   824  	// as a member account.
   825  	//
   826  	// MemberAccountId is a required field
   827  	MemberAccountId *string `locationName:"memberAccountId" type:"string" required:"true"`
   828  }
   829  
   830  // String returns the string representation.
   831  //
   832  // API parameter values that are decorated as "sensitive" in the API will not
   833  // be included in the string output. The member name will be present, but the
   834  // value will be replaced with "sensitive".
   835  func (s AssociateMemberAccountInput) String() string {
   836  	return awsutil.Prettify(s)
   837  }
   838  
   839  // GoString returns the string representation.
   840  //
   841  // API parameter values that are decorated as "sensitive" in the API will not
   842  // be included in the string output. The member name will be present, but the
   843  // value will be replaced with "sensitive".
   844  func (s AssociateMemberAccountInput) GoString() string {
   845  	return s.String()
   846  }
   847  
   848  // Validate inspects the fields of the type to determine if they are valid.
   849  func (s *AssociateMemberAccountInput) Validate() error {
   850  	invalidParams := request.ErrInvalidParams{Context: "AssociateMemberAccountInput"}
   851  	if s.MemberAccountId == nil {
   852  		invalidParams.Add(request.NewErrParamRequired("MemberAccountId"))
   853  	}
   854  
   855  	if invalidParams.Len() > 0 {
   856  		return invalidParams
   857  	}
   858  	return nil
   859  }
   860  
   861  // SetMemberAccountId sets the MemberAccountId field's value.
   862  func (s *AssociateMemberAccountInput) SetMemberAccountId(v string) *AssociateMemberAccountInput {
   863  	s.MemberAccountId = &v
   864  	return s
   865  }
   866  
   867  type AssociateMemberAccountOutput struct {
   868  	_ struct{} `type:"structure"`
   869  }
   870  
   871  // String returns the string representation.
   872  //
   873  // API parameter values that are decorated as "sensitive" in the API will not
   874  // be included in the string output. The member name will be present, but the
   875  // value will be replaced with "sensitive".
   876  func (s AssociateMemberAccountOutput) String() string {
   877  	return awsutil.Prettify(s)
   878  }
   879  
   880  // GoString returns the string representation.
   881  //
   882  // API parameter values that are decorated as "sensitive" in the API will not
   883  // be included in the string output. The member name will be present, but the
   884  // value will be replaced with "sensitive".
   885  func (s AssociateMemberAccountOutput) GoString() string {
   886  	return s.String()
   887  }
   888  
   889  type AssociateS3ResourcesInput struct {
   890  	_ struct{} `type:"structure"`
   891  
   892  	// The ID of the Amazon Macie Classic member account whose resources you want
   893  	// to associate with Macie Classic.
   894  	MemberAccountId *string `locationName:"memberAccountId" type:"string"`
   895  
   896  	// The S3 resources that you want to associate with Amazon Macie Classic for
   897  	// monitoring and data classification.
   898  	//
   899  	// S3Resources is a required field
   900  	S3Resources []*S3ResourceClassification `locationName:"s3Resources" type:"list" required:"true"`
   901  }
   902  
   903  // String returns the string representation.
   904  //
   905  // API parameter values that are decorated as "sensitive" in the API will not
   906  // be included in the string output. The member name will be present, but the
   907  // value will be replaced with "sensitive".
   908  func (s AssociateS3ResourcesInput) String() string {
   909  	return awsutil.Prettify(s)
   910  }
   911  
   912  // GoString returns the string representation.
   913  //
   914  // API parameter values that are decorated as "sensitive" in the API will not
   915  // be included in the string output. The member name will be present, but the
   916  // value will be replaced with "sensitive".
   917  func (s AssociateS3ResourcesInput) GoString() string {
   918  	return s.String()
   919  }
   920  
   921  // Validate inspects the fields of the type to determine if they are valid.
   922  func (s *AssociateS3ResourcesInput) Validate() error {
   923  	invalidParams := request.ErrInvalidParams{Context: "AssociateS3ResourcesInput"}
   924  	if s.S3Resources == nil {
   925  		invalidParams.Add(request.NewErrParamRequired("S3Resources"))
   926  	}
   927  	if s.S3Resources != nil {
   928  		for i, v := range s.S3Resources {
   929  			if v == nil {
   930  				continue
   931  			}
   932  			if err := v.Validate(); err != nil {
   933  				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "S3Resources", i), err.(request.ErrInvalidParams))
   934  			}
   935  		}
   936  	}
   937  
   938  	if invalidParams.Len() > 0 {
   939  		return invalidParams
   940  	}
   941  	return nil
   942  }
   943  
   944  // SetMemberAccountId sets the MemberAccountId field's value.
   945  func (s *AssociateS3ResourcesInput) SetMemberAccountId(v string) *AssociateS3ResourcesInput {
   946  	s.MemberAccountId = &v
   947  	return s
   948  }
   949  
   950  // SetS3Resources sets the S3Resources field's value.
   951  func (s *AssociateS3ResourcesInput) SetS3Resources(v []*S3ResourceClassification) *AssociateS3ResourcesInput {
   952  	s.S3Resources = v
   953  	return s
   954  }
   955  
   956  type AssociateS3ResourcesOutput struct {
   957  	_ struct{} `type:"structure"`
   958  
   959  	// S3 resources that couldn't be associated with Amazon Macie Classic. An error
   960  	// code and an error message are provided for each failed item.
   961  	FailedS3Resources []*FailedS3Resource `locationName:"failedS3Resources" type:"list"`
   962  }
   963  
   964  // String returns the string representation.
   965  //
   966  // API parameter values that are decorated as "sensitive" in the API will not
   967  // be included in the string output. The member name will be present, but the
   968  // value will be replaced with "sensitive".
   969  func (s AssociateS3ResourcesOutput) String() string {
   970  	return awsutil.Prettify(s)
   971  }
   972  
   973  // GoString returns the string representation.
   974  //
   975  // API parameter values that are decorated as "sensitive" in the API will not
   976  // be included in the string output. The member name will be present, but the
   977  // value will be replaced with "sensitive".
   978  func (s AssociateS3ResourcesOutput) GoString() string {
   979  	return s.String()
   980  }
   981  
   982  // SetFailedS3Resources sets the FailedS3Resources field's value.
   983  func (s *AssociateS3ResourcesOutput) SetFailedS3Resources(v []*FailedS3Resource) *AssociateS3ResourcesOutput {
   984  	s.FailedS3Resources = v
   985  	return s
   986  }
   987  
   988  // The classification type that Amazon Macie Classic applies to the associated
   989  // S3 resources.
   990  type ClassificationType struct {
   991  	_ struct{} `type:"structure"`
   992  
   993  	// A continuous classification of the objects that are added to a specified
   994  	// S3 bucket. Amazon Macie Classic begins performing continuous classification
   995  	// after a bucket is successfully associated with Macie Classic.
   996  	//
   997  	// Continuous is a required field
   998  	Continuous *string `locationName:"continuous" type:"string" required:"true" enum:"S3ContinuousClassificationType"`
   999  
  1000  	// A one-time classification of all of the existing objects in a specified S3
  1001  	// bucket.
  1002  	//
  1003  	// OneTime is a required field
  1004  	OneTime *string `locationName:"oneTime" type:"string" required:"true" enum:"S3OneTimeClassificationType"`
  1005  }
  1006  
  1007  // String returns the string representation.
  1008  //
  1009  // API parameter values that are decorated as "sensitive" in the API will not
  1010  // be included in the string output. The member name will be present, but the
  1011  // value will be replaced with "sensitive".
  1012  func (s ClassificationType) String() string {
  1013  	return awsutil.Prettify(s)
  1014  }
  1015  
  1016  // GoString returns the string representation.
  1017  //
  1018  // API parameter values that are decorated as "sensitive" in the API will not
  1019  // be included in the string output. The member name will be present, but the
  1020  // value will be replaced with "sensitive".
  1021  func (s ClassificationType) GoString() string {
  1022  	return s.String()
  1023  }
  1024  
  1025  // Validate inspects the fields of the type to determine if they are valid.
  1026  func (s *ClassificationType) Validate() error {
  1027  	invalidParams := request.ErrInvalidParams{Context: "ClassificationType"}
  1028  	if s.Continuous == nil {
  1029  		invalidParams.Add(request.NewErrParamRequired("Continuous"))
  1030  	}
  1031  	if s.OneTime == nil {
  1032  		invalidParams.Add(request.NewErrParamRequired("OneTime"))
  1033  	}
  1034  
  1035  	if invalidParams.Len() > 0 {
  1036  		return invalidParams
  1037  	}
  1038  	return nil
  1039  }
  1040  
  1041  // SetContinuous sets the Continuous field's value.
  1042  func (s *ClassificationType) SetContinuous(v string) *ClassificationType {
  1043  	s.Continuous = &v
  1044  	return s
  1045  }
  1046  
  1047  // SetOneTime sets the OneTime field's value.
  1048  func (s *ClassificationType) SetOneTime(v string) *ClassificationType {
  1049  	s.OneTime = &v
  1050  	return s
  1051  }
  1052  
  1053  // The classification type that Amazon Macie Classic applies to the associated
  1054  // S3 resources. At least one of the classification types (oneTime or continuous)
  1055  // must be specified.
  1056  type ClassificationTypeUpdate struct {
  1057  	_ struct{} `type:"structure"`
  1058  
  1059  	// A continuous classification of the objects that are added to a specified
  1060  	// S3 bucket. Amazon Macie Classic begins performing continuous classification
  1061  	// after a bucket is successfully associated with Macie Classic.
  1062  	Continuous *string `locationName:"continuous" type:"string" enum:"S3ContinuousClassificationType"`
  1063  
  1064  	// A one-time classification of all of the existing objects in a specified S3
  1065  	// bucket.
  1066  	OneTime *string `locationName:"oneTime" type:"string" enum:"S3OneTimeClassificationType"`
  1067  }
  1068  
  1069  // String returns the string representation.
  1070  //
  1071  // API parameter values that are decorated as "sensitive" in the API will not
  1072  // be included in the string output. The member name will be present, but the
  1073  // value will be replaced with "sensitive".
  1074  func (s ClassificationTypeUpdate) String() string {
  1075  	return awsutil.Prettify(s)
  1076  }
  1077  
  1078  // GoString returns the string representation.
  1079  //
  1080  // API parameter values that are decorated as "sensitive" in the API will not
  1081  // be included in the string output. The member name will be present, but the
  1082  // value will be replaced with "sensitive".
  1083  func (s ClassificationTypeUpdate) GoString() string {
  1084  	return s.String()
  1085  }
  1086  
  1087  // SetContinuous sets the Continuous field's value.
  1088  func (s *ClassificationTypeUpdate) SetContinuous(v string) *ClassificationTypeUpdate {
  1089  	s.Continuous = &v
  1090  	return s
  1091  }
  1092  
  1093  // SetOneTime sets the OneTime field's value.
  1094  func (s *ClassificationTypeUpdate) SetOneTime(v string) *ClassificationTypeUpdate {
  1095  	s.OneTime = &v
  1096  	return s
  1097  }
  1098  
  1099  type DisassociateMemberAccountInput struct {
  1100  	_ struct{} `type:"structure"`
  1101  
  1102  	// The ID of the member account that you want to remove from Amazon Macie Classic.
  1103  	//
  1104  	// MemberAccountId is a required field
  1105  	MemberAccountId *string `locationName:"memberAccountId" type:"string" required:"true"`
  1106  }
  1107  
  1108  // String returns the string representation.
  1109  //
  1110  // API parameter values that are decorated as "sensitive" in the API will not
  1111  // be included in the string output. The member name will be present, but the
  1112  // value will be replaced with "sensitive".
  1113  func (s DisassociateMemberAccountInput) String() string {
  1114  	return awsutil.Prettify(s)
  1115  }
  1116  
  1117  // GoString returns the string representation.
  1118  //
  1119  // API parameter values that are decorated as "sensitive" in the API will not
  1120  // be included in the string output. The member name will be present, but the
  1121  // value will be replaced with "sensitive".
  1122  func (s DisassociateMemberAccountInput) GoString() string {
  1123  	return s.String()
  1124  }
  1125  
  1126  // Validate inspects the fields of the type to determine if they are valid.
  1127  func (s *DisassociateMemberAccountInput) Validate() error {
  1128  	invalidParams := request.ErrInvalidParams{Context: "DisassociateMemberAccountInput"}
  1129  	if s.MemberAccountId == nil {
  1130  		invalidParams.Add(request.NewErrParamRequired("MemberAccountId"))
  1131  	}
  1132  
  1133  	if invalidParams.Len() > 0 {
  1134  		return invalidParams
  1135  	}
  1136  	return nil
  1137  }
  1138  
  1139  // SetMemberAccountId sets the MemberAccountId field's value.
  1140  func (s *DisassociateMemberAccountInput) SetMemberAccountId(v string) *DisassociateMemberAccountInput {
  1141  	s.MemberAccountId = &v
  1142  	return s
  1143  }
  1144  
  1145  type DisassociateMemberAccountOutput struct {
  1146  	_ struct{} `type:"structure"`
  1147  }
  1148  
  1149  // String returns the string representation.
  1150  //
  1151  // API parameter values that are decorated as "sensitive" in the API will not
  1152  // be included in the string output. The member name will be present, but the
  1153  // value will be replaced with "sensitive".
  1154  func (s DisassociateMemberAccountOutput) String() string {
  1155  	return awsutil.Prettify(s)
  1156  }
  1157  
  1158  // GoString returns the string representation.
  1159  //
  1160  // API parameter values that are decorated as "sensitive" in the API will not
  1161  // be included in the string output. The member name will be present, but the
  1162  // value will be replaced with "sensitive".
  1163  func (s DisassociateMemberAccountOutput) GoString() string {
  1164  	return s.String()
  1165  }
  1166  
  1167  type DisassociateS3ResourcesInput struct {
  1168  	_ struct{} `type:"structure"`
  1169  
  1170  	// The S3 resources (buckets or prefixes) that you want to remove from being
  1171  	// monitored and classified by Amazon Macie Classic.
  1172  	//
  1173  	// AssociatedS3Resources is a required field
  1174  	AssociatedS3Resources []*S3Resource `locationName:"associatedS3Resources" type:"list" required:"true"`
  1175  
  1176  	// The ID of the Amazon Macie Classic member account whose resources you want
  1177  	// to remove from being monitored by Macie Classic.
  1178  	MemberAccountId *string `locationName:"memberAccountId" type:"string"`
  1179  }
  1180  
  1181  // String returns the string representation.
  1182  //
  1183  // API parameter values that are decorated as "sensitive" in the API will not
  1184  // be included in the string output. The member name will be present, but the
  1185  // value will be replaced with "sensitive".
  1186  func (s DisassociateS3ResourcesInput) String() string {
  1187  	return awsutil.Prettify(s)
  1188  }
  1189  
  1190  // GoString returns the string representation.
  1191  //
  1192  // API parameter values that are decorated as "sensitive" in the API will not
  1193  // be included in the string output. The member name will be present, but the
  1194  // value will be replaced with "sensitive".
  1195  func (s DisassociateS3ResourcesInput) GoString() string {
  1196  	return s.String()
  1197  }
  1198  
  1199  // Validate inspects the fields of the type to determine if they are valid.
  1200  func (s *DisassociateS3ResourcesInput) Validate() error {
  1201  	invalidParams := request.ErrInvalidParams{Context: "DisassociateS3ResourcesInput"}
  1202  	if s.AssociatedS3Resources == nil {
  1203  		invalidParams.Add(request.NewErrParamRequired("AssociatedS3Resources"))
  1204  	}
  1205  	if s.AssociatedS3Resources != nil {
  1206  		for i, v := range s.AssociatedS3Resources {
  1207  			if v == nil {
  1208  				continue
  1209  			}
  1210  			if err := v.Validate(); err != nil {
  1211  				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "AssociatedS3Resources", i), err.(request.ErrInvalidParams))
  1212  			}
  1213  		}
  1214  	}
  1215  
  1216  	if invalidParams.Len() > 0 {
  1217  		return invalidParams
  1218  	}
  1219  	return nil
  1220  }
  1221  
  1222  // SetAssociatedS3Resources sets the AssociatedS3Resources field's value.
  1223  func (s *DisassociateS3ResourcesInput) SetAssociatedS3Resources(v []*S3Resource) *DisassociateS3ResourcesInput {
  1224  	s.AssociatedS3Resources = v
  1225  	return s
  1226  }
  1227  
  1228  // SetMemberAccountId sets the MemberAccountId field's value.
  1229  func (s *DisassociateS3ResourcesInput) SetMemberAccountId(v string) *DisassociateS3ResourcesInput {
  1230  	s.MemberAccountId = &v
  1231  	return s
  1232  }
  1233  
  1234  type DisassociateS3ResourcesOutput struct {
  1235  	_ struct{} `type:"structure"`
  1236  
  1237  	// S3 resources that couldn't be removed from being monitored and classified
  1238  	// by Amazon Macie Classic. An error code and an error message are provided
  1239  	// for each failed item.
  1240  	FailedS3Resources []*FailedS3Resource `locationName:"failedS3Resources" type:"list"`
  1241  }
  1242  
  1243  // String returns the string representation.
  1244  //
  1245  // API parameter values that are decorated as "sensitive" in the API will not
  1246  // be included in the string output. The member name will be present, but the
  1247  // value will be replaced with "sensitive".
  1248  func (s DisassociateS3ResourcesOutput) String() string {
  1249  	return awsutil.Prettify(s)
  1250  }
  1251  
  1252  // GoString returns the string representation.
  1253  //
  1254  // API parameter values that are decorated as "sensitive" in the API will not
  1255  // be included in the string output. The member name will be present, but the
  1256  // value will be replaced with "sensitive".
  1257  func (s DisassociateS3ResourcesOutput) GoString() string {
  1258  	return s.String()
  1259  }
  1260  
  1261  // SetFailedS3Resources sets the FailedS3Resources field's value.
  1262  func (s *DisassociateS3ResourcesOutput) SetFailedS3Resources(v []*FailedS3Resource) *DisassociateS3ResourcesOutput {
  1263  	s.FailedS3Resources = v
  1264  	return s
  1265  }
  1266  
  1267  // Includes details about the failed S3 resources.
  1268  type FailedS3Resource struct {
  1269  	_ struct{} `type:"structure"`
  1270  
  1271  	// The status code of a failed item.
  1272  	ErrorCode *string `locationName:"errorCode" type:"string"`
  1273  
  1274  	// The error message of a failed item.
  1275  	ErrorMessage *string `locationName:"errorMessage" type:"string"`
  1276  
  1277  	// The failed S3 resources.
  1278  	FailedItem *S3Resource `locationName:"failedItem" type:"structure"`
  1279  }
  1280  
  1281  // String returns the string representation.
  1282  //
  1283  // API parameter values that are decorated as "sensitive" in the API will not
  1284  // be included in the string output. The member name will be present, but the
  1285  // value will be replaced with "sensitive".
  1286  func (s FailedS3Resource) String() string {
  1287  	return awsutil.Prettify(s)
  1288  }
  1289  
  1290  // GoString returns the string representation.
  1291  //
  1292  // API parameter values that are decorated as "sensitive" in the API will not
  1293  // be included in the string output. The member name will be present, but the
  1294  // value will be replaced with "sensitive".
  1295  func (s FailedS3Resource) GoString() string {
  1296  	return s.String()
  1297  }
  1298  
  1299  // SetErrorCode sets the ErrorCode field's value.
  1300  func (s *FailedS3Resource) SetErrorCode(v string) *FailedS3Resource {
  1301  	s.ErrorCode = &v
  1302  	return s
  1303  }
  1304  
  1305  // SetErrorMessage sets the ErrorMessage field's value.
  1306  func (s *FailedS3Resource) SetErrorMessage(v string) *FailedS3Resource {
  1307  	s.ErrorMessage = &v
  1308  	return s
  1309  }
  1310  
  1311  // SetFailedItem sets the FailedItem field's value.
  1312  func (s *FailedS3Resource) SetFailedItem(v *S3Resource) *FailedS3Resource {
  1313  	s.FailedItem = v
  1314  	return s
  1315  }
  1316  
  1317  // Internal server error.
  1318  type InternalException struct {
  1319  	_            struct{}                  `type:"structure"`
  1320  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  1321  
  1322  	// Error code for the exception
  1323  	ErrorCode *string `locationName:"errorCode" type:"string"`
  1324  
  1325  	Message_ *string `locationName:"message" type:"string"`
  1326  }
  1327  
  1328  // String returns the string representation.
  1329  //
  1330  // API parameter values that are decorated as "sensitive" in the API will not
  1331  // be included in the string output. The member name will be present, but the
  1332  // value will be replaced with "sensitive".
  1333  func (s InternalException) String() string {
  1334  	return awsutil.Prettify(s)
  1335  }
  1336  
  1337  // GoString returns the string representation.
  1338  //
  1339  // API parameter values that are decorated as "sensitive" in the API will not
  1340  // be included in the string output. The member name will be present, but the
  1341  // value will be replaced with "sensitive".
  1342  func (s InternalException) GoString() string {
  1343  	return s.String()
  1344  }
  1345  
  1346  func newErrorInternalException(v protocol.ResponseMetadata) error {
  1347  	return &InternalException{
  1348  		RespMetadata: v,
  1349  	}
  1350  }
  1351  
  1352  // Code returns the exception type name.
  1353  func (s *InternalException) Code() string {
  1354  	return "InternalException"
  1355  }
  1356  
  1357  // Message returns the exception's message.
  1358  func (s *InternalException) Message() string {
  1359  	if s.Message_ != nil {
  1360  		return *s.Message_
  1361  	}
  1362  	return ""
  1363  }
  1364  
  1365  // OrigErr always returns nil, satisfies awserr.Error interface.
  1366  func (s *InternalException) OrigErr() error {
  1367  	return nil
  1368  }
  1369  
  1370  func (s *InternalException) Error() string {
  1371  	return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
  1372  }
  1373  
  1374  // Status code returns the HTTP status code for the request's response error.
  1375  func (s *InternalException) StatusCode() int {
  1376  	return s.RespMetadata.StatusCode
  1377  }
  1378  
  1379  // RequestID returns the service's response RequestID for request.
  1380  func (s *InternalException) RequestID() string {
  1381  	return s.RespMetadata.RequestID
  1382  }
  1383  
  1384  // The request was rejected because an invalid or out-of-range value was supplied
  1385  // for an input parameter.
  1386  type InvalidInputException struct {
  1387  	_            struct{}                  `type:"structure"`
  1388  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  1389  
  1390  	// Error code for the exception
  1391  	ErrorCode *string `locationName:"errorCode" type:"string"`
  1392  
  1393  	// Field that has invalid input
  1394  	FieldName *string `locationName:"fieldName" type:"string"`
  1395  
  1396  	Message_ *string `locationName:"message" type:"string"`
  1397  }
  1398  
  1399  // String returns the string representation.
  1400  //
  1401  // API parameter values that are decorated as "sensitive" in the API will not
  1402  // be included in the string output. The member name will be present, but the
  1403  // value will be replaced with "sensitive".
  1404  func (s InvalidInputException) String() string {
  1405  	return awsutil.Prettify(s)
  1406  }
  1407  
  1408  // GoString returns the string representation.
  1409  //
  1410  // API parameter values that are decorated as "sensitive" in the API will not
  1411  // be included in the string output. The member name will be present, but the
  1412  // value will be replaced with "sensitive".
  1413  func (s InvalidInputException) GoString() string {
  1414  	return s.String()
  1415  }
  1416  
  1417  func newErrorInvalidInputException(v protocol.ResponseMetadata) error {
  1418  	return &InvalidInputException{
  1419  		RespMetadata: v,
  1420  	}
  1421  }
  1422  
  1423  // Code returns the exception type name.
  1424  func (s *InvalidInputException) Code() string {
  1425  	return "InvalidInputException"
  1426  }
  1427  
  1428  // Message returns the exception's message.
  1429  func (s *InvalidInputException) Message() string {
  1430  	if s.Message_ != nil {
  1431  		return *s.Message_
  1432  	}
  1433  	return ""
  1434  }
  1435  
  1436  // OrigErr always returns nil, satisfies awserr.Error interface.
  1437  func (s *InvalidInputException) OrigErr() error {
  1438  	return nil
  1439  }
  1440  
  1441  func (s *InvalidInputException) Error() string {
  1442  	return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
  1443  }
  1444  
  1445  // Status code returns the HTTP status code for the request's response error.
  1446  func (s *InvalidInputException) StatusCode() int {
  1447  	return s.RespMetadata.StatusCode
  1448  }
  1449  
  1450  // RequestID returns the service's response RequestID for request.
  1451  func (s *InvalidInputException) RequestID() string {
  1452  	return s.RespMetadata.RequestID
  1453  }
  1454  
  1455  // The request was rejected because it attempted to create resources beyond
  1456  // the current AWS account limits. The error code describes the limit exceeded.
  1457  type LimitExceededException struct {
  1458  	_            struct{}                  `type:"structure"`
  1459  	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
  1460  
  1461  	// Error code for the exception
  1462  	ErrorCode *string `locationName:"errorCode" type:"string"`
  1463  
  1464  	Message_ *string `locationName:"message" type:"string"`
  1465  
  1466  	// Resource type that caused the exception
  1467  	ResourceType *string `locationName:"resourceType" type:"string"`
  1468  }
  1469  
  1470  // String returns the string representation.
  1471  //
  1472  // API parameter values that are decorated as "sensitive" in the API will not
  1473  // be included in the string output. The member name will be present, but the
  1474  // value will be replaced with "sensitive".
  1475  func (s LimitExceededException) String() string {
  1476  	return awsutil.Prettify(s)
  1477  }
  1478  
  1479  // GoString returns the string representation.
  1480  //
  1481  // API parameter values that are decorated as "sensitive" in the API will not
  1482  // be included in the string output. The member name will be present, but the
  1483  // value will be replaced with "sensitive".
  1484  func (s LimitExceededException) GoString() string {
  1485  	return s.String()
  1486  }
  1487  
  1488  func newErrorLimitExceededException(v protocol.ResponseMetadata) error {
  1489  	return &LimitExceededException{
  1490  		RespMetadata: v,
  1491  	}
  1492  }
  1493  
  1494  // Code returns the exception type name.
  1495  func (s *LimitExceededException) Code() string {
  1496  	return "LimitExceededException"
  1497  }
  1498  
  1499  // Message returns the exception's message.
  1500  func (s *LimitExceededException) Message() string {
  1501  	if s.Message_ != nil {
  1502  		return *s.Message_
  1503  	}
  1504  	return ""
  1505  }
  1506  
  1507  // OrigErr always returns nil, satisfies awserr.Error interface.
  1508  func (s *LimitExceededException) OrigErr() error {
  1509  	return nil
  1510  }
  1511  
  1512  func (s *LimitExceededException) Error() string {
  1513  	return fmt.Sprintf("%s: %s\n%s", s.Code(), s.Message(), s.String())
  1514  }
  1515  
  1516  // Status code returns the HTTP status code for the request's response error.
  1517  func (s *LimitExceededException) StatusCode() int {
  1518  	return s.RespMetadata.StatusCode
  1519  }
  1520  
  1521  // RequestID returns the service's response RequestID for request.
  1522  func (s *LimitExceededException) RequestID() string {
  1523  	return s.RespMetadata.RequestID
  1524  }
  1525  
  1526  type ListMemberAccountsInput struct {
  1527  	_ struct{} `type:"structure"`
  1528  
  1529  	// Use this parameter to indicate the maximum number of items that you want
  1530  	// in the response. The default value is 250.
  1531  	MaxResults *int64 `locationName:"maxResults" type:"integer"`
  1532  
  1533  	// Use this parameter when paginating results. Set the value of this parameter
  1534  	// to null on your first call to the ListMemberAccounts action. Subsequent calls
  1535  	// to the action fill nextToken in the request with the value of nextToken from
  1536  	// the previous response to continue listing data.
  1537  	NextToken *string `locationName:"nextToken" type:"string"`
  1538  }
  1539  
  1540  // String returns the string representation.
  1541  //
  1542  // API parameter values that are decorated as "sensitive" in the API will not
  1543  // be included in the string output. The member name will be present, but the
  1544  // value will be replaced with "sensitive".
  1545  func (s ListMemberAccountsInput) String() string {
  1546  	return awsutil.Prettify(s)
  1547  }
  1548  
  1549  // GoString returns the string representation.
  1550  //
  1551  // API parameter values that are decorated as "sensitive" in the API will not
  1552  // be included in the string output. The member name will be present, but the
  1553  // value will be replaced with "sensitive".
  1554  func (s ListMemberAccountsInput) GoString() string {
  1555  	return s.String()
  1556  }
  1557  
  1558  // SetMaxResults sets the MaxResults field's value.
  1559  func (s *ListMemberAccountsInput) SetMaxResults(v int64) *ListMemberAccountsInput {
  1560  	s.MaxResults = &v
  1561  	return s
  1562  }
  1563  
  1564  // SetNextToken sets the NextToken field's value.
  1565  func (s *ListMemberAccountsInput) SetNextToken(v string) *ListMemberAccountsInput {
  1566  	s.NextToken = &v
  1567  	return s
  1568  }
  1569  
  1570  type ListMemberAccountsOutput struct {
  1571  	_ struct{} `type:"structure"`
  1572  
  1573  	// A list of the Amazon Macie Classic member accounts returned by the action.
  1574  	// The current Macie Classic administrator account is also included in this
  1575  	// list.
  1576  	MemberAccounts []*MemberAccount `locationName:"memberAccounts" type:"list"`
  1577  
  1578  	// When a response is generated, if there is more data to be listed, this parameter
  1579  	// is present in the response and contains the value to use for the nextToken
  1580  	// parameter in a subsequent pagination request. If there is no more data to
  1581  	// be listed, this parameter is set to null.
  1582  	NextToken *string `locationName:"nextToken" type:"string"`
  1583  }
  1584  
  1585  // String returns the string representation.
  1586  //
  1587  // API parameter values that are decorated as "sensitive" in the API will not
  1588  // be included in the string output. The member name will be present, but the
  1589  // value will be replaced with "sensitive".
  1590  func (s ListMemberAccountsOutput) String() string {
  1591  	return awsutil.Prettify(s)
  1592  }
  1593  
  1594  // GoString returns the string representation.
  1595  //
  1596  // API parameter values that are decorated as "sensitive" in the API will not
  1597  // be included in the string output. The member name will be present, but the
  1598  // value will be replaced with "sensitive".
  1599  func (s ListMemberAccountsOutput) GoString() string {
  1600  	return s.String()
  1601  }
  1602  
  1603  // SetMemberAccounts sets the MemberAccounts field's value.
  1604  func (s *ListMemberAccountsOutput) SetMemberAccounts(v []*MemberAccount) *ListMemberAccountsOutput {
  1605  	s.MemberAccounts = v
  1606  	return s
  1607  }
  1608  
  1609  // SetNextToken sets the NextToken field's value.
  1610  func (s *ListMemberAccountsOutput) SetNextToken(v string) *ListMemberAccountsOutput {
  1611  	s.NextToken = &v
  1612  	return s
  1613  }
  1614  
  1615  type ListS3ResourcesInput struct {
  1616  	_ struct{} `type:"structure"`
  1617  
  1618  	// Use this parameter to indicate the maximum number of items that you want
  1619  	// in the response. The default value is 250.
  1620  	MaxResults *int64 `locationName:"maxResults" type:"integer"`
  1621  
  1622  	// The Amazon Macie Classic member account ID whose associated S3 resources
  1623  	// you want to list.
  1624  	MemberAccountId *string `locationName:"memberAccountId" type:"string"`
  1625  
  1626  	// Use this parameter when paginating results. Set its value to null on your
  1627  	// first call to the ListS3Resources action. Subsequent calls to the action
  1628  	// fill nextToken in the request with the value of nextToken from the previous
  1629  	// response to continue listing data.
  1630  	NextToken *string `locationName:"nextToken" type:"string"`
  1631  }
  1632  
  1633  // String returns the string representation.
  1634  //
  1635  // API parameter values that are decorated as "sensitive" in the API will not
  1636  // be included in the string output. The member name will be present, but the
  1637  // value will be replaced with "sensitive".
  1638  func (s ListS3ResourcesInput) String() string {
  1639  	return awsutil.Prettify(s)
  1640  }
  1641  
  1642  // GoString returns the string representation.
  1643  //
  1644  // API parameter values that are decorated as "sensitive" in the API will not
  1645  // be included in the string output. The member name will be present, but the
  1646  // value will be replaced with "sensitive".
  1647  func (s ListS3ResourcesInput) GoString() string {
  1648  	return s.String()
  1649  }
  1650  
  1651  // SetMaxResults sets the MaxResults field's value.
  1652  func (s *ListS3ResourcesInput) SetMaxResults(v int64) *ListS3ResourcesInput {
  1653  	s.MaxResults = &v
  1654  	return s
  1655  }
  1656  
  1657  // SetMemberAccountId sets the MemberAccountId field's value.
  1658  func (s *ListS3ResourcesInput) SetMemberAccountId(v string) *ListS3ResourcesInput {
  1659  	s.MemberAccountId = &v
  1660  	return s
  1661  }
  1662  
  1663  // SetNextToken sets the NextToken field's value.
  1664  func (s *ListS3ResourcesInput) SetNextToken(v string) *ListS3ResourcesInput {
  1665  	s.NextToken = &v
  1666  	return s
  1667  }
  1668  
  1669  type ListS3ResourcesOutput struct {
  1670  	_ struct{} `type:"structure"`
  1671  
  1672  	// When a response is generated, if there is more data to be listed, this parameter
  1673  	// is present in the response and contains the value to use for the nextToken
  1674  	// parameter in a subsequent pagination request. If there is no more data to
  1675  	// be listed, this parameter is set to null.
  1676  	NextToken *string `locationName:"nextToken" type:"string"`
  1677  
  1678  	// A list of the associated S3 resources returned by the action.
  1679  	S3Resources []*S3ResourceClassification `locationName:"s3Resources" type:"list"`
  1680  }
  1681  
  1682  // String returns the string representation.
  1683  //
  1684  // API parameter values that are decorated as "sensitive" in the API will not
  1685  // be included in the string output. The member name will be present, but the
  1686  // value will be replaced with "sensitive".
  1687  func (s ListS3ResourcesOutput) String() string {
  1688  	return awsutil.Prettify(s)
  1689  }
  1690  
  1691  // GoString returns the string representation.
  1692  //
  1693  // API parameter values that are decorated as "sensitive" in the API will not
  1694  // be included in the string output. The member name will be present, but the
  1695  // value will be replaced with "sensitive".
  1696  func (s ListS3ResourcesOutput) GoString() string {
  1697  	return s.String()
  1698  }
  1699  
  1700  // SetNextToken sets the NextToken field's value.
  1701  func (s *ListS3ResourcesOutput) SetNextToken(v string) *ListS3ResourcesOutput {
  1702  	s.NextToken = &v
  1703  	return s
  1704  }
  1705  
  1706  // SetS3Resources sets the S3Resources field's value.
  1707  func (s *ListS3ResourcesOutput) SetS3Resources(v []*S3ResourceClassification) *ListS3ResourcesOutput {
  1708  	s.S3Resources = v
  1709  	return s
  1710  }
  1711  
  1712  // Contains information about the Amazon Macie Classic member account.
  1713  type MemberAccount struct {
  1714  	_ struct{} `type:"structure"`
  1715  
  1716  	// The AWS account ID of the Amazon Macie Classic member account.
  1717  	AccountId *string `locationName:"accountId" type:"string"`
  1718  }
  1719  
  1720  // String returns the string representation.
  1721  //
  1722  // API parameter values that are decorated as "sensitive" in the API will not
  1723  // be included in the string output. The member name will be present, but the
  1724  // value will be replaced with "sensitive".
  1725  func (s MemberAccount) String() string {
  1726  	return awsutil.Prettify(s)
  1727  }
  1728  
  1729  // GoString returns the string representation.
  1730  //
  1731  // API parameter values that are decorated as "sensitive" in the API will not
  1732  // be included in the string output. The member name will be present, but the
  1733  // value will be replaced with "sensitive".
  1734  func (s MemberAccount) GoString() string {
  1735  	return s.String()
  1736  }
  1737  
  1738  // SetAccountId sets the AccountId field's value.
  1739  func (s *MemberAccount) SetAccountId(v string) *MemberAccount {
  1740  	s.AccountId = &v
  1741  	return s
  1742  }
  1743  
  1744  // Contains information about the S3 resource. This data type is used as a request
  1745  // parameter in the DisassociateS3Resources action and can be used as a response
  1746  // parameter in the AssociateS3Resources and UpdateS3Resources actions.
  1747  type S3Resource struct {
  1748  	_ struct{} `type:"structure"`
  1749  
  1750  	// The name of the S3 bucket.
  1751  	//
  1752  	// BucketName is a required field
  1753  	BucketName *string `locationName:"bucketName" type:"string" required:"true"`
  1754  
  1755  	// The prefix of the S3 bucket.
  1756  	Prefix *string `locationName:"prefix" type:"string"`
  1757  }
  1758  
  1759  // String returns the string representation.
  1760  //
  1761  // API parameter values that are decorated as "sensitive" in the API will not
  1762  // be included in the string output. The member name will be present, but the
  1763  // value will be replaced with "sensitive".
  1764  func (s S3Resource) String() string {
  1765  	return awsutil.Prettify(s)
  1766  }
  1767  
  1768  // GoString returns the string representation.
  1769  //
  1770  // API parameter values that are decorated as "sensitive" in the API will not
  1771  // be included in the string output. The member name will be present, but the
  1772  // value will be replaced with "sensitive".
  1773  func (s S3Resource) GoString() string {
  1774  	return s.String()
  1775  }
  1776  
  1777  // Validate inspects the fields of the type to determine if they are valid.
  1778  func (s *S3Resource) Validate() error {
  1779  	invalidParams := request.ErrInvalidParams{Context: "S3Resource"}
  1780  	if s.BucketName == nil {
  1781  		invalidParams.Add(request.NewErrParamRequired("BucketName"))
  1782  	}
  1783  
  1784  	if invalidParams.Len() > 0 {
  1785  		return invalidParams
  1786  	}
  1787  	return nil
  1788  }
  1789  
  1790  // SetBucketName sets the BucketName field's value.
  1791  func (s *S3Resource) SetBucketName(v string) *S3Resource {
  1792  	s.BucketName = &v
  1793  	return s
  1794  }
  1795  
  1796  // SetPrefix sets the Prefix field's value.
  1797  func (s *S3Resource) SetPrefix(v string) *S3Resource {
  1798  	s.Prefix = &v
  1799  	return s
  1800  }
  1801  
  1802  // The S3 resources that you want to associate with Amazon Macie Classic for
  1803  // monitoring and data classification. This data type is used as a request parameter
  1804  // in the AssociateS3Resources action and a response parameter in the ListS3Resources
  1805  // action.
  1806  type S3ResourceClassification struct {
  1807  	_ struct{} `type:"structure"`
  1808  
  1809  	// The name of the S3 bucket that you want to associate with Amazon Macie Classic.
  1810  	//
  1811  	// BucketName is a required field
  1812  	BucketName *string `locationName:"bucketName" type:"string" required:"true"`
  1813  
  1814  	// The classification type that you want to specify for the resource associated
  1815  	// with Amazon Macie Classic.
  1816  	//
  1817  	// ClassificationType is a required field
  1818  	ClassificationType *ClassificationType `locationName:"classificationType" type:"structure" required:"true"`
  1819  
  1820  	// The prefix of the S3 bucket that you want to associate with Amazon Macie
  1821  	// Classic.
  1822  	Prefix *string `locationName:"prefix" type:"string"`
  1823  }
  1824  
  1825  // String returns the string representation.
  1826  //
  1827  // API parameter values that are decorated as "sensitive" in the API will not
  1828  // be included in the string output. The member name will be present, but the
  1829  // value will be replaced with "sensitive".
  1830  func (s S3ResourceClassification) String() string {
  1831  	return awsutil.Prettify(s)
  1832  }
  1833  
  1834  // GoString returns the string representation.
  1835  //
  1836  // API parameter values that are decorated as "sensitive" in the API will not
  1837  // be included in the string output. The member name will be present, but the
  1838  // value will be replaced with "sensitive".
  1839  func (s S3ResourceClassification) GoString() string {
  1840  	return s.String()
  1841  }
  1842  
  1843  // Validate inspects the fields of the type to determine if they are valid.
  1844  func (s *S3ResourceClassification) Validate() error {
  1845  	invalidParams := request.ErrInvalidParams{Context: "S3ResourceClassification"}
  1846  	if s.BucketName == nil {
  1847  		invalidParams.Add(request.NewErrParamRequired("BucketName"))
  1848  	}
  1849  	if s.ClassificationType == nil {
  1850  		invalidParams.Add(request.NewErrParamRequired("ClassificationType"))
  1851  	}
  1852  	if s.ClassificationType != nil {
  1853  		if err := s.ClassificationType.Validate(); err != nil {
  1854  			invalidParams.AddNested("ClassificationType", err.(request.ErrInvalidParams))
  1855  		}
  1856  	}
  1857  
  1858  	if invalidParams.Len() > 0 {
  1859  		return invalidParams
  1860  	}
  1861  	return nil
  1862  }
  1863  
  1864  // SetBucketName sets the BucketName field's value.
  1865  func (s *S3ResourceClassification) SetBucketName(v string) *S3ResourceClassification {
  1866  	s.BucketName = &v
  1867  	return s
  1868  }
  1869  
  1870  // SetClassificationType sets the ClassificationType field's value.
  1871  func (s *S3ResourceClassification) SetClassificationType(v *ClassificationType) *S3ResourceClassification {
  1872  	s.ClassificationType = v
  1873  	return s
  1874  }
  1875  
  1876  // SetPrefix sets the Prefix field's value.
  1877  func (s *S3ResourceClassification) SetPrefix(v string) *S3ResourceClassification {
  1878  	s.Prefix = &v
  1879  	return s
  1880  }
  1881  
  1882  // The S3 resources whose classification types you want to update. This data
  1883  // type is used as a request parameter in the UpdateS3Resources action.
  1884  type S3ResourceClassificationUpdate struct {
  1885  	_ struct{} `type:"structure"`
  1886  
  1887  	// The name of the S3 bucket whose classification types you want to update.
  1888  	//
  1889  	// BucketName is a required field
  1890  	BucketName *string `locationName:"bucketName" type:"string" required:"true"`
  1891  
  1892  	// The classification type that you want to update for the resource associated
  1893  	// with Amazon Macie Classic.
  1894  	//
  1895  	// ClassificationTypeUpdate is a required field
  1896  	ClassificationTypeUpdate *ClassificationTypeUpdate `locationName:"classificationTypeUpdate" type:"structure" required:"true"`
  1897  
  1898  	// The prefix of the S3 bucket whose classification types you want to update.
  1899  	Prefix *string `locationName:"prefix" type:"string"`
  1900  }
  1901  
  1902  // String returns the string representation.
  1903  //
  1904  // API parameter values that are decorated as "sensitive" in the API will not
  1905  // be included in the string output. The member name will be present, but the
  1906  // value will be replaced with "sensitive".
  1907  func (s S3ResourceClassificationUpdate) String() string {
  1908  	return awsutil.Prettify(s)
  1909  }
  1910  
  1911  // GoString returns the string representation.
  1912  //
  1913  // API parameter values that are decorated as "sensitive" in the API will not
  1914  // be included in the string output. The member name will be present, but the
  1915  // value will be replaced with "sensitive".
  1916  func (s S3ResourceClassificationUpdate) GoString() string {
  1917  	return s.String()
  1918  }
  1919  
  1920  // Validate inspects the fields of the type to determine if they are valid.
  1921  func (s *S3ResourceClassificationUpdate) Validate() error {
  1922  	invalidParams := request.ErrInvalidParams{Context: "S3ResourceClassificationUpdate"}
  1923  	if s.BucketName == nil {
  1924  		invalidParams.Add(request.NewErrParamRequired("BucketName"))
  1925  	}
  1926  	if s.ClassificationTypeUpdate == nil {
  1927  		invalidParams.Add(request.NewErrParamRequired("ClassificationTypeUpdate"))
  1928  	}
  1929  
  1930  	if invalidParams.Len() > 0 {
  1931  		return invalidParams
  1932  	}
  1933  	return nil
  1934  }
  1935  
  1936  // SetBucketName sets the BucketName field's value.
  1937  func (s *S3ResourceClassificationUpdate) SetBucketName(v string) *S3ResourceClassificationUpdate {
  1938  	s.BucketName = &v
  1939  	return s
  1940  }
  1941  
  1942  // SetClassificationTypeUpdate sets the ClassificationTypeUpdate field's value.
  1943  func (s *S3ResourceClassificationUpdate) SetClassificationTypeUpdate(v *ClassificationTypeUpdate) *S3ResourceClassificationUpdate {
  1944  	s.ClassificationTypeUpdate = v
  1945  	return s
  1946  }
  1947  
  1948  // SetPrefix sets the Prefix field's value.
  1949  func (s *S3ResourceClassificationUpdate) SetPrefix(v string) *S3ResourceClassificationUpdate {
  1950  	s.Prefix = &v
  1951  	return s
  1952  }
  1953  
  1954  type UpdateS3ResourcesInput struct {
  1955  	_ struct{} `type:"structure"`
  1956  
  1957  	// The AWS ID of the Amazon Macie Classic member account whose S3 resources'
  1958  	// classification types you want to update.
  1959  	MemberAccountId *string `locationName:"memberAccountId" type:"string"`
  1960  
  1961  	// The S3 resources whose classification types you want to update.
  1962  	//
  1963  	// S3ResourcesUpdate is a required field
  1964  	S3ResourcesUpdate []*S3ResourceClassificationUpdate `locationName:"s3ResourcesUpdate" type:"list" required:"true"`
  1965  }
  1966  
  1967  // String returns the string representation.
  1968  //
  1969  // API parameter values that are decorated as "sensitive" in the API will not
  1970  // be included in the string output. The member name will be present, but the
  1971  // value will be replaced with "sensitive".
  1972  func (s UpdateS3ResourcesInput) String() string {
  1973  	return awsutil.Prettify(s)
  1974  }
  1975  
  1976  // GoString returns the string representation.
  1977  //
  1978  // API parameter values that are decorated as "sensitive" in the API will not
  1979  // be included in the string output. The member name will be present, but the
  1980  // value will be replaced with "sensitive".
  1981  func (s UpdateS3ResourcesInput) GoString() string {
  1982  	return s.String()
  1983  }
  1984  
  1985  // Validate inspects the fields of the type to determine if they are valid.
  1986  func (s *UpdateS3ResourcesInput) Validate() error {
  1987  	invalidParams := request.ErrInvalidParams{Context: "UpdateS3ResourcesInput"}
  1988  	if s.S3ResourcesUpdate == nil {
  1989  		invalidParams.Add(request.NewErrParamRequired("S3ResourcesUpdate"))
  1990  	}
  1991  	if s.S3ResourcesUpdate != nil {
  1992  		for i, v := range s.S3ResourcesUpdate {
  1993  			if v == nil {
  1994  				continue
  1995  			}
  1996  			if err := v.Validate(); err != nil {
  1997  				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "S3ResourcesUpdate", i), err.(request.ErrInvalidParams))
  1998  			}
  1999  		}
  2000  	}
  2001  
  2002  	if invalidParams.Len() > 0 {
  2003  		return invalidParams
  2004  	}
  2005  	return nil
  2006  }
  2007  
  2008  // SetMemberAccountId sets the MemberAccountId field's value.
  2009  func (s *UpdateS3ResourcesInput) SetMemberAccountId(v string) *UpdateS3ResourcesInput {
  2010  	s.MemberAccountId = &v
  2011  	return s
  2012  }
  2013  
  2014  // SetS3ResourcesUpdate sets the S3ResourcesUpdate field's value.
  2015  func (s *UpdateS3ResourcesInput) SetS3ResourcesUpdate(v []*S3ResourceClassificationUpdate) *UpdateS3ResourcesInput {
  2016  	s.S3ResourcesUpdate = v
  2017  	return s
  2018  }
  2019  
  2020  type UpdateS3ResourcesOutput struct {
  2021  	_ struct{} `type:"structure"`
  2022  
  2023  	// The S3 resources whose classification types can't be updated. An error code
  2024  	// and an error message are provided for each failed item.
  2025  	FailedS3Resources []*FailedS3Resource `locationName:"failedS3Resources" type:"list"`
  2026  }
  2027  
  2028  // String returns the string representation.
  2029  //
  2030  // API parameter values that are decorated as "sensitive" in the API will not
  2031  // be included in the string output. The member name will be present, but the
  2032  // value will be replaced with "sensitive".
  2033  func (s UpdateS3ResourcesOutput) String() string {
  2034  	return awsutil.Prettify(s)
  2035  }
  2036  
  2037  // GoString returns the string representation.
  2038  //
  2039  // API parameter values that are decorated as "sensitive" in the API will not
  2040  // be included in the string output. The member name will be present, but the
  2041  // value will be replaced with "sensitive".
  2042  func (s UpdateS3ResourcesOutput) GoString() string {
  2043  	return s.String()
  2044  }
  2045  
  2046  // SetFailedS3Resources sets the FailedS3Resources field's value.
  2047  func (s *UpdateS3ResourcesOutput) SetFailedS3Resources(v []*FailedS3Resource) *UpdateS3ResourcesOutput {
  2048  	s.FailedS3Resources = v
  2049  	return s
  2050  }
  2051  
  2052  const (
  2053  	// S3ContinuousClassificationTypeFull is a S3ContinuousClassificationType enum value
  2054  	S3ContinuousClassificationTypeFull = "FULL"
  2055  )
  2056  
  2057  // S3ContinuousClassificationType_Values returns all elements of the S3ContinuousClassificationType enum
  2058  func S3ContinuousClassificationType_Values() []string {
  2059  	return []string{
  2060  		S3ContinuousClassificationTypeFull,
  2061  	}
  2062  }
  2063  
  2064  const (
  2065  	// S3OneTimeClassificationTypeFull is a S3OneTimeClassificationType enum value
  2066  	S3OneTimeClassificationTypeFull = "FULL"
  2067  
  2068  	// S3OneTimeClassificationTypeNone is a S3OneTimeClassificationType enum value
  2069  	S3OneTimeClassificationTypeNone = "NONE"
  2070  )
  2071  
  2072  // S3OneTimeClassificationType_Values returns all elements of the S3OneTimeClassificationType enum
  2073  func S3OneTimeClassificationType_Values() []string {
  2074  	return []string{
  2075  		S3OneTimeClassificationTypeFull,
  2076  		S3OneTimeClassificationTypeNone,
  2077  	}
  2078  }