1// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
2
3package detective
4
5import (
6	"fmt"
7	"time"
8
9	"github.com/aws/aws-sdk-go/aws"
10	"github.com/aws/aws-sdk-go/aws/awsutil"
11	"github.com/aws/aws-sdk-go/aws/request"
12	"github.com/aws/aws-sdk-go/private/protocol"
13	"github.com/aws/aws-sdk-go/private/protocol/restjson"
14)
15
16const opAcceptInvitation = "AcceptInvitation"
17
18// AcceptInvitationRequest generates a "aws/request.Request" representing the
19// client's request for the AcceptInvitation operation. The "output" return
20// value will be populated with the request's response once the request completes
21// successfully.
22//
23// Use "Send" method on the returned Request to send the API call to the service.
24// the "output" return value is not valid until after Send returns without error.
25//
26// See AcceptInvitation for more information on using the AcceptInvitation
27// API call, and error handling.
28//
29// This method is useful when you want to inject custom logic or configuration
30// into the SDK's request lifecycle. Such as custom headers, or retry logic.
31//
32//
33//    // Example sending a request using the AcceptInvitationRequest method.
34//    req, resp := client.AcceptInvitationRequest(params)
35//
36//    err := req.Send()
37//    if err == nil { // resp is now filled
38//        fmt.Println(resp)
39//    }
40//
41// See also, https://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/AcceptInvitation
42func (c *Detective) AcceptInvitationRequest(input *AcceptInvitationInput) (req *request.Request, output *AcceptInvitationOutput) {
43	op := &request.Operation{
44		Name:       opAcceptInvitation,
45		HTTPMethod: "PUT",
46		HTTPPath:   "/invitation",
47	}
48
49	if input == nil {
50		input = &AcceptInvitationInput{}
51	}
52
53	output = &AcceptInvitationOutput{}
54	req = c.newRequest(op, input, output)
55	req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
56	return
57}
58
59// AcceptInvitation API operation for Amazon Detective.
60//
61// Accepts an invitation for the member account to contribute data to a behavior
62// graph. This operation can only be called by an invited member account.
63//
64// The request provides the ARN of behavior graph.
65//
66// The member account status in the graph must be INVITED.
67//
68// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
69// with awserr.Error's Code and Message methods to get detailed information about
70// the error.
71//
72// See the AWS API reference guide for Amazon Detective's
73// API operation AcceptInvitation for usage and error information.
74//
75// Returned Error Types:
76//   * ConflictException
77//   The request attempted an invalid action.
78//
79//   * InternalServerException
80//   The request was valid but failed because of a problem with the service.
81//
82//   * ResourceNotFoundException
83//   The request refers to a nonexistent resource.
84//
85//   * ValidationException
86//   The request parameters are invalid.
87//
88// See also, https://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/AcceptInvitation
89func (c *Detective) AcceptInvitation(input *AcceptInvitationInput) (*AcceptInvitationOutput, error) {
90	req, out := c.AcceptInvitationRequest(input)
91	return out, req.Send()
92}
93
94// AcceptInvitationWithContext is the same as AcceptInvitation with the addition of
95// the ability to pass a context and additional request options.
96//
97// See AcceptInvitation for details on how to use this API operation.
98//
99// The context must be non-nil and will be used for request cancellation. If
100// the context is nil a panic will occur. In the future the SDK may create
101// sub-contexts for http.Requests. See https://golang.org/pkg/context/
102// for more information on using Contexts.
103func (c *Detective) AcceptInvitationWithContext(ctx aws.Context, input *AcceptInvitationInput, opts ...request.Option) (*AcceptInvitationOutput, error) {
104	req, out := c.AcceptInvitationRequest(input)
105	req.SetContext(ctx)
106	req.ApplyOptions(opts...)
107	return out, req.Send()
108}
109
110const opCreateGraph = "CreateGraph"
111
112// CreateGraphRequest generates a "aws/request.Request" representing the
113// client's request for the CreateGraph operation. The "output" return
114// value will be populated with the request's response once the request completes
115// successfully.
116//
117// Use "Send" method on the returned Request to send the API call to the service.
118// the "output" return value is not valid until after Send returns without error.
119//
120// See CreateGraph for more information on using the CreateGraph
121// API call, and error handling.
122//
123// This method is useful when you want to inject custom logic or configuration
124// into the SDK's request lifecycle. Such as custom headers, or retry logic.
125//
126//
127//    // Example sending a request using the CreateGraphRequest method.
128//    req, resp := client.CreateGraphRequest(params)
129//
130//    err := req.Send()
131//    if err == nil { // resp is now filled
132//        fmt.Println(resp)
133//    }
134//
135// See also, https://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/CreateGraph
136func (c *Detective) CreateGraphRequest(input *CreateGraphInput) (req *request.Request, output *CreateGraphOutput) {
137	op := &request.Operation{
138		Name:       opCreateGraph,
139		HTTPMethod: "POST",
140		HTTPPath:   "/graph",
141	}
142
143	if input == nil {
144		input = &CreateGraphInput{}
145	}
146
147	output = &CreateGraphOutput{}
148	req = c.newRequest(op, input, output)
149	return
150}
151
152// CreateGraph API operation for Amazon Detective.
153//
154// Creates a new behavior graph for the calling account, and sets that account
155// as the administrator account. This operation is called by the account that
156// is enabling Detective.
157//
158// Before you try to enable Detective, make sure that your account has been
159// enrolled in Amazon GuardDuty for at least 48 hours. If you do not meet this
160// requirement, you cannot enable Detective. If you do meet the GuardDuty prerequisite,
161// then when you make the request to enable Detective, it checks whether your
162// data volume is within the Detective quota. If it exceeds the quota, then
163// you cannot enable Detective.
164//
165// The operation also enables Detective for the calling account in the currently
166// selected Region. It returns the ARN of the new behavior graph.
167//
168// CreateGraph triggers a process to create the corresponding data tables for
169// the new behavior graph.
170//
171// An account can only be the administrator account for one behavior graph within
172// a Region. If the same account calls CreateGraph with the same administrator
173// account, it always returns the same behavior graph ARN. It does not create
174// a new behavior graph.
175//
176// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
177// with awserr.Error's Code and Message methods to get detailed information about
178// the error.
179//
180// See the AWS API reference guide for Amazon Detective's
181// API operation CreateGraph for usage and error information.
182//
183// Returned Error Types:
184//   * ConflictException
185//   The request attempted an invalid action.
186//
187//   * InternalServerException
188//   The request was valid but failed because of a problem with the service.
189//
190//   * ServiceQuotaExceededException
191//   This request cannot be completed for one of the following reasons.
192//
193//      * The request would cause the number of member accounts in the behavior
194//      graph to exceed the maximum allowed. A behavior graph cannot have more
195//      than 1000 member accounts.
196//
197//      * The request would cause the data rate for the behavior graph to exceed
198//      the maximum allowed.
199//
200//      * Detective is unable to verify the data rate for the member account.
201//      This is usually because the member account is not enrolled in Amazon GuardDuty.
202//
203// See also, https://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/CreateGraph
204func (c *Detective) CreateGraph(input *CreateGraphInput) (*CreateGraphOutput, error) {
205	req, out := c.CreateGraphRequest(input)
206	return out, req.Send()
207}
208
209// CreateGraphWithContext is the same as CreateGraph with the addition of
210// the ability to pass a context and additional request options.
211//
212// See CreateGraph for details on how to use this API operation.
213//
214// The context must be non-nil and will be used for request cancellation. If
215// the context is nil a panic will occur. In the future the SDK may create
216// sub-contexts for http.Requests. See https://golang.org/pkg/context/
217// for more information on using Contexts.
218func (c *Detective) CreateGraphWithContext(ctx aws.Context, input *CreateGraphInput, opts ...request.Option) (*CreateGraphOutput, error) {
219	req, out := c.CreateGraphRequest(input)
220	req.SetContext(ctx)
221	req.ApplyOptions(opts...)
222	return out, req.Send()
223}
224
225const opCreateMembers = "CreateMembers"
226
227// CreateMembersRequest generates a "aws/request.Request" representing the
228// client's request for the CreateMembers operation. The "output" return
229// value will be populated with the request's response once the request completes
230// successfully.
231//
232// Use "Send" method on the returned Request to send the API call to the service.
233// the "output" return value is not valid until after Send returns without error.
234//
235// See CreateMembers for more information on using the CreateMembers
236// API call, and error handling.
237//
238// This method is useful when you want to inject custom logic or configuration
239// into the SDK's request lifecycle. Such as custom headers, or retry logic.
240//
241//
242//    // Example sending a request using the CreateMembersRequest method.
243//    req, resp := client.CreateMembersRequest(params)
244//
245//    err := req.Send()
246//    if err == nil { // resp is now filled
247//        fmt.Println(resp)
248//    }
249//
250// See also, https://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/CreateMembers
251func (c *Detective) CreateMembersRequest(input *CreateMembersInput) (req *request.Request, output *CreateMembersOutput) {
252	op := &request.Operation{
253		Name:       opCreateMembers,
254		HTTPMethod: "POST",
255		HTTPPath:   "/graph/members",
256	}
257
258	if input == nil {
259		input = &CreateMembersInput{}
260	}
261
262	output = &CreateMembersOutput{}
263	req = c.newRequest(op, input, output)
264	return
265}
266
267// CreateMembers API operation for Amazon Detective.
268//
269// Sends a request to invite the specified AWS accounts to be member accounts
270// in the behavior graph. This operation can only be called by the administrator
271// account for a behavior graph.
272//
273// CreateMembers verifies the accounts and then invites the verified accounts.
274// The administrator can optionally specify to not send invitation emails to
275// the member accounts. This would be used when the administrator manages their
276// member accounts centrally.
277//
278// The request provides the behavior graph ARN and the list of accounts to invite.
279//
280// The response separates the requested accounts into two lists:
281//
282//    * The accounts that CreateMembers was able to start the verification for.
283//    This list includes member accounts that are being verified, that have
284//    passed verification and are to be invited, and that have failed verification.
285//
286//    * The accounts that CreateMembers was unable to process. This list includes
287//    accounts that were already invited to be member accounts in the behavior
288//    graph.
289//
290// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
291// with awserr.Error's Code and Message methods to get detailed information about
292// the error.
293//
294// See the AWS API reference guide for Amazon Detective's
295// API operation CreateMembers for usage and error information.
296//
297// Returned Error Types:
298//   * InternalServerException
299//   The request was valid but failed because of a problem with the service.
300//
301//   * ResourceNotFoundException
302//   The request refers to a nonexistent resource.
303//
304//   * ValidationException
305//   The request parameters are invalid.
306//
307//   * ServiceQuotaExceededException
308//   This request cannot be completed for one of the following reasons.
309//
310//      * The request would cause the number of member accounts in the behavior
311//      graph to exceed the maximum allowed. A behavior graph cannot have more
312//      than 1000 member accounts.
313//
314//      * The request would cause the data rate for the behavior graph to exceed
315//      the maximum allowed.
316//
317//      * Detective is unable to verify the data rate for the member account.
318//      This is usually because the member account is not enrolled in Amazon GuardDuty.
319//
320// See also, https://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/CreateMembers
321func (c *Detective) CreateMembers(input *CreateMembersInput) (*CreateMembersOutput, error) {
322	req, out := c.CreateMembersRequest(input)
323	return out, req.Send()
324}
325
326// CreateMembersWithContext is the same as CreateMembers with the addition of
327// the ability to pass a context and additional request options.
328//
329// See CreateMembers for details on how to use this API operation.
330//
331// The context must be non-nil and will be used for request cancellation. If
332// the context is nil a panic will occur. In the future the SDK may create
333// sub-contexts for http.Requests. See https://golang.org/pkg/context/
334// for more information on using Contexts.
335func (c *Detective) CreateMembersWithContext(ctx aws.Context, input *CreateMembersInput, opts ...request.Option) (*CreateMembersOutput, error) {
336	req, out := c.CreateMembersRequest(input)
337	req.SetContext(ctx)
338	req.ApplyOptions(opts...)
339	return out, req.Send()
340}
341
342const opDeleteGraph = "DeleteGraph"
343
344// DeleteGraphRequest generates a "aws/request.Request" representing the
345// client's request for the DeleteGraph operation. The "output" return
346// value will be populated with the request's response once the request completes
347// successfully.
348//
349// Use "Send" method on the returned Request to send the API call to the service.
350// the "output" return value is not valid until after Send returns without error.
351//
352// See DeleteGraph for more information on using the DeleteGraph
353// API call, and error handling.
354//
355// This method is useful when you want to inject custom logic or configuration
356// into the SDK's request lifecycle. Such as custom headers, or retry logic.
357//
358//
359//    // Example sending a request using the DeleteGraphRequest method.
360//    req, resp := client.DeleteGraphRequest(params)
361//
362//    err := req.Send()
363//    if err == nil { // resp is now filled
364//        fmt.Println(resp)
365//    }
366//
367// See also, https://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/DeleteGraph
368func (c *Detective) DeleteGraphRequest(input *DeleteGraphInput) (req *request.Request, output *DeleteGraphOutput) {
369	op := &request.Operation{
370		Name:       opDeleteGraph,
371		HTTPMethod: "POST",
372		HTTPPath:   "/graph/removal",
373	}
374
375	if input == nil {
376		input = &DeleteGraphInput{}
377	}
378
379	output = &DeleteGraphOutput{}
380	req = c.newRequest(op, input, output)
381	req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
382	return
383}
384
385// DeleteGraph API operation for Amazon Detective.
386//
387// Disables the specified behavior graph and queues it to be deleted. This operation
388// removes the graph from each member account's list of behavior graphs.
389//
390// DeleteGraph can only be called by the administrator account for a behavior
391// graph.
392//
393// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
394// with awserr.Error's Code and Message methods to get detailed information about
395// the error.
396//
397// See the AWS API reference guide for Amazon Detective's
398// API operation DeleteGraph for usage and error information.
399//
400// Returned Error Types:
401//   * InternalServerException
402//   The request was valid but failed because of a problem with the service.
403//
404//   * ResourceNotFoundException
405//   The request refers to a nonexistent resource.
406//
407//   * ValidationException
408//   The request parameters are invalid.
409//
410// See also, https://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/DeleteGraph
411func (c *Detective) DeleteGraph(input *DeleteGraphInput) (*DeleteGraphOutput, error) {
412	req, out := c.DeleteGraphRequest(input)
413	return out, req.Send()
414}
415
416// DeleteGraphWithContext is the same as DeleteGraph with the addition of
417// the ability to pass a context and additional request options.
418//
419// See DeleteGraph for details on how to use this API operation.
420//
421// The context must be non-nil and will be used for request cancellation. If
422// the context is nil a panic will occur. In the future the SDK may create
423// sub-contexts for http.Requests. See https://golang.org/pkg/context/
424// for more information on using Contexts.
425func (c *Detective) DeleteGraphWithContext(ctx aws.Context, input *DeleteGraphInput, opts ...request.Option) (*DeleteGraphOutput, error) {
426	req, out := c.DeleteGraphRequest(input)
427	req.SetContext(ctx)
428	req.ApplyOptions(opts...)
429	return out, req.Send()
430}
431
432const opDeleteMembers = "DeleteMembers"
433
434// DeleteMembersRequest generates a "aws/request.Request" representing the
435// client's request for the DeleteMembers operation. The "output" return
436// value will be populated with the request's response once the request completes
437// successfully.
438//
439// Use "Send" method on the returned Request to send the API call to the service.
440// the "output" return value is not valid until after Send returns without error.
441//
442// See DeleteMembers for more information on using the DeleteMembers
443// API call, and error handling.
444//
445// This method is useful when you want to inject custom logic or configuration
446// into the SDK's request lifecycle. Such as custom headers, or retry logic.
447//
448//
449//    // Example sending a request using the DeleteMembersRequest method.
450//    req, resp := client.DeleteMembersRequest(params)
451//
452//    err := req.Send()
453//    if err == nil { // resp is now filled
454//        fmt.Println(resp)
455//    }
456//
457// See also, https://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/DeleteMembers
458func (c *Detective) DeleteMembersRequest(input *DeleteMembersInput) (req *request.Request, output *DeleteMembersOutput) {
459	op := &request.Operation{
460		Name:       opDeleteMembers,
461		HTTPMethod: "POST",
462		HTTPPath:   "/graph/members/removal",
463	}
464
465	if input == nil {
466		input = &DeleteMembersInput{}
467	}
468
469	output = &DeleteMembersOutput{}
470	req = c.newRequest(op, input, output)
471	return
472}
473
474// DeleteMembers API operation for Amazon Detective.
475//
476// Deletes one or more member accounts from the administrator account's behavior
477// graph. This operation can only be called by a Detective administrator account.
478// That account cannot use DeleteMembers to delete their own account from the
479// behavior graph. To disable a behavior graph, the administrator account uses
480// the DeleteGraph API method.
481//
482// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
483// with awserr.Error's Code and Message methods to get detailed information about
484// the error.
485//
486// See the AWS API reference guide for Amazon Detective's
487// API operation DeleteMembers for usage and error information.
488//
489// Returned Error Types:
490//   * ConflictException
491//   The request attempted an invalid action.
492//
493//   * InternalServerException
494//   The request was valid but failed because of a problem with the service.
495//
496//   * ResourceNotFoundException
497//   The request refers to a nonexistent resource.
498//
499//   * ValidationException
500//   The request parameters are invalid.
501//
502// See also, https://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/DeleteMembers
503func (c *Detective) DeleteMembers(input *DeleteMembersInput) (*DeleteMembersOutput, error) {
504	req, out := c.DeleteMembersRequest(input)
505	return out, req.Send()
506}
507
508// DeleteMembersWithContext is the same as DeleteMembers with the addition of
509// the ability to pass a context and additional request options.
510//
511// See DeleteMembers for details on how to use this API operation.
512//
513// The context must be non-nil and will be used for request cancellation. If
514// the context is nil a panic will occur. In the future the SDK may create
515// sub-contexts for http.Requests. See https://golang.org/pkg/context/
516// for more information on using Contexts.
517func (c *Detective) DeleteMembersWithContext(ctx aws.Context, input *DeleteMembersInput, opts ...request.Option) (*DeleteMembersOutput, error) {
518	req, out := c.DeleteMembersRequest(input)
519	req.SetContext(ctx)
520	req.ApplyOptions(opts...)
521	return out, req.Send()
522}
523
524const opDisassociateMembership = "DisassociateMembership"
525
526// DisassociateMembershipRequest generates a "aws/request.Request" representing the
527// client's request for the DisassociateMembership operation. The "output" return
528// value will be populated with the request's response once the request completes
529// successfully.
530//
531// Use "Send" method on the returned Request to send the API call to the service.
532// the "output" return value is not valid until after Send returns without error.
533//
534// See DisassociateMembership for more information on using the DisassociateMembership
535// API call, and error handling.
536//
537// This method is useful when you want to inject custom logic or configuration
538// into the SDK's request lifecycle. Such as custom headers, or retry logic.
539//
540//
541//    // Example sending a request using the DisassociateMembershipRequest method.
542//    req, resp := client.DisassociateMembershipRequest(params)
543//
544//    err := req.Send()
545//    if err == nil { // resp is now filled
546//        fmt.Println(resp)
547//    }
548//
549// See also, https://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/DisassociateMembership
550func (c *Detective) DisassociateMembershipRequest(input *DisassociateMembershipInput) (req *request.Request, output *DisassociateMembershipOutput) {
551	op := &request.Operation{
552		Name:       opDisassociateMembership,
553		HTTPMethod: "POST",
554		HTTPPath:   "/membership/removal",
555	}
556
557	if input == nil {
558		input = &DisassociateMembershipInput{}
559	}
560
561	output = &DisassociateMembershipOutput{}
562	req = c.newRequest(op, input, output)
563	req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
564	return
565}
566
567// DisassociateMembership API operation for Amazon Detective.
568//
569// Removes the member account from the specified behavior graph. This operation
570// can only be called by a member account that has the ENABLED status.
571//
572// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
573// with awserr.Error's Code and Message methods to get detailed information about
574// the error.
575//
576// See the AWS API reference guide for Amazon Detective's
577// API operation DisassociateMembership for usage and error information.
578//
579// Returned Error Types:
580//   * ConflictException
581//   The request attempted an invalid action.
582//
583//   * InternalServerException
584//   The request was valid but failed because of a problem with the service.
585//
586//   * ResourceNotFoundException
587//   The request refers to a nonexistent resource.
588//
589//   * ValidationException
590//   The request parameters are invalid.
591//
592// See also, https://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/DisassociateMembership
593func (c *Detective) DisassociateMembership(input *DisassociateMembershipInput) (*DisassociateMembershipOutput, error) {
594	req, out := c.DisassociateMembershipRequest(input)
595	return out, req.Send()
596}
597
598// DisassociateMembershipWithContext is the same as DisassociateMembership with the addition of
599// the ability to pass a context and additional request options.
600//
601// See DisassociateMembership for details on how to use this API operation.
602//
603// The context must be non-nil and will be used for request cancellation. If
604// the context is nil a panic will occur. In the future the SDK may create
605// sub-contexts for http.Requests. See https://golang.org/pkg/context/
606// for more information on using Contexts.
607func (c *Detective) DisassociateMembershipWithContext(ctx aws.Context, input *DisassociateMembershipInput, opts ...request.Option) (*DisassociateMembershipOutput, error) {
608	req, out := c.DisassociateMembershipRequest(input)
609	req.SetContext(ctx)
610	req.ApplyOptions(opts...)
611	return out, req.Send()
612}
613
614const opGetMembers = "GetMembers"
615
616// GetMembersRequest generates a "aws/request.Request" representing the
617// client's request for the GetMembers operation. The "output" return
618// value will be populated with the request's response once the request completes
619// successfully.
620//
621// Use "Send" method on the returned Request to send the API call to the service.
622// the "output" return value is not valid until after Send returns without error.
623//
624// See GetMembers for more information on using the GetMembers
625// API call, and error handling.
626//
627// This method is useful when you want to inject custom logic or configuration
628// into the SDK's request lifecycle. Such as custom headers, or retry logic.
629//
630//
631//    // Example sending a request using the GetMembersRequest method.
632//    req, resp := client.GetMembersRequest(params)
633//
634//    err := req.Send()
635//    if err == nil { // resp is now filled
636//        fmt.Println(resp)
637//    }
638//
639// See also, https://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/GetMembers
640func (c *Detective) GetMembersRequest(input *GetMembersInput) (req *request.Request, output *GetMembersOutput) {
641	op := &request.Operation{
642		Name:       opGetMembers,
643		HTTPMethod: "POST",
644		HTTPPath:   "/graph/members/get",
645	}
646
647	if input == nil {
648		input = &GetMembersInput{}
649	}
650
651	output = &GetMembersOutput{}
652	req = c.newRequest(op, input, output)
653	return
654}
655
656// GetMembers API operation for Amazon Detective.
657//
658// Returns the membership details for specified member accounts for a behavior
659// graph.
660//
661// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
662// with awserr.Error's Code and Message methods to get detailed information about
663// the error.
664//
665// See the AWS API reference guide for Amazon Detective's
666// API operation GetMembers for usage and error information.
667//
668// Returned Error Types:
669//   * InternalServerException
670//   The request was valid but failed because of a problem with the service.
671//
672//   * ResourceNotFoundException
673//   The request refers to a nonexistent resource.
674//
675//   * ValidationException
676//   The request parameters are invalid.
677//
678// See also, https://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/GetMembers
679func (c *Detective) GetMembers(input *GetMembersInput) (*GetMembersOutput, error) {
680	req, out := c.GetMembersRequest(input)
681	return out, req.Send()
682}
683
684// GetMembersWithContext is the same as GetMembers with the addition of
685// the ability to pass a context and additional request options.
686//
687// See GetMembers for details on how to use this API operation.
688//
689// The context must be non-nil and will be used for request cancellation. If
690// the context is nil a panic will occur. In the future the SDK may create
691// sub-contexts for http.Requests. See https://golang.org/pkg/context/
692// for more information on using Contexts.
693func (c *Detective) GetMembersWithContext(ctx aws.Context, input *GetMembersInput, opts ...request.Option) (*GetMembersOutput, error) {
694	req, out := c.GetMembersRequest(input)
695	req.SetContext(ctx)
696	req.ApplyOptions(opts...)
697	return out, req.Send()
698}
699
700const opListGraphs = "ListGraphs"
701
702// ListGraphsRequest generates a "aws/request.Request" representing the
703// client's request for the ListGraphs operation. The "output" return
704// value will be populated with the request's response once the request completes
705// successfully.
706//
707// Use "Send" method on the returned Request to send the API call to the service.
708// the "output" return value is not valid until after Send returns without error.
709//
710// See ListGraphs for more information on using the ListGraphs
711// API call, and error handling.
712//
713// This method is useful when you want to inject custom logic or configuration
714// into the SDK's request lifecycle. Such as custom headers, or retry logic.
715//
716//
717//    // Example sending a request using the ListGraphsRequest method.
718//    req, resp := client.ListGraphsRequest(params)
719//
720//    err := req.Send()
721//    if err == nil { // resp is now filled
722//        fmt.Println(resp)
723//    }
724//
725// See also, https://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/ListGraphs
726func (c *Detective) ListGraphsRequest(input *ListGraphsInput) (req *request.Request, output *ListGraphsOutput) {
727	op := &request.Operation{
728		Name:       opListGraphs,
729		HTTPMethod: "POST",
730		HTTPPath:   "/graphs/list",
731		Paginator: &request.Paginator{
732			InputTokens:     []string{"NextToken"},
733			OutputTokens:    []string{"NextToken"},
734			LimitToken:      "MaxResults",
735			TruncationToken: "",
736		},
737	}
738
739	if input == nil {
740		input = &ListGraphsInput{}
741	}
742
743	output = &ListGraphsOutput{}
744	req = c.newRequest(op, input, output)
745	return
746}
747
748// ListGraphs API operation for Amazon Detective.
749//
750// Returns the list of behavior graphs that the calling account is an administrator
751// account of. This operation can only be called by an administrator account.
752//
753// Because an account can currently only be the administrator of one behavior
754// graph within a Region, the results always contain a single behavior graph.
755//
756// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
757// with awserr.Error's Code and Message methods to get detailed information about
758// the error.
759//
760// See the AWS API reference guide for Amazon Detective's
761// API operation ListGraphs for usage and error information.
762//
763// Returned Error Types:
764//   * InternalServerException
765//   The request was valid but failed because of a problem with the service.
766//
767//   * ValidationException
768//   The request parameters are invalid.
769//
770// See also, https://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/ListGraphs
771func (c *Detective) ListGraphs(input *ListGraphsInput) (*ListGraphsOutput, error) {
772	req, out := c.ListGraphsRequest(input)
773	return out, req.Send()
774}
775
776// ListGraphsWithContext is the same as ListGraphs with the addition of
777// the ability to pass a context and additional request options.
778//
779// See ListGraphs for details on how to use this API operation.
780//
781// The context must be non-nil and will be used for request cancellation. If
782// the context is nil a panic will occur. In the future the SDK may create
783// sub-contexts for http.Requests. See https://golang.org/pkg/context/
784// for more information on using Contexts.
785func (c *Detective) ListGraphsWithContext(ctx aws.Context, input *ListGraphsInput, opts ...request.Option) (*ListGraphsOutput, error) {
786	req, out := c.ListGraphsRequest(input)
787	req.SetContext(ctx)
788	req.ApplyOptions(opts...)
789	return out, req.Send()
790}
791
792// ListGraphsPages iterates over the pages of a ListGraphs operation,
793// calling the "fn" function with the response data for each page. To stop
794// iterating, return false from the fn function.
795//
796// See ListGraphs method for more information on how to use this operation.
797//
798// Note: This operation can generate multiple requests to a service.
799//
800//    // Example iterating over at most 3 pages of a ListGraphs operation.
801//    pageNum := 0
802//    err := client.ListGraphsPages(params,
803//        func(page *detective.ListGraphsOutput, lastPage bool) bool {
804//            pageNum++
805//            fmt.Println(page)
806//            return pageNum <= 3
807//        })
808//
809func (c *Detective) ListGraphsPages(input *ListGraphsInput, fn func(*ListGraphsOutput, bool) bool) error {
810	return c.ListGraphsPagesWithContext(aws.BackgroundContext(), input, fn)
811}
812
813// ListGraphsPagesWithContext same as ListGraphsPages except
814// it takes a Context and allows setting request options on the pages.
815//
816// The context must be non-nil and will be used for request cancellation. If
817// the context is nil a panic will occur. In the future the SDK may create
818// sub-contexts for http.Requests. See https://golang.org/pkg/context/
819// for more information on using Contexts.
820func (c *Detective) ListGraphsPagesWithContext(ctx aws.Context, input *ListGraphsInput, fn func(*ListGraphsOutput, bool) bool, opts ...request.Option) error {
821	p := request.Pagination{
822		NewRequest: func() (*request.Request, error) {
823			var inCpy *ListGraphsInput
824			if input != nil {
825				tmp := *input
826				inCpy = &tmp
827			}
828			req, _ := c.ListGraphsRequest(inCpy)
829			req.SetContext(ctx)
830			req.ApplyOptions(opts...)
831			return req, nil
832		},
833	}
834
835	for p.Next() {
836		if !fn(p.Page().(*ListGraphsOutput), !p.HasNextPage()) {
837			break
838		}
839	}
840
841	return p.Err()
842}
843
844const opListInvitations = "ListInvitations"
845
846// ListInvitationsRequest generates a "aws/request.Request" representing the
847// client's request for the ListInvitations operation. The "output" return
848// value will be populated with the request's response once the request completes
849// successfully.
850//
851// Use "Send" method on the returned Request to send the API call to the service.
852// the "output" return value is not valid until after Send returns without error.
853//
854// See ListInvitations for more information on using the ListInvitations
855// API call, and error handling.
856//
857// This method is useful when you want to inject custom logic or configuration
858// into the SDK's request lifecycle. Such as custom headers, or retry logic.
859//
860//
861//    // Example sending a request using the ListInvitationsRequest method.
862//    req, resp := client.ListInvitationsRequest(params)
863//
864//    err := req.Send()
865//    if err == nil { // resp is now filled
866//        fmt.Println(resp)
867//    }
868//
869// See also, https://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/ListInvitations
870func (c *Detective) ListInvitationsRequest(input *ListInvitationsInput) (req *request.Request, output *ListInvitationsOutput) {
871	op := &request.Operation{
872		Name:       opListInvitations,
873		HTTPMethod: "POST",
874		HTTPPath:   "/invitations/list",
875		Paginator: &request.Paginator{
876			InputTokens:     []string{"NextToken"},
877			OutputTokens:    []string{"NextToken"},
878			LimitToken:      "MaxResults",
879			TruncationToken: "",
880		},
881	}
882
883	if input == nil {
884		input = &ListInvitationsInput{}
885	}
886
887	output = &ListInvitationsOutput{}
888	req = c.newRequest(op, input, output)
889	return
890}
891
892// ListInvitations API operation for Amazon Detective.
893//
894// Retrieves the list of open and accepted behavior graph invitations for the
895// member account. This operation can only be called by a member account.
896//
897// Open invitations are invitations that the member account has not responded
898// to.
899//
900// The results do not include behavior graphs for which the member account declined
901// the invitation. The results also do not include behavior graphs that the
902// member account resigned from or was removed from.
903//
904// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
905// with awserr.Error's Code and Message methods to get detailed information about
906// the error.
907//
908// See the AWS API reference guide for Amazon Detective's
909// API operation ListInvitations for usage and error information.
910//
911// Returned Error Types:
912//   * InternalServerException
913//   The request was valid but failed because of a problem with the service.
914//
915//   * ValidationException
916//   The request parameters are invalid.
917//
918// See also, https://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/ListInvitations
919func (c *Detective) ListInvitations(input *ListInvitationsInput) (*ListInvitationsOutput, error) {
920	req, out := c.ListInvitationsRequest(input)
921	return out, req.Send()
922}
923
924// ListInvitationsWithContext is the same as ListInvitations with the addition of
925// the ability to pass a context and additional request options.
926//
927// See ListInvitations for details on how to use this API operation.
928//
929// The context must be non-nil and will be used for request cancellation. If
930// the context is nil a panic will occur. In the future the SDK may create
931// sub-contexts for http.Requests. See https://golang.org/pkg/context/
932// for more information on using Contexts.
933func (c *Detective) ListInvitationsWithContext(ctx aws.Context, input *ListInvitationsInput, opts ...request.Option) (*ListInvitationsOutput, error) {
934	req, out := c.ListInvitationsRequest(input)
935	req.SetContext(ctx)
936	req.ApplyOptions(opts...)
937	return out, req.Send()
938}
939
940// ListInvitationsPages iterates over the pages of a ListInvitations operation,
941// calling the "fn" function with the response data for each page. To stop
942// iterating, return false from the fn function.
943//
944// See ListInvitations method for more information on how to use this operation.
945//
946// Note: This operation can generate multiple requests to a service.
947//
948//    // Example iterating over at most 3 pages of a ListInvitations operation.
949//    pageNum := 0
950//    err := client.ListInvitationsPages(params,
951//        func(page *detective.ListInvitationsOutput, lastPage bool) bool {
952//            pageNum++
953//            fmt.Println(page)
954//            return pageNum <= 3
955//        })
956//
957func (c *Detective) ListInvitationsPages(input *ListInvitationsInput, fn func(*ListInvitationsOutput, bool) bool) error {
958	return c.ListInvitationsPagesWithContext(aws.BackgroundContext(), input, fn)
959}
960
961// ListInvitationsPagesWithContext same as ListInvitationsPages except
962// it takes a Context and allows setting request options on the pages.
963//
964// The context must be non-nil and will be used for request cancellation. If
965// the context is nil a panic will occur. In the future the SDK may create
966// sub-contexts for http.Requests. See https://golang.org/pkg/context/
967// for more information on using Contexts.
968func (c *Detective) ListInvitationsPagesWithContext(ctx aws.Context, input *ListInvitationsInput, fn func(*ListInvitationsOutput, bool) bool, opts ...request.Option) error {
969	p := request.Pagination{
970		NewRequest: func() (*request.Request, error) {
971			var inCpy *ListInvitationsInput
972			if input != nil {
973				tmp := *input
974				inCpy = &tmp
975			}
976			req, _ := c.ListInvitationsRequest(inCpy)
977			req.SetContext(ctx)
978			req.ApplyOptions(opts...)
979			return req, nil
980		},
981	}
982
983	for p.Next() {
984		if !fn(p.Page().(*ListInvitationsOutput), !p.HasNextPage()) {
985			break
986		}
987	}
988
989	return p.Err()
990}
991
992const opListMembers = "ListMembers"
993
994// ListMembersRequest generates a "aws/request.Request" representing the
995// client's request for the ListMembers operation. The "output" return
996// value will be populated with the request's response once the request completes
997// successfully.
998//
999// Use "Send" method on the returned Request to send the API call to the service.
1000// the "output" return value is not valid until after Send returns without error.
1001//
1002// See ListMembers for more information on using the ListMembers
1003// API call, and error handling.
1004//
1005// This method is useful when you want to inject custom logic or configuration
1006// into the SDK's request lifecycle. Such as custom headers, or retry logic.
1007//
1008//
1009//    // Example sending a request using the ListMembersRequest method.
1010//    req, resp := client.ListMembersRequest(params)
1011//
1012//    err := req.Send()
1013//    if err == nil { // resp is now filled
1014//        fmt.Println(resp)
1015//    }
1016//
1017// See also, https://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/ListMembers
1018func (c *Detective) ListMembersRequest(input *ListMembersInput) (req *request.Request, output *ListMembersOutput) {
1019	op := &request.Operation{
1020		Name:       opListMembers,
1021		HTTPMethod: "POST",
1022		HTTPPath:   "/graph/members/list",
1023		Paginator: &request.Paginator{
1024			InputTokens:     []string{"NextToken"},
1025			OutputTokens:    []string{"NextToken"},
1026			LimitToken:      "MaxResults",
1027			TruncationToken: "",
1028		},
1029	}
1030
1031	if input == nil {
1032		input = &ListMembersInput{}
1033	}
1034
1035	output = &ListMembersOutput{}
1036	req = c.newRequest(op, input, output)
1037	return
1038}
1039
1040// ListMembers API operation for Amazon Detective.
1041//
1042// Retrieves the list of member accounts for a behavior graph. Does not return
1043// member accounts that were removed from the behavior graph.
1044//
1045// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
1046// with awserr.Error's Code and Message methods to get detailed information about
1047// the error.
1048//
1049// See the AWS API reference guide for Amazon Detective's
1050// API operation ListMembers for usage and error information.
1051//
1052// Returned Error Types:
1053//   * InternalServerException
1054//   The request was valid but failed because of a problem with the service.
1055//
1056//   * ResourceNotFoundException
1057//   The request refers to a nonexistent resource.
1058//
1059//   * ValidationException
1060//   The request parameters are invalid.
1061//
1062// See also, https://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/ListMembers
1063func (c *Detective) ListMembers(input *ListMembersInput) (*ListMembersOutput, error) {
1064	req, out := c.ListMembersRequest(input)
1065	return out, req.Send()
1066}
1067
1068// ListMembersWithContext is the same as ListMembers with the addition of
1069// the ability to pass a context and additional request options.
1070//
1071// See ListMembers for details on how to use this API operation.
1072//
1073// The context must be non-nil and will be used for request cancellation. If
1074// the context is nil a panic will occur. In the future the SDK may create
1075// sub-contexts for http.Requests. See https://golang.org/pkg/context/
1076// for more information on using Contexts.
1077func (c *Detective) ListMembersWithContext(ctx aws.Context, input *ListMembersInput, opts ...request.Option) (*ListMembersOutput, error) {
1078	req, out := c.ListMembersRequest(input)
1079	req.SetContext(ctx)
1080	req.ApplyOptions(opts...)
1081	return out, req.Send()
1082}
1083
1084// ListMembersPages iterates over the pages of a ListMembers operation,
1085// calling the "fn" function with the response data for each page. To stop
1086// iterating, return false from the fn function.
1087//
1088// See ListMembers method for more information on how to use this operation.
1089//
1090// Note: This operation can generate multiple requests to a service.
1091//
1092//    // Example iterating over at most 3 pages of a ListMembers operation.
1093//    pageNum := 0
1094//    err := client.ListMembersPages(params,
1095//        func(page *detective.ListMembersOutput, lastPage bool) bool {
1096//            pageNum++
1097//            fmt.Println(page)
1098//            return pageNum <= 3
1099//        })
1100//
1101func (c *Detective) ListMembersPages(input *ListMembersInput, fn func(*ListMembersOutput, bool) bool) error {
1102	return c.ListMembersPagesWithContext(aws.BackgroundContext(), input, fn)
1103}
1104
1105// ListMembersPagesWithContext same as ListMembersPages except
1106// it takes a Context and allows setting request options on the pages.
1107//
1108// The context must be non-nil and will be used for request cancellation. If
1109// the context is nil a panic will occur. In the future the SDK may create
1110// sub-contexts for http.Requests. See https://golang.org/pkg/context/
1111// for more information on using Contexts.
1112func (c *Detective) ListMembersPagesWithContext(ctx aws.Context, input *ListMembersInput, fn func(*ListMembersOutput, bool) bool, opts ...request.Option) error {
1113	p := request.Pagination{
1114		NewRequest: func() (*request.Request, error) {
1115			var inCpy *ListMembersInput
1116			if input != nil {
1117				tmp := *input
1118				inCpy = &tmp
1119			}
1120			req, _ := c.ListMembersRequest(inCpy)
1121			req.SetContext(ctx)
1122			req.ApplyOptions(opts...)
1123			return req, nil
1124		},
1125	}
1126
1127	for p.Next() {
1128		if !fn(p.Page().(*ListMembersOutput), !p.HasNextPage()) {
1129			break
1130		}
1131	}
1132
1133	return p.Err()
1134}
1135
1136const opListTagsForResource = "ListTagsForResource"
1137
1138// ListTagsForResourceRequest generates a "aws/request.Request" representing the
1139// client's request for the ListTagsForResource operation. The "output" return
1140// value will be populated with the request's response once the request completes
1141// successfully.
1142//
1143// Use "Send" method on the returned Request to send the API call to the service.
1144// the "output" return value is not valid until after Send returns without error.
1145//
1146// See ListTagsForResource for more information on using the ListTagsForResource
1147// API call, and error handling.
1148//
1149// This method is useful when you want to inject custom logic or configuration
1150// into the SDK's request lifecycle. Such as custom headers, or retry logic.
1151//
1152//
1153//    // Example sending a request using the ListTagsForResourceRequest method.
1154//    req, resp := client.ListTagsForResourceRequest(params)
1155//
1156//    err := req.Send()
1157//    if err == nil { // resp is now filled
1158//        fmt.Println(resp)
1159//    }
1160//
1161// See also, https://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/ListTagsForResource
1162func (c *Detective) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) {
1163	op := &request.Operation{
1164		Name:       opListTagsForResource,
1165		HTTPMethod: "GET",
1166		HTTPPath:   "/tags/{ResourceArn}",
1167	}
1168
1169	if input == nil {
1170		input = &ListTagsForResourceInput{}
1171	}
1172
1173	output = &ListTagsForResourceOutput{}
1174	req = c.newRequest(op, input, output)
1175	return
1176}
1177
1178// ListTagsForResource API operation for Amazon Detective.
1179//
1180// Returns the tag values that are assigned to a behavior graph.
1181//
1182// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
1183// with awserr.Error's Code and Message methods to get detailed information about
1184// the error.
1185//
1186// See the AWS API reference guide for Amazon Detective's
1187// API operation ListTagsForResource for usage and error information.
1188//
1189// Returned Error Types:
1190//   * InternalServerException
1191//   The request was valid but failed because of a problem with the service.
1192//
1193//   * ValidationException
1194//   The request parameters are invalid.
1195//
1196//   * ResourceNotFoundException
1197//   The request refers to a nonexistent resource.
1198//
1199// See also, https://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/ListTagsForResource
1200func (c *Detective) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) {
1201	req, out := c.ListTagsForResourceRequest(input)
1202	return out, req.Send()
1203}
1204
1205// ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of
1206// the ability to pass a context and additional request options.
1207//
1208// See ListTagsForResource for details on how to use this API operation.
1209//
1210// The context must be non-nil and will be used for request cancellation. If
1211// the context is nil a panic will occur. In the future the SDK may create
1212// sub-contexts for http.Requests. See https://golang.org/pkg/context/
1213// for more information on using Contexts.
1214func (c *Detective) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) {
1215	req, out := c.ListTagsForResourceRequest(input)
1216	req.SetContext(ctx)
1217	req.ApplyOptions(opts...)
1218	return out, req.Send()
1219}
1220
1221const opRejectInvitation = "RejectInvitation"
1222
1223// RejectInvitationRequest generates a "aws/request.Request" representing the
1224// client's request for the RejectInvitation operation. The "output" return
1225// value will be populated with the request's response once the request completes
1226// successfully.
1227//
1228// Use "Send" method on the returned Request to send the API call to the service.
1229// the "output" return value is not valid until after Send returns without error.
1230//
1231// See RejectInvitation for more information on using the RejectInvitation
1232// API call, and error handling.
1233//
1234// This method is useful when you want to inject custom logic or configuration
1235// into the SDK's request lifecycle. Such as custom headers, or retry logic.
1236//
1237//
1238//    // Example sending a request using the RejectInvitationRequest method.
1239//    req, resp := client.RejectInvitationRequest(params)
1240//
1241//    err := req.Send()
1242//    if err == nil { // resp is now filled
1243//        fmt.Println(resp)
1244//    }
1245//
1246// See also, https://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/RejectInvitation
1247func (c *Detective) RejectInvitationRequest(input *RejectInvitationInput) (req *request.Request, output *RejectInvitationOutput) {
1248	op := &request.Operation{
1249		Name:       opRejectInvitation,
1250		HTTPMethod: "POST",
1251		HTTPPath:   "/invitation/removal",
1252	}
1253
1254	if input == nil {
1255		input = &RejectInvitationInput{}
1256	}
1257
1258	output = &RejectInvitationOutput{}
1259	req = c.newRequest(op, input, output)
1260	req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
1261	return
1262}
1263
1264// RejectInvitation API operation for Amazon Detective.
1265//
1266// Rejects an invitation to contribute the account data to a behavior graph.
1267// This operation must be called by a member account that has the INVITED status.
1268//
1269// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
1270// with awserr.Error's Code and Message methods to get detailed information about
1271// the error.
1272//
1273// See the AWS API reference guide for Amazon Detective's
1274// API operation RejectInvitation for usage and error information.
1275//
1276// Returned Error Types:
1277//   * ConflictException
1278//   The request attempted an invalid action.
1279//
1280//   * InternalServerException
1281//   The request was valid but failed because of a problem with the service.
1282//
1283//   * ResourceNotFoundException
1284//   The request refers to a nonexistent resource.
1285//
1286//   * ValidationException
1287//   The request parameters are invalid.
1288//
1289// See also, https://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/RejectInvitation
1290func (c *Detective) RejectInvitation(input *RejectInvitationInput) (*RejectInvitationOutput, error) {
1291	req, out := c.RejectInvitationRequest(input)
1292	return out, req.Send()
1293}
1294
1295// RejectInvitationWithContext is the same as RejectInvitation with the addition of
1296// the ability to pass a context and additional request options.
1297//
1298// See RejectInvitation for details on how to use this API operation.
1299//
1300// The context must be non-nil and will be used for request cancellation. If
1301// the context is nil a panic will occur. In the future the SDK may create
1302// sub-contexts for http.Requests. See https://golang.org/pkg/context/
1303// for more information on using Contexts.
1304func (c *Detective) RejectInvitationWithContext(ctx aws.Context, input *RejectInvitationInput, opts ...request.Option) (*RejectInvitationOutput, error) {
1305	req, out := c.RejectInvitationRequest(input)
1306	req.SetContext(ctx)
1307	req.ApplyOptions(opts...)
1308	return out, req.Send()
1309}
1310
1311const opStartMonitoringMember = "StartMonitoringMember"
1312
1313// StartMonitoringMemberRequest generates a "aws/request.Request" representing the
1314// client's request for the StartMonitoringMember operation. The "output" return
1315// value will be populated with the request's response once the request completes
1316// successfully.
1317//
1318// Use "Send" method on the returned Request to send the API call to the service.
1319// the "output" return value is not valid until after Send returns without error.
1320//
1321// See StartMonitoringMember for more information on using the StartMonitoringMember
1322// API call, and error handling.
1323//
1324// This method is useful when you want to inject custom logic or configuration
1325// into the SDK's request lifecycle. Such as custom headers, or retry logic.
1326//
1327//
1328//    // Example sending a request using the StartMonitoringMemberRequest method.
1329//    req, resp := client.StartMonitoringMemberRequest(params)
1330//
1331//    err := req.Send()
1332//    if err == nil { // resp is now filled
1333//        fmt.Println(resp)
1334//    }
1335//
1336// See also, https://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/StartMonitoringMember
1337func (c *Detective) StartMonitoringMemberRequest(input *StartMonitoringMemberInput) (req *request.Request, output *StartMonitoringMemberOutput) {
1338	op := &request.Operation{
1339		Name:       opStartMonitoringMember,
1340		HTTPMethod: "POST",
1341		HTTPPath:   "/graph/member/monitoringstate",
1342	}
1343
1344	if input == nil {
1345		input = &StartMonitoringMemberInput{}
1346	}
1347
1348	output = &StartMonitoringMemberOutput{}
1349	req = c.newRequest(op, input, output)
1350	req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
1351	return
1352}
1353
1354// StartMonitoringMember API operation for Amazon Detective.
1355//
1356// Sends a request to enable data ingest for a member account that has a status
1357// of ACCEPTED_BUT_DISABLED.
1358//
1359// For valid member accounts, the status is updated as follows.
1360//
1361//    * If Detective enabled the member account, then the new status is ENABLED.
1362//
1363//    * If Detective cannot enable the member account, the status remains ACCEPTED_BUT_DISABLED.
1364//
1365// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
1366// with awserr.Error's Code and Message methods to get detailed information about
1367// the error.
1368//
1369// See the AWS API reference guide for Amazon Detective's
1370// API operation StartMonitoringMember for usage and error information.
1371//
1372// Returned Error Types:
1373//   * ConflictException
1374//   The request attempted an invalid action.
1375//
1376//   * InternalServerException
1377//   The request was valid but failed because of a problem with the service.
1378//
1379//   * ResourceNotFoundException
1380//   The request refers to a nonexistent resource.
1381//
1382//   * ServiceQuotaExceededException
1383//   This request cannot be completed for one of the following reasons.
1384//
1385//      * The request would cause the number of member accounts in the behavior
1386//      graph to exceed the maximum allowed. A behavior graph cannot have more
1387//      than 1000 member accounts.
1388//
1389//      * The request would cause the data rate for the behavior graph to exceed
1390//      the maximum allowed.
1391//
1392//      * Detective is unable to verify the data rate for the member account.
1393//      This is usually because the member account is not enrolled in Amazon GuardDuty.
1394//
1395//   * ValidationException
1396//   The request parameters are invalid.
1397//
1398// See also, https://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/StartMonitoringMember
1399func (c *Detective) StartMonitoringMember(input *StartMonitoringMemberInput) (*StartMonitoringMemberOutput, error) {
1400	req, out := c.StartMonitoringMemberRequest(input)
1401	return out, req.Send()
1402}
1403
1404// StartMonitoringMemberWithContext is the same as StartMonitoringMember with the addition of
1405// the ability to pass a context and additional request options.
1406//
1407// See StartMonitoringMember for details on how to use this API operation.
1408//
1409// The context must be non-nil and will be used for request cancellation. If
1410// the context is nil a panic will occur. In the future the SDK may create
1411// sub-contexts for http.Requests. See https://golang.org/pkg/context/
1412// for more information on using Contexts.
1413func (c *Detective) StartMonitoringMemberWithContext(ctx aws.Context, input *StartMonitoringMemberInput, opts ...request.Option) (*StartMonitoringMemberOutput, error) {
1414	req, out := c.StartMonitoringMemberRequest(input)
1415	req.SetContext(ctx)
1416	req.ApplyOptions(opts...)
1417	return out, req.Send()
1418}
1419
1420const opTagResource = "TagResource"
1421
1422// TagResourceRequest generates a "aws/request.Request" representing the
1423// client's request for the TagResource operation. The "output" return
1424// value will be populated with the request's response once the request completes
1425// successfully.
1426//
1427// Use "Send" method on the returned Request to send the API call to the service.
1428// the "output" return value is not valid until after Send returns without error.
1429//
1430// See TagResource for more information on using the TagResource
1431// API call, and error handling.
1432//
1433// This method is useful when you want to inject custom logic or configuration
1434// into the SDK's request lifecycle. Such as custom headers, or retry logic.
1435//
1436//
1437//    // Example sending a request using the TagResourceRequest method.
1438//    req, resp := client.TagResourceRequest(params)
1439//
1440//    err := req.Send()
1441//    if err == nil { // resp is now filled
1442//        fmt.Println(resp)
1443//    }
1444//
1445// See also, https://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/TagResource
1446func (c *Detective) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) {
1447	op := &request.Operation{
1448		Name:       opTagResource,
1449		HTTPMethod: "POST",
1450		HTTPPath:   "/tags/{ResourceArn}",
1451	}
1452
1453	if input == nil {
1454		input = &TagResourceInput{}
1455	}
1456
1457	output = &TagResourceOutput{}
1458	req = c.newRequest(op, input, output)
1459	req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
1460	return
1461}
1462
1463// TagResource API operation for Amazon Detective.
1464//
1465// Applies tag values to a behavior graph.
1466//
1467// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
1468// with awserr.Error's Code and Message methods to get detailed information about
1469// the error.
1470//
1471// See the AWS API reference guide for Amazon Detective's
1472// API operation TagResource for usage and error information.
1473//
1474// Returned Error Types:
1475//   * InternalServerException
1476//   The request was valid but failed because of a problem with the service.
1477//
1478//   * ValidationException
1479//   The request parameters are invalid.
1480//
1481//   * ResourceNotFoundException
1482//   The request refers to a nonexistent resource.
1483//
1484// See also, https://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/TagResource
1485func (c *Detective) TagResource(input *TagResourceInput) (*TagResourceOutput, error) {
1486	req, out := c.TagResourceRequest(input)
1487	return out, req.Send()
1488}
1489
1490// TagResourceWithContext is the same as TagResource with the addition of
1491// the ability to pass a context and additional request options.
1492//
1493// See TagResource for details on how to use this API operation.
1494//
1495// The context must be non-nil and will be used for request cancellation. If
1496// the context is nil a panic will occur. In the future the SDK may create
1497// sub-contexts for http.Requests. See https://golang.org/pkg/context/
1498// for more information on using Contexts.
1499func (c *Detective) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) {
1500	req, out := c.TagResourceRequest(input)
1501	req.SetContext(ctx)
1502	req.ApplyOptions(opts...)
1503	return out, req.Send()
1504}
1505
1506const opUntagResource = "UntagResource"
1507
1508// UntagResourceRequest generates a "aws/request.Request" representing the
1509// client's request for the UntagResource operation. The "output" return
1510// value will be populated with the request's response once the request completes
1511// successfully.
1512//
1513// Use "Send" method on the returned Request to send the API call to the service.
1514// the "output" return value is not valid until after Send returns without error.
1515//
1516// See UntagResource for more information on using the UntagResource
1517// API call, and error handling.
1518//
1519// This method is useful when you want to inject custom logic or configuration
1520// into the SDK's request lifecycle. Such as custom headers, or retry logic.
1521//
1522//
1523//    // Example sending a request using the UntagResourceRequest method.
1524//    req, resp := client.UntagResourceRequest(params)
1525//
1526//    err := req.Send()
1527//    if err == nil { // resp is now filled
1528//        fmt.Println(resp)
1529//    }
1530//
1531// See also, https://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/UntagResource
1532func (c *Detective) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) {
1533	op := &request.Operation{
1534		Name:       opUntagResource,
1535		HTTPMethod: "DELETE",
1536		HTTPPath:   "/tags/{ResourceArn}",
1537	}
1538
1539	if input == nil {
1540		input = &UntagResourceInput{}
1541	}
1542
1543	output = &UntagResourceOutput{}
1544	req = c.newRequest(op, input, output)
1545	req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler)
1546	return
1547}
1548
1549// UntagResource API operation for Amazon Detective.
1550//
1551// Removes tags from a behavior graph.
1552//
1553// Returns awserr.Error for service API and SDK errors. Use runtime type assertions
1554// with awserr.Error's Code and Message methods to get detailed information about
1555// the error.
1556//
1557// See the AWS API reference guide for Amazon Detective's
1558// API operation UntagResource for usage and error information.
1559//
1560// Returned Error Types:
1561//   * InternalServerException
1562//   The request was valid but failed because of a problem with the service.
1563//
1564//   * ValidationException
1565//   The request parameters are invalid.
1566//
1567//   * ResourceNotFoundException
1568//   The request refers to a nonexistent resource.
1569//
1570// See also, https://docs.aws.amazon.com/goto/WebAPI/detective-2018-10-26/UntagResource
1571func (c *Detective) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) {
1572	req, out := c.UntagResourceRequest(input)
1573	return out, req.Send()
1574}
1575
1576// UntagResourceWithContext is the same as UntagResource with the addition of
1577// the ability to pass a context and additional request options.
1578//
1579// See UntagResource for details on how to use this API operation.
1580//
1581// The context must be non-nil and will be used for request cancellation. If
1582// the context is nil a panic will occur. In the future the SDK may create
1583// sub-contexts for http.Requests. See https://golang.org/pkg/context/
1584// for more information on using Contexts.
1585func (c *Detective) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) {
1586	req, out := c.UntagResourceRequest(input)
1587	req.SetContext(ctx)
1588	req.ApplyOptions(opts...)
1589	return out, req.Send()
1590}
1591
1592type AcceptInvitationInput struct {
1593	_ struct{} `type:"structure"`
1594
1595	// The ARN of the behavior graph that the member account is accepting the invitation
1596	// for.
1597	//
1598	// The member account status in the behavior graph must be INVITED.
1599	//
1600	// GraphArn is a required field
1601	GraphArn *string `type:"string" required:"true"`
1602}
1603
1604// String returns the string representation.
1605//
1606// API parameter values that are decorated as "sensitive" in the API will not
1607// be included in the string output. The member name will be present, but the
1608// value will be replaced with "sensitive".
1609func (s AcceptInvitationInput) String() string {
1610	return awsutil.Prettify(s)
1611}
1612
1613// GoString returns the string representation.
1614//
1615// API parameter values that are decorated as "sensitive" in the API will not
1616// be included in the string output. The member name will be present, but the
1617// value will be replaced with "sensitive".
1618func (s AcceptInvitationInput) GoString() string {
1619	return s.String()
1620}
1621
1622// Validate inspects the fields of the type to determine if they are valid.
1623func (s *AcceptInvitationInput) Validate() error {
1624	invalidParams := request.ErrInvalidParams{Context: "AcceptInvitationInput"}
1625	if s.GraphArn == nil {
1626		invalidParams.Add(request.NewErrParamRequired("GraphArn"))
1627	}
1628
1629	if invalidParams.Len() > 0 {
1630		return invalidParams
1631	}
1632	return nil
1633}
1634
1635// SetGraphArn sets the GraphArn field's value.
1636func (s *AcceptInvitationInput) SetGraphArn(v string) *AcceptInvitationInput {
1637	s.GraphArn = &v
1638	return s
1639}
1640
1641type AcceptInvitationOutput struct {
1642	_ struct{} `type:"structure"`
1643}
1644
1645// String returns the string representation.
1646//
1647// API parameter values that are decorated as "sensitive" in the API will not
1648// be included in the string output. The member name will be present, but the
1649// value will be replaced with "sensitive".
1650func (s AcceptInvitationOutput) String() string {
1651	return awsutil.Prettify(s)
1652}
1653
1654// GoString returns the string representation.
1655//
1656// API parameter values that are decorated as "sensitive" in the API will not
1657// be included in the string output. The member name will be present, but the
1658// value will be replaced with "sensitive".
1659func (s AcceptInvitationOutput) GoString() string {
1660	return s.String()
1661}
1662
1663// An AWS account that is the administrator account of or a member of a behavior
1664// graph.
1665type Account struct {
1666	_ struct{} `type:"structure"`
1667
1668	// The account identifier of the AWS account.
1669	//
1670	// AccountId is a required field
1671	AccountId *string `min:"12" type:"string" required:"true"`
1672
1673	// The AWS account root user email address for the AWS account.
1674	//
1675	// EmailAddress is a required field
1676	EmailAddress *string `min:"1" type:"string" required:"true"`
1677}
1678
1679// String returns the string representation.
1680//
1681// API parameter values that are decorated as "sensitive" in the API will not
1682// be included in the string output. The member name will be present, but the
1683// value will be replaced with "sensitive".
1684func (s Account) String() string {
1685	return awsutil.Prettify(s)
1686}
1687
1688// GoString returns the string representation.
1689//
1690// API parameter values that are decorated as "sensitive" in the API will not
1691// be included in the string output. The member name will be present, but the
1692// value will be replaced with "sensitive".
1693func (s Account) GoString() string {
1694	return s.String()
1695}
1696
1697// Validate inspects the fields of the type to determine if they are valid.
1698func (s *Account) Validate() error {
1699	invalidParams := request.ErrInvalidParams{Context: "Account"}
1700	if s.AccountId == nil {
1701		invalidParams.Add(request.NewErrParamRequired("AccountId"))
1702	}
1703	if s.AccountId != nil && len(*s.AccountId) < 12 {
1704		invalidParams.Add(request.NewErrParamMinLen("AccountId", 12))
1705	}
1706	if s.EmailAddress == nil {
1707		invalidParams.Add(request.NewErrParamRequired("EmailAddress"))
1708	}
1709	if s.EmailAddress != nil && len(*s.EmailAddress) < 1 {
1710		invalidParams.Add(request.NewErrParamMinLen("EmailAddress", 1))
1711	}
1712
1713	if invalidParams.Len() > 0 {
1714		return invalidParams
1715	}
1716	return nil
1717}
1718
1719// SetAccountId sets the AccountId field's value.
1720func (s *Account) SetAccountId(v string) *Account {
1721	s.AccountId = &v
1722	return s
1723}
1724
1725// SetEmailAddress sets the EmailAddress field's value.
1726func (s *Account) SetEmailAddress(v string) *Account {
1727	s.EmailAddress = &v
1728	return s
1729}
1730
1731// The request attempted an invalid action.
1732type ConflictException struct {
1733	_            struct{}                  `type:"structure"`
1734	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
1735
1736	Message_ *string `locationName:"Message" type:"string"`
1737}
1738
1739// String returns the string representation.
1740//
1741// API parameter values that are decorated as "sensitive" in the API will not
1742// be included in the string output. The member name will be present, but the
1743// value will be replaced with "sensitive".
1744func (s ConflictException) String() string {
1745	return awsutil.Prettify(s)
1746}
1747
1748// GoString returns the string representation.
1749//
1750// API parameter values that are decorated as "sensitive" in the API will not
1751// be included in the string output. The member name will be present, but the
1752// value will be replaced with "sensitive".
1753func (s ConflictException) GoString() string {
1754	return s.String()
1755}
1756
1757func newErrorConflictException(v protocol.ResponseMetadata) error {
1758	return &ConflictException{
1759		RespMetadata: v,
1760	}
1761}
1762
1763// Code returns the exception type name.
1764func (s *ConflictException) Code() string {
1765	return "ConflictException"
1766}
1767
1768// Message returns the exception's message.
1769func (s *ConflictException) Message() string {
1770	if s.Message_ != nil {
1771		return *s.Message_
1772	}
1773	return ""
1774}
1775
1776// OrigErr always returns nil, satisfies awserr.Error interface.
1777func (s *ConflictException) OrigErr() error {
1778	return nil
1779}
1780
1781func (s *ConflictException) Error() string {
1782	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
1783}
1784
1785// Status code returns the HTTP status code for the request's response error.
1786func (s *ConflictException) StatusCode() int {
1787	return s.RespMetadata.StatusCode
1788}
1789
1790// RequestID returns the service's response RequestID for request.
1791func (s *ConflictException) RequestID() string {
1792	return s.RespMetadata.RequestID
1793}
1794
1795type CreateGraphInput struct {
1796	_ struct{} `type:"structure"`
1797
1798	// The tags to assign to the new behavior graph. You can add up to 50 tags.
1799	// For each tag, you provide the tag key and the tag value. Each tag key can
1800	// contain up to 128 characters. Each tag value can contain up to 256 characters.
1801	Tags map[string]*string `min:"1" type:"map"`
1802}
1803
1804// String returns the string representation.
1805//
1806// API parameter values that are decorated as "sensitive" in the API will not
1807// be included in the string output. The member name will be present, but the
1808// value will be replaced with "sensitive".
1809func (s CreateGraphInput) String() string {
1810	return awsutil.Prettify(s)
1811}
1812
1813// GoString returns the string representation.
1814//
1815// API parameter values that are decorated as "sensitive" in the API will not
1816// be included in the string output. The member name will be present, but the
1817// value will be replaced with "sensitive".
1818func (s CreateGraphInput) GoString() string {
1819	return s.String()
1820}
1821
1822// Validate inspects the fields of the type to determine if they are valid.
1823func (s *CreateGraphInput) Validate() error {
1824	invalidParams := request.ErrInvalidParams{Context: "CreateGraphInput"}
1825	if s.Tags != nil && len(s.Tags) < 1 {
1826		invalidParams.Add(request.NewErrParamMinLen("Tags", 1))
1827	}
1828
1829	if invalidParams.Len() > 0 {
1830		return invalidParams
1831	}
1832	return nil
1833}
1834
1835// SetTags sets the Tags field's value.
1836func (s *CreateGraphInput) SetTags(v map[string]*string) *CreateGraphInput {
1837	s.Tags = v
1838	return s
1839}
1840
1841type CreateGraphOutput struct {
1842	_ struct{} `type:"structure"`
1843
1844	// The ARN of the new behavior graph.
1845	GraphArn *string `type:"string"`
1846}
1847
1848// String returns the string representation.
1849//
1850// API parameter values that are decorated as "sensitive" in the API will not
1851// be included in the string output. The member name will be present, but the
1852// value will be replaced with "sensitive".
1853func (s CreateGraphOutput) String() string {
1854	return awsutil.Prettify(s)
1855}
1856
1857// GoString returns the string representation.
1858//
1859// API parameter values that are decorated as "sensitive" in the API will not
1860// be included in the string output. The member name will be present, but the
1861// value will be replaced with "sensitive".
1862func (s CreateGraphOutput) GoString() string {
1863	return s.String()
1864}
1865
1866// SetGraphArn sets the GraphArn field's value.
1867func (s *CreateGraphOutput) SetGraphArn(v string) *CreateGraphOutput {
1868	s.GraphArn = &v
1869	return s
1870}
1871
1872type CreateMembersInput struct {
1873	_ struct{} `type:"structure"`
1874
1875	// The list of AWS accounts to invite to become member accounts in the behavior
1876	// graph. You can invite up to 50 accounts at a time. For each invited account,
1877	// the account list contains the account identifier and the AWS account root
1878	// user email address.
1879	//
1880	// Accounts is a required field
1881	Accounts []*Account `min:"1" type:"list" required:"true"`
1882
1883	// if set to true, then the member accounts do not receive email notifications.
1884	// By default, this is set to false, and the member accounts receive email notifications.
1885	DisableEmailNotification *bool `type:"boolean"`
1886
1887	// The ARN of the behavior graph to invite the member accounts to contribute
1888	// their data to.
1889	//
1890	// GraphArn is a required field
1891	GraphArn *string `type:"string" required:"true"`
1892
1893	// Customized message text to include in the invitation email message to the
1894	// invited member accounts.
1895	Message *string `min:"1" type:"string"`
1896}
1897
1898// String returns the string representation.
1899//
1900// API parameter values that are decorated as "sensitive" in the API will not
1901// be included in the string output. The member name will be present, but the
1902// value will be replaced with "sensitive".
1903func (s CreateMembersInput) String() string {
1904	return awsutil.Prettify(s)
1905}
1906
1907// GoString returns the string representation.
1908//
1909// API parameter values that are decorated as "sensitive" in the API will not
1910// be included in the string output. The member name will be present, but the
1911// value will be replaced with "sensitive".
1912func (s CreateMembersInput) GoString() string {
1913	return s.String()
1914}
1915
1916// Validate inspects the fields of the type to determine if they are valid.
1917func (s *CreateMembersInput) Validate() error {
1918	invalidParams := request.ErrInvalidParams{Context: "CreateMembersInput"}
1919	if s.Accounts == nil {
1920		invalidParams.Add(request.NewErrParamRequired("Accounts"))
1921	}
1922	if s.Accounts != nil && len(s.Accounts) < 1 {
1923		invalidParams.Add(request.NewErrParamMinLen("Accounts", 1))
1924	}
1925	if s.GraphArn == nil {
1926		invalidParams.Add(request.NewErrParamRequired("GraphArn"))
1927	}
1928	if s.Message != nil && len(*s.Message) < 1 {
1929		invalidParams.Add(request.NewErrParamMinLen("Message", 1))
1930	}
1931	if s.Accounts != nil {
1932		for i, v := range s.Accounts {
1933			if v == nil {
1934				continue
1935			}
1936			if err := v.Validate(); err != nil {
1937				invalidParams.AddNested(fmt.Sprintf("%s[%v]", "Accounts", i), err.(request.ErrInvalidParams))
1938			}
1939		}
1940	}
1941
1942	if invalidParams.Len() > 0 {
1943		return invalidParams
1944	}
1945	return nil
1946}
1947
1948// SetAccounts sets the Accounts field's value.
1949func (s *CreateMembersInput) SetAccounts(v []*Account) *CreateMembersInput {
1950	s.Accounts = v
1951	return s
1952}
1953
1954// SetDisableEmailNotification sets the DisableEmailNotification field's value.
1955func (s *CreateMembersInput) SetDisableEmailNotification(v bool) *CreateMembersInput {
1956	s.DisableEmailNotification = &v
1957	return s
1958}
1959
1960// SetGraphArn sets the GraphArn field's value.
1961func (s *CreateMembersInput) SetGraphArn(v string) *CreateMembersInput {
1962	s.GraphArn = &v
1963	return s
1964}
1965
1966// SetMessage sets the Message field's value.
1967func (s *CreateMembersInput) SetMessage(v string) *CreateMembersInput {
1968	s.Message = &v
1969	return s
1970}
1971
1972type CreateMembersOutput struct {
1973	_ struct{} `type:"structure"`
1974
1975	// The set of member account invitation requests that Detective was able to
1976	// process. This includes accounts that are being verified, that failed verification,
1977	// and that passed verification and are being sent an invitation.
1978	Members []*MemberDetail `type:"list"`
1979
1980	// The list of accounts for which Detective was unable to process the invitation
1981	// request. For each account, the list provides the reason why the request could
1982	// not be processed. The list includes accounts that are already member accounts
1983	// in the behavior graph.
1984	UnprocessedAccounts []*UnprocessedAccount `type:"list"`
1985}
1986
1987// String returns the string representation.
1988//
1989// API parameter values that are decorated as "sensitive" in the API will not
1990// be included in the string output. The member name will be present, but the
1991// value will be replaced with "sensitive".
1992func (s CreateMembersOutput) String() string {
1993	return awsutil.Prettify(s)
1994}
1995
1996// GoString returns the string representation.
1997//
1998// API parameter values that are decorated as "sensitive" in the API will not
1999// be included in the string output. The member name will be present, but the
2000// value will be replaced with "sensitive".
2001func (s CreateMembersOutput) GoString() string {
2002	return s.String()
2003}
2004
2005// SetMembers sets the Members field's value.
2006func (s *CreateMembersOutput) SetMembers(v []*MemberDetail) *CreateMembersOutput {
2007	s.Members = v
2008	return s
2009}
2010
2011// SetUnprocessedAccounts sets the UnprocessedAccounts field's value.
2012func (s *CreateMembersOutput) SetUnprocessedAccounts(v []*UnprocessedAccount) *CreateMembersOutput {
2013	s.UnprocessedAccounts = v
2014	return s
2015}
2016
2017type DeleteGraphInput struct {
2018	_ struct{} `type:"structure"`
2019
2020	// The ARN of the behavior graph to disable.
2021	//
2022	// GraphArn is a required field
2023	GraphArn *string `type:"string" required:"true"`
2024}
2025
2026// String returns the string representation.
2027//
2028// API parameter values that are decorated as "sensitive" in the API will not
2029// be included in the string output. The member name will be present, but the
2030// value will be replaced with "sensitive".
2031func (s DeleteGraphInput) String() string {
2032	return awsutil.Prettify(s)
2033}
2034
2035// GoString returns the string representation.
2036//
2037// API parameter values that are decorated as "sensitive" in the API will not
2038// be included in the string output. The member name will be present, but the
2039// value will be replaced with "sensitive".
2040func (s DeleteGraphInput) GoString() string {
2041	return s.String()
2042}
2043
2044// Validate inspects the fields of the type to determine if they are valid.
2045func (s *DeleteGraphInput) Validate() error {
2046	invalidParams := request.ErrInvalidParams{Context: "DeleteGraphInput"}
2047	if s.GraphArn == nil {
2048		invalidParams.Add(request.NewErrParamRequired("GraphArn"))
2049	}
2050
2051	if invalidParams.Len() > 0 {
2052		return invalidParams
2053	}
2054	return nil
2055}
2056
2057// SetGraphArn sets the GraphArn field's value.
2058func (s *DeleteGraphInput) SetGraphArn(v string) *DeleteGraphInput {
2059	s.GraphArn = &v
2060	return s
2061}
2062
2063type DeleteGraphOutput struct {
2064	_ struct{} `type:"structure"`
2065}
2066
2067// String returns the string representation.
2068//
2069// API parameter values that are decorated as "sensitive" in the API will not
2070// be included in the string output. The member name will be present, but the
2071// value will be replaced with "sensitive".
2072func (s DeleteGraphOutput) String() string {
2073	return awsutil.Prettify(s)
2074}
2075
2076// GoString returns the string representation.
2077//
2078// API parameter values that are decorated as "sensitive" in the API will not
2079// be included in the string output. The member name will be present, but the
2080// value will be replaced with "sensitive".
2081func (s DeleteGraphOutput) GoString() string {
2082	return s.String()
2083}
2084
2085type DeleteMembersInput struct {
2086	_ struct{} `type:"structure"`
2087
2088	// The list of AWS account identifiers for the member accounts to delete from
2089	// the behavior graph. You can delete up to 50 member accounts at a time.
2090	//
2091	// AccountIds is a required field
2092	AccountIds []*string `min:"1" type:"list" required:"true"`
2093
2094	// The ARN of the behavior graph to delete members from.
2095	//
2096	// GraphArn is a required field
2097	GraphArn *string `type:"string" required:"true"`
2098}
2099
2100// String returns the string representation.
2101//
2102// API parameter values that are decorated as "sensitive" in the API will not
2103// be included in the string output. The member name will be present, but the
2104// value will be replaced with "sensitive".
2105func (s DeleteMembersInput) String() string {
2106	return awsutil.Prettify(s)
2107}
2108
2109// GoString returns the string representation.
2110//
2111// API parameter values that are decorated as "sensitive" in the API will not
2112// be included in the string output. The member name will be present, but the
2113// value will be replaced with "sensitive".
2114func (s DeleteMembersInput) GoString() string {
2115	return s.String()
2116}
2117
2118// Validate inspects the fields of the type to determine if they are valid.
2119func (s *DeleteMembersInput) Validate() error {
2120	invalidParams := request.ErrInvalidParams{Context: "DeleteMembersInput"}
2121	if s.AccountIds == nil {
2122		invalidParams.Add(request.NewErrParamRequired("AccountIds"))
2123	}
2124	if s.AccountIds != nil && len(s.AccountIds) < 1 {
2125		invalidParams.Add(request.NewErrParamMinLen("AccountIds", 1))
2126	}
2127	if s.GraphArn == nil {
2128		invalidParams.Add(request.NewErrParamRequired("GraphArn"))
2129	}
2130
2131	if invalidParams.Len() > 0 {
2132		return invalidParams
2133	}
2134	return nil
2135}
2136
2137// SetAccountIds sets the AccountIds field's value.
2138func (s *DeleteMembersInput) SetAccountIds(v []*string) *DeleteMembersInput {
2139	s.AccountIds = v
2140	return s
2141}
2142
2143// SetGraphArn sets the GraphArn field's value.
2144func (s *DeleteMembersInput) SetGraphArn(v string) *DeleteMembersInput {
2145	s.GraphArn = &v
2146	return s
2147}
2148
2149type DeleteMembersOutput struct {
2150	_ struct{} `type:"structure"`
2151
2152	// The list of AWS account identifiers for the member accounts that Detective
2153	// successfully deleted from the behavior graph.
2154	AccountIds []*string `min:"1" type:"list"`
2155
2156	// The list of member accounts that Detective was not able to delete from the
2157	// behavior graph. For each member account, provides the reason that the deletion
2158	// could not be processed.
2159	UnprocessedAccounts []*UnprocessedAccount `type:"list"`
2160}
2161
2162// String returns the string representation.
2163//
2164// API parameter values that are decorated as "sensitive" in the API will not
2165// be included in the string output. The member name will be present, but the
2166// value will be replaced with "sensitive".
2167func (s DeleteMembersOutput) String() string {
2168	return awsutil.Prettify(s)
2169}
2170
2171// GoString returns the string representation.
2172//
2173// API parameter values that are decorated as "sensitive" in the API will not
2174// be included in the string output. The member name will be present, but the
2175// value will be replaced with "sensitive".
2176func (s DeleteMembersOutput) GoString() string {
2177	return s.String()
2178}
2179
2180// SetAccountIds sets the AccountIds field's value.
2181func (s *DeleteMembersOutput) SetAccountIds(v []*string) *DeleteMembersOutput {
2182	s.AccountIds = v
2183	return s
2184}
2185
2186// SetUnprocessedAccounts sets the UnprocessedAccounts field's value.
2187func (s *DeleteMembersOutput) SetUnprocessedAccounts(v []*UnprocessedAccount) *DeleteMembersOutput {
2188	s.UnprocessedAccounts = v
2189	return s
2190}
2191
2192type DisassociateMembershipInput struct {
2193	_ struct{} `type:"structure"`
2194
2195	// The ARN of the behavior graph to remove the member account from.
2196	//
2197	// The member account's member status in the behavior graph must be ENABLED.
2198	//
2199	// GraphArn is a required field
2200	GraphArn *string `type:"string" required:"true"`
2201}
2202
2203// String returns the string representation.
2204//
2205// API parameter values that are decorated as "sensitive" in the API will not
2206// be included in the string output. The member name will be present, but the
2207// value will be replaced with "sensitive".
2208func (s DisassociateMembershipInput) String() string {
2209	return awsutil.Prettify(s)
2210}
2211
2212// GoString returns the string representation.
2213//
2214// API parameter values that are decorated as "sensitive" in the API will not
2215// be included in the string output. The member name will be present, but the
2216// value will be replaced with "sensitive".
2217func (s DisassociateMembershipInput) GoString() string {
2218	return s.String()
2219}
2220
2221// Validate inspects the fields of the type to determine if they are valid.
2222func (s *DisassociateMembershipInput) Validate() error {
2223	invalidParams := request.ErrInvalidParams{Context: "DisassociateMembershipInput"}
2224	if s.GraphArn == nil {
2225		invalidParams.Add(request.NewErrParamRequired("GraphArn"))
2226	}
2227
2228	if invalidParams.Len() > 0 {
2229		return invalidParams
2230	}
2231	return nil
2232}
2233
2234// SetGraphArn sets the GraphArn field's value.
2235func (s *DisassociateMembershipInput) SetGraphArn(v string) *DisassociateMembershipInput {
2236	s.GraphArn = &v
2237	return s
2238}
2239
2240type DisassociateMembershipOutput struct {
2241	_ struct{} `type:"structure"`
2242}
2243
2244// String returns the string representation.
2245//
2246// API parameter values that are decorated as "sensitive" in the API will not
2247// be included in the string output. The member name will be present, but the
2248// value will be replaced with "sensitive".
2249func (s DisassociateMembershipOutput) String() string {
2250	return awsutil.Prettify(s)
2251}
2252
2253// GoString returns the string representation.
2254//
2255// API parameter values that are decorated as "sensitive" in the API will not
2256// be included in the string output. The member name will be present, but the
2257// value will be replaced with "sensitive".
2258func (s DisassociateMembershipOutput) GoString() string {
2259	return s.String()
2260}
2261
2262type GetMembersInput struct {
2263	_ struct{} `type:"structure"`
2264
2265	// The list of AWS account identifiers for the member account for which to return
2266	// member details. You can request details for up to 50 member accounts at a
2267	// time.
2268	//
2269	// You cannot use GetMembers to retrieve information about member accounts that
2270	// were removed from the behavior graph.
2271	//
2272	// AccountIds is a required field
2273	AccountIds []*string `min:"1" type:"list" required:"true"`
2274
2275	// The ARN of the behavior graph for which to request the member details.
2276	//
2277	// GraphArn is a required field
2278	GraphArn *string `type:"string" required:"true"`
2279}
2280
2281// String returns the string representation.
2282//
2283// API parameter values that are decorated as "sensitive" in the API will not
2284// be included in the string output. The member name will be present, but the
2285// value will be replaced with "sensitive".
2286func (s GetMembersInput) String() string {
2287	return awsutil.Prettify(s)
2288}
2289
2290// GoString returns the string representation.
2291//
2292// API parameter values that are decorated as "sensitive" in the API will not
2293// be included in the string output. The member name will be present, but the
2294// value will be replaced with "sensitive".
2295func (s GetMembersInput) GoString() string {
2296	return s.String()
2297}
2298
2299// Validate inspects the fields of the type to determine if they are valid.
2300func (s *GetMembersInput) Validate() error {
2301	invalidParams := request.ErrInvalidParams{Context: "GetMembersInput"}
2302	if s.AccountIds == nil {
2303		invalidParams.Add(request.NewErrParamRequired("AccountIds"))
2304	}
2305	if s.AccountIds != nil && len(s.AccountIds) < 1 {
2306		invalidParams.Add(request.NewErrParamMinLen("AccountIds", 1))
2307	}
2308	if s.GraphArn == nil {
2309		invalidParams.Add(request.NewErrParamRequired("GraphArn"))
2310	}
2311
2312	if invalidParams.Len() > 0 {
2313		return invalidParams
2314	}
2315	return nil
2316}
2317
2318// SetAccountIds sets the AccountIds field's value.
2319func (s *GetMembersInput) SetAccountIds(v []*string) *GetMembersInput {
2320	s.AccountIds = v
2321	return s
2322}
2323
2324// SetGraphArn sets the GraphArn field's value.
2325func (s *GetMembersInput) SetGraphArn(v string) *GetMembersInput {
2326	s.GraphArn = &v
2327	return s
2328}
2329
2330type GetMembersOutput struct {
2331	_ struct{} `type:"structure"`
2332
2333	// The member account details that Detective is returning in response to the
2334	// request.
2335	MemberDetails []*MemberDetail `type:"list"`
2336
2337	// The requested member accounts for which Detective was unable to return member
2338	// details.
2339	//
2340	// For each account, provides the reason why the request could not be processed.
2341	UnprocessedAccounts []*UnprocessedAccount `type:"list"`
2342}
2343
2344// String returns the string representation.
2345//
2346// API parameter values that are decorated as "sensitive" in the API will not
2347// be included in the string output. The member name will be present, but the
2348// value will be replaced with "sensitive".
2349func (s GetMembersOutput) String() string {
2350	return awsutil.Prettify(s)
2351}
2352
2353// GoString returns the string representation.
2354//
2355// API parameter values that are decorated as "sensitive" in the API will not
2356// be included in the string output. The member name will be present, but the
2357// value will be replaced with "sensitive".
2358func (s GetMembersOutput) GoString() string {
2359	return s.String()
2360}
2361
2362// SetMemberDetails sets the MemberDetails field's value.
2363func (s *GetMembersOutput) SetMemberDetails(v []*MemberDetail) *GetMembersOutput {
2364	s.MemberDetails = v
2365	return s
2366}
2367
2368// SetUnprocessedAccounts sets the UnprocessedAccounts field's value.
2369func (s *GetMembersOutput) SetUnprocessedAccounts(v []*UnprocessedAccount) *GetMembersOutput {
2370	s.UnprocessedAccounts = v
2371	return s
2372}
2373
2374// A behavior graph in Detective.
2375type Graph struct {
2376	_ struct{} `type:"structure"`
2377
2378	// The ARN of the behavior graph.
2379	Arn *string `type:"string"`
2380
2381	// The date and time that the behavior graph was created. The value is in milliseconds
2382	// since the epoch.
2383	CreatedTime *time.Time `type:"timestamp" timestampFormat:"iso8601"`
2384}
2385
2386// String returns the string representation.
2387//
2388// API parameter values that are decorated as "sensitive" in the API will not
2389// be included in the string output. The member name will be present, but the
2390// value will be replaced with "sensitive".
2391func (s Graph) String() string {
2392	return awsutil.Prettify(s)
2393}
2394
2395// GoString returns the string representation.
2396//
2397// API parameter values that are decorated as "sensitive" in the API will not
2398// be included in the string output. The member name will be present, but the
2399// value will be replaced with "sensitive".
2400func (s Graph) GoString() string {
2401	return s.String()
2402}
2403
2404// SetArn sets the Arn field's value.
2405func (s *Graph) SetArn(v string) *Graph {
2406	s.Arn = &v
2407	return s
2408}
2409
2410// SetCreatedTime sets the CreatedTime field's value.
2411func (s *Graph) SetCreatedTime(v time.Time) *Graph {
2412	s.CreatedTime = &v
2413	return s
2414}
2415
2416// The request was valid but failed because of a problem with the service.
2417type InternalServerException struct {
2418	_            struct{}                  `type:"structure"`
2419	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
2420
2421	Message_ *string `locationName:"Message" type:"string"`
2422}
2423
2424// String returns the string representation.
2425//
2426// API parameter values that are decorated as "sensitive" in the API will not
2427// be included in the string output. The member name will be present, but the
2428// value will be replaced with "sensitive".
2429func (s InternalServerException) String() string {
2430	return awsutil.Prettify(s)
2431}
2432
2433// GoString returns the string representation.
2434//
2435// API parameter values that are decorated as "sensitive" in the API will not
2436// be included in the string output. The member name will be present, but the
2437// value will be replaced with "sensitive".
2438func (s InternalServerException) GoString() string {
2439	return s.String()
2440}
2441
2442func newErrorInternalServerException(v protocol.ResponseMetadata) error {
2443	return &InternalServerException{
2444		RespMetadata: v,
2445	}
2446}
2447
2448// Code returns the exception type name.
2449func (s *InternalServerException) Code() string {
2450	return "InternalServerException"
2451}
2452
2453// Message returns the exception's message.
2454func (s *InternalServerException) Message() string {
2455	if s.Message_ != nil {
2456		return *s.Message_
2457	}
2458	return ""
2459}
2460
2461// OrigErr always returns nil, satisfies awserr.Error interface.
2462func (s *InternalServerException) OrigErr() error {
2463	return nil
2464}
2465
2466func (s *InternalServerException) Error() string {
2467	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
2468}
2469
2470// Status code returns the HTTP status code for the request's response error.
2471func (s *InternalServerException) StatusCode() int {
2472	return s.RespMetadata.StatusCode
2473}
2474
2475// RequestID returns the service's response RequestID for request.
2476func (s *InternalServerException) RequestID() string {
2477	return s.RespMetadata.RequestID
2478}
2479
2480type ListGraphsInput struct {
2481	_ struct{} `type:"structure"`
2482
2483	// The maximum number of graphs to return at a time. The total must be less
2484	// than the overall limit on the number of results to return, which is currently
2485	// 200.
2486	MaxResults *int64 `min:"1" type:"integer"`
2487
2488	// For requests to get the next page of results, the pagination token that was
2489	// returned with the previous set of results. The initial request does not include
2490	// a pagination token.
2491	NextToken *string `min:"1" type:"string"`
2492}
2493
2494// String returns the string representation.
2495//
2496// API parameter values that are decorated as "sensitive" in the API will not
2497// be included in the string output. The member name will be present, but the
2498// value will be replaced with "sensitive".
2499func (s ListGraphsInput) String() string {
2500	return awsutil.Prettify(s)
2501}
2502
2503// GoString returns the string representation.
2504//
2505// API parameter values that are decorated as "sensitive" in the API will not
2506// be included in the string output. The member name will be present, but the
2507// value will be replaced with "sensitive".
2508func (s ListGraphsInput) GoString() string {
2509	return s.String()
2510}
2511
2512// Validate inspects the fields of the type to determine if they are valid.
2513func (s *ListGraphsInput) Validate() error {
2514	invalidParams := request.ErrInvalidParams{Context: "ListGraphsInput"}
2515	if s.MaxResults != nil && *s.MaxResults < 1 {
2516		invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
2517	}
2518	if s.NextToken != nil && len(*s.NextToken) < 1 {
2519		invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
2520	}
2521
2522	if invalidParams.Len() > 0 {
2523		return invalidParams
2524	}
2525	return nil
2526}
2527
2528// SetMaxResults sets the MaxResults field's value.
2529func (s *ListGraphsInput) SetMaxResults(v int64) *ListGraphsInput {
2530	s.MaxResults = &v
2531	return s
2532}
2533
2534// SetNextToken sets the NextToken field's value.
2535func (s *ListGraphsInput) SetNextToken(v string) *ListGraphsInput {
2536	s.NextToken = &v
2537	return s
2538}
2539
2540type ListGraphsOutput struct {
2541	_ struct{} `type:"structure"`
2542
2543	// A list of behavior graphs that the account is an administrator account for.
2544	GraphList []*Graph `type:"list"`
2545
2546	// If there are more behavior graphs remaining in the results, then this is
2547	// the pagination token to use to request the next page of behavior graphs.
2548	NextToken *string `min:"1" type:"string"`
2549}
2550
2551// String returns the string representation.
2552//
2553// API parameter values that are decorated as "sensitive" in the API will not
2554// be included in the string output. The member name will be present, but the
2555// value will be replaced with "sensitive".
2556func (s ListGraphsOutput) String() string {
2557	return awsutil.Prettify(s)
2558}
2559
2560// GoString returns the string representation.
2561//
2562// API parameter values that are decorated as "sensitive" in the API will not
2563// be included in the string output. The member name will be present, but the
2564// value will be replaced with "sensitive".
2565func (s ListGraphsOutput) GoString() string {
2566	return s.String()
2567}
2568
2569// SetGraphList sets the GraphList field's value.
2570func (s *ListGraphsOutput) SetGraphList(v []*Graph) *ListGraphsOutput {
2571	s.GraphList = v
2572	return s
2573}
2574
2575// SetNextToken sets the NextToken field's value.
2576func (s *ListGraphsOutput) SetNextToken(v string) *ListGraphsOutput {
2577	s.NextToken = &v
2578	return s
2579}
2580
2581type ListInvitationsInput struct {
2582	_ struct{} `type:"structure"`
2583
2584	// The maximum number of behavior graph invitations to return in the response.
2585	// The total must be less than the overall limit on the number of results to
2586	// return, which is currently 200.
2587	MaxResults *int64 `min:"1" type:"integer"`
2588
2589	// For requests to retrieve the next page of results, the pagination token that
2590	// was returned with the previous page of results. The initial request does
2591	// not include a pagination token.
2592	NextToken *string `min:"1" type:"string"`
2593}
2594
2595// String returns the string representation.
2596//
2597// API parameter values that are decorated as "sensitive" in the API will not
2598// be included in the string output. The member name will be present, but the
2599// value will be replaced with "sensitive".
2600func (s ListInvitationsInput) String() string {
2601	return awsutil.Prettify(s)
2602}
2603
2604// GoString returns the string representation.
2605//
2606// API parameter values that are decorated as "sensitive" in the API will not
2607// be included in the string output. The member name will be present, but the
2608// value will be replaced with "sensitive".
2609func (s ListInvitationsInput) GoString() string {
2610	return s.String()
2611}
2612
2613// Validate inspects the fields of the type to determine if they are valid.
2614func (s *ListInvitationsInput) Validate() error {
2615	invalidParams := request.ErrInvalidParams{Context: "ListInvitationsInput"}
2616	if s.MaxResults != nil && *s.MaxResults < 1 {
2617		invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
2618	}
2619	if s.NextToken != nil && len(*s.NextToken) < 1 {
2620		invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
2621	}
2622
2623	if invalidParams.Len() > 0 {
2624		return invalidParams
2625	}
2626	return nil
2627}
2628
2629// SetMaxResults sets the MaxResults field's value.
2630func (s *ListInvitationsInput) SetMaxResults(v int64) *ListInvitationsInput {
2631	s.MaxResults = &v
2632	return s
2633}
2634
2635// SetNextToken sets the NextToken field's value.
2636func (s *ListInvitationsInput) SetNextToken(v string) *ListInvitationsInput {
2637	s.NextToken = &v
2638	return s
2639}
2640
2641type ListInvitationsOutput struct {
2642	_ struct{} `type:"structure"`
2643
2644	// The list of behavior graphs for which the member account has open or accepted
2645	// invitations.
2646	Invitations []*MemberDetail `type:"list"`
2647
2648	// If there are more behavior graphs remaining in the results, then this is
2649	// the pagination token to use to request the next page of behavior graphs.
2650	NextToken *string `min:"1" type:"string"`
2651}
2652
2653// String returns the string representation.
2654//
2655// API parameter values that are decorated as "sensitive" in the API will not
2656// be included in the string output. The member name will be present, but the
2657// value will be replaced with "sensitive".
2658func (s ListInvitationsOutput) String() string {
2659	return awsutil.Prettify(s)
2660}
2661
2662// GoString returns the string representation.
2663//
2664// API parameter values that are decorated as "sensitive" in the API will not
2665// be included in the string output. The member name will be present, but the
2666// value will be replaced with "sensitive".
2667func (s ListInvitationsOutput) GoString() string {
2668	return s.String()
2669}
2670
2671// SetInvitations sets the Invitations field's value.
2672func (s *ListInvitationsOutput) SetInvitations(v []*MemberDetail) *ListInvitationsOutput {
2673	s.Invitations = v
2674	return s
2675}
2676
2677// SetNextToken sets the NextToken field's value.
2678func (s *ListInvitationsOutput) SetNextToken(v string) *ListInvitationsOutput {
2679	s.NextToken = &v
2680	return s
2681}
2682
2683type ListMembersInput struct {
2684	_ struct{} `type:"structure"`
2685
2686	// The ARN of the behavior graph for which to retrieve the list of member accounts.
2687	//
2688	// GraphArn is a required field
2689	GraphArn *string `type:"string" required:"true"`
2690
2691	// The maximum number of member accounts to include in the response. The total
2692	// must be less than the overall limit on the number of results to return, which
2693	// is currently 200.
2694	MaxResults *int64 `min:"1" type:"integer"`
2695
2696	// For requests to retrieve the next page of member account results, the pagination
2697	// token that was returned with the previous page of results. The initial request
2698	// does not include a pagination token.
2699	NextToken *string `min:"1" type:"string"`
2700}
2701
2702// String returns the string representation.
2703//
2704// API parameter values that are decorated as "sensitive" in the API will not
2705// be included in the string output. The member name will be present, but the
2706// value will be replaced with "sensitive".
2707func (s ListMembersInput) String() string {
2708	return awsutil.Prettify(s)
2709}
2710
2711// GoString returns the string representation.
2712//
2713// API parameter values that are decorated as "sensitive" in the API will not
2714// be included in the string output. The member name will be present, but the
2715// value will be replaced with "sensitive".
2716func (s ListMembersInput) GoString() string {
2717	return s.String()
2718}
2719
2720// Validate inspects the fields of the type to determine if they are valid.
2721func (s *ListMembersInput) Validate() error {
2722	invalidParams := request.ErrInvalidParams{Context: "ListMembersInput"}
2723	if s.GraphArn == nil {
2724		invalidParams.Add(request.NewErrParamRequired("GraphArn"))
2725	}
2726	if s.MaxResults != nil && *s.MaxResults < 1 {
2727		invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1))
2728	}
2729	if s.NextToken != nil && len(*s.NextToken) < 1 {
2730		invalidParams.Add(request.NewErrParamMinLen("NextToken", 1))
2731	}
2732
2733	if invalidParams.Len() > 0 {
2734		return invalidParams
2735	}
2736	return nil
2737}
2738
2739// SetGraphArn sets the GraphArn field's value.
2740func (s *ListMembersInput) SetGraphArn(v string) *ListMembersInput {
2741	s.GraphArn = &v
2742	return s
2743}
2744
2745// SetMaxResults sets the MaxResults field's value.
2746func (s *ListMembersInput) SetMaxResults(v int64) *ListMembersInput {
2747	s.MaxResults = &v
2748	return s
2749}
2750
2751// SetNextToken sets the NextToken field's value.
2752func (s *ListMembersInput) SetNextToken(v string) *ListMembersInput {
2753	s.NextToken = &v
2754	return s
2755}
2756
2757type ListMembersOutput struct {
2758	_ struct{} `type:"structure"`
2759
2760	// The list of member accounts in the behavior graph.
2761	//
2762	// The results include member accounts that did not pass verification and member
2763	// accounts that have not yet accepted the invitation to the behavior graph.
2764	// The results do not include member accounts that were removed from the behavior
2765	// graph.
2766	MemberDetails []*MemberDetail `type:"list"`
2767
2768	// If there are more member accounts remaining in the results, then this is
2769	// the pagination token to use to request the next page of member accounts.
2770	NextToken *string `min:"1" type:"string"`
2771}
2772
2773// String returns the string representation.
2774//
2775// API parameter values that are decorated as "sensitive" in the API will not
2776// be included in the string output. The member name will be present, but the
2777// value will be replaced with "sensitive".
2778func (s ListMembersOutput) String() string {
2779	return awsutil.Prettify(s)
2780}
2781
2782// GoString returns the string representation.
2783//
2784// API parameter values that are decorated as "sensitive" in the API will not
2785// be included in the string output. The member name will be present, but the
2786// value will be replaced with "sensitive".
2787func (s ListMembersOutput) GoString() string {
2788	return s.String()
2789}
2790
2791// SetMemberDetails sets the MemberDetails field's value.
2792func (s *ListMembersOutput) SetMemberDetails(v []*MemberDetail) *ListMembersOutput {
2793	s.MemberDetails = v
2794	return s
2795}
2796
2797// SetNextToken sets the NextToken field's value.
2798func (s *ListMembersOutput) SetNextToken(v string) *ListMembersOutput {
2799	s.NextToken = &v
2800	return s
2801}
2802
2803type ListTagsForResourceInput struct {
2804	_ struct{} `type:"structure" nopayload:"true"`
2805
2806	// The ARN of the behavior graph for which to retrieve the tag values.
2807	//
2808	// ResourceArn is a required field
2809	ResourceArn *string `location:"uri" locationName:"ResourceArn" type:"string" required:"true"`
2810}
2811
2812// String returns the string representation.
2813//
2814// API parameter values that are decorated as "sensitive" in the API will not
2815// be included in the string output. The member name will be present, but the
2816// value will be replaced with "sensitive".
2817func (s ListTagsForResourceInput) String() string {
2818	return awsutil.Prettify(s)
2819}
2820
2821// GoString returns the string representation.
2822//
2823// API parameter values that are decorated as "sensitive" in the API will not
2824// be included in the string output. The member name will be present, but the
2825// value will be replaced with "sensitive".
2826func (s ListTagsForResourceInput) GoString() string {
2827	return s.String()
2828}
2829
2830// Validate inspects the fields of the type to determine if they are valid.
2831func (s *ListTagsForResourceInput) Validate() error {
2832	invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"}
2833	if s.ResourceArn == nil {
2834		invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
2835	}
2836	if s.ResourceArn != nil && len(*s.ResourceArn) < 1 {
2837		invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1))
2838	}
2839
2840	if invalidParams.Len() > 0 {
2841		return invalidParams
2842	}
2843	return nil
2844}
2845
2846// SetResourceArn sets the ResourceArn field's value.
2847func (s *ListTagsForResourceInput) SetResourceArn(v string) *ListTagsForResourceInput {
2848	s.ResourceArn = &v
2849	return s
2850}
2851
2852type ListTagsForResourceOutput struct {
2853	_ struct{} `type:"structure"`
2854
2855	// The tag values that are assigned to the behavior graph. The request returns
2856	// up to 50 tag values.
2857	Tags map[string]*string `min:"1" type:"map"`
2858}
2859
2860// String returns the string representation.
2861//
2862// API parameter values that are decorated as "sensitive" in the API will not
2863// be included in the string output. The member name will be present, but the
2864// value will be replaced with "sensitive".
2865func (s ListTagsForResourceOutput) String() string {
2866	return awsutil.Prettify(s)
2867}
2868
2869// GoString returns the string representation.
2870//
2871// API parameter values that are decorated as "sensitive" in the API will not
2872// be included in the string output. The member name will be present, but the
2873// value will be replaced with "sensitive".
2874func (s ListTagsForResourceOutput) GoString() string {
2875	return s.String()
2876}
2877
2878// SetTags sets the Tags field's value.
2879func (s *ListTagsForResourceOutput) SetTags(v map[string]*string) *ListTagsForResourceOutput {
2880	s.Tags = v
2881	return s
2882}
2883
2884// Details about a member account that was invited to contribute to a behavior
2885// graph.
2886type MemberDetail struct {
2887	_ struct{} `type:"structure"`
2888
2889	// The AWS account identifier for the member account.
2890	AccountId *string `min:"12" type:"string"`
2891
2892	// The AWS account identifier of the administrator account for the behavior
2893	// graph.
2894	AdministratorId *string `min:"12" type:"string"`
2895
2896	// For member accounts with a status of ACCEPTED_BUT_DISABLED, the reason that
2897	// the member account is not enabled.
2898	//
2899	// The reason can have one of the following values:
2900	//
2901	//    * VOLUME_TOO_HIGH - Indicates that adding the member account would cause
2902	//    the data volume for the behavior graph to be too high.
2903	//
2904	//    * VOLUME_UNKNOWN - Indicates that Detective is unable to verify the data
2905	//    volume for the member account. This is usually because the member account
2906	//    is not enrolled in Amazon GuardDuty.
2907	DisabledReason *string `type:"string" enum:"MemberDisabledReason"`
2908
2909	// The AWS account root user email address for the member account.
2910	EmailAddress *string `min:"1" type:"string"`
2911
2912	// The ARN of the behavior graph that the member account was invited to.
2913	GraphArn *string `type:"string"`
2914
2915	// The date and time that Detective sent the invitation to the member account.
2916	// The value is in milliseconds since the epoch.
2917	InvitedTime *time.Time `type:"timestamp" timestampFormat:"iso8601"`
2918
2919	// The AWS account identifier of the administrator account for the behavior
2920	// graph.
2921	//
2922	// Deprecated: This property is deprecated. Use AdministratorId instead.
2923	MasterId *string `min:"12" deprecated:"true" type:"string"`
2924
2925	// The member account data volume as a percentage of the maximum allowed data
2926	// volume. 0 indicates 0 percent, and 100 indicates 100 percent.
2927	//
2928	// Note that this is not the percentage of the behavior graph data volume.
2929	//
2930	// For example, the data volume for the behavior graph is 80 GB per day. The
2931	// maximum data volume is 160 GB per day. If the data volume for the member
2932	// account is 40 GB per day, then PercentOfGraphUtilization is 25. It represents
2933	// 25% of the maximum allowed data volume.
2934	//
2935	// Deprecated: This property is deprecated. Use VolumeUsageInBytes instead.
2936	PercentOfGraphUtilization *float64 `deprecated:"true" type:"double"`
2937
2938	// The date and time when the graph utilization percentage was last updated.
2939	//
2940	// Deprecated: This property is deprecated. Use VolumeUsageUpdatedTime instead.
2941	PercentOfGraphUtilizationUpdatedTime *time.Time `deprecated:"true" type:"timestamp" timestampFormat:"iso8601"`
2942
2943	// The current membership status of the member account. The status can have
2944	// one of the following values:
2945	//
2946	//    * INVITED - Indicates that the member was sent an invitation but has not
2947	//    yet responded.
2948	//
2949	//    * VERIFICATION_IN_PROGRESS - Indicates that Detective is verifying that
2950	//    the account identifier and email address provided for the member account
2951	//    match. If they do match, then Detective sends the invitation. If the email
2952	//    address and account identifier don't match, then the member cannot be
2953	//    added to the behavior graph.
2954	//
2955	//    * VERIFICATION_FAILED - Indicates that the account and email address provided
2956	//    for the member account do not match, and Detective did not send an invitation
2957	//    to the account.
2958	//
2959	//    * ENABLED - Indicates that the member account accepted the invitation
2960	//    to contribute to the behavior graph.
2961	//
2962	//    * ACCEPTED_BUT_DISABLED - Indicates that the member account accepted the
2963	//    invitation but is prevented from contributing data to the behavior graph.
2964	//    DisabledReason provides the reason why the member account is not enabled.
2965	//
2966	// Member accounts that declined an invitation or that were removed from the
2967	// behavior graph are not included.
2968	Status *string `type:"string" enum:"MemberStatus"`
2969
2970	// The date and time that the member account was last updated. The value is
2971	// in milliseconds since the epoch.
2972	UpdatedTime *time.Time `type:"timestamp" timestampFormat:"iso8601"`
2973
2974	// The data volume in bytes per day for the member account.
2975	VolumeUsageInBytes *int64 `type:"long"`
2976
2977	// The data and time when the member account data volume was last updated.
2978	VolumeUsageUpdatedTime *time.Time `type:"timestamp" timestampFormat:"iso8601"`
2979}
2980
2981// String returns the string representation.
2982//
2983// API parameter values that are decorated as "sensitive" in the API will not
2984// be included in the string output. The member name will be present, but the
2985// value will be replaced with "sensitive".
2986func (s MemberDetail) String() string {
2987	return awsutil.Prettify(s)
2988}
2989
2990// GoString returns the string representation.
2991//
2992// API parameter values that are decorated as "sensitive" in the API will not
2993// be included in the string output. The member name will be present, but the
2994// value will be replaced with "sensitive".
2995func (s MemberDetail) GoString() string {
2996	return s.String()
2997}
2998
2999// SetAccountId sets the AccountId field's value.
3000func (s *MemberDetail) SetAccountId(v string) *MemberDetail {
3001	s.AccountId = &v
3002	return s
3003}
3004
3005// SetAdministratorId sets the AdministratorId field's value.
3006func (s *MemberDetail) SetAdministratorId(v string) *MemberDetail {
3007	s.AdministratorId = &v
3008	return s
3009}
3010
3011// SetDisabledReason sets the DisabledReason field's value.
3012func (s *MemberDetail) SetDisabledReason(v string) *MemberDetail {
3013	s.DisabledReason = &v
3014	return s
3015}
3016
3017// SetEmailAddress sets the EmailAddress field's value.
3018func (s *MemberDetail) SetEmailAddress(v string) *MemberDetail {
3019	s.EmailAddress = &v
3020	return s
3021}
3022
3023// SetGraphArn sets the GraphArn field's value.
3024func (s *MemberDetail) SetGraphArn(v string) *MemberDetail {
3025	s.GraphArn = &v
3026	return s
3027}
3028
3029// SetInvitedTime sets the InvitedTime field's value.
3030func (s *MemberDetail) SetInvitedTime(v time.Time) *MemberDetail {
3031	s.InvitedTime = &v
3032	return s
3033}
3034
3035// SetMasterId sets the MasterId field's value.
3036func (s *MemberDetail) SetMasterId(v string) *MemberDetail {
3037	s.MasterId = &v
3038	return s
3039}
3040
3041// SetPercentOfGraphUtilization sets the PercentOfGraphUtilization field's value.
3042func (s *MemberDetail) SetPercentOfGraphUtilization(v float64) *MemberDetail {
3043	s.PercentOfGraphUtilization = &v
3044	return s
3045}
3046
3047// SetPercentOfGraphUtilizationUpdatedTime sets the PercentOfGraphUtilizationUpdatedTime field's value.
3048func (s *MemberDetail) SetPercentOfGraphUtilizationUpdatedTime(v time.Time) *MemberDetail {
3049	s.PercentOfGraphUtilizationUpdatedTime = &v
3050	return s
3051}
3052
3053// SetStatus sets the Status field's value.
3054func (s *MemberDetail) SetStatus(v string) *MemberDetail {
3055	s.Status = &v
3056	return s
3057}
3058
3059// SetUpdatedTime sets the UpdatedTime field's value.
3060func (s *MemberDetail) SetUpdatedTime(v time.Time) *MemberDetail {
3061	s.UpdatedTime = &v
3062	return s
3063}
3064
3065// SetVolumeUsageInBytes sets the VolumeUsageInBytes field's value.
3066func (s *MemberDetail) SetVolumeUsageInBytes(v int64) *MemberDetail {
3067	s.VolumeUsageInBytes = &v
3068	return s
3069}
3070
3071// SetVolumeUsageUpdatedTime sets the VolumeUsageUpdatedTime field's value.
3072func (s *MemberDetail) SetVolumeUsageUpdatedTime(v time.Time) *MemberDetail {
3073	s.VolumeUsageUpdatedTime = &v
3074	return s
3075}
3076
3077type RejectInvitationInput struct {
3078	_ struct{} `type:"structure"`
3079
3080	// The ARN of the behavior graph to reject the invitation to.
3081	//
3082	// The member account's current member status in the behavior graph must be
3083	// INVITED.
3084	//
3085	// GraphArn is a required field
3086	GraphArn *string `type:"string" required:"true"`
3087}
3088
3089// String returns the string representation.
3090//
3091// API parameter values that are decorated as "sensitive" in the API will not
3092// be included in the string output. The member name will be present, but the
3093// value will be replaced with "sensitive".
3094func (s RejectInvitationInput) String() string {
3095	return awsutil.Prettify(s)
3096}
3097
3098// GoString returns the string representation.
3099//
3100// API parameter values that are decorated as "sensitive" in the API will not
3101// be included in the string output. The member name will be present, but the
3102// value will be replaced with "sensitive".
3103func (s RejectInvitationInput) GoString() string {
3104	return s.String()
3105}
3106
3107// Validate inspects the fields of the type to determine if they are valid.
3108func (s *RejectInvitationInput) Validate() error {
3109	invalidParams := request.ErrInvalidParams{Context: "RejectInvitationInput"}
3110	if s.GraphArn == nil {
3111		invalidParams.Add(request.NewErrParamRequired("GraphArn"))
3112	}
3113
3114	if invalidParams.Len() > 0 {
3115		return invalidParams
3116	}
3117	return nil
3118}
3119
3120// SetGraphArn sets the GraphArn field's value.
3121func (s *RejectInvitationInput) SetGraphArn(v string) *RejectInvitationInput {
3122	s.GraphArn = &v
3123	return s
3124}
3125
3126type RejectInvitationOutput struct {
3127	_ struct{} `type:"structure"`
3128}
3129
3130// String returns the string representation.
3131//
3132// API parameter values that are decorated as "sensitive" in the API will not
3133// be included in the string output. The member name will be present, but the
3134// value will be replaced with "sensitive".
3135func (s RejectInvitationOutput) String() string {
3136	return awsutil.Prettify(s)
3137}
3138
3139// GoString returns the string representation.
3140//
3141// API parameter values that are decorated as "sensitive" in the API will not
3142// be included in the string output. The member name will be present, but the
3143// value will be replaced with "sensitive".
3144func (s RejectInvitationOutput) GoString() string {
3145	return s.String()
3146}
3147
3148// The request refers to a nonexistent resource.
3149type ResourceNotFoundException struct {
3150	_            struct{}                  `type:"structure"`
3151	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
3152
3153	Message_ *string `locationName:"Message" type:"string"`
3154}
3155
3156// String returns the string representation.
3157//
3158// API parameter values that are decorated as "sensitive" in the API will not
3159// be included in the string output. The member name will be present, but the
3160// value will be replaced with "sensitive".
3161func (s ResourceNotFoundException) String() string {
3162	return awsutil.Prettify(s)
3163}
3164
3165// GoString returns the string representation.
3166//
3167// API parameter values that are decorated as "sensitive" in the API will not
3168// be included in the string output. The member name will be present, but the
3169// value will be replaced with "sensitive".
3170func (s ResourceNotFoundException) GoString() string {
3171	return s.String()
3172}
3173
3174func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error {
3175	return &ResourceNotFoundException{
3176		RespMetadata: v,
3177	}
3178}
3179
3180// Code returns the exception type name.
3181func (s *ResourceNotFoundException) Code() string {
3182	return "ResourceNotFoundException"
3183}
3184
3185// Message returns the exception's message.
3186func (s *ResourceNotFoundException) Message() string {
3187	if s.Message_ != nil {
3188		return *s.Message_
3189	}
3190	return ""
3191}
3192
3193// OrigErr always returns nil, satisfies awserr.Error interface.
3194func (s *ResourceNotFoundException) OrigErr() error {
3195	return nil
3196}
3197
3198func (s *ResourceNotFoundException) Error() string {
3199	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
3200}
3201
3202// Status code returns the HTTP status code for the request's response error.
3203func (s *ResourceNotFoundException) StatusCode() int {
3204	return s.RespMetadata.StatusCode
3205}
3206
3207// RequestID returns the service's response RequestID for request.
3208func (s *ResourceNotFoundException) RequestID() string {
3209	return s.RespMetadata.RequestID
3210}
3211
3212// This request cannot be completed for one of the following reasons.
3213//
3214//    * The request would cause the number of member accounts in the behavior
3215//    graph to exceed the maximum allowed. A behavior graph cannot have more
3216//    than 1000 member accounts.
3217//
3218//    * The request would cause the data rate for the behavior graph to exceed
3219//    the maximum allowed.
3220//
3221//    * Detective is unable to verify the data rate for the member account.
3222//    This is usually because the member account is not enrolled in Amazon GuardDuty.
3223type ServiceQuotaExceededException struct {
3224	_            struct{}                  `type:"structure"`
3225	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
3226
3227	Message_ *string `locationName:"Message" type:"string"`
3228}
3229
3230// String returns the string representation.
3231//
3232// API parameter values that are decorated as "sensitive" in the API will not
3233// be included in the string output. The member name will be present, but the
3234// value will be replaced with "sensitive".
3235func (s ServiceQuotaExceededException) String() string {
3236	return awsutil.Prettify(s)
3237}
3238
3239// GoString returns the string representation.
3240//
3241// API parameter values that are decorated as "sensitive" in the API will not
3242// be included in the string output. The member name will be present, but the
3243// value will be replaced with "sensitive".
3244func (s ServiceQuotaExceededException) GoString() string {
3245	return s.String()
3246}
3247
3248func newErrorServiceQuotaExceededException(v protocol.ResponseMetadata) error {
3249	return &ServiceQuotaExceededException{
3250		RespMetadata: v,
3251	}
3252}
3253
3254// Code returns the exception type name.
3255func (s *ServiceQuotaExceededException) Code() string {
3256	return "ServiceQuotaExceededException"
3257}
3258
3259// Message returns the exception's message.
3260func (s *ServiceQuotaExceededException) Message() string {
3261	if s.Message_ != nil {
3262		return *s.Message_
3263	}
3264	return ""
3265}
3266
3267// OrigErr always returns nil, satisfies awserr.Error interface.
3268func (s *ServiceQuotaExceededException) OrigErr() error {
3269	return nil
3270}
3271
3272func (s *ServiceQuotaExceededException) Error() string {
3273	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
3274}
3275
3276// Status code returns the HTTP status code for the request's response error.
3277func (s *ServiceQuotaExceededException) StatusCode() int {
3278	return s.RespMetadata.StatusCode
3279}
3280
3281// RequestID returns the service's response RequestID for request.
3282func (s *ServiceQuotaExceededException) RequestID() string {
3283	return s.RespMetadata.RequestID
3284}
3285
3286type StartMonitoringMemberInput struct {
3287	_ struct{} `type:"structure"`
3288
3289	// The account ID of the member account to try to enable.
3290	//
3291	// The account must be an invited member account with a status of ACCEPTED_BUT_DISABLED.
3292	//
3293	// AccountId is a required field
3294	AccountId *string `min:"12" type:"string" required:"true"`
3295
3296	// The ARN of the behavior graph.
3297	//
3298	// GraphArn is a required field
3299	GraphArn *string `type:"string" required:"true"`
3300}
3301
3302// String returns the string representation.
3303//
3304// API parameter values that are decorated as "sensitive" in the API will not
3305// be included in the string output. The member name will be present, but the
3306// value will be replaced with "sensitive".
3307func (s StartMonitoringMemberInput) String() string {
3308	return awsutil.Prettify(s)
3309}
3310
3311// GoString returns the string representation.
3312//
3313// API parameter values that are decorated as "sensitive" in the API will not
3314// be included in the string output. The member name will be present, but the
3315// value will be replaced with "sensitive".
3316func (s StartMonitoringMemberInput) GoString() string {
3317	return s.String()
3318}
3319
3320// Validate inspects the fields of the type to determine if they are valid.
3321func (s *StartMonitoringMemberInput) Validate() error {
3322	invalidParams := request.ErrInvalidParams{Context: "StartMonitoringMemberInput"}
3323	if s.AccountId == nil {
3324		invalidParams.Add(request.NewErrParamRequired("AccountId"))
3325	}
3326	if s.AccountId != nil && len(*s.AccountId) < 12 {
3327		invalidParams.Add(request.NewErrParamMinLen("AccountId", 12))
3328	}
3329	if s.GraphArn == nil {
3330		invalidParams.Add(request.NewErrParamRequired("GraphArn"))
3331	}
3332
3333	if invalidParams.Len() > 0 {
3334		return invalidParams
3335	}
3336	return nil
3337}
3338
3339// SetAccountId sets the AccountId field's value.
3340func (s *StartMonitoringMemberInput) SetAccountId(v string) *StartMonitoringMemberInput {
3341	s.AccountId = &v
3342	return s
3343}
3344
3345// SetGraphArn sets the GraphArn field's value.
3346func (s *StartMonitoringMemberInput) SetGraphArn(v string) *StartMonitoringMemberInput {
3347	s.GraphArn = &v
3348	return s
3349}
3350
3351type StartMonitoringMemberOutput struct {
3352	_ struct{} `type:"structure"`
3353}
3354
3355// String returns the string representation.
3356//
3357// API parameter values that are decorated as "sensitive" in the API will not
3358// be included in the string output. The member name will be present, but the
3359// value will be replaced with "sensitive".
3360func (s StartMonitoringMemberOutput) String() string {
3361	return awsutil.Prettify(s)
3362}
3363
3364// GoString returns the string representation.
3365//
3366// API parameter values that are decorated as "sensitive" in the API will not
3367// be included in the string output. The member name will be present, but the
3368// value will be replaced with "sensitive".
3369func (s StartMonitoringMemberOutput) GoString() string {
3370	return s.String()
3371}
3372
3373type TagResourceInput struct {
3374	_ struct{} `type:"structure"`
3375
3376	// The ARN of the behavior graph to assign the tags to.
3377	//
3378	// ResourceArn is a required field
3379	ResourceArn *string `location:"uri" locationName:"ResourceArn" type:"string" required:"true"`
3380
3381	// The tags to assign to the behavior graph. You can add up to 50 tags. For
3382	// each tag, you provide the tag key and the tag value. Each tag key can contain
3383	// up to 128 characters. Each tag value can contain up to 256 characters.
3384	//
3385	// Tags is a required field
3386	Tags map[string]*string `min:"1" type:"map" required:"true"`
3387}
3388
3389// String returns the string representation.
3390//
3391// API parameter values that are decorated as "sensitive" in the API will not
3392// be included in the string output. The member name will be present, but the
3393// value will be replaced with "sensitive".
3394func (s TagResourceInput) String() string {
3395	return awsutil.Prettify(s)
3396}
3397
3398// GoString returns the string representation.
3399//
3400// API parameter values that are decorated as "sensitive" in the API will not
3401// be included in the string output. The member name will be present, but the
3402// value will be replaced with "sensitive".
3403func (s TagResourceInput) GoString() string {
3404	return s.String()
3405}
3406
3407// Validate inspects the fields of the type to determine if they are valid.
3408func (s *TagResourceInput) Validate() error {
3409	invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"}
3410	if s.ResourceArn == nil {
3411		invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
3412	}
3413	if s.ResourceArn != nil && len(*s.ResourceArn) < 1 {
3414		invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1))
3415	}
3416	if s.Tags == nil {
3417		invalidParams.Add(request.NewErrParamRequired("Tags"))
3418	}
3419	if s.Tags != nil && len(s.Tags) < 1 {
3420		invalidParams.Add(request.NewErrParamMinLen("Tags", 1))
3421	}
3422
3423	if invalidParams.Len() > 0 {
3424		return invalidParams
3425	}
3426	return nil
3427}
3428
3429// SetResourceArn sets the ResourceArn field's value.
3430func (s *TagResourceInput) SetResourceArn(v string) *TagResourceInput {
3431	s.ResourceArn = &v
3432	return s
3433}
3434
3435// SetTags sets the Tags field's value.
3436func (s *TagResourceInput) SetTags(v map[string]*string) *TagResourceInput {
3437	s.Tags = v
3438	return s
3439}
3440
3441type TagResourceOutput struct {
3442	_ struct{} `type:"structure"`
3443}
3444
3445// String returns the string representation.
3446//
3447// API parameter values that are decorated as "sensitive" in the API will not
3448// be included in the string output. The member name will be present, but the
3449// value will be replaced with "sensitive".
3450func (s TagResourceOutput) String() string {
3451	return awsutil.Prettify(s)
3452}
3453
3454// GoString returns the string representation.
3455//
3456// API parameter values that are decorated as "sensitive" in the API will not
3457// be included in the string output. The member name will be present, but the
3458// value will be replaced with "sensitive".
3459func (s TagResourceOutput) GoString() string {
3460	return s.String()
3461}
3462
3463// A member account that was included in a request but for which the request
3464// could not be processed.
3465type UnprocessedAccount struct {
3466	_ struct{} `type:"structure"`
3467
3468	// The AWS account identifier of the member account that was not processed.
3469	AccountId *string `min:"12" type:"string"`
3470
3471	// The reason that the member account request could not be processed.
3472	Reason *string `type:"string"`
3473}
3474
3475// String returns the string representation.
3476//
3477// API parameter values that are decorated as "sensitive" in the API will not
3478// be included in the string output. The member name will be present, but the
3479// value will be replaced with "sensitive".
3480func (s UnprocessedAccount) String() string {
3481	return awsutil.Prettify(s)
3482}
3483
3484// GoString returns the string representation.
3485//
3486// API parameter values that are decorated as "sensitive" in the API will not
3487// be included in the string output. The member name will be present, but the
3488// value will be replaced with "sensitive".
3489func (s UnprocessedAccount) GoString() string {
3490	return s.String()
3491}
3492
3493// SetAccountId sets the AccountId field's value.
3494func (s *UnprocessedAccount) SetAccountId(v string) *UnprocessedAccount {
3495	s.AccountId = &v
3496	return s
3497}
3498
3499// SetReason sets the Reason field's value.
3500func (s *UnprocessedAccount) SetReason(v string) *UnprocessedAccount {
3501	s.Reason = &v
3502	return s
3503}
3504
3505type UntagResourceInput struct {
3506	_ struct{} `type:"structure" nopayload:"true"`
3507
3508	// The ARN of the behavior graph to remove the tags from.
3509	//
3510	// ResourceArn is a required field
3511	ResourceArn *string `location:"uri" locationName:"ResourceArn" type:"string" required:"true"`
3512
3513	// The tag keys of the tags to remove from the behavior graph. You can remove
3514	// up to 50 tags at a time.
3515	//
3516	// TagKeys is a required field
3517	TagKeys []*string `location:"querystring" locationName:"tagKeys" min:"1" type:"list" required:"true"`
3518}
3519
3520// String returns the string representation.
3521//
3522// API parameter values that are decorated as "sensitive" in the API will not
3523// be included in the string output. The member name will be present, but the
3524// value will be replaced with "sensitive".
3525func (s UntagResourceInput) String() string {
3526	return awsutil.Prettify(s)
3527}
3528
3529// GoString returns the string representation.
3530//
3531// API parameter values that are decorated as "sensitive" in the API will not
3532// be included in the string output. The member name will be present, but the
3533// value will be replaced with "sensitive".
3534func (s UntagResourceInput) GoString() string {
3535	return s.String()
3536}
3537
3538// Validate inspects the fields of the type to determine if they are valid.
3539func (s *UntagResourceInput) Validate() error {
3540	invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"}
3541	if s.ResourceArn == nil {
3542		invalidParams.Add(request.NewErrParamRequired("ResourceArn"))
3543	}
3544	if s.ResourceArn != nil && len(*s.ResourceArn) < 1 {
3545		invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1))
3546	}
3547	if s.TagKeys == nil {
3548		invalidParams.Add(request.NewErrParamRequired("TagKeys"))
3549	}
3550	if s.TagKeys != nil && len(s.TagKeys) < 1 {
3551		invalidParams.Add(request.NewErrParamMinLen("TagKeys", 1))
3552	}
3553
3554	if invalidParams.Len() > 0 {
3555		return invalidParams
3556	}
3557	return nil
3558}
3559
3560// SetResourceArn sets the ResourceArn field's value.
3561func (s *UntagResourceInput) SetResourceArn(v string) *UntagResourceInput {
3562	s.ResourceArn = &v
3563	return s
3564}
3565
3566// SetTagKeys sets the TagKeys field's value.
3567func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput {
3568	s.TagKeys = v
3569	return s
3570}
3571
3572type UntagResourceOutput struct {
3573	_ struct{} `type:"structure"`
3574}
3575
3576// String returns the string representation.
3577//
3578// API parameter values that are decorated as "sensitive" in the API will not
3579// be included in the string output. The member name will be present, but the
3580// value will be replaced with "sensitive".
3581func (s UntagResourceOutput) String() string {
3582	return awsutil.Prettify(s)
3583}
3584
3585// GoString returns the string representation.
3586//
3587// API parameter values that are decorated as "sensitive" in the API will not
3588// be included in the string output. The member name will be present, but the
3589// value will be replaced with "sensitive".
3590func (s UntagResourceOutput) GoString() string {
3591	return s.String()
3592}
3593
3594// The request parameters are invalid.
3595type ValidationException struct {
3596	_            struct{}                  `type:"structure"`
3597	RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"`
3598
3599	Message_ *string `locationName:"Message" type:"string"`
3600}
3601
3602// String returns the string representation.
3603//
3604// API parameter values that are decorated as "sensitive" in the API will not
3605// be included in the string output. The member name will be present, but the
3606// value will be replaced with "sensitive".
3607func (s ValidationException) String() string {
3608	return awsutil.Prettify(s)
3609}
3610
3611// GoString returns the string representation.
3612//
3613// API parameter values that are decorated as "sensitive" in the API will not
3614// be included in the string output. The member name will be present, but the
3615// value will be replaced with "sensitive".
3616func (s ValidationException) GoString() string {
3617	return s.String()
3618}
3619
3620func newErrorValidationException(v protocol.ResponseMetadata) error {
3621	return &ValidationException{
3622		RespMetadata: v,
3623	}
3624}
3625
3626// Code returns the exception type name.
3627func (s *ValidationException) Code() string {
3628	return "ValidationException"
3629}
3630
3631// Message returns the exception's message.
3632func (s *ValidationException) Message() string {
3633	if s.Message_ != nil {
3634		return *s.Message_
3635	}
3636	return ""
3637}
3638
3639// OrigErr always returns nil, satisfies awserr.Error interface.
3640func (s *ValidationException) OrigErr() error {
3641	return nil
3642}
3643
3644func (s *ValidationException) Error() string {
3645	return fmt.Sprintf("%s: %s", s.Code(), s.Message())
3646}
3647
3648// Status code returns the HTTP status code for the request's response error.
3649func (s *ValidationException) StatusCode() int {
3650	return s.RespMetadata.StatusCode
3651}
3652
3653// RequestID returns the service's response RequestID for request.
3654func (s *ValidationException) RequestID() string {
3655	return s.RespMetadata.RequestID
3656}
3657
3658const (
3659	// MemberDisabledReasonVolumeTooHigh is a MemberDisabledReason enum value
3660	MemberDisabledReasonVolumeTooHigh = "VOLUME_TOO_HIGH"
3661
3662	// MemberDisabledReasonVolumeUnknown is a MemberDisabledReason enum value
3663	MemberDisabledReasonVolumeUnknown = "VOLUME_UNKNOWN"
3664)
3665
3666// MemberDisabledReason_Values returns all elements of the MemberDisabledReason enum
3667func MemberDisabledReason_Values() []string {
3668	return []string{
3669		MemberDisabledReasonVolumeTooHigh,
3670		MemberDisabledReasonVolumeUnknown,
3671	}
3672}
3673
3674const (
3675	// MemberStatusInvited is a MemberStatus enum value
3676	MemberStatusInvited = "INVITED"
3677
3678	// MemberStatusVerificationInProgress is a MemberStatus enum value
3679	MemberStatusVerificationInProgress = "VERIFICATION_IN_PROGRESS"
3680
3681	// MemberStatusVerificationFailed is a MemberStatus enum value
3682	MemberStatusVerificationFailed = "VERIFICATION_FAILED"
3683
3684	// MemberStatusEnabled is a MemberStatus enum value
3685	MemberStatusEnabled = "ENABLED"
3686
3687	// MemberStatusAcceptedButDisabled is a MemberStatus enum value
3688	MemberStatusAcceptedButDisabled = "ACCEPTED_BUT_DISABLED"
3689)
3690
3691// MemberStatus_Values returns all elements of the MemberStatus enum
3692func MemberStatus_Values() []string {
3693	return []string{
3694		MemberStatusInvited,
3695		MemberStatusVerificationInProgress,
3696		MemberStatusVerificationFailed,
3697		MemberStatusEnabled,
3698		MemberStatusAcceptedButDisabled,
3699	}
3700}
3701