1// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. 2 3package codegurureviewer 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 opAssociateRepository = "AssociateRepository" 17 18// AssociateRepositoryRequest generates a "aws/request.Request" representing the 19// client's request for the AssociateRepository 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 AssociateRepository for more information on using the AssociateRepository 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 AssociateRepositoryRequest method. 34// req, resp := client.AssociateRepositoryRequest(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/codeguru-reviewer-2019-09-19/AssociateRepository 42func (c *CodeGuruReviewer) AssociateRepositoryRequest(input *AssociateRepositoryInput) (req *request.Request, output *AssociateRepositoryOutput) { 43 op := &request.Operation{ 44 Name: opAssociateRepository, 45 HTTPMethod: "POST", 46 HTTPPath: "/associations", 47 } 48 49 if input == nil { 50 input = &AssociateRepositoryInput{} 51 } 52 53 output = &AssociateRepositoryOutput{} 54 req = c.newRequest(op, input, output) 55 return 56} 57 58// AssociateRepository API operation for Amazon CodeGuru Reviewer. 59// 60// Use to associate an AWS CodeCommit repository or a repostory managed by AWS 61// CodeStar Connections with Amazon CodeGuru Reviewer. When you associate a 62// repository, CodeGuru Reviewer reviews source code changes in the repository's 63// pull requests and provides automatic recommendations. You can view recommendations 64// using the CodeGuru Reviewer console. For more information, see Recommendations 65// in Amazon CodeGuru Reviewer (https://docs.aws.amazon.com/codeguru/latest/reviewer-ug/recommendations.html) 66// in the Amazon CodeGuru Reviewer User Guide. 67// 68// If you associate a CodeCommit repository, it must be in the same AWS Region 69// and AWS account where its CodeGuru Reviewer code reviews are configured. 70// 71// Bitbucket and GitHub Enterprise Server repositories are managed by AWS CodeStar 72// Connections to connect to CodeGuru Reviewer. For more information, see Associate 73// a repository (https://docs.aws.amazon.com/codeguru/latest/reviewer-ug/getting-started-associate-repository.html) 74// in the Amazon CodeGuru Reviewer User Guide. 75// 76// You cannot use the CodeGuru Reviewer SDK or the AWS CLI to associate a GitHub 77// repository with Amazon CodeGuru Reviewer. To associate a GitHub repository, 78// use the console. For more information, see Getting started with CodeGuru 79// Reviewer (https://docs.aws.amazon.com/codeguru/latest/reviewer-ug/getting-started-with-guru.html) 80// in the CodeGuru Reviewer User Guide. 81// 82// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 83// with awserr.Error's Code and Message methods to get detailed information about 84// the error. 85// 86// See the AWS API reference guide for Amazon CodeGuru Reviewer's 87// API operation AssociateRepository for usage and error information. 88// 89// Returned Error Types: 90// * InternalServerException 91// The server encountered an internal error and is unable to complete the request. 92// 93// * ValidationException 94// The input fails to satisfy the specified constraints. 95// 96// * AccessDeniedException 97// You do not have sufficient access to perform this action. 98// 99// * ConflictException 100// The requested operation would cause a conflict with the current state of 101// a service resource associated with the request. Resolve the conflict before 102// retrying this request. 103// 104// * ThrottlingException 105// The request was denied due to request throttling. 106// 107// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguru-reviewer-2019-09-19/AssociateRepository 108func (c *CodeGuruReviewer) AssociateRepository(input *AssociateRepositoryInput) (*AssociateRepositoryOutput, error) { 109 req, out := c.AssociateRepositoryRequest(input) 110 return out, req.Send() 111} 112 113// AssociateRepositoryWithContext is the same as AssociateRepository with the addition of 114// the ability to pass a context and additional request options. 115// 116// See AssociateRepository for details on how to use this API operation. 117// 118// The context must be non-nil and will be used for request cancellation. If 119// the context is nil a panic will occur. In the future the SDK may create 120// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 121// for more information on using Contexts. 122func (c *CodeGuruReviewer) AssociateRepositoryWithContext(ctx aws.Context, input *AssociateRepositoryInput, opts ...request.Option) (*AssociateRepositoryOutput, error) { 123 req, out := c.AssociateRepositoryRequest(input) 124 req.SetContext(ctx) 125 req.ApplyOptions(opts...) 126 return out, req.Send() 127} 128 129const opCreateCodeReview = "CreateCodeReview" 130 131// CreateCodeReviewRequest generates a "aws/request.Request" representing the 132// client's request for the CreateCodeReview operation. The "output" return 133// value will be populated with the request's response once the request completes 134// successfully. 135// 136// Use "Send" method on the returned Request to send the API call to the service. 137// the "output" return value is not valid until after Send returns without error. 138// 139// See CreateCodeReview for more information on using the CreateCodeReview 140// API call, and error handling. 141// 142// This method is useful when you want to inject custom logic or configuration 143// into the SDK's request lifecycle. Such as custom headers, or retry logic. 144// 145// 146// // Example sending a request using the CreateCodeReviewRequest method. 147// req, resp := client.CreateCodeReviewRequest(params) 148// 149// err := req.Send() 150// if err == nil { // resp is now filled 151// fmt.Println(resp) 152// } 153// 154// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguru-reviewer-2019-09-19/CreateCodeReview 155func (c *CodeGuruReviewer) CreateCodeReviewRequest(input *CreateCodeReviewInput) (req *request.Request, output *CreateCodeReviewOutput) { 156 op := &request.Operation{ 157 Name: opCreateCodeReview, 158 HTTPMethod: "POST", 159 HTTPPath: "/codereviews", 160 } 161 162 if input == nil { 163 input = &CreateCodeReviewInput{} 164 } 165 166 output = &CreateCodeReviewOutput{} 167 req = c.newRequest(op, input, output) 168 return 169} 170 171// CreateCodeReview API operation for Amazon CodeGuru Reviewer. 172// 173// Use to create a code review with a CodeReviewType (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_CodeReviewType.html) 174// of RepositoryAnalysis. This type of code review analyzes all code under a 175// specified branch in an associated repository. PullRequest code reviews are 176// automatically triggered by a pull request so cannot be created using this 177// method. 178// 179// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 180// with awserr.Error's Code and Message methods to get detailed information about 181// the error. 182// 183// See the AWS API reference guide for Amazon CodeGuru Reviewer's 184// API operation CreateCodeReview for usage and error information. 185// 186// Returned Error Types: 187// * ResourceNotFoundException 188// The resource specified in the request was not found. 189// 190// * InternalServerException 191// The server encountered an internal error and is unable to complete the request. 192// 193// * ValidationException 194// The input fails to satisfy the specified constraints. 195// 196// * ConflictException 197// The requested operation would cause a conflict with the current state of 198// a service resource associated with the request. Resolve the conflict before 199// retrying this request. 200// 201// * AccessDeniedException 202// You do not have sufficient access to perform this action. 203// 204// * ThrottlingException 205// The request was denied due to request throttling. 206// 207// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguru-reviewer-2019-09-19/CreateCodeReview 208func (c *CodeGuruReviewer) CreateCodeReview(input *CreateCodeReviewInput) (*CreateCodeReviewOutput, error) { 209 req, out := c.CreateCodeReviewRequest(input) 210 return out, req.Send() 211} 212 213// CreateCodeReviewWithContext is the same as CreateCodeReview with the addition of 214// the ability to pass a context and additional request options. 215// 216// See CreateCodeReview for details on how to use this API operation. 217// 218// The context must be non-nil and will be used for request cancellation. If 219// the context is nil a panic will occur. In the future the SDK may create 220// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 221// for more information on using Contexts. 222func (c *CodeGuruReviewer) CreateCodeReviewWithContext(ctx aws.Context, input *CreateCodeReviewInput, opts ...request.Option) (*CreateCodeReviewOutput, error) { 223 req, out := c.CreateCodeReviewRequest(input) 224 req.SetContext(ctx) 225 req.ApplyOptions(opts...) 226 return out, req.Send() 227} 228 229const opDescribeCodeReview = "DescribeCodeReview" 230 231// DescribeCodeReviewRequest generates a "aws/request.Request" representing the 232// client's request for the DescribeCodeReview operation. The "output" return 233// value will be populated with the request's response once the request completes 234// successfully. 235// 236// Use "Send" method on the returned Request to send the API call to the service. 237// the "output" return value is not valid until after Send returns without error. 238// 239// See DescribeCodeReview for more information on using the DescribeCodeReview 240// API call, and error handling. 241// 242// This method is useful when you want to inject custom logic or configuration 243// into the SDK's request lifecycle. Such as custom headers, or retry logic. 244// 245// 246// // Example sending a request using the DescribeCodeReviewRequest method. 247// req, resp := client.DescribeCodeReviewRequest(params) 248// 249// err := req.Send() 250// if err == nil { // resp is now filled 251// fmt.Println(resp) 252// } 253// 254// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguru-reviewer-2019-09-19/DescribeCodeReview 255func (c *CodeGuruReviewer) DescribeCodeReviewRequest(input *DescribeCodeReviewInput) (req *request.Request, output *DescribeCodeReviewOutput) { 256 op := &request.Operation{ 257 Name: opDescribeCodeReview, 258 HTTPMethod: "GET", 259 HTTPPath: "/codereviews/{CodeReviewArn}", 260 } 261 262 if input == nil { 263 input = &DescribeCodeReviewInput{} 264 } 265 266 output = &DescribeCodeReviewOutput{} 267 req = c.newRequest(op, input, output) 268 return 269} 270 271// DescribeCodeReview API operation for Amazon CodeGuru Reviewer. 272// 273// Returns the metadata associated with the code review along with its status. 274// 275// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 276// with awserr.Error's Code and Message methods to get detailed information about 277// the error. 278// 279// See the AWS API reference guide for Amazon CodeGuru Reviewer's 280// API operation DescribeCodeReview for usage and error information. 281// 282// Returned Error Types: 283// * ResourceNotFoundException 284// The resource specified in the request was not found. 285// 286// * InternalServerException 287// The server encountered an internal error and is unable to complete the request. 288// 289// * ValidationException 290// The input fails to satisfy the specified constraints. 291// 292// * AccessDeniedException 293// You do not have sufficient access to perform this action. 294// 295// * ThrottlingException 296// The request was denied due to request throttling. 297// 298// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguru-reviewer-2019-09-19/DescribeCodeReview 299func (c *CodeGuruReviewer) DescribeCodeReview(input *DescribeCodeReviewInput) (*DescribeCodeReviewOutput, error) { 300 req, out := c.DescribeCodeReviewRequest(input) 301 return out, req.Send() 302} 303 304// DescribeCodeReviewWithContext is the same as DescribeCodeReview with the addition of 305// the ability to pass a context and additional request options. 306// 307// See DescribeCodeReview for details on how to use this API operation. 308// 309// The context must be non-nil and will be used for request cancellation. If 310// the context is nil a panic will occur. In the future the SDK may create 311// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 312// for more information on using Contexts. 313func (c *CodeGuruReviewer) DescribeCodeReviewWithContext(ctx aws.Context, input *DescribeCodeReviewInput, opts ...request.Option) (*DescribeCodeReviewOutput, error) { 314 req, out := c.DescribeCodeReviewRequest(input) 315 req.SetContext(ctx) 316 req.ApplyOptions(opts...) 317 return out, req.Send() 318} 319 320const opDescribeRecommendationFeedback = "DescribeRecommendationFeedback" 321 322// DescribeRecommendationFeedbackRequest generates a "aws/request.Request" representing the 323// client's request for the DescribeRecommendationFeedback operation. The "output" return 324// value will be populated with the request's response once the request completes 325// successfully. 326// 327// Use "Send" method on the returned Request to send the API call to the service. 328// the "output" return value is not valid until after Send returns without error. 329// 330// See DescribeRecommendationFeedback for more information on using the DescribeRecommendationFeedback 331// API call, and error handling. 332// 333// This method is useful when you want to inject custom logic or configuration 334// into the SDK's request lifecycle. Such as custom headers, or retry logic. 335// 336// 337// // Example sending a request using the DescribeRecommendationFeedbackRequest method. 338// req, resp := client.DescribeRecommendationFeedbackRequest(params) 339// 340// err := req.Send() 341// if err == nil { // resp is now filled 342// fmt.Println(resp) 343// } 344// 345// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguru-reviewer-2019-09-19/DescribeRecommendationFeedback 346func (c *CodeGuruReviewer) DescribeRecommendationFeedbackRequest(input *DescribeRecommendationFeedbackInput) (req *request.Request, output *DescribeRecommendationFeedbackOutput) { 347 op := &request.Operation{ 348 Name: opDescribeRecommendationFeedback, 349 HTTPMethod: "GET", 350 HTTPPath: "/feedback/{CodeReviewArn}", 351 } 352 353 if input == nil { 354 input = &DescribeRecommendationFeedbackInput{} 355 } 356 357 output = &DescribeRecommendationFeedbackOutput{} 358 req = c.newRequest(op, input, output) 359 return 360} 361 362// DescribeRecommendationFeedback API operation for Amazon CodeGuru Reviewer. 363// 364// Describes the customer feedback for a CodeGuru Reviewer recommendation. 365// 366// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 367// with awserr.Error's Code and Message methods to get detailed information about 368// the error. 369// 370// See the AWS API reference guide for Amazon CodeGuru Reviewer's 371// API operation DescribeRecommendationFeedback for usage and error information. 372// 373// Returned Error Types: 374// * ResourceNotFoundException 375// The resource specified in the request was not found. 376// 377// * InternalServerException 378// The server encountered an internal error and is unable to complete the request. 379// 380// * ValidationException 381// The input fails to satisfy the specified constraints. 382// 383// * AccessDeniedException 384// You do not have sufficient access to perform this action. 385// 386// * ThrottlingException 387// The request was denied due to request throttling. 388// 389// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguru-reviewer-2019-09-19/DescribeRecommendationFeedback 390func (c *CodeGuruReviewer) DescribeRecommendationFeedback(input *DescribeRecommendationFeedbackInput) (*DescribeRecommendationFeedbackOutput, error) { 391 req, out := c.DescribeRecommendationFeedbackRequest(input) 392 return out, req.Send() 393} 394 395// DescribeRecommendationFeedbackWithContext is the same as DescribeRecommendationFeedback with the addition of 396// the ability to pass a context and additional request options. 397// 398// See DescribeRecommendationFeedback for details on how to use this API operation. 399// 400// The context must be non-nil and will be used for request cancellation. If 401// the context is nil a panic will occur. In the future the SDK may create 402// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 403// for more information on using Contexts. 404func (c *CodeGuruReviewer) DescribeRecommendationFeedbackWithContext(ctx aws.Context, input *DescribeRecommendationFeedbackInput, opts ...request.Option) (*DescribeRecommendationFeedbackOutput, error) { 405 req, out := c.DescribeRecommendationFeedbackRequest(input) 406 req.SetContext(ctx) 407 req.ApplyOptions(opts...) 408 return out, req.Send() 409} 410 411const opDescribeRepositoryAssociation = "DescribeRepositoryAssociation" 412 413// DescribeRepositoryAssociationRequest generates a "aws/request.Request" representing the 414// client's request for the DescribeRepositoryAssociation operation. The "output" return 415// value will be populated with the request's response once the request completes 416// successfully. 417// 418// Use "Send" method on the returned Request to send the API call to the service. 419// the "output" return value is not valid until after Send returns without error. 420// 421// See DescribeRepositoryAssociation for more information on using the DescribeRepositoryAssociation 422// API call, and error handling. 423// 424// This method is useful when you want to inject custom logic or configuration 425// into the SDK's request lifecycle. Such as custom headers, or retry logic. 426// 427// 428// // Example sending a request using the DescribeRepositoryAssociationRequest method. 429// req, resp := client.DescribeRepositoryAssociationRequest(params) 430// 431// err := req.Send() 432// if err == nil { // resp is now filled 433// fmt.Println(resp) 434// } 435// 436// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguru-reviewer-2019-09-19/DescribeRepositoryAssociation 437func (c *CodeGuruReviewer) DescribeRepositoryAssociationRequest(input *DescribeRepositoryAssociationInput) (req *request.Request, output *DescribeRepositoryAssociationOutput) { 438 op := &request.Operation{ 439 Name: opDescribeRepositoryAssociation, 440 HTTPMethod: "GET", 441 HTTPPath: "/associations/{AssociationArn}", 442 } 443 444 if input == nil { 445 input = &DescribeRepositoryAssociationInput{} 446 } 447 448 output = &DescribeRepositoryAssociationOutput{} 449 req = c.newRequest(op, input, output) 450 return 451} 452 453// DescribeRepositoryAssociation API operation for Amazon CodeGuru Reviewer. 454// 455// Returns a RepositoryAssociation (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociation.html) 456// object that contains information about the requested repository association. 457// 458// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 459// with awserr.Error's Code and Message methods to get detailed information about 460// the error. 461// 462// See the AWS API reference guide for Amazon CodeGuru Reviewer's 463// API operation DescribeRepositoryAssociation for usage and error information. 464// 465// Returned Error Types: 466// * NotFoundException 467// The resource specified in the request was not found. 468// 469// * InternalServerException 470// The server encountered an internal error and is unable to complete the request. 471// 472// * ValidationException 473// The input fails to satisfy the specified constraints. 474// 475// * AccessDeniedException 476// You do not have sufficient access to perform this action. 477// 478// * ThrottlingException 479// The request was denied due to request throttling. 480// 481// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguru-reviewer-2019-09-19/DescribeRepositoryAssociation 482func (c *CodeGuruReviewer) DescribeRepositoryAssociation(input *DescribeRepositoryAssociationInput) (*DescribeRepositoryAssociationOutput, error) { 483 req, out := c.DescribeRepositoryAssociationRequest(input) 484 return out, req.Send() 485} 486 487// DescribeRepositoryAssociationWithContext is the same as DescribeRepositoryAssociation with the addition of 488// the ability to pass a context and additional request options. 489// 490// See DescribeRepositoryAssociation for details on how to use this API operation. 491// 492// The context must be non-nil and will be used for request cancellation. If 493// the context is nil a panic will occur. In the future the SDK may create 494// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 495// for more information on using Contexts. 496func (c *CodeGuruReviewer) DescribeRepositoryAssociationWithContext(ctx aws.Context, input *DescribeRepositoryAssociationInput, opts ...request.Option) (*DescribeRepositoryAssociationOutput, error) { 497 req, out := c.DescribeRepositoryAssociationRequest(input) 498 req.SetContext(ctx) 499 req.ApplyOptions(opts...) 500 return out, req.Send() 501} 502 503const opDisassociateRepository = "DisassociateRepository" 504 505// DisassociateRepositoryRequest generates a "aws/request.Request" representing the 506// client's request for the DisassociateRepository operation. The "output" return 507// value will be populated with the request's response once the request completes 508// successfully. 509// 510// Use "Send" method on the returned Request to send the API call to the service. 511// the "output" return value is not valid until after Send returns without error. 512// 513// See DisassociateRepository for more information on using the DisassociateRepository 514// API call, and error handling. 515// 516// This method is useful when you want to inject custom logic or configuration 517// into the SDK's request lifecycle. Such as custom headers, or retry logic. 518// 519// 520// // Example sending a request using the DisassociateRepositoryRequest method. 521// req, resp := client.DisassociateRepositoryRequest(params) 522// 523// err := req.Send() 524// if err == nil { // resp is now filled 525// fmt.Println(resp) 526// } 527// 528// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguru-reviewer-2019-09-19/DisassociateRepository 529func (c *CodeGuruReviewer) DisassociateRepositoryRequest(input *DisassociateRepositoryInput) (req *request.Request, output *DisassociateRepositoryOutput) { 530 op := &request.Operation{ 531 Name: opDisassociateRepository, 532 HTTPMethod: "DELETE", 533 HTTPPath: "/associations/{AssociationArn}", 534 } 535 536 if input == nil { 537 input = &DisassociateRepositoryInput{} 538 } 539 540 output = &DisassociateRepositoryOutput{} 541 req = c.newRequest(op, input, output) 542 return 543} 544 545// DisassociateRepository API operation for Amazon CodeGuru Reviewer. 546// 547// Removes the association between Amazon CodeGuru Reviewer and a repository. 548// 549// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 550// with awserr.Error's Code and Message methods to get detailed information about 551// the error. 552// 553// See the AWS API reference guide for Amazon CodeGuru Reviewer's 554// API operation DisassociateRepository for usage and error information. 555// 556// Returned Error Types: 557// * NotFoundException 558// The resource specified in the request was not found. 559// 560// * InternalServerException 561// The server encountered an internal error and is unable to complete the request. 562// 563// * ValidationException 564// The input fails to satisfy the specified constraints. 565// 566// * AccessDeniedException 567// You do not have sufficient access to perform this action. 568// 569// * ConflictException 570// The requested operation would cause a conflict with the current state of 571// a service resource associated with the request. Resolve the conflict before 572// retrying this request. 573// 574// * ThrottlingException 575// The request was denied due to request throttling. 576// 577// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguru-reviewer-2019-09-19/DisassociateRepository 578func (c *CodeGuruReviewer) DisassociateRepository(input *DisassociateRepositoryInput) (*DisassociateRepositoryOutput, error) { 579 req, out := c.DisassociateRepositoryRequest(input) 580 return out, req.Send() 581} 582 583// DisassociateRepositoryWithContext is the same as DisassociateRepository with the addition of 584// the ability to pass a context and additional request options. 585// 586// See DisassociateRepository for details on how to use this API operation. 587// 588// The context must be non-nil and will be used for request cancellation. If 589// the context is nil a panic will occur. In the future the SDK may create 590// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 591// for more information on using Contexts. 592func (c *CodeGuruReviewer) DisassociateRepositoryWithContext(ctx aws.Context, input *DisassociateRepositoryInput, opts ...request.Option) (*DisassociateRepositoryOutput, error) { 593 req, out := c.DisassociateRepositoryRequest(input) 594 req.SetContext(ctx) 595 req.ApplyOptions(opts...) 596 return out, req.Send() 597} 598 599const opListCodeReviews = "ListCodeReviews" 600 601// ListCodeReviewsRequest generates a "aws/request.Request" representing the 602// client's request for the ListCodeReviews operation. The "output" return 603// value will be populated with the request's response once the request completes 604// successfully. 605// 606// Use "Send" method on the returned Request to send the API call to the service. 607// the "output" return value is not valid until after Send returns without error. 608// 609// See ListCodeReviews for more information on using the ListCodeReviews 610// API call, and error handling. 611// 612// This method is useful when you want to inject custom logic or configuration 613// into the SDK's request lifecycle. Such as custom headers, or retry logic. 614// 615// 616// // Example sending a request using the ListCodeReviewsRequest method. 617// req, resp := client.ListCodeReviewsRequest(params) 618// 619// err := req.Send() 620// if err == nil { // resp is now filled 621// fmt.Println(resp) 622// } 623// 624// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguru-reviewer-2019-09-19/ListCodeReviews 625func (c *CodeGuruReviewer) ListCodeReviewsRequest(input *ListCodeReviewsInput) (req *request.Request, output *ListCodeReviewsOutput) { 626 op := &request.Operation{ 627 Name: opListCodeReviews, 628 HTTPMethod: "GET", 629 HTTPPath: "/codereviews", 630 Paginator: &request.Paginator{ 631 InputTokens: []string{"NextToken"}, 632 OutputTokens: []string{"NextToken"}, 633 LimitToken: "MaxResults", 634 TruncationToken: "", 635 }, 636 } 637 638 if input == nil { 639 input = &ListCodeReviewsInput{} 640 } 641 642 output = &ListCodeReviewsOutput{} 643 req = c.newRequest(op, input, output) 644 return 645} 646 647// ListCodeReviews API operation for Amazon CodeGuru Reviewer. 648// 649// Lists all the code reviews that the customer has created in the past 90 days. 650// 651// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 652// with awserr.Error's Code and Message methods to get detailed information about 653// the error. 654// 655// See the AWS API reference guide for Amazon CodeGuru Reviewer's 656// API operation ListCodeReviews for usage and error information. 657// 658// Returned Error Types: 659// * InternalServerException 660// The server encountered an internal error and is unable to complete the request. 661// 662// * ValidationException 663// The input fails to satisfy the specified constraints. 664// 665// * ThrottlingException 666// The request was denied due to request throttling. 667// 668// * AccessDeniedException 669// You do not have sufficient access to perform this action. 670// 671// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguru-reviewer-2019-09-19/ListCodeReviews 672func (c *CodeGuruReviewer) ListCodeReviews(input *ListCodeReviewsInput) (*ListCodeReviewsOutput, error) { 673 req, out := c.ListCodeReviewsRequest(input) 674 return out, req.Send() 675} 676 677// ListCodeReviewsWithContext is the same as ListCodeReviews with the addition of 678// the ability to pass a context and additional request options. 679// 680// See ListCodeReviews for details on how to use this API operation. 681// 682// The context must be non-nil and will be used for request cancellation. If 683// the context is nil a panic will occur. In the future the SDK may create 684// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 685// for more information on using Contexts. 686func (c *CodeGuruReviewer) ListCodeReviewsWithContext(ctx aws.Context, input *ListCodeReviewsInput, opts ...request.Option) (*ListCodeReviewsOutput, error) { 687 req, out := c.ListCodeReviewsRequest(input) 688 req.SetContext(ctx) 689 req.ApplyOptions(opts...) 690 return out, req.Send() 691} 692 693// ListCodeReviewsPages iterates over the pages of a ListCodeReviews operation, 694// calling the "fn" function with the response data for each page. To stop 695// iterating, return false from the fn function. 696// 697// See ListCodeReviews method for more information on how to use this operation. 698// 699// Note: This operation can generate multiple requests to a service. 700// 701// // Example iterating over at most 3 pages of a ListCodeReviews operation. 702// pageNum := 0 703// err := client.ListCodeReviewsPages(params, 704// func(page *codegurureviewer.ListCodeReviewsOutput, lastPage bool) bool { 705// pageNum++ 706// fmt.Println(page) 707// return pageNum <= 3 708// }) 709// 710func (c *CodeGuruReviewer) ListCodeReviewsPages(input *ListCodeReviewsInput, fn func(*ListCodeReviewsOutput, bool) bool) error { 711 return c.ListCodeReviewsPagesWithContext(aws.BackgroundContext(), input, fn) 712} 713 714// ListCodeReviewsPagesWithContext same as ListCodeReviewsPages except 715// it takes a Context and allows setting request options on the pages. 716// 717// The context must be non-nil and will be used for request cancellation. If 718// the context is nil a panic will occur. In the future the SDK may create 719// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 720// for more information on using Contexts. 721func (c *CodeGuruReviewer) ListCodeReviewsPagesWithContext(ctx aws.Context, input *ListCodeReviewsInput, fn func(*ListCodeReviewsOutput, bool) bool, opts ...request.Option) error { 722 p := request.Pagination{ 723 NewRequest: func() (*request.Request, error) { 724 var inCpy *ListCodeReviewsInput 725 if input != nil { 726 tmp := *input 727 inCpy = &tmp 728 } 729 req, _ := c.ListCodeReviewsRequest(inCpy) 730 req.SetContext(ctx) 731 req.ApplyOptions(opts...) 732 return req, nil 733 }, 734 } 735 736 for p.Next() { 737 if !fn(p.Page().(*ListCodeReviewsOutput), !p.HasNextPage()) { 738 break 739 } 740 } 741 742 return p.Err() 743} 744 745const opListRecommendationFeedback = "ListRecommendationFeedback" 746 747// ListRecommendationFeedbackRequest generates a "aws/request.Request" representing the 748// client's request for the ListRecommendationFeedback operation. The "output" return 749// value will be populated with the request's response once the request completes 750// successfully. 751// 752// Use "Send" method on the returned Request to send the API call to the service. 753// the "output" return value is not valid until after Send returns without error. 754// 755// See ListRecommendationFeedback for more information on using the ListRecommendationFeedback 756// API call, and error handling. 757// 758// This method is useful when you want to inject custom logic or configuration 759// into the SDK's request lifecycle. Such as custom headers, or retry logic. 760// 761// 762// // Example sending a request using the ListRecommendationFeedbackRequest method. 763// req, resp := client.ListRecommendationFeedbackRequest(params) 764// 765// err := req.Send() 766// if err == nil { // resp is now filled 767// fmt.Println(resp) 768// } 769// 770// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguru-reviewer-2019-09-19/ListRecommendationFeedback 771func (c *CodeGuruReviewer) ListRecommendationFeedbackRequest(input *ListRecommendationFeedbackInput) (req *request.Request, output *ListRecommendationFeedbackOutput) { 772 op := &request.Operation{ 773 Name: opListRecommendationFeedback, 774 HTTPMethod: "GET", 775 HTTPPath: "/feedback/{CodeReviewArn}/RecommendationFeedback", 776 Paginator: &request.Paginator{ 777 InputTokens: []string{"NextToken"}, 778 OutputTokens: []string{"NextToken"}, 779 LimitToken: "MaxResults", 780 TruncationToken: "", 781 }, 782 } 783 784 if input == nil { 785 input = &ListRecommendationFeedbackInput{} 786 } 787 788 output = &ListRecommendationFeedbackOutput{} 789 req = c.newRequest(op, input, output) 790 return 791} 792 793// ListRecommendationFeedback API operation for Amazon CodeGuru Reviewer. 794// 795// Returns a list of RecommendationFeedbackSummary (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RecommendationFeedbackSummary.html) 796// objects that contain customer recommendation feedback for all CodeGuru Reviewer 797// users. 798// 799// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 800// with awserr.Error's Code and Message methods to get detailed information about 801// the error. 802// 803// See the AWS API reference guide for Amazon CodeGuru Reviewer's 804// API operation ListRecommendationFeedback for usage and error information. 805// 806// Returned Error Types: 807// * ResourceNotFoundException 808// The resource specified in the request was not found. 809// 810// * InternalServerException 811// The server encountered an internal error and is unable to complete the request. 812// 813// * ValidationException 814// The input fails to satisfy the specified constraints. 815// 816// * AccessDeniedException 817// You do not have sufficient access to perform this action. 818// 819// * ThrottlingException 820// The request was denied due to request throttling. 821// 822// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguru-reviewer-2019-09-19/ListRecommendationFeedback 823func (c *CodeGuruReviewer) ListRecommendationFeedback(input *ListRecommendationFeedbackInput) (*ListRecommendationFeedbackOutput, error) { 824 req, out := c.ListRecommendationFeedbackRequest(input) 825 return out, req.Send() 826} 827 828// ListRecommendationFeedbackWithContext is the same as ListRecommendationFeedback with the addition of 829// the ability to pass a context and additional request options. 830// 831// See ListRecommendationFeedback for details on how to use this API operation. 832// 833// The context must be non-nil and will be used for request cancellation. If 834// the context is nil a panic will occur. In the future the SDK may create 835// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 836// for more information on using Contexts. 837func (c *CodeGuruReviewer) ListRecommendationFeedbackWithContext(ctx aws.Context, input *ListRecommendationFeedbackInput, opts ...request.Option) (*ListRecommendationFeedbackOutput, error) { 838 req, out := c.ListRecommendationFeedbackRequest(input) 839 req.SetContext(ctx) 840 req.ApplyOptions(opts...) 841 return out, req.Send() 842} 843 844// ListRecommendationFeedbackPages iterates over the pages of a ListRecommendationFeedback operation, 845// calling the "fn" function with the response data for each page. To stop 846// iterating, return false from the fn function. 847// 848// See ListRecommendationFeedback method for more information on how to use this operation. 849// 850// Note: This operation can generate multiple requests to a service. 851// 852// // Example iterating over at most 3 pages of a ListRecommendationFeedback operation. 853// pageNum := 0 854// err := client.ListRecommendationFeedbackPages(params, 855// func(page *codegurureviewer.ListRecommendationFeedbackOutput, lastPage bool) bool { 856// pageNum++ 857// fmt.Println(page) 858// return pageNum <= 3 859// }) 860// 861func (c *CodeGuruReviewer) ListRecommendationFeedbackPages(input *ListRecommendationFeedbackInput, fn func(*ListRecommendationFeedbackOutput, bool) bool) error { 862 return c.ListRecommendationFeedbackPagesWithContext(aws.BackgroundContext(), input, fn) 863} 864 865// ListRecommendationFeedbackPagesWithContext same as ListRecommendationFeedbackPages except 866// it takes a Context and allows setting request options on the pages. 867// 868// The context must be non-nil and will be used for request cancellation. If 869// the context is nil a panic will occur. In the future the SDK may create 870// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 871// for more information on using Contexts. 872func (c *CodeGuruReviewer) ListRecommendationFeedbackPagesWithContext(ctx aws.Context, input *ListRecommendationFeedbackInput, fn func(*ListRecommendationFeedbackOutput, bool) bool, opts ...request.Option) error { 873 p := request.Pagination{ 874 NewRequest: func() (*request.Request, error) { 875 var inCpy *ListRecommendationFeedbackInput 876 if input != nil { 877 tmp := *input 878 inCpy = &tmp 879 } 880 req, _ := c.ListRecommendationFeedbackRequest(inCpy) 881 req.SetContext(ctx) 882 req.ApplyOptions(opts...) 883 return req, nil 884 }, 885 } 886 887 for p.Next() { 888 if !fn(p.Page().(*ListRecommendationFeedbackOutput), !p.HasNextPage()) { 889 break 890 } 891 } 892 893 return p.Err() 894} 895 896const opListRecommendations = "ListRecommendations" 897 898// ListRecommendationsRequest generates a "aws/request.Request" representing the 899// client's request for the ListRecommendations operation. The "output" return 900// value will be populated with the request's response once the request completes 901// successfully. 902// 903// Use "Send" method on the returned Request to send the API call to the service. 904// the "output" return value is not valid until after Send returns without error. 905// 906// See ListRecommendations for more information on using the ListRecommendations 907// API call, and error handling. 908// 909// This method is useful when you want to inject custom logic or configuration 910// into the SDK's request lifecycle. Such as custom headers, or retry logic. 911// 912// 913// // Example sending a request using the ListRecommendationsRequest method. 914// req, resp := client.ListRecommendationsRequest(params) 915// 916// err := req.Send() 917// if err == nil { // resp is now filled 918// fmt.Println(resp) 919// } 920// 921// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguru-reviewer-2019-09-19/ListRecommendations 922func (c *CodeGuruReviewer) ListRecommendationsRequest(input *ListRecommendationsInput) (req *request.Request, output *ListRecommendationsOutput) { 923 op := &request.Operation{ 924 Name: opListRecommendations, 925 HTTPMethod: "GET", 926 HTTPPath: "/codereviews/{CodeReviewArn}/Recommendations", 927 Paginator: &request.Paginator{ 928 InputTokens: []string{"NextToken"}, 929 OutputTokens: []string{"NextToken"}, 930 LimitToken: "MaxResults", 931 TruncationToken: "", 932 }, 933 } 934 935 if input == nil { 936 input = &ListRecommendationsInput{} 937 } 938 939 output = &ListRecommendationsOutput{} 940 req = c.newRequest(op, input, output) 941 return 942} 943 944// ListRecommendations API operation for Amazon CodeGuru Reviewer. 945// 946// Returns the list of all recommendations for a completed code review. 947// 948// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 949// with awserr.Error's Code and Message methods to get detailed information about 950// the error. 951// 952// See the AWS API reference guide for Amazon CodeGuru Reviewer's 953// API operation ListRecommendations for usage and error information. 954// 955// Returned Error Types: 956// * ResourceNotFoundException 957// The resource specified in the request was not found. 958// 959// * InternalServerException 960// The server encountered an internal error and is unable to complete the request. 961// 962// * ValidationException 963// The input fails to satisfy the specified constraints. 964// 965// * AccessDeniedException 966// You do not have sufficient access to perform this action. 967// 968// * ThrottlingException 969// The request was denied due to request throttling. 970// 971// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguru-reviewer-2019-09-19/ListRecommendations 972func (c *CodeGuruReviewer) ListRecommendations(input *ListRecommendationsInput) (*ListRecommendationsOutput, error) { 973 req, out := c.ListRecommendationsRequest(input) 974 return out, req.Send() 975} 976 977// ListRecommendationsWithContext is the same as ListRecommendations with the addition of 978// the ability to pass a context and additional request options. 979// 980// See ListRecommendations for details on how to use this API operation. 981// 982// The context must be non-nil and will be used for request cancellation. If 983// the context is nil a panic will occur. In the future the SDK may create 984// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 985// for more information on using Contexts. 986func (c *CodeGuruReviewer) ListRecommendationsWithContext(ctx aws.Context, input *ListRecommendationsInput, opts ...request.Option) (*ListRecommendationsOutput, error) { 987 req, out := c.ListRecommendationsRequest(input) 988 req.SetContext(ctx) 989 req.ApplyOptions(opts...) 990 return out, req.Send() 991} 992 993// ListRecommendationsPages iterates over the pages of a ListRecommendations operation, 994// calling the "fn" function with the response data for each page. To stop 995// iterating, return false from the fn function. 996// 997// See ListRecommendations method for more information on how to use this operation. 998// 999// Note: This operation can generate multiple requests to a service. 1000// 1001// // Example iterating over at most 3 pages of a ListRecommendations operation. 1002// pageNum := 0 1003// err := client.ListRecommendationsPages(params, 1004// func(page *codegurureviewer.ListRecommendationsOutput, lastPage bool) bool { 1005// pageNum++ 1006// fmt.Println(page) 1007// return pageNum <= 3 1008// }) 1009// 1010func (c *CodeGuruReviewer) ListRecommendationsPages(input *ListRecommendationsInput, fn func(*ListRecommendationsOutput, bool) bool) error { 1011 return c.ListRecommendationsPagesWithContext(aws.BackgroundContext(), input, fn) 1012} 1013 1014// ListRecommendationsPagesWithContext same as ListRecommendationsPages except 1015// it takes a Context and allows setting request options on the pages. 1016// 1017// The context must be non-nil and will be used for request cancellation. If 1018// the context is nil a panic will occur. In the future the SDK may create 1019// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1020// for more information on using Contexts. 1021func (c *CodeGuruReviewer) ListRecommendationsPagesWithContext(ctx aws.Context, input *ListRecommendationsInput, fn func(*ListRecommendationsOutput, bool) bool, opts ...request.Option) error { 1022 p := request.Pagination{ 1023 NewRequest: func() (*request.Request, error) { 1024 var inCpy *ListRecommendationsInput 1025 if input != nil { 1026 tmp := *input 1027 inCpy = &tmp 1028 } 1029 req, _ := c.ListRecommendationsRequest(inCpy) 1030 req.SetContext(ctx) 1031 req.ApplyOptions(opts...) 1032 return req, nil 1033 }, 1034 } 1035 1036 for p.Next() { 1037 if !fn(p.Page().(*ListRecommendationsOutput), !p.HasNextPage()) { 1038 break 1039 } 1040 } 1041 1042 return p.Err() 1043} 1044 1045const opListRepositoryAssociations = "ListRepositoryAssociations" 1046 1047// ListRepositoryAssociationsRequest generates a "aws/request.Request" representing the 1048// client's request for the ListRepositoryAssociations operation. The "output" return 1049// value will be populated with the request's response once the request completes 1050// successfully. 1051// 1052// Use "Send" method on the returned Request to send the API call to the service. 1053// the "output" return value is not valid until after Send returns without error. 1054// 1055// See ListRepositoryAssociations for more information on using the ListRepositoryAssociations 1056// API call, and error handling. 1057// 1058// This method is useful when you want to inject custom logic or configuration 1059// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1060// 1061// 1062// // Example sending a request using the ListRepositoryAssociationsRequest method. 1063// req, resp := client.ListRepositoryAssociationsRequest(params) 1064// 1065// err := req.Send() 1066// if err == nil { // resp is now filled 1067// fmt.Println(resp) 1068// } 1069// 1070// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguru-reviewer-2019-09-19/ListRepositoryAssociations 1071func (c *CodeGuruReviewer) ListRepositoryAssociationsRequest(input *ListRepositoryAssociationsInput) (req *request.Request, output *ListRepositoryAssociationsOutput) { 1072 op := &request.Operation{ 1073 Name: opListRepositoryAssociations, 1074 HTTPMethod: "GET", 1075 HTTPPath: "/associations", 1076 Paginator: &request.Paginator{ 1077 InputTokens: []string{"NextToken"}, 1078 OutputTokens: []string{"NextToken"}, 1079 LimitToken: "MaxResults", 1080 TruncationToken: "", 1081 }, 1082 } 1083 1084 if input == nil { 1085 input = &ListRepositoryAssociationsInput{} 1086 } 1087 1088 output = &ListRepositoryAssociationsOutput{} 1089 req = c.newRequest(op, input, output) 1090 return 1091} 1092 1093// ListRepositoryAssociations API operation for Amazon CodeGuru Reviewer. 1094// 1095// Returns a list of RepositoryAssociationSummary (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociationSummary.html) 1096// objects that contain summary information about a repository association. 1097// You can filter the returned list by ProviderType (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociationSummary.html#reviewer-Type-RepositoryAssociationSummary-ProviderType), 1098// Name (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociationSummary.html#reviewer-Type-RepositoryAssociationSummary-Name), 1099// State (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociationSummary.html#reviewer-Type-RepositoryAssociationSummary-State), 1100// and Owner (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociationSummary.html#reviewer-Type-RepositoryAssociationSummary-Owner). 1101// 1102// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1103// with awserr.Error's Code and Message methods to get detailed information about 1104// the error. 1105// 1106// See the AWS API reference guide for Amazon CodeGuru Reviewer's 1107// API operation ListRepositoryAssociations for usage and error information. 1108// 1109// Returned Error Types: 1110// * InternalServerException 1111// The server encountered an internal error and is unable to complete the request. 1112// 1113// * ValidationException 1114// The input fails to satisfy the specified constraints. 1115// 1116// * ThrottlingException 1117// The request was denied due to request throttling. 1118// 1119// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguru-reviewer-2019-09-19/ListRepositoryAssociations 1120func (c *CodeGuruReviewer) ListRepositoryAssociations(input *ListRepositoryAssociationsInput) (*ListRepositoryAssociationsOutput, error) { 1121 req, out := c.ListRepositoryAssociationsRequest(input) 1122 return out, req.Send() 1123} 1124 1125// ListRepositoryAssociationsWithContext is the same as ListRepositoryAssociations with the addition of 1126// the ability to pass a context and additional request options. 1127// 1128// See ListRepositoryAssociations for details on how to use this API operation. 1129// 1130// The context must be non-nil and will be used for request cancellation. If 1131// the context is nil a panic will occur. In the future the SDK may create 1132// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1133// for more information on using Contexts. 1134func (c *CodeGuruReviewer) ListRepositoryAssociationsWithContext(ctx aws.Context, input *ListRepositoryAssociationsInput, opts ...request.Option) (*ListRepositoryAssociationsOutput, error) { 1135 req, out := c.ListRepositoryAssociationsRequest(input) 1136 req.SetContext(ctx) 1137 req.ApplyOptions(opts...) 1138 return out, req.Send() 1139} 1140 1141// ListRepositoryAssociationsPages iterates over the pages of a ListRepositoryAssociations operation, 1142// calling the "fn" function with the response data for each page. To stop 1143// iterating, return false from the fn function. 1144// 1145// See ListRepositoryAssociations method for more information on how to use this operation. 1146// 1147// Note: This operation can generate multiple requests to a service. 1148// 1149// // Example iterating over at most 3 pages of a ListRepositoryAssociations operation. 1150// pageNum := 0 1151// err := client.ListRepositoryAssociationsPages(params, 1152// func(page *codegurureviewer.ListRepositoryAssociationsOutput, lastPage bool) bool { 1153// pageNum++ 1154// fmt.Println(page) 1155// return pageNum <= 3 1156// }) 1157// 1158func (c *CodeGuruReviewer) ListRepositoryAssociationsPages(input *ListRepositoryAssociationsInput, fn func(*ListRepositoryAssociationsOutput, bool) bool) error { 1159 return c.ListRepositoryAssociationsPagesWithContext(aws.BackgroundContext(), input, fn) 1160} 1161 1162// ListRepositoryAssociationsPagesWithContext same as ListRepositoryAssociationsPages except 1163// it takes a Context and allows setting request options on the pages. 1164// 1165// The context must be non-nil and will be used for request cancellation. If 1166// the context is nil a panic will occur. In the future the SDK may create 1167// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1168// for more information on using Contexts. 1169func (c *CodeGuruReviewer) ListRepositoryAssociationsPagesWithContext(ctx aws.Context, input *ListRepositoryAssociationsInput, fn func(*ListRepositoryAssociationsOutput, bool) bool, opts ...request.Option) error { 1170 p := request.Pagination{ 1171 NewRequest: func() (*request.Request, error) { 1172 var inCpy *ListRepositoryAssociationsInput 1173 if input != nil { 1174 tmp := *input 1175 inCpy = &tmp 1176 } 1177 req, _ := c.ListRepositoryAssociationsRequest(inCpy) 1178 req.SetContext(ctx) 1179 req.ApplyOptions(opts...) 1180 return req, nil 1181 }, 1182 } 1183 1184 for p.Next() { 1185 if !fn(p.Page().(*ListRepositoryAssociationsOutput), !p.HasNextPage()) { 1186 break 1187 } 1188 } 1189 1190 return p.Err() 1191} 1192 1193const opListTagsForResource = "ListTagsForResource" 1194 1195// ListTagsForResourceRequest generates a "aws/request.Request" representing the 1196// client's request for the ListTagsForResource operation. The "output" return 1197// value will be populated with the request's response once the request completes 1198// successfully. 1199// 1200// Use "Send" method on the returned Request to send the API call to the service. 1201// the "output" return value is not valid until after Send returns without error. 1202// 1203// See ListTagsForResource for more information on using the ListTagsForResource 1204// API call, and error handling. 1205// 1206// This method is useful when you want to inject custom logic or configuration 1207// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1208// 1209// 1210// // Example sending a request using the ListTagsForResourceRequest method. 1211// req, resp := client.ListTagsForResourceRequest(params) 1212// 1213// err := req.Send() 1214// if err == nil { // resp is now filled 1215// fmt.Println(resp) 1216// } 1217// 1218// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguru-reviewer-2019-09-19/ListTagsForResource 1219func (c *CodeGuruReviewer) ListTagsForResourceRequest(input *ListTagsForResourceInput) (req *request.Request, output *ListTagsForResourceOutput) { 1220 op := &request.Operation{ 1221 Name: opListTagsForResource, 1222 HTTPMethod: "GET", 1223 HTTPPath: "/tags/{resourceArn}", 1224 } 1225 1226 if input == nil { 1227 input = &ListTagsForResourceInput{} 1228 } 1229 1230 output = &ListTagsForResourceOutput{} 1231 req = c.newRequest(op, input, output) 1232 return 1233} 1234 1235// ListTagsForResource API operation for Amazon CodeGuru Reviewer. 1236// 1237// Returns the list of tags associated with an associated repository resource. 1238// 1239// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1240// with awserr.Error's Code and Message methods to get detailed information about 1241// the error. 1242// 1243// See the AWS API reference guide for Amazon CodeGuru Reviewer's 1244// API operation ListTagsForResource for usage and error information. 1245// 1246// Returned Error Types: 1247// * InternalServerException 1248// The server encountered an internal error and is unable to complete the request. 1249// 1250// * ValidationException 1251// The input fails to satisfy the specified constraints. 1252// 1253// * ResourceNotFoundException 1254// The resource specified in the request was not found. 1255// 1256// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguru-reviewer-2019-09-19/ListTagsForResource 1257func (c *CodeGuruReviewer) ListTagsForResource(input *ListTagsForResourceInput) (*ListTagsForResourceOutput, error) { 1258 req, out := c.ListTagsForResourceRequest(input) 1259 return out, req.Send() 1260} 1261 1262// ListTagsForResourceWithContext is the same as ListTagsForResource with the addition of 1263// the ability to pass a context and additional request options. 1264// 1265// See ListTagsForResource for details on how to use this API operation. 1266// 1267// The context must be non-nil and will be used for request cancellation. If 1268// the context is nil a panic will occur. In the future the SDK may create 1269// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1270// for more information on using Contexts. 1271func (c *CodeGuruReviewer) ListTagsForResourceWithContext(ctx aws.Context, input *ListTagsForResourceInput, opts ...request.Option) (*ListTagsForResourceOutput, error) { 1272 req, out := c.ListTagsForResourceRequest(input) 1273 req.SetContext(ctx) 1274 req.ApplyOptions(opts...) 1275 return out, req.Send() 1276} 1277 1278const opPutRecommendationFeedback = "PutRecommendationFeedback" 1279 1280// PutRecommendationFeedbackRequest generates a "aws/request.Request" representing the 1281// client's request for the PutRecommendationFeedback operation. The "output" return 1282// value will be populated with the request's response once the request completes 1283// successfully. 1284// 1285// Use "Send" method on the returned Request to send the API call to the service. 1286// the "output" return value is not valid until after Send returns without error. 1287// 1288// See PutRecommendationFeedback for more information on using the PutRecommendationFeedback 1289// API call, and error handling. 1290// 1291// This method is useful when you want to inject custom logic or configuration 1292// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1293// 1294// 1295// // Example sending a request using the PutRecommendationFeedbackRequest method. 1296// req, resp := client.PutRecommendationFeedbackRequest(params) 1297// 1298// err := req.Send() 1299// if err == nil { // resp is now filled 1300// fmt.Println(resp) 1301// } 1302// 1303// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguru-reviewer-2019-09-19/PutRecommendationFeedback 1304func (c *CodeGuruReviewer) PutRecommendationFeedbackRequest(input *PutRecommendationFeedbackInput) (req *request.Request, output *PutRecommendationFeedbackOutput) { 1305 op := &request.Operation{ 1306 Name: opPutRecommendationFeedback, 1307 HTTPMethod: "PUT", 1308 HTTPPath: "/feedback", 1309 } 1310 1311 if input == nil { 1312 input = &PutRecommendationFeedbackInput{} 1313 } 1314 1315 output = &PutRecommendationFeedbackOutput{} 1316 req = c.newRequest(op, input, output) 1317 req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 1318 return 1319} 1320 1321// PutRecommendationFeedback API operation for Amazon CodeGuru Reviewer. 1322// 1323// Stores customer feedback for a CodeGuru Reviewer recommendation. When this 1324// API is called again with different reactions the previous feedback is overwritten. 1325// 1326// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1327// with awserr.Error's Code and Message methods to get detailed information about 1328// the error. 1329// 1330// See the AWS API reference guide for Amazon CodeGuru Reviewer's 1331// API operation PutRecommendationFeedback for usage and error information. 1332// 1333// Returned Error Types: 1334// * ResourceNotFoundException 1335// The resource specified in the request was not found. 1336// 1337// * InternalServerException 1338// The server encountered an internal error and is unable to complete the request. 1339// 1340// * ValidationException 1341// The input fails to satisfy the specified constraints. 1342// 1343// * AccessDeniedException 1344// You do not have sufficient access to perform this action. 1345// 1346// * ThrottlingException 1347// The request was denied due to request throttling. 1348// 1349// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguru-reviewer-2019-09-19/PutRecommendationFeedback 1350func (c *CodeGuruReviewer) PutRecommendationFeedback(input *PutRecommendationFeedbackInput) (*PutRecommendationFeedbackOutput, error) { 1351 req, out := c.PutRecommendationFeedbackRequest(input) 1352 return out, req.Send() 1353} 1354 1355// PutRecommendationFeedbackWithContext is the same as PutRecommendationFeedback with the addition of 1356// the ability to pass a context and additional request options. 1357// 1358// See PutRecommendationFeedback for details on how to use this API operation. 1359// 1360// The context must be non-nil and will be used for request cancellation. If 1361// the context is nil a panic will occur. In the future the SDK may create 1362// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1363// for more information on using Contexts. 1364func (c *CodeGuruReviewer) PutRecommendationFeedbackWithContext(ctx aws.Context, input *PutRecommendationFeedbackInput, opts ...request.Option) (*PutRecommendationFeedbackOutput, error) { 1365 req, out := c.PutRecommendationFeedbackRequest(input) 1366 req.SetContext(ctx) 1367 req.ApplyOptions(opts...) 1368 return out, req.Send() 1369} 1370 1371const opTagResource = "TagResource" 1372 1373// TagResourceRequest generates a "aws/request.Request" representing the 1374// client's request for the TagResource operation. The "output" return 1375// value will be populated with the request's response once the request completes 1376// successfully. 1377// 1378// Use "Send" method on the returned Request to send the API call to the service. 1379// the "output" return value is not valid until after Send returns without error. 1380// 1381// See TagResource for more information on using the TagResource 1382// API call, and error handling. 1383// 1384// This method is useful when you want to inject custom logic or configuration 1385// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1386// 1387// 1388// // Example sending a request using the TagResourceRequest method. 1389// req, resp := client.TagResourceRequest(params) 1390// 1391// err := req.Send() 1392// if err == nil { // resp is now filled 1393// fmt.Println(resp) 1394// } 1395// 1396// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguru-reviewer-2019-09-19/TagResource 1397func (c *CodeGuruReviewer) TagResourceRequest(input *TagResourceInput) (req *request.Request, output *TagResourceOutput) { 1398 op := &request.Operation{ 1399 Name: opTagResource, 1400 HTTPMethod: "POST", 1401 HTTPPath: "/tags/{resourceArn}", 1402 } 1403 1404 if input == nil { 1405 input = &TagResourceInput{} 1406 } 1407 1408 output = &TagResourceOutput{} 1409 req = c.newRequest(op, input, output) 1410 req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 1411 return 1412} 1413 1414// TagResource API operation for Amazon CodeGuru Reviewer. 1415// 1416// Adds one or more tags to an associated repository. 1417// 1418// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1419// with awserr.Error's Code and Message methods to get detailed information about 1420// the error. 1421// 1422// See the AWS API reference guide for Amazon CodeGuru Reviewer's 1423// API operation TagResource for usage and error information. 1424// 1425// Returned Error Types: 1426// * InternalServerException 1427// The server encountered an internal error and is unable to complete the request. 1428// 1429// * ValidationException 1430// The input fails to satisfy the specified constraints. 1431// 1432// * ResourceNotFoundException 1433// The resource specified in the request was not found. 1434// 1435// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguru-reviewer-2019-09-19/TagResource 1436func (c *CodeGuruReviewer) TagResource(input *TagResourceInput) (*TagResourceOutput, error) { 1437 req, out := c.TagResourceRequest(input) 1438 return out, req.Send() 1439} 1440 1441// TagResourceWithContext is the same as TagResource with the addition of 1442// the ability to pass a context and additional request options. 1443// 1444// See TagResource for details on how to use this API operation. 1445// 1446// The context must be non-nil and will be used for request cancellation. If 1447// the context is nil a panic will occur. In the future the SDK may create 1448// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1449// for more information on using Contexts. 1450func (c *CodeGuruReviewer) TagResourceWithContext(ctx aws.Context, input *TagResourceInput, opts ...request.Option) (*TagResourceOutput, error) { 1451 req, out := c.TagResourceRequest(input) 1452 req.SetContext(ctx) 1453 req.ApplyOptions(opts...) 1454 return out, req.Send() 1455} 1456 1457const opUntagResource = "UntagResource" 1458 1459// UntagResourceRequest generates a "aws/request.Request" representing the 1460// client's request for the UntagResource operation. The "output" return 1461// value will be populated with the request's response once the request completes 1462// successfully. 1463// 1464// Use "Send" method on the returned Request to send the API call to the service. 1465// the "output" return value is not valid until after Send returns without error. 1466// 1467// See UntagResource for more information on using the UntagResource 1468// API call, and error handling. 1469// 1470// This method is useful when you want to inject custom logic or configuration 1471// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1472// 1473// 1474// // Example sending a request using the UntagResourceRequest method. 1475// req, resp := client.UntagResourceRequest(params) 1476// 1477// err := req.Send() 1478// if err == nil { // resp is now filled 1479// fmt.Println(resp) 1480// } 1481// 1482// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguru-reviewer-2019-09-19/UntagResource 1483func (c *CodeGuruReviewer) UntagResourceRequest(input *UntagResourceInput) (req *request.Request, output *UntagResourceOutput) { 1484 op := &request.Operation{ 1485 Name: opUntagResource, 1486 HTTPMethod: "DELETE", 1487 HTTPPath: "/tags/{resourceArn}", 1488 } 1489 1490 if input == nil { 1491 input = &UntagResourceInput{} 1492 } 1493 1494 output = &UntagResourceOutput{} 1495 req = c.newRequest(op, input, output) 1496 req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 1497 return 1498} 1499 1500// UntagResource API operation for Amazon CodeGuru Reviewer. 1501// 1502// Removes a tag from an associated repository. 1503// 1504// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1505// with awserr.Error's Code and Message methods to get detailed information about 1506// the error. 1507// 1508// See the AWS API reference guide for Amazon CodeGuru Reviewer's 1509// API operation UntagResource for usage and error information. 1510// 1511// Returned Error Types: 1512// * InternalServerException 1513// The server encountered an internal error and is unable to complete the request. 1514// 1515// * ValidationException 1516// The input fails to satisfy the specified constraints. 1517// 1518// * ResourceNotFoundException 1519// The resource specified in the request was not found. 1520// 1521// See also, https://docs.aws.amazon.com/goto/WebAPI/codeguru-reviewer-2019-09-19/UntagResource 1522func (c *CodeGuruReviewer) UntagResource(input *UntagResourceInput) (*UntagResourceOutput, error) { 1523 req, out := c.UntagResourceRequest(input) 1524 return out, req.Send() 1525} 1526 1527// UntagResourceWithContext is the same as UntagResource with the addition of 1528// the ability to pass a context and additional request options. 1529// 1530// See UntagResource for details on how to use this API operation. 1531// 1532// The context must be non-nil and will be used for request cancellation. If 1533// the context is nil a panic will occur. In the future the SDK may create 1534// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1535// for more information on using Contexts. 1536func (c *CodeGuruReviewer) UntagResourceWithContext(ctx aws.Context, input *UntagResourceInput, opts ...request.Option) (*UntagResourceOutput, error) { 1537 req, out := c.UntagResourceRequest(input) 1538 req.SetContext(ctx) 1539 req.ApplyOptions(opts...) 1540 return out, req.Send() 1541} 1542 1543// You do not have sufficient access to perform this action. 1544type AccessDeniedException struct { 1545 _ struct{} `type:"structure"` 1546 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1547 1548 Message_ *string `locationName:"Message" type:"string"` 1549} 1550 1551// String returns the string representation 1552func (s AccessDeniedException) String() string { 1553 return awsutil.Prettify(s) 1554} 1555 1556// GoString returns the string representation 1557func (s AccessDeniedException) GoString() string { 1558 return s.String() 1559} 1560 1561func newErrorAccessDeniedException(v protocol.ResponseMetadata) error { 1562 return &AccessDeniedException{ 1563 RespMetadata: v, 1564 } 1565} 1566 1567// Code returns the exception type name. 1568func (s *AccessDeniedException) Code() string { 1569 return "AccessDeniedException" 1570} 1571 1572// Message returns the exception's message. 1573func (s *AccessDeniedException) Message() string { 1574 if s.Message_ != nil { 1575 return *s.Message_ 1576 } 1577 return "" 1578} 1579 1580// OrigErr always returns nil, satisfies awserr.Error interface. 1581func (s *AccessDeniedException) OrigErr() error { 1582 return nil 1583} 1584 1585func (s *AccessDeniedException) Error() string { 1586 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1587} 1588 1589// Status code returns the HTTP status code for the request's response error. 1590func (s *AccessDeniedException) StatusCode() int { 1591 return s.RespMetadata.StatusCode 1592} 1593 1594// RequestID returns the service's response RequestID for request. 1595func (s *AccessDeniedException) RequestID() string { 1596 return s.RespMetadata.RequestID 1597} 1598 1599type AssociateRepositoryInput struct { 1600 _ struct{} `type:"structure"` 1601 1602 // Amazon CodeGuru Reviewer uses this value to prevent the accidental creation 1603 // of duplicate repository associations if there are failures and retries. 1604 ClientRequestToken *string `min:"1" type:"string" idempotencyToken:"true"` 1605 1606 // A KMSKeyDetails object that contains: 1607 // 1608 // * The encryption option for this repository association. It is either 1609 // owned by AWS Key Management Service (KMS) (AWS_OWNED_CMK) or customer 1610 // managed (CUSTOMER_MANAGED_CMK). 1611 // 1612 // * The ID of the AWS KMS key that is associated with this respository association. 1613 KMSKeyDetails *KMSKeyDetails `type:"structure"` 1614 1615 // The repository to associate. 1616 // 1617 // Repository is a required field 1618 Repository *Repository `type:"structure" required:"true"` 1619 1620 // An array of key-value pairs used to tag an associated repository. A tag is 1621 // a custom attribute label with two parts: 1622 // 1623 // * A tag key (for example, CostCenter, Environment, Project, or Secret). 1624 // Tag keys are case sensitive. 1625 // 1626 // * An optional field known as a tag value (for example, 111122223333, Production, 1627 // or a team name). Omitting the tag value is the same as using an empty 1628 // string. Like tag keys, tag values are case sensitive. 1629 Tags map[string]*string `min:"1" type:"map"` 1630} 1631 1632// String returns the string representation 1633func (s AssociateRepositoryInput) String() string { 1634 return awsutil.Prettify(s) 1635} 1636 1637// GoString returns the string representation 1638func (s AssociateRepositoryInput) GoString() string { 1639 return s.String() 1640} 1641 1642// Validate inspects the fields of the type to determine if they are valid. 1643func (s *AssociateRepositoryInput) Validate() error { 1644 invalidParams := request.ErrInvalidParams{Context: "AssociateRepositoryInput"} 1645 if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 { 1646 invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1)) 1647 } 1648 if s.Repository == nil { 1649 invalidParams.Add(request.NewErrParamRequired("Repository")) 1650 } 1651 if s.Tags != nil && len(s.Tags) < 1 { 1652 invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) 1653 } 1654 if s.KMSKeyDetails != nil { 1655 if err := s.KMSKeyDetails.Validate(); err != nil { 1656 invalidParams.AddNested("KMSKeyDetails", err.(request.ErrInvalidParams)) 1657 } 1658 } 1659 if s.Repository != nil { 1660 if err := s.Repository.Validate(); err != nil { 1661 invalidParams.AddNested("Repository", err.(request.ErrInvalidParams)) 1662 } 1663 } 1664 1665 if invalidParams.Len() > 0 { 1666 return invalidParams 1667 } 1668 return nil 1669} 1670 1671// SetClientRequestToken sets the ClientRequestToken field's value. 1672func (s *AssociateRepositoryInput) SetClientRequestToken(v string) *AssociateRepositoryInput { 1673 s.ClientRequestToken = &v 1674 return s 1675} 1676 1677// SetKMSKeyDetails sets the KMSKeyDetails field's value. 1678func (s *AssociateRepositoryInput) SetKMSKeyDetails(v *KMSKeyDetails) *AssociateRepositoryInput { 1679 s.KMSKeyDetails = v 1680 return s 1681} 1682 1683// SetRepository sets the Repository field's value. 1684func (s *AssociateRepositoryInput) SetRepository(v *Repository) *AssociateRepositoryInput { 1685 s.Repository = v 1686 return s 1687} 1688 1689// SetTags sets the Tags field's value. 1690func (s *AssociateRepositoryInput) SetTags(v map[string]*string) *AssociateRepositoryInput { 1691 s.Tags = v 1692 return s 1693} 1694 1695type AssociateRepositoryOutput struct { 1696 _ struct{} `type:"structure"` 1697 1698 // Information about the repository association. 1699 RepositoryAssociation *RepositoryAssociation `type:"structure"` 1700 1701 // An array of key-value pairs used to tag an associated repository. A tag is 1702 // a custom attribute label with two parts: 1703 // 1704 // * A tag key (for example, CostCenter, Environment, Project, or Secret). 1705 // Tag keys are case sensitive. 1706 // 1707 // * An optional field known as a tag value (for example, 111122223333, Production, 1708 // or a team name). Omitting the tag value is the same as using an empty 1709 // string. Like tag keys, tag values are case sensitive. 1710 Tags map[string]*string `min:"1" type:"map"` 1711} 1712 1713// String returns the string representation 1714func (s AssociateRepositoryOutput) String() string { 1715 return awsutil.Prettify(s) 1716} 1717 1718// GoString returns the string representation 1719func (s AssociateRepositoryOutput) GoString() string { 1720 return s.String() 1721} 1722 1723// SetRepositoryAssociation sets the RepositoryAssociation field's value. 1724func (s *AssociateRepositoryOutput) SetRepositoryAssociation(v *RepositoryAssociation) *AssociateRepositoryOutput { 1725 s.RepositoryAssociation = v 1726 return s 1727} 1728 1729// SetTags sets the Tags field's value. 1730func (s *AssociateRepositoryOutput) SetTags(v map[string]*string) *AssociateRepositoryOutput { 1731 s.Tags = v 1732 return s 1733} 1734 1735// Information about an AWS CodeCommit repository. The CodeCommit repository 1736// must be in the same AWS Region and AWS account where its CodeGuru Reviewer 1737// code reviews are configured. 1738type CodeCommitRepository struct { 1739 _ struct{} `type:"structure"` 1740 1741 // The name of the AWS CodeCommit repository. For more information, see repositoryName 1742 // (https://docs.aws.amazon.com/codecommit/latest/APIReference/API_GetRepository.html#CodeCommit-GetRepository-request-repositoryName) 1743 // in the AWS CodeCommit API Reference. 1744 // 1745 // Name is a required field 1746 Name *string `min:"1" type:"string" required:"true"` 1747} 1748 1749// String returns the string representation 1750func (s CodeCommitRepository) String() string { 1751 return awsutil.Prettify(s) 1752} 1753 1754// GoString returns the string representation 1755func (s CodeCommitRepository) GoString() string { 1756 return s.String() 1757} 1758 1759// Validate inspects the fields of the type to determine if they are valid. 1760func (s *CodeCommitRepository) Validate() error { 1761 invalidParams := request.ErrInvalidParams{Context: "CodeCommitRepository"} 1762 if s.Name == nil { 1763 invalidParams.Add(request.NewErrParamRequired("Name")) 1764 } 1765 if s.Name != nil && len(*s.Name) < 1 { 1766 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 1767 } 1768 1769 if invalidParams.Len() > 0 { 1770 return invalidParams 1771 } 1772 return nil 1773} 1774 1775// SetName sets the Name field's value. 1776func (s *CodeCommitRepository) SetName(v string) *CodeCommitRepository { 1777 s.Name = &v 1778 return s 1779} 1780 1781// Information about a code review. A code review belongs to the associated 1782// repository that contains the reviewed code. 1783type CodeReview struct { 1784 _ struct{} `type:"structure"` 1785 1786 // The Amazon Resource Name (ARN) of the RepositoryAssociation (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociation.html) 1787 // that contains the reviewed source code. You can retrieve associated repository 1788 // ARNs by calling ListRepositoryAssociations (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_ListRepositoryAssociations.html). 1789 AssociationArn *string `min:"1" type:"string"` 1790 1791 // The Amazon Resource Name (ARN) of the CodeReview (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_CodeReview.html) 1792 // object. 1793 CodeReviewArn *string `min:"1" type:"string"` 1794 1795 // The time, in milliseconds since the epoch, when the code review was created. 1796 CreatedTimeStamp *time.Time `type:"timestamp"` 1797 1798 // The time, in milliseconds since the epoch, when the code review was last 1799 // updated. 1800 LastUpdatedTimeStamp *time.Time `type:"timestamp"` 1801 1802 // The statistics from the code review. 1803 Metrics *Metrics `type:"structure"` 1804 1805 // The name of the code review. 1806 Name *string `min:"1" type:"string"` 1807 1808 // The owner of the repository. For an AWS CodeCommit repository, this is the 1809 // AWS account ID of the account that owns the repository. For a GitHub, GitHub 1810 // Enterprise Server, or Bitbucket repository, this is the username for the 1811 // account that owns the repository. 1812 Owner *string `min:"1" type:"string"` 1813 1814 // The type of repository that contains the reviewed code (for example, GitHub 1815 // or Bitbucket). 1816 ProviderType *string `type:"string" enum:"ProviderType"` 1817 1818 // The pull request ID for the code review. 1819 PullRequestId *string `min:"1" type:"string"` 1820 1821 // The name of the repository. 1822 RepositoryName *string `min:"1" type:"string"` 1823 1824 // The type of the source code for the code review. 1825 SourceCodeType *SourceCodeType `type:"structure"` 1826 1827 // The valid code review states are: 1828 // 1829 // * Completed: The code review is complete. 1830 // 1831 // * Pending: The code review started and has not completed or failed. 1832 // 1833 // * Failed: The code review failed. 1834 // 1835 // * Deleting: The code review is being deleted. 1836 State *string `type:"string" enum:"JobState"` 1837 1838 // The reason for the state of the code review. 1839 StateReason *string `type:"string"` 1840 1841 // The type of code review. 1842 Type *string `type:"string" enum:"Type"` 1843} 1844 1845// String returns the string representation 1846func (s CodeReview) String() string { 1847 return awsutil.Prettify(s) 1848} 1849 1850// GoString returns the string representation 1851func (s CodeReview) GoString() string { 1852 return s.String() 1853} 1854 1855// SetAssociationArn sets the AssociationArn field's value. 1856func (s *CodeReview) SetAssociationArn(v string) *CodeReview { 1857 s.AssociationArn = &v 1858 return s 1859} 1860 1861// SetCodeReviewArn sets the CodeReviewArn field's value. 1862func (s *CodeReview) SetCodeReviewArn(v string) *CodeReview { 1863 s.CodeReviewArn = &v 1864 return s 1865} 1866 1867// SetCreatedTimeStamp sets the CreatedTimeStamp field's value. 1868func (s *CodeReview) SetCreatedTimeStamp(v time.Time) *CodeReview { 1869 s.CreatedTimeStamp = &v 1870 return s 1871} 1872 1873// SetLastUpdatedTimeStamp sets the LastUpdatedTimeStamp field's value. 1874func (s *CodeReview) SetLastUpdatedTimeStamp(v time.Time) *CodeReview { 1875 s.LastUpdatedTimeStamp = &v 1876 return s 1877} 1878 1879// SetMetrics sets the Metrics field's value. 1880func (s *CodeReview) SetMetrics(v *Metrics) *CodeReview { 1881 s.Metrics = v 1882 return s 1883} 1884 1885// SetName sets the Name field's value. 1886func (s *CodeReview) SetName(v string) *CodeReview { 1887 s.Name = &v 1888 return s 1889} 1890 1891// SetOwner sets the Owner field's value. 1892func (s *CodeReview) SetOwner(v string) *CodeReview { 1893 s.Owner = &v 1894 return s 1895} 1896 1897// SetProviderType sets the ProviderType field's value. 1898func (s *CodeReview) SetProviderType(v string) *CodeReview { 1899 s.ProviderType = &v 1900 return s 1901} 1902 1903// SetPullRequestId sets the PullRequestId field's value. 1904func (s *CodeReview) SetPullRequestId(v string) *CodeReview { 1905 s.PullRequestId = &v 1906 return s 1907} 1908 1909// SetRepositoryName sets the RepositoryName field's value. 1910func (s *CodeReview) SetRepositoryName(v string) *CodeReview { 1911 s.RepositoryName = &v 1912 return s 1913} 1914 1915// SetSourceCodeType sets the SourceCodeType field's value. 1916func (s *CodeReview) SetSourceCodeType(v *SourceCodeType) *CodeReview { 1917 s.SourceCodeType = v 1918 return s 1919} 1920 1921// SetState sets the State field's value. 1922func (s *CodeReview) SetState(v string) *CodeReview { 1923 s.State = &v 1924 return s 1925} 1926 1927// SetStateReason sets the StateReason field's value. 1928func (s *CodeReview) SetStateReason(v string) *CodeReview { 1929 s.StateReason = &v 1930 return s 1931} 1932 1933// SetType sets the Type field's value. 1934func (s *CodeReview) SetType(v string) *CodeReview { 1935 s.Type = &v 1936 return s 1937} 1938 1939// Information about the summary of the code review. 1940type CodeReviewSummary struct { 1941 _ struct{} `type:"structure"` 1942 1943 // The Amazon Resource Name (ARN) of the CodeReview (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_CodeReview.html) 1944 // object. 1945 CodeReviewArn *string `min:"1" type:"string"` 1946 1947 // The time, in milliseconds since the epoch, when the code review was created. 1948 CreatedTimeStamp *time.Time `type:"timestamp"` 1949 1950 // The time, in milliseconds since the epoch, when the code review was last 1951 // updated. 1952 LastUpdatedTimeStamp *time.Time `type:"timestamp"` 1953 1954 // The statistics from the code review. 1955 MetricsSummary *MetricsSummary `type:"structure"` 1956 1957 // The name of the code review. 1958 Name *string `min:"1" type:"string"` 1959 1960 // The owner of the repository. For an AWS CodeCommit repository, this is the 1961 // AWS account ID of the account that owns the repository. For a GitHub, GitHub 1962 // Enterprise Server, or Bitbucket repository, this is the username for the 1963 // account that owns the repository. 1964 Owner *string `min:"1" type:"string"` 1965 1966 // The provider type of the repository association. 1967 ProviderType *string `type:"string" enum:"ProviderType"` 1968 1969 // The pull request ID for the code review. 1970 PullRequestId *string `min:"1" type:"string"` 1971 1972 // The name of the repository. 1973 RepositoryName *string `min:"1" type:"string"` 1974 1975 // The state of the code review. 1976 // 1977 // The valid code review states are: 1978 // 1979 // * Completed: The code review is complete. 1980 // 1981 // * Pending: The code review started and has not completed or failed. 1982 // 1983 // * Failed: The code review failed. 1984 // 1985 // * Deleting: The code review is being deleted. 1986 State *string `type:"string" enum:"JobState"` 1987 1988 // The type of the code review. 1989 Type *string `type:"string" enum:"Type"` 1990} 1991 1992// String returns the string representation 1993func (s CodeReviewSummary) String() string { 1994 return awsutil.Prettify(s) 1995} 1996 1997// GoString returns the string representation 1998func (s CodeReviewSummary) GoString() string { 1999 return s.String() 2000} 2001 2002// SetCodeReviewArn sets the CodeReviewArn field's value. 2003func (s *CodeReviewSummary) SetCodeReviewArn(v string) *CodeReviewSummary { 2004 s.CodeReviewArn = &v 2005 return s 2006} 2007 2008// SetCreatedTimeStamp sets the CreatedTimeStamp field's value. 2009func (s *CodeReviewSummary) SetCreatedTimeStamp(v time.Time) *CodeReviewSummary { 2010 s.CreatedTimeStamp = &v 2011 return s 2012} 2013 2014// SetLastUpdatedTimeStamp sets the LastUpdatedTimeStamp field's value. 2015func (s *CodeReviewSummary) SetLastUpdatedTimeStamp(v time.Time) *CodeReviewSummary { 2016 s.LastUpdatedTimeStamp = &v 2017 return s 2018} 2019 2020// SetMetricsSummary sets the MetricsSummary field's value. 2021func (s *CodeReviewSummary) SetMetricsSummary(v *MetricsSummary) *CodeReviewSummary { 2022 s.MetricsSummary = v 2023 return s 2024} 2025 2026// SetName sets the Name field's value. 2027func (s *CodeReviewSummary) SetName(v string) *CodeReviewSummary { 2028 s.Name = &v 2029 return s 2030} 2031 2032// SetOwner sets the Owner field's value. 2033func (s *CodeReviewSummary) SetOwner(v string) *CodeReviewSummary { 2034 s.Owner = &v 2035 return s 2036} 2037 2038// SetProviderType sets the ProviderType field's value. 2039func (s *CodeReviewSummary) SetProviderType(v string) *CodeReviewSummary { 2040 s.ProviderType = &v 2041 return s 2042} 2043 2044// SetPullRequestId sets the PullRequestId field's value. 2045func (s *CodeReviewSummary) SetPullRequestId(v string) *CodeReviewSummary { 2046 s.PullRequestId = &v 2047 return s 2048} 2049 2050// SetRepositoryName sets the RepositoryName field's value. 2051func (s *CodeReviewSummary) SetRepositoryName(v string) *CodeReviewSummary { 2052 s.RepositoryName = &v 2053 return s 2054} 2055 2056// SetState sets the State field's value. 2057func (s *CodeReviewSummary) SetState(v string) *CodeReviewSummary { 2058 s.State = &v 2059 return s 2060} 2061 2062// SetType sets the Type field's value. 2063func (s *CodeReviewSummary) SetType(v string) *CodeReviewSummary { 2064 s.Type = &v 2065 return s 2066} 2067 2068// The type of a code review. There are two code review types: 2069// 2070// * PullRequest - A code review that is automatically triggered by a pull 2071// request on an associated repository. Because this type of code review 2072// is automatically generated, you cannot specify this code review type using 2073// CreateCodeReview (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_CreateCodeReview). 2074// 2075// * RepositoryAnalysis - A code review that analyzes all code under a specified 2076// branch in an associated repository. The associated repository is specified 2077// using its ARN in CreateCodeReview (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_CreateCodeReview). 2078type CodeReviewType struct { 2079 _ struct{} `type:"structure"` 2080 2081 // A code review that analyzes all code under a specified branch in an associated 2082 // repository. The associated repository is specified using its ARN in CreateCodeReview 2083 // (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_CreateCodeReview). 2084 // 2085 // RepositoryAnalysis is a required field 2086 RepositoryAnalysis *RepositoryAnalysis `type:"structure" required:"true"` 2087} 2088 2089// String returns the string representation 2090func (s CodeReviewType) String() string { 2091 return awsutil.Prettify(s) 2092} 2093 2094// GoString returns the string representation 2095func (s CodeReviewType) GoString() string { 2096 return s.String() 2097} 2098 2099// Validate inspects the fields of the type to determine if they are valid. 2100func (s *CodeReviewType) Validate() error { 2101 invalidParams := request.ErrInvalidParams{Context: "CodeReviewType"} 2102 if s.RepositoryAnalysis == nil { 2103 invalidParams.Add(request.NewErrParamRequired("RepositoryAnalysis")) 2104 } 2105 if s.RepositoryAnalysis != nil { 2106 if err := s.RepositoryAnalysis.Validate(); err != nil { 2107 invalidParams.AddNested("RepositoryAnalysis", err.(request.ErrInvalidParams)) 2108 } 2109 } 2110 2111 if invalidParams.Len() > 0 { 2112 return invalidParams 2113 } 2114 return nil 2115} 2116 2117// SetRepositoryAnalysis sets the RepositoryAnalysis field's value. 2118func (s *CodeReviewType) SetRepositoryAnalysis(v *RepositoryAnalysis) *CodeReviewType { 2119 s.RepositoryAnalysis = v 2120 return s 2121} 2122 2123// A type of SourceCodeType (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_SourceCodeType) 2124// that specifies the commit diff for a pull request on an associated repository. 2125type CommitDiffSourceCodeType struct { 2126 _ struct{} `type:"structure"` 2127 2128 // The SHA of the destination commit used to generate a commit diff. 2129 DestinationCommit *string `min:"6" type:"string"` 2130 2131 // The SHA of the source commit used to generate a commit diff. 2132 SourceCommit *string `min:"6" type:"string"` 2133} 2134 2135// String returns the string representation 2136func (s CommitDiffSourceCodeType) String() string { 2137 return awsutil.Prettify(s) 2138} 2139 2140// GoString returns the string representation 2141func (s CommitDiffSourceCodeType) GoString() string { 2142 return s.String() 2143} 2144 2145// SetDestinationCommit sets the DestinationCommit field's value. 2146func (s *CommitDiffSourceCodeType) SetDestinationCommit(v string) *CommitDiffSourceCodeType { 2147 s.DestinationCommit = &v 2148 return s 2149} 2150 2151// SetSourceCommit sets the SourceCommit field's value. 2152func (s *CommitDiffSourceCodeType) SetSourceCommit(v string) *CommitDiffSourceCodeType { 2153 s.SourceCommit = &v 2154 return s 2155} 2156 2157// The requested operation would cause a conflict with the current state of 2158// a service resource associated with the request. Resolve the conflict before 2159// retrying this request. 2160type ConflictException struct { 2161 _ struct{} `type:"structure"` 2162 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2163 2164 Message_ *string `locationName:"Message" type:"string"` 2165} 2166 2167// String returns the string representation 2168func (s ConflictException) String() string { 2169 return awsutil.Prettify(s) 2170} 2171 2172// GoString returns the string representation 2173func (s ConflictException) GoString() string { 2174 return s.String() 2175} 2176 2177func newErrorConflictException(v protocol.ResponseMetadata) error { 2178 return &ConflictException{ 2179 RespMetadata: v, 2180 } 2181} 2182 2183// Code returns the exception type name. 2184func (s *ConflictException) Code() string { 2185 return "ConflictException" 2186} 2187 2188// Message returns the exception's message. 2189func (s *ConflictException) Message() string { 2190 if s.Message_ != nil { 2191 return *s.Message_ 2192 } 2193 return "" 2194} 2195 2196// OrigErr always returns nil, satisfies awserr.Error interface. 2197func (s *ConflictException) OrigErr() error { 2198 return nil 2199} 2200 2201func (s *ConflictException) Error() string { 2202 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 2203} 2204 2205// Status code returns the HTTP status code for the request's response error. 2206func (s *ConflictException) StatusCode() int { 2207 return s.RespMetadata.StatusCode 2208} 2209 2210// RequestID returns the service's response RequestID for request. 2211func (s *ConflictException) RequestID() string { 2212 return s.RespMetadata.RequestID 2213} 2214 2215type CreateCodeReviewInput struct { 2216 _ struct{} `type:"structure"` 2217 2218 // Amazon CodeGuru Reviewer uses this value to prevent the accidental creation 2219 // of duplicate code reviews if there are failures and retries. 2220 ClientRequestToken *string `min:"1" type:"string" idempotencyToken:"true"` 2221 2222 // The name of the code review. The name of each code review in your AWS account 2223 // must be unique. 2224 // 2225 // Name is a required field 2226 Name *string `min:"1" type:"string" required:"true"` 2227 2228 // The Amazon Resource Name (ARN) of the RepositoryAssociation (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociation.html) 2229 // object. You can retrieve this ARN by calling ListRepositoryAssociations (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_ListRepositoryAssociations.html). 2230 // 2231 // A code review can only be created on an associated repository. This is the 2232 // ARN of the associated repository. 2233 // 2234 // RepositoryAssociationArn is a required field 2235 RepositoryAssociationArn *string `min:"1" type:"string" required:"true"` 2236 2237 // The type of code review to create. This is specified using a CodeReviewType 2238 // (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_CodeReviewType.html) 2239 // object. You can create a code review only of type RepositoryAnalysis. 2240 // 2241 // Type is a required field 2242 Type *CodeReviewType `type:"structure" required:"true"` 2243} 2244 2245// String returns the string representation 2246func (s CreateCodeReviewInput) String() string { 2247 return awsutil.Prettify(s) 2248} 2249 2250// GoString returns the string representation 2251func (s CreateCodeReviewInput) GoString() string { 2252 return s.String() 2253} 2254 2255// Validate inspects the fields of the type to determine if they are valid. 2256func (s *CreateCodeReviewInput) Validate() error { 2257 invalidParams := request.ErrInvalidParams{Context: "CreateCodeReviewInput"} 2258 if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 { 2259 invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1)) 2260 } 2261 if s.Name == nil { 2262 invalidParams.Add(request.NewErrParamRequired("Name")) 2263 } 2264 if s.Name != nil && len(*s.Name) < 1 { 2265 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 2266 } 2267 if s.RepositoryAssociationArn == nil { 2268 invalidParams.Add(request.NewErrParamRequired("RepositoryAssociationArn")) 2269 } 2270 if s.RepositoryAssociationArn != nil && len(*s.RepositoryAssociationArn) < 1 { 2271 invalidParams.Add(request.NewErrParamMinLen("RepositoryAssociationArn", 1)) 2272 } 2273 if s.Type == nil { 2274 invalidParams.Add(request.NewErrParamRequired("Type")) 2275 } 2276 if s.Type != nil { 2277 if err := s.Type.Validate(); err != nil { 2278 invalidParams.AddNested("Type", err.(request.ErrInvalidParams)) 2279 } 2280 } 2281 2282 if invalidParams.Len() > 0 { 2283 return invalidParams 2284 } 2285 return nil 2286} 2287 2288// SetClientRequestToken sets the ClientRequestToken field's value. 2289func (s *CreateCodeReviewInput) SetClientRequestToken(v string) *CreateCodeReviewInput { 2290 s.ClientRequestToken = &v 2291 return s 2292} 2293 2294// SetName sets the Name field's value. 2295func (s *CreateCodeReviewInput) SetName(v string) *CreateCodeReviewInput { 2296 s.Name = &v 2297 return s 2298} 2299 2300// SetRepositoryAssociationArn sets the RepositoryAssociationArn field's value. 2301func (s *CreateCodeReviewInput) SetRepositoryAssociationArn(v string) *CreateCodeReviewInput { 2302 s.RepositoryAssociationArn = &v 2303 return s 2304} 2305 2306// SetType sets the Type field's value. 2307func (s *CreateCodeReviewInput) SetType(v *CodeReviewType) *CreateCodeReviewInput { 2308 s.Type = v 2309 return s 2310} 2311 2312type CreateCodeReviewOutput struct { 2313 _ struct{} `type:"structure"` 2314 2315 // Information about a code review. A code review belongs to the associated 2316 // repository that contains the reviewed code. 2317 CodeReview *CodeReview `type:"structure"` 2318} 2319 2320// String returns the string representation 2321func (s CreateCodeReviewOutput) String() string { 2322 return awsutil.Prettify(s) 2323} 2324 2325// GoString returns the string representation 2326func (s CreateCodeReviewOutput) GoString() string { 2327 return s.String() 2328} 2329 2330// SetCodeReview sets the CodeReview field's value. 2331func (s *CreateCodeReviewOutput) SetCodeReview(v *CodeReview) *CreateCodeReviewOutput { 2332 s.CodeReview = v 2333 return s 2334} 2335 2336type DescribeCodeReviewInput struct { 2337 _ struct{} `type:"structure"` 2338 2339 // The Amazon Resource Name (ARN) of the CodeReview (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_CodeReview.html) 2340 // object. 2341 // 2342 // CodeReviewArn is a required field 2343 CodeReviewArn *string `location:"uri" locationName:"CodeReviewArn" min:"1" type:"string" required:"true"` 2344} 2345 2346// String returns the string representation 2347func (s DescribeCodeReviewInput) String() string { 2348 return awsutil.Prettify(s) 2349} 2350 2351// GoString returns the string representation 2352func (s DescribeCodeReviewInput) GoString() string { 2353 return s.String() 2354} 2355 2356// Validate inspects the fields of the type to determine if they are valid. 2357func (s *DescribeCodeReviewInput) Validate() error { 2358 invalidParams := request.ErrInvalidParams{Context: "DescribeCodeReviewInput"} 2359 if s.CodeReviewArn == nil { 2360 invalidParams.Add(request.NewErrParamRequired("CodeReviewArn")) 2361 } 2362 if s.CodeReviewArn != nil && len(*s.CodeReviewArn) < 1 { 2363 invalidParams.Add(request.NewErrParamMinLen("CodeReviewArn", 1)) 2364 } 2365 2366 if invalidParams.Len() > 0 { 2367 return invalidParams 2368 } 2369 return nil 2370} 2371 2372// SetCodeReviewArn sets the CodeReviewArn field's value. 2373func (s *DescribeCodeReviewInput) SetCodeReviewArn(v string) *DescribeCodeReviewInput { 2374 s.CodeReviewArn = &v 2375 return s 2376} 2377 2378type DescribeCodeReviewOutput struct { 2379 _ struct{} `type:"structure"` 2380 2381 // Information about the code review. 2382 CodeReview *CodeReview `type:"structure"` 2383} 2384 2385// String returns the string representation 2386func (s DescribeCodeReviewOutput) String() string { 2387 return awsutil.Prettify(s) 2388} 2389 2390// GoString returns the string representation 2391func (s DescribeCodeReviewOutput) GoString() string { 2392 return s.String() 2393} 2394 2395// SetCodeReview sets the CodeReview field's value. 2396func (s *DescribeCodeReviewOutput) SetCodeReview(v *CodeReview) *DescribeCodeReviewOutput { 2397 s.CodeReview = v 2398 return s 2399} 2400 2401type DescribeRecommendationFeedbackInput struct { 2402 _ struct{} `type:"structure"` 2403 2404 // The Amazon Resource Name (ARN) of the CodeReview (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_CodeReview.html) 2405 // object. 2406 // 2407 // CodeReviewArn is a required field 2408 CodeReviewArn *string `location:"uri" locationName:"CodeReviewArn" min:"1" type:"string" required:"true"` 2409 2410 // The recommendation ID that can be used to track the provided recommendations 2411 // and then to collect the feedback. 2412 // 2413 // RecommendationId is a required field 2414 RecommendationId *string `location:"querystring" locationName:"RecommendationId" min:"1" type:"string" required:"true"` 2415 2416 // Optional parameter to describe the feedback for a given user. If this is 2417 // not supplied, it defaults to the user making the request. 2418 // 2419 // The UserId is an IAM principal that can be specified as an AWS account ID 2420 // or an Amazon Resource Name (ARN). For more information, see Specifying a 2421 // Principal (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html#Principal_specifying) 2422 // in the AWS Identity and Access Management User Guide. 2423 UserId *string `location:"querystring" locationName:"UserId" min:"1" type:"string"` 2424} 2425 2426// String returns the string representation 2427func (s DescribeRecommendationFeedbackInput) String() string { 2428 return awsutil.Prettify(s) 2429} 2430 2431// GoString returns the string representation 2432func (s DescribeRecommendationFeedbackInput) GoString() string { 2433 return s.String() 2434} 2435 2436// Validate inspects the fields of the type to determine if they are valid. 2437func (s *DescribeRecommendationFeedbackInput) Validate() error { 2438 invalidParams := request.ErrInvalidParams{Context: "DescribeRecommendationFeedbackInput"} 2439 if s.CodeReviewArn == nil { 2440 invalidParams.Add(request.NewErrParamRequired("CodeReviewArn")) 2441 } 2442 if s.CodeReviewArn != nil && len(*s.CodeReviewArn) < 1 { 2443 invalidParams.Add(request.NewErrParamMinLen("CodeReviewArn", 1)) 2444 } 2445 if s.RecommendationId == nil { 2446 invalidParams.Add(request.NewErrParamRequired("RecommendationId")) 2447 } 2448 if s.RecommendationId != nil && len(*s.RecommendationId) < 1 { 2449 invalidParams.Add(request.NewErrParamMinLen("RecommendationId", 1)) 2450 } 2451 if s.UserId != nil && len(*s.UserId) < 1 { 2452 invalidParams.Add(request.NewErrParamMinLen("UserId", 1)) 2453 } 2454 2455 if invalidParams.Len() > 0 { 2456 return invalidParams 2457 } 2458 return nil 2459} 2460 2461// SetCodeReviewArn sets the CodeReviewArn field's value. 2462func (s *DescribeRecommendationFeedbackInput) SetCodeReviewArn(v string) *DescribeRecommendationFeedbackInput { 2463 s.CodeReviewArn = &v 2464 return s 2465} 2466 2467// SetRecommendationId sets the RecommendationId field's value. 2468func (s *DescribeRecommendationFeedbackInput) SetRecommendationId(v string) *DescribeRecommendationFeedbackInput { 2469 s.RecommendationId = &v 2470 return s 2471} 2472 2473// SetUserId sets the UserId field's value. 2474func (s *DescribeRecommendationFeedbackInput) SetUserId(v string) *DescribeRecommendationFeedbackInput { 2475 s.UserId = &v 2476 return s 2477} 2478 2479type DescribeRecommendationFeedbackOutput struct { 2480 _ struct{} `type:"structure"` 2481 2482 // The recommendation feedback given by the user. 2483 RecommendationFeedback *RecommendationFeedback `type:"structure"` 2484} 2485 2486// String returns the string representation 2487func (s DescribeRecommendationFeedbackOutput) String() string { 2488 return awsutil.Prettify(s) 2489} 2490 2491// GoString returns the string representation 2492func (s DescribeRecommendationFeedbackOutput) GoString() string { 2493 return s.String() 2494} 2495 2496// SetRecommendationFeedback sets the RecommendationFeedback field's value. 2497func (s *DescribeRecommendationFeedbackOutput) SetRecommendationFeedback(v *RecommendationFeedback) *DescribeRecommendationFeedbackOutput { 2498 s.RecommendationFeedback = v 2499 return s 2500} 2501 2502type DescribeRepositoryAssociationInput struct { 2503 _ struct{} `type:"structure"` 2504 2505 // The Amazon Resource Name (ARN) of the RepositoryAssociation (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociation.html) 2506 // object. You can retrieve this ARN by calling ListRepositoryAssociations (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_ListRepositoryAssociations.html). 2507 // 2508 // AssociationArn is a required field 2509 AssociationArn *string `location:"uri" locationName:"AssociationArn" min:"1" type:"string" required:"true"` 2510} 2511 2512// String returns the string representation 2513func (s DescribeRepositoryAssociationInput) String() string { 2514 return awsutil.Prettify(s) 2515} 2516 2517// GoString returns the string representation 2518func (s DescribeRepositoryAssociationInput) GoString() string { 2519 return s.String() 2520} 2521 2522// Validate inspects the fields of the type to determine if they are valid. 2523func (s *DescribeRepositoryAssociationInput) Validate() error { 2524 invalidParams := request.ErrInvalidParams{Context: "DescribeRepositoryAssociationInput"} 2525 if s.AssociationArn == nil { 2526 invalidParams.Add(request.NewErrParamRequired("AssociationArn")) 2527 } 2528 if s.AssociationArn != nil && len(*s.AssociationArn) < 1 { 2529 invalidParams.Add(request.NewErrParamMinLen("AssociationArn", 1)) 2530 } 2531 2532 if invalidParams.Len() > 0 { 2533 return invalidParams 2534 } 2535 return nil 2536} 2537 2538// SetAssociationArn sets the AssociationArn field's value. 2539func (s *DescribeRepositoryAssociationInput) SetAssociationArn(v string) *DescribeRepositoryAssociationInput { 2540 s.AssociationArn = &v 2541 return s 2542} 2543 2544type DescribeRepositoryAssociationOutput struct { 2545 _ struct{} `type:"structure"` 2546 2547 // Information about the repository association. 2548 RepositoryAssociation *RepositoryAssociation `type:"structure"` 2549 2550 // An array of key-value pairs used to tag an associated repository. A tag is 2551 // a custom attribute label with two parts: 2552 // 2553 // * A tag key (for example, CostCenter, Environment, Project, or Secret). 2554 // Tag keys are case sensitive. 2555 // 2556 // * An optional field known as a tag value (for example, 111122223333, Production, 2557 // or a team name). Omitting the tag value is the same as using an empty 2558 // string. Like tag keys, tag values are case sensitive. 2559 Tags map[string]*string `min:"1" type:"map"` 2560} 2561 2562// String returns the string representation 2563func (s DescribeRepositoryAssociationOutput) String() string { 2564 return awsutil.Prettify(s) 2565} 2566 2567// GoString returns the string representation 2568func (s DescribeRepositoryAssociationOutput) GoString() string { 2569 return s.String() 2570} 2571 2572// SetRepositoryAssociation sets the RepositoryAssociation field's value. 2573func (s *DescribeRepositoryAssociationOutput) SetRepositoryAssociation(v *RepositoryAssociation) *DescribeRepositoryAssociationOutput { 2574 s.RepositoryAssociation = v 2575 return s 2576} 2577 2578// SetTags sets the Tags field's value. 2579func (s *DescribeRepositoryAssociationOutput) SetTags(v map[string]*string) *DescribeRepositoryAssociationOutput { 2580 s.Tags = v 2581 return s 2582} 2583 2584type DisassociateRepositoryInput struct { 2585 _ struct{} `type:"structure"` 2586 2587 // The Amazon Resource Name (ARN) of the RepositoryAssociation (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociation.html) 2588 // object. You can retrieve this ARN by calling ListRepositoryAssociations (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_ListRepositoryAssociations.html). 2589 // 2590 // AssociationArn is a required field 2591 AssociationArn *string `location:"uri" locationName:"AssociationArn" min:"1" type:"string" required:"true"` 2592} 2593 2594// String returns the string representation 2595func (s DisassociateRepositoryInput) String() string { 2596 return awsutil.Prettify(s) 2597} 2598 2599// GoString returns the string representation 2600func (s DisassociateRepositoryInput) GoString() string { 2601 return s.String() 2602} 2603 2604// Validate inspects the fields of the type to determine if they are valid. 2605func (s *DisassociateRepositoryInput) Validate() error { 2606 invalidParams := request.ErrInvalidParams{Context: "DisassociateRepositoryInput"} 2607 if s.AssociationArn == nil { 2608 invalidParams.Add(request.NewErrParamRequired("AssociationArn")) 2609 } 2610 if s.AssociationArn != nil && len(*s.AssociationArn) < 1 { 2611 invalidParams.Add(request.NewErrParamMinLen("AssociationArn", 1)) 2612 } 2613 2614 if invalidParams.Len() > 0 { 2615 return invalidParams 2616 } 2617 return nil 2618} 2619 2620// SetAssociationArn sets the AssociationArn field's value. 2621func (s *DisassociateRepositoryInput) SetAssociationArn(v string) *DisassociateRepositoryInput { 2622 s.AssociationArn = &v 2623 return s 2624} 2625 2626type DisassociateRepositoryOutput struct { 2627 _ struct{} `type:"structure"` 2628 2629 // Information about the disassociated repository. 2630 RepositoryAssociation *RepositoryAssociation `type:"structure"` 2631 2632 // An array of key-value pairs used to tag an associated repository. A tag is 2633 // a custom attribute label with two parts: 2634 // 2635 // * A tag key (for example, CostCenter, Environment, Project, or Secret). 2636 // Tag keys are case sensitive. 2637 // 2638 // * An optional field known as a tag value (for example, 111122223333, Production, 2639 // or a team name). Omitting the tag value is the same as using an empty 2640 // string. Like tag keys, tag values are case sensitive. 2641 Tags map[string]*string `min:"1" type:"map"` 2642} 2643 2644// String returns the string representation 2645func (s DisassociateRepositoryOutput) String() string { 2646 return awsutil.Prettify(s) 2647} 2648 2649// GoString returns the string representation 2650func (s DisassociateRepositoryOutput) GoString() string { 2651 return s.String() 2652} 2653 2654// SetRepositoryAssociation sets the RepositoryAssociation field's value. 2655func (s *DisassociateRepositoryOutput) SetRepositoryAssociation(v *RepositoryAssociation) *DisassociateRepositoryOutput { 2656 s.RepositoryAssociation = v 2657 return s 2658} 2659 2660// SetTags sets the Tags field's value. 2661func (s *DisassociateRepositoryOutput) SetTags(v map[string]*string) *DisassociateRepositoryOutput { 2662 s.Tags = v 2663 return s 2664} 2665 2666// The server encountered an internal error and is unable to complete the request. 2667type InternalServerException struct { 2668 _ struct{} `type:"structure"` 2669 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2670 2671 Message_ *string `locationName:"Message" type:"string"` 2672} 2673 2674// String returns the string representation 2675func (s InternalServerException) String() string { 2676 return awsutil.Prettify(s) 2677} 2678 2679// GoString returns the string representation 2680func (s InternalServerException) GoString() string { 2681 return s.String() 2682} 2683 2684func newErrorInternalServerException(v protocol.ResponseMetadata) error { 2685 return &InternalServerException{ 2686 RespMetadata: v, 2687 } 2688} 2689 2690// Code returns the exception type name. 2691func (s *InternalServerException) Code() string { 2692 return "InternalServerException" 2693} 2694 2695// Message returns the exception's message. 2696func (s *InternalServerException) Message() string { 2697 if s.Message_ != nil { 2698 return *s.Message_ 2699 } 2700 return "" 2701} 2702 2703// OrigErr always returns nil, satisfies awserr.Error interface. 2704func (s *InternalServerException) OrigErr() error { 2705 return nil 2706} 2707 2708func (s *InternalServerException) Error() string { 2709 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 2710} 2711 2712// Status code returns the HTTP status code for the request's response error. 2713func (s *InternalServerException) StatusCode() int { 2714 return s.RespMetadata.StatusCode 2715} 2716 2717// RequestID returns the service's response RequestID for request. 2718func (s *InternalServerException) RequestID() string { 2719 return s.RespMetadata.RequestID 2720} 2721 2722// An object that contains: 2723// 2724// * The encryption option for a repository association. It is either owned 2725// by AWS Key Management Service (KMS) (AWS_OWNED_CMK) or customer managed 2726// (CUSTOMER_MANAGED_CMK). 2727// 2728// * The ID of the AWS KMS key that is associated with a respository association. 2729type KMSKeyDetails struct { 2730 _ struct{} `type:"structure"` 2731 2732 // The encryption option for a repository association. It is either owned by 2733 // AWS Key Management Service (KMS) (AWS_OWNED_CMK) or customer managed (CUSTOMER_MANAGED_CMK). 2734 EncryptionOption *string `type:"string" enum:"EncryptionOption"` 2735 2736 // The ID of the AWS KMS key that is associated with a respository association. 2737 KMSKeyId *string `min:"1" type:"string"` 2738} 2739 2740// String returns the string representation 2741func (s KMSKeyDetails) String() string { 2742 return awsutil.Prettify(s) 2743} 2744 2745// GoString returns the string representation 2746func (s KMSKeyDetails) GoString() string { 2747 return s.String() 2748} 2749 2750// Validate inspects the fields of the type to determine if they are valid. 2751func (s *KMSKeyDetails) Validate() error { 2752 invalidParams := request.ErrInvalidParams{Context: "KMSKeyDetails"} 2753 if s.KMSKeyId != nil && len(*s.KMSKeyId) < 1 { 2754 invalidParams.Add(request.NewErrParamMinLen("KMSKeyId", 1)) 2755 } 2756 2757 if invalidParams.Len() > 0 { 2758 return invalidParams 2759 } 2760 return nil 2761} 2762 2763// SetEncryptionOption sets the EncryptionOption field's value. 2764func (s *KMSKeyDetails) SetEncryptionOption(v string) *KMSKeyDetails { 2765 s.EncryptionOption = &v 2766 return s 2767} 2768 2769// SetKMSKeyId sets the KMSKeyId field's value. 2770func (s *KMSKeyDetails) SetKMSKeyId(v string) *KMSKeyDetails { 2771 s.KMSKeyId = &v 2772 return s 2773} 2774 2775type ListCodeReviewsInput struct { 2776 _ struct{} `type:"structure"` 2777 2778 // The maximum number of results that are returned per call. The default is 2779 // 100. 2780 MaxResults *int64 `location:"querystring" locationName:"MaxResults" min:"1" type:"integer"` 2781 2782 // If nextToken is returned, there are more results available. The value of 2783 // nextToken is a unique pagination token for each page. Make the call again 2784 // using the returned token to retrieve the next page. Keep all other arguments 2785 // unchanged. 2786 NextToken *string `location:"querystring" locationName:"NextToken" min:"1" type:"string"` 2787 2788 // List of provider types for filtering that needs to be applied before displaying 2789 // the result. For example, providerTypes=[GitHub] lists code reviews from GitHub. 2790 ProviderTypes []*string `location:"querystring" locationName:"ProviderTypes" min:"1" type:"list"` 2791 2792 // List of repository names for filtering that needs to be applied before displaying 2793 // the result. 2794 RepositoryNames []*string `location:"querystring" locationName:"RepositoryNames" min:"1" type:"list"` 2795 2796 // List of states for filtering that needs to be applied before displaying the 2797 // result. For example, states=[Pending] lists code reviews in the Pending state. 2798 // 2799 // The valid code review states are: 2800 // 2801 // * Completed: The code review is complete. 2802 // 2803 // * Pending: The code review started and has not completed or failed. 2804 // 2805 // * Failed: The code review failed. 2806 // 2807 // * Deleting: The code review is being deleted. 2808 States []*string `location:"querystring" locationName:"States" min:"1" type:"list"` 2809 2810 // The type of code reviews to list in the response. 2811 // 2812 // Type is a required field 2813 Type *string `location:"querystring" locationName:"Type" type:"string" required:"true" enum:"Type"` 2814} 2815 2816// String returns the string representation 2817func (s ListCodeReviewsInput) String() string { 2818 return awsutil.Prettify(s) 2819} 2820 2821// GoString returns the string representation 2822func (s ListCodeReviewsInput) GoString() string { 2823 return s.String() 2824} 2825 2826// Validate inspects the fields of the type to determine if they are valid. 2827func (s *ListCodeReviewsInput) Validate() error { 2828 invalidParams := request.ErrInvalidParams{Context: "ListCodeReviewsInput"} 2829 if s.MaxResults != nil && *s.MaxResults < 1 { 2830 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 2831 } 2832 if s.NextToken != nil && len(*s.NextToken) < 1 { 2833 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 2834 } 2835 if s.ProviderTypes != nil && len(s.ProviderTypes) < 1 { 2836 invalidParams.Add(request.NewErrParamMinLen("ProviderTypes", 1)) 2837 } 2838 if s.RepositoryNames != nil && len(s.RepositoryNames) < 1 { 2839 invalidParams.Add(request.NewErrParamMinLen("RepositoryNames", 1)) 2840 } 2841 if s.States != nil && len(s.States) < 1 { 2842 invalidParams.Add(request.NewErrParamMinLen("States", 1)) 2843 } 2844 if s.Type == nil { 2845 invalidParams.Add(request.NewErrParamRequired("Type")) 2846 } 2847 2848 if invalidParams.Len() > 0 { 2849 return invalidParams 2850 } 2851 return nil 2852} 2853 2854// SetMaxResults sets the MaxResults field's value. 2855func (s *ListCodeReviewsInput) SetMaxResults(v int64) *ListCodeReviewsInput { 2856 s.MaxResults = &v 2857 return s 2858} 2859 2860// SetNextToken sets the NextToken field's value. 2861func (s *ListCodeReviewsInput) SetNextToken(v string) *ListCodeReviewsInput { 2862 s.NextToken = &v 2863 return s 2864} 2865 2866// SetProviderTypes sets the ProviderTypes field's value. 2867func (s *ListCodeReviewsInput) SetProviderTypes(v []*string) *ListCodeReviewsInput { 2868 s.ProviderTypes = v 2869 return s 2870} 2871 2872// SetRepositoryNames sets the RepositoryNames field's value. 2873func (s *ListCodeReviewsInput) SetRepositoryNames(v []*string) *ListCodeReviewsInput { 2874 s.RepositoryNames = v 2875 return s 2876} 2877 2878// SetStates sets the States field's value. 2879func (s *ListCodeReviewsInput) SetStates(v []*string) *ListCodeReviewsInput { 2880 s.States = v 2881 return s 2882} 2883 2884// SetType sets the Type field's value. 2885func (s *ListCodeReviewsInput) SetType(v string) *ListCodeReviewsInput { 2886 s.Type = &v 2887 return s 2888} 2889 2890type ListCodeReviewsOutput struct { 2891 _ struct{} `type:"structure"` 2892 2893 // A list of code reviews that meet the criteria of the request. 2894 CodeReviewSummaries []*CodeReviewSummary `type:"list"` 2895 2896 // Pagination token. 2897 NextToken *string `min:"1" type:"string"` 2898} 2899 2900// String returns the string representation 2901func (s ListCodeReviewsOutput) String() string { 2902 return awsutil.Prettify(s) 2903} 2904 2905// GoString returns the string representation 2906func (s ListCodeReviewsOutput) GoString() string { 2907 return s.String() 2908} 2909 2910// SetCodeReviewSummaries sets the CodeReviewSummaries field's value. 2911func (s *ListCodeReviewsOutput) SetCodeReviewSummaries(v []*CodeReviewSummary) *ListCodeReviewsOutput { 2912 s.CodeReviewSummaries = v 2913 return s 2914} 2915 2916// SetNextToken sets the NextToken field's value. 2917func (s *ListCodeReviewsOutput) SetNextToken(v string) *ListCodeReviewsOutput { 2918 s.NextToken = &v 2919 return s 2920} 2921 2922type ListRecommendationFeedbackInput struct { 2923 _ struct{} `type:"structure"` 2924 2925 // The Amazon Resource Name (ARN) of the CodeReview (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_CodeReview.html) 2926 // object. 2927 // 2928 // CodeReviewArn is a required field 2929 CodeReviewArn *string `location:"uri" locationName:"CodeReviewArn" min:"1" type:"string" required:"true"` 2930 2931 // The maximum number of results that are returned per call. The default is 2932 // 100. 2933 MaxResults *int64 `location:"querystring" locationName:"MaxResults" min:"1" type:"integer"` 2934 2935 // If nextToken is returned, there are more results available. The value of 2936 // nextToken is a unique pagination token for each page. Make the call again 2937 // using the returned token to retrieve the next page. Keep all other arguments 2938 // unchanged. 2939 NextToken *string `location:"querystring" locationName:"NextToken" min:"1" type:"string"` 2940 2941 // Used to query the recommendation feedback for a given recommendation. 2942 RecommendationIds []*string `location:"querystring" locationName:"RecommendationIds" min:"1" type:"list"` 2943 2944 // An AWS user's account ID or Amazon Resource Name (ARN). Use this ID to query 2945 // the recommendation feedback for a code review from that user. 2946 // 2947 // The UserId is an IAM principal that can be specified as an AWS account ID 2948 // or an Amazon Resource Name (ARN). For more information, see Specifying a 2949 // Principal (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html#Principal_specifying) 2950 // in the AWS Identity and Access Management User Guide. 2951 UserIds []*string `location:"querystring" locationName:"UserIds" min:"1" type:"list"` 2952} 2953 2954// String returns the string representation 2955func (s ListRecommendationFeedbackInput) String() string { 2956 return awsutil.Prettify(s) 2957} 2958 2959// GoString returns the string representation 2960func (s ListRecommendationFeedbackInput) GoString() string { 2961 return s.String() 2962} 2963 2964// Validate inspects the fields of the type to determine if they are valid. 2965func (s *ListRecommendationFeedbackInput) Validate() error { 2966 invalidParams := request.ErrInvalidParams{Context: "ListRecommendationFeedbackInput"} 2967 if s.CodeReviewArn == nil { 2968 invalidParams.Add(request.NewErrParamRequired("CodeReviewArn")) 2969 } 2970 if s.CodeReviewArn != nil && len(*s.CodeReviewArn) < 1 { 2971 invalidParams.Add(request.NewErrParamMinLen("CodeReviewArn", 1)) 2972 } 2973 if s.MaxResults != nil && *s.MaxResults < 1 { 2974 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 2975 } 2976 if s.NextToken != nil && len(*s.NextToken) < 1 { 2977 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 2978 } 2979 if s.RecommendationIds != nil && len(s.RecommendationIds) < 1 { 2980 invalidParams.Add(request.NewErrParamMinLen("RecommendationIds", 1)) 2981 } 2982 if s.UserIds != nil && len(s.UserIds) < 1 { 2983 invalidParams.Add(request.NewErrParamMinLen("UserIds", 1)) 2984 } 2985 2986 if invalidParams.Len() > 0 { 2987 return invalidParams 2988 } 2989 return nil 2990} 2991 2992// SetCodeReviewArn sets the CodeReviewArn field's value. 2993func (s *ListRecommendationFeedbackInput) SetCodeReviewArn(v string) *ListRecommendationFeedbackInput { 2994 s.CodeReviewArn = &v 2995 return s 2996} 2997 2998// SetMaxResults sets the MaxResults field's value. 2999func (s *ListRecommendationFeedbackInput) SetMaxResults(v int64) *ListRecommendationFeedbackInput { 3000 s.MaxResults = &v 3001 return s 3002} 3003 3004// SetNextToken sets the NextToken field's value. 3005func (s *ListRecommendationFeedbackInput) SetNextToken(v string) *ListRecommendationFeedbackInput { 3006 s.NextToken = &v 3007 return s 3008} 3009 3010// SetRecommendationIds sets the RecommendationIds field's value. 3011func (s *ListRecommendationFeedbackInput) SetRecommendationIds(v []*string) *ListRecommendationFeedbackInput { 3012 s.RecommendationIds = v 3013 return s 3014} 3015 3016// SetUserIds sets the UserIds field's value. 3017func (s *ListRecommendationFeedbackInput) SetUserIds(v []*string) *ListRecommendationFeedbackInput { 3018 s.UserIds = v 3019 return s 3020} 3021 3022type ListRecommendationFeedbackOutput struct { 3023 _ struct{} `type:"structure"` 3024 3025 // If nextToken is returned, there are more results available. The value of 3026 // nextToken is a unique pagination token for each page. Make the call again 3027 // using the returned token to retrieve the next page. Keep all other arguments 3028 // unchanged. 3029 NextToken *string `min:"1" type:"string"` 3030 3031 // Recommendation feedback summaries corresponding to the code review ARN. 3032 RecommendationFeedbackSummaries []*RecommendationFeedbackSummary `type:"list"` 3033} 3034 3035// String returns the string representation 3036func (s ListRecommendationFeedbackOutput) String() string { 3037 return awsutil.Prettify(s) 3038} 3039 3040// GoString returns the string representation 3041func (s ListRecommendationFeedbackOutput) GoString() string { 3042 return s.String() 3043} 3044 3045// SetNextToken sets the NextToken field's value. 3046func (s *ListRecommendationFeedbackOutput) SetNextToken(v string) *ListRecommendationFeedbackOutput { 3047 s.NextToken = &v 3048 return s 3049} 3050 3051// SetRecommendationFeedbackSummaries sets the RecommendationFeedbackSummaries field's value. 3052func (s *ListRecommendationFeedbackOutput) SetRecommendationFeedbackSummaries(v []*RecommendationFeedbackSummary) *ListRecommendationFeedbackOutput { 3053 s.RecommendationFeedbackSummaries = v 3054 return s 3055} 3056 3057type ListRecommendationsInput struct { 3058 _ struct{} `type:"structure"` 3059 3060 // The Amazon Resource Name (ARN) of the CodeReview (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_CodeReview.html) 3061 // object. 3062 // 3063 // CodeReviewArn is a required field 3064 CodeReviewArn *string `location:"uri" locationName:"CodeReviewArn" min:"1" type:"string" required:"true"` 3065 3066 // The maximum number of results that are returned per call. The default is 3067 // 100. 3068 MaxResults *int64 `location:"querystring" locationName:"MaxResults" min:"1" type:"integer"` 3069 3070 // Pagination token. 3071 NextToken *string `location:"querystring" locationName:"NextToken" min:"1" type:"string"` 3072} 3073 3074// String returns the string representation 3075func (s ListRecommendationsInput) String() string { 3076 return awsutil.Prettify(s) 3077} 3078 3079// GoString returns the string representation 3080func (s ListRecommendationsInput) GoString() string { 3081 return s.String() 3082} 3083 3084// Validate inspects the fields of the type to determine if they are valid. 3085func (s *ListRecommendationsInput) Validate() error { 3086 invalidParams := request.ErrInvalidParams{Context: "ListRecommendationsInput"} 3087 if s.CodeReviewArn == nil { 3088 invalidParams.Add(request.NewErrParamRequired("CodeReviewArn")) 3089 } 3090 if s.CodeReviewArn != nil && len(*s.CodeReviewArn) < 1 { 3091 invalidParams.Add(request.NewErrParamMinLen("CodeReviewArn", 1)) 3092 } 3093 if s.MaxResults != nil && *s.MaxResults < 1 { 3094 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 3095 } 3096 if s.NextToken != nil && len(*s.NextToken) < 1 { 3097 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 3098 } 3099 3100 if invalidParams.Len() > 0 { 3101 return invalidParams 3102 } 3103 return nil 3104} 3105 3106// SetCodeReviewArn sets the CodeReviewArn field's value. 3107func (s *ListRecommendationsInput) SetCodeReviewArn(v string) *ListRecommendationsInput { 3108 s.CodeReviewArn = &v 3109 return s 3110} 3111 3112// SetMaxResults sets the MaxResults field's value. 3113func (s *ListRecommendationsInput) SetMaxResults(v int64) *ListRecommendationsInput { 3114 s.MaxResults = &v 3115 return s 3116} 3117 3118// SetNextToken sets the NextToken field's value. 3119func (s *ListRecommendationsInput) SetNextToken(v string) *ListRecommendationsInput { 3120 s.NextToken = &v 3121 return s 3122} 3123 3124type ListRecommendationsOutput struct { 3125 _ struct{} `type:"structure"` 3126 3127 // Pagination token. 3128 NextToken *string `min:"1" type:"string"` 3129 3130 // List of recommendations for the requested code review. 3131 RecommendationSummaries []*RecommendationSummary `type:"list"` 3132} 3133 3134// String returns the string representation 3135func (s ListRecommendationsOutput) String() string { 3136 return awsutil.Prettify(s) 3137} 3138 3139// GoString returns the string representation 3140func (s ListRecommendationsOutput) GoString() string { 3141 return s.String() 3142} 3143 3144// SetNextToken sets the NextToken field's value. 3145func (s *ListRecommendationsOutput) SetNextToken(v string) *ListRecommendationsOutput { 3146 s.NextToken = &v 3147 return s 3148} 3149 3150// SetRecommendationSummaries sets the RecommendationSummaries field's value. 3151func (s *ListRecommendationsOutput) SetRecommendationSummaries(v []*RecommendationSummary) *ListRecommendationsOutput { 3152 s.RecommendationSummaries = v 3153 return s 3154} 3155 3156type ListRepositoryAssociationsInput struct { 3157 _ struct{} `type:"structure"` 3158 3159 // The maximum number of repository association results returned by ListRepositoryAssociations 3160 // in paginated output. When this parameter is used, ListRepositoryAssociations 3161 // only returns maxResults results in a single page with a nextToken response 3162 // element. The remaining results of the initial request can be seen by sending 3163 // another ListRepositoryAssociations request with the returned nextToken value. 3164 // This value can be between 1 and 100. If this parameter is not used, ListRepositoryAssociations 3165 // returns up to 100 results and a nextToken value if applicable. 3166 MaxResults *int64 `location:"querystring" locationName:"MaxResults" min:"1" type:"integer"` 3167 3168 // List of repository names to use as a filter. 3169 Names []*string `location:"querystring" locationName:"Name" min:"1" type:"list"` 3170 3171 // The nextToken value returned from a previous paginated ListRepositoryAssociations 3172 // request where maxResults was used and the results exceeded the value of that 3173 // parameter. Pagination continues from the end of the previous results that 3174 // returned the nextToken value. 3175 // 3176 // Treat this token as an opaque identifier that is only used to retrieve the 3177 // next items in a list and not for other programmatic purposes. 3178 NextToken *string `location:"querystring" locationName:"NextToken" min:"1" type:"string"` 3179 3180 // List of owners to use as a filter. For AWS CodeCommit, it is the name of 3181 // the CodeCommit account that was used to associate the repository. For other 3182 // repository source providers, such as Bitbucket and GitHub Enterprise Server, 3183 // this is name of the account that was used to associate the repository. 3184 Owners []*string `location:"querystring" locationName:"Owner" min:"1" type:"list"` 3185 3186 // List of provider types to use as a filter. 3187 ProviderTypes []*string `location:"querystring" locationName:"ProviderType" min:"1" type:"list"` 3188 3189 // List of repository association states to use as a filter. 3190 // 3191 // The valid repository association states are: 3192 // 3193 // * Associated: The repository association is complete. 3194 // 3195 // * Associating: CodeGuru Reviewer is: Setting up pull request notifications. 3196 // This is required for pull requests to trigger a CodeGuru Reviewer review. 3197 // If your repository ProviderType is GitHub, GitHub Enterprise Server, or 3198 // Bitbucket, CodeGuru Reviewer creates webhooks in your repository to trigger 3199 // CodeGuru Reviewer reviews. If you delete these webhooks, reviews of code 3200 // in your repository cannot be triggered. Setting up source code access. 3201 // This is required for CodeGuru Reviewer to securely clone code in your 3202 // repository. 3203 // 3204 // * Failed: The repository failed to associate or disassociate. 3205 // 3206 // * Disassociating: CodeGuru Reviewer is removing the repository's pull 3207 // request notifications and source code access. 3208 // 3209 // * Disassociated: CodeGuru Reviewer successfully disassociated the repository. 3210 // You can create a new association with this repository if you want to review 3211 // source code in it later. You can control access to code reviews created 3212 // in an associated repository with tags after it has been disassociated. 3213 // For more information, see Using tags to control access to associated repositories 3214 // (https://docs.aws.amazon.com/codeguru/latest/reviewer-ug/auth-and-access-control-using-tags.html) 3215 // in the Amazon CodeGuru Reviewer User Guide. 3216 States []*string `location:"querystring" locationName:"State" min:"1" type:"list"` 3217} 3218 3219// String returns the string representation 3220func (s ListRepositoryAssociationsInput) String() string { 3221 return awsutil.Prettify(s) 3222} 3223 3224// GoString returns the string representation 3225func (s ListRepositoryAssociationsInput) GoString() string { 3226 return s.String() 3227} 3228 3229// Validate inspects the fields of the type to determine if they are valid. 3230func (s *ListRepositoryAssociationsInput) Validate() error { 3231 invalidParams := request.ErrInvalidParams{Context: "ListRepositoryAssociationsInput"} 3232 if s.MaxResults != nil && *s.MaxResults < 1 { 3233 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 3234 } 3235 if s.Names != nil && len(s.Names) < 1 { 3236 invalidParams.Add(request.NewErrParamMinLen("Names", 1)) 3237 } 3238 if s.NextToken != nil && len(*s.NextToken) < 1 { 3239 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 3240 } 3241 if s.Owners != nil && len(s.Owners) < 1 { 3242 invalidParams.Add(request.NewErrParamMinLen("Owners", 1)) 3243 } 3244 if s.ProviderTypes != nil && len(s.ProviderTypes) < 1 { 3245 invalidParams.Add(request.NewErrParamMinLen("ProviderTypes", 1)) 3246 } 3247 if s.States != nil && len(s.States) < 1 { 3248 invalidParams.Add(request.NewErrParamMinLen("States", 1)) 3249 } 3250 3251 if invalidParams.Len() > 0 { 3252 return invalidParams 3253 } 3254 return nil 3255} 3256 3257// SetMaxResults sets the MaxResults field's value. 3258func (s *ListRepositoryAssociationsInput) SetMaxResults(v int64) *ListRepositoryAssociationsInput { 3259 s.MaxResults = &v 3260 return s 3261} 3262 3263// SetNames sets the Names field's value. 3264func (s *ListRepositoryAssociationsInput) SetNames(v []*string) *ListRepositoryAssociationsInput { 3265 s.Names = v 3266 return s 3267} 3268 3269// SetNextToken sets the NextToken field's value. 3270func (s *ListRepositoryAssociationsInput) SetNextToken(v string) *ListRepositoryAssociationsInput { 3271 s.NextToken = &v 3272 return s 3273} 3274 3275// SetOwners sets the Owners field's value. 3276func (s *ListRepositoryAssociationsInput) SetOwners(v []*string) *ListRepositoryAssociationsInput { 3277 s.Owners = v 3278 return s 3279} 3280 3281// SetProviderTypes sets the ProviderTypes field's value. 3282func (s *ListRepositoryAssociationsInput) SetProviderTypes(v []*string) *ListRepositoryAssociationsInput { 3283 s.ProviderTypes = v 3284 return s 3285} 3286 3287// SetStates sets the States field's value. 3288func (s *ListRepositoryAssociationsInput) SetStates(v []*string) *ListRepositoryAssociationsInput { 3289 s.States = v 3290 return s 3291} 3292 3293type ListRepositoryAssociationsOutput struct { 3294 _ struct{} `type:"structure"` 3295 3296 // The nextToken value to include in a future ListRecommendations request. When 3297 // the results of a ListRecommendations request exceed maxResults, this value 3298 // can be used to retrieve the next page of results. This value is null when 3299 // there are no more results to return. 3300 NextToken *string `min:"1" type:"string"` 3301 3302 // A list of repository associations that meet the criteria of the request. 3303 RepositoryAssociationSummaries []*RepositoryAssociationSummary `type:"list"` 3304} 3305 3306// String returns the string representation 3307func (s ListRepositoryAssociationsOutput) String() string { 3308 return awsutil.Prettify(s) 3309} 3310 3311// GoString returns the string representation 3312func (s ListRepositoryAssociationsOutput) GoString() string { 3313 return s.String() 3314} 3315 3316// SetNextToken sets the NextToken field's value. 3317func (s *ListRepositoryAssociationsOutput) SetNextToken(v string) *ListRepositoryAssociationsOutput { 3318 s.NextToken = &v 3319 return s 3320} 3321 3322// SetRepositoryAssociationSummaries sets the RepositoryAssociationSummaries field's value. 3323func (s *ListRepositoryAssociationsOutput) SetRepositoryAssociationSummaries(v []*RepositoryAssociationSummary) *ListRepositoryAssociationsOutput { 3324 s.RepositoryAssociationSummaries = v 3325 return s 3326} 3327 3328type ListTagsForResourceInput struct { 3329 _ struct{} `type:"structure"` 3330 3331 // The Amazon Resource Name (ARN) of the RepositoryAssociation (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociation.html) 3332 // object. You can retrieve this ARN by calling ListRepositoryAssociations (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_ListRepositoryAssociations.html). 3333 // 3334 // ResourceArn is a required field 3335 ResourceArn *string `location:"uri" locationName:"resourceArn" min:"1" type:"string" required:"true"` 3336} 3337 3338// String returns the string representation 3339func (s ListTagsForResourceInput) String() string { 3340 return awsutil.Prettify(s) 3341} 3342 3343// GoString returns the string representation 3344func (s ListTagsForResourceInput) GoString() string { 3345 return s.String() 3346} 3347 3348// Validate inspects the fields of the type to determine if they are valid. 3349func (s *ListTagsForResourceInput) Validate() error { 3350 invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"} 3351 if s.ResourceArn == nil { 3352 invalidParams.Add(request.NewErrParamRequired("ResourceArn")) 3353 } 3354 if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { 3355 invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) 3356 } 3357 3358 if invalidParams.Len() > 0 { 3359 return invalidParams 3360 } 3361 return nil 3362} 3363 3364// SetResourceArn sets the ResourceArn field's value. 3365func (s *ListTagsForResourceInput) SetResourceArn(v string) *ListTagsForResourceInput { 3366 s.ResourceArn = &v 3367 return s 3368} 3369 3370type ListTagsForResourceOutput struct { 3371 _ struct{} `type:"structure"` 3372 3373 // An array of key-value pairs used to tag an associated repository. A tag is 3374 // a custom attribute label with two parts: 3375 // 3376 // * A tag key (for example, CostCenter, Environment, Project, or Secret). 3377 // Tag keys are case sensitive. 3378 // 3379 // * An optional field known as a tag value (for example, 111122223333, Production, 3380 // or a team name). Omitting the tag value is the same as using an empty 3381 // string. Like tag keys, tag values are case sensitive. 3382 Tags map[string]*string `min:"1" type:"map"` 3383} 3384 3385// String returns the string representation 3386func (s ListTagsForResourceOutput) String() string { 3387 return awsutil.Prettify(s) 3388} 3389 3390// GoString returns the string representation 3391func (s ListTagsForResourceOutput) GoString() string { 3392 return s.String() 3393} 3394 3395// SetTags sets the Tags field's value. 3396func (s *ListTagsForResourceOutput) SetTags(v map[string]*string) *ListTagsForResourceOutput { 3397 s.Tags = v 3398 return s 3399} 3400 3401// Information about the statistics from the code review. 3402type Metrics struct { 3403 _ struct{} `type:"structure"` 3404 3405 // Total number of recommendations found in the code review. 3406 FindingsCount *int64 `type:"long"` 3407 3408 // Lines of code metered in the code review. For the initial code review pull 3409 // request and all subsequent revisions, this includes all lines of code in 3410 // the files added to the pull request. In subsequent revisions, for files that 3411 // already existed in the pull request, this includes only the changed lines 3412 // of code. In both cases, this does not include non-code lines such as comments 3413 // and import statements. For example, if you submit a pull request containing 3414 // 5 files, each with 500 lines of code, and in a subsequent revision you added 3415 // a new file with 200 lines of code, and also modified a total of 25 lines 3416 // across the initial 5 files, MeteredLinesOfCodeCount includes the first 5 3417 // files (5 * 500 = 2,500 lines), the new file (200 lines) and the 25 changed 3418 // lines of code for a total of 2,725 lines of code. 3419 MeteredLinesOfCodeCount *int64 `type:"long"` 3420} 3421 3422// String returns the string representation 3423func (s Metrics) String() string { 3424 return awsutil.Prettify(s) 3425} 3426 3427// GoString returns the string representation 3428func (s Metrics) GoString() string { 3429 return s.String() 3430} 3431 3432// SetFindingsCount sets the FindingsCount field's value. 3433func (s *Metrics) SetFindingsCount(v int64) *Metrics { 3434 s.FindingsCount = &v 3435 return s 3436} 3437 3438// SetMeteredLinesOfCodeCount sets the MeteredLinesOfCodeCount field's value. 3439func (s *Metrics) SetMeteredLinesOfCodeCount(v int64) *Metrics { 3440 s.MeteredLinesOfCodeCount = &v 3441 return s 3442} 3443 3444// Information about metrics summaries. 3445type MetricsSummary struct { 3446 _ struct{} `type:"structure"` 3447 3448 // Total number of recommendations found in the code review. 3449 FindingsCount *int64 `type:"long"` 3450 3451 // Lines of code metered in the code review. For the initial code review pull 3452 // request and all subsequent revisions, this includes all lines of code in 3453 // the files added to the pull request. In subsequent revisions, for files that 3454 // already existed in the pull request, this includes only the changed lines 3455 // of code. In both cases, this does not include non-code lines such as comments 3456 // and import statements. For example, if you submit a pull request containing 3457 // 5 files, each with 500 lines of code, and in a subsequent revision you added 3458 // a new file with 200 lines of code, and also modified a total of 25 lines 3459 // across the initial 5 files, MeteredLinesOfCodeCount includes the first 5 3460 // files (5 * 500 = 2,500 lines), the new file (200 lines) and the 25 changed 3461 // lines of code for a total of 2,725 lines of code. 3462 MeteredLinesOfCodeCount *int64 `type:"long"` 3463} 3464 3465// String returns the string representation 3466func (s MetricsSummary) String() string { 3467 return awsutil.Prettify(s) 3468} 3469 3470// GoString returns the string representation 3471func (s MetricsSummary) GoString() string { 3472 return s.String() 3473} 3474 3475// SetFindingsCount sets the FindingsCount field's value. 3476func (s *MetricsSummary) SetFindingsCount(v int64) *MetricsSummary { 3477 s.FindingsCount = &v 3478 return s 3479} 3480 3481// SetMeteredLinesOfCodeCount sets the MeteredLinesOfCodeCount field's value. 3482func (s *MetricsSummary) SetMeteredLinesOfCodeCount(v int64) *MetricsSummary { 3483 s.MeteredLinesOfCodeCount = &v 3484 return s 3485} 3486 3487// The resource specified in the request was not found. 3488type NotFoundException struct { 3489 _ struct{} `type:"structure"` 3490 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 3491 3492 Message_ *string `locationName:"Message" type:"string"` 3493} 3494 3495// String returns the string representation 3496func (s NotFoundException) String() string { 3497 return awsutil.Prettify(s) 3498} 3499 3500// GoString returns the string representation 3501func (s NotFoundException) GoString() string { 3502 return s.String() 3503} 3504 3505func newErrorNotFoundException(v protocol.ResponseMetadata) error { 3506 return &NotFoundException{ 3507 RespMetadata: v, 3508 } 3509} 3510 3511// Code returns the exception type name. 3512func (s *NotFoundException) Code() string { 3513 return "NotFoundException" 3514} 3515 3516// Message returns the exception's message. 3517func (s *NotFoundException) Message() string { 3518 if s.Message_ != nil { 3519 return *s.Message_ 3520 } 3521 return "" 3522} 3523 3524// OrigErr always returns nil, satisfies awserr.Error interface. 3525func (s *NotFoundException) OrigErr() error { 3526 return nil 3527} 3528 3529func (s *NotFoundException) Error() string { 3530 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 3531} 3532 3533// Status code returns the HTTP status code for the request's response error. 3534func (s *NotFoundException) StatusCode() int { 3535 return s.RespMetadata.StatusCode 3536} 3537 3538// RequestID returns the service's response RequestID for request. 3539func (s *NotFoundException) RequestID() string { 3540 return s.RespMetadata.RequestID 3541} 3542 3543type PutRecommendationFeedbackInput struct { 3544 _ struct{} `type:"structure"` 3545 3546 // The Amazon Resource Name (ARN) of the CodeReview (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_CodeReview.html) 3547 // object. 3548 // 3549 // CodeReviewArn is a required field 3550 CodeReviewArn *string `min:"1" type:"string" required:"true"` 3551 3552 // List for storing reactions. Reactions are utf-8 text code for emojis. If 3553 // you send an empty list it clears all your feedback. 3554 // 3555 // Reactions is a required field 3556 Reactions []*string `type:"list" required:"true"` 3557 3558 // The recommendation ID that can be used to track the provided recommendations 3559 // and then to collect the feedback. 3560 // 3561 // RecommendationId is a required field 3562 RecommendationId *string `min:"1" type:"string" required:"true"` 3563} 3564 3565// String returns the string representation 3566func (s PutRecommendationFeedbackInput) String() string { 3567 return awsutil.Prettify(s) 3568} 3569 3570// GoString returns the string representation 3571func (s PutRecommendationFeedbackInput) GoString() string { 3572 return s.String() 3573} 3574 3575// Validate inspects the fields of the type to determine if they are valid. 3576func (s *PutRecommendationFeedbackInput) Validate() error { 3577 invalidParams := request.ErrInvalidParams{Context: "PutRecommendationFeedbackInput"} 3578 if s.CodeReviewArn == nil { 3579 invalidParams.Add(request.NewErrParamRequired("CodeReviewArn")) 3580 } 3581 if s.CodeReviewArn != nil && len(*s.CodeReviewArn) < 1 { 3582 invalidParams.Add(request.NewErrParamMinLen("CodeReviewArn", 1)) 3583 } 3584 if s.Reactions == nil { 3585 invalidParams.Add(request.NewErrParamRequired("Reactions")) 3586 } 3587 if s.RecommendationId == nil { 3588 invalidParams.Add(request.NewErrParamRequired("RecommendationId")) 3589 } 3590 if s.RecommendationId != nil && len(*s.RecommendationId) < 1 { 3591 invalidParams.Add(request.NewErrParamMinLen("RecommendationId", 1)) 3592 } 3593 3594 if invalidParams.Len() > 0 { 3595 return invalidParams 3596 } 3597 return nil 3598} 3599 3600// SetCodeReviewArn sets the CodeReviewArn field's value. 3601func (s *PutRecommendationFeedbackInput) SetCodeReviewArn(v string) *PutRecommendationFeedbackInput { 3602 s.CodeReviewArn = &v 3603 return s 3604} 3605 3606// SetReactions sets the Reactions field's value. 3607func (s *PutRecommendationFeedbackInput) SetReactions(v []*string) *PutRecommendationFeedbackInput { 3608 s.Reactions = v 3609 return s 3610} 3611 3612// SetRecommendationId sets the RecommendationId field's value. 3613func (s *PutRecommendationFeedbackInput) SetRecommendationId(v string) *PutRecommendationFeedbackInput { 3614 s.RecommendationId = &v 3615 return s 3616} 3617 3618type PutRecommendationFeedbackOutput struct { 3619 _ struct{} `type:"structure"` 3620} 3621 3622// String returns the string representation 3623func (s PutRecommendationFeedbackOutput) String() string { 3624 return awsutil.Prettify(s) 3625} 3626 3627// GoString returns the string representation 3628func (s PutRecommendationFeedbackOutput) GoString() string { 3629 return s.String() 3630} 3631 3632// Information about the recommendation feedback. 3633type RecommendationFeedback struct { 3634 _ struct{} `type:"structure"` 3635 3636 // The Amazon Resource Name (ARN) of the CodeReview (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_CodeReview.html) 3637 // object. 3638 CodeReviewArn *string `min:"1" type:"string"` 3639 3640 // The time at which the feedback was created. 3641 CreatedTimeStamp *time.Time `type:"timestamp"` 3642 3643 // The time at which the feedback was last updated. 3644 LastUpdatedTimeStamp *time.Time `type:"timestamp"` 3645 3646 // List for storing reactions. Reactions are utf-8 text code for emojis. You 3647 // can send an empty list to clear off all your feedback. 3648 Reactions []*string `type:"list"` 3649 3650 // The recommendation ID that can be used to track the provided recommendations. 3651 // Later on it can be used to collect the feedback. 3652 RecommendationId *string `min:"1" type:"string"` 3653 3654 // The ID of the user that made the API call. 3655 // 3656 // The UserId is an IAM principal that can be specified as an AWS account ID 3657 // or an Amazon Resource Name (ARN). For more information, see Specifying a 3658 // Principal (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html#Principal_specifying) 3659 // in the AWS Identity and Access Management User Guide. 3660 UserId *string `min:"1" type:"string"` 3661} 3662 3663// String returns the string representation 3664func (s RecommendationFeedback) String() string { 3665 return awsutil.Prettify(s) 3666} 3667 3668// GoString returns the string representation 3669func (s RecommendationFeedback) GoString() string { 3670 return s.String() 3671} 3672 3673// SetCodeReviewArn sets the CodeReviewArn field's value. 3674func (s *RecommendationFeedback) SetCodeReviewArn(v string) *RecommendationFeedback { 3675 s.CodeReviewArn = &v 3676 return s 3677} 3678 3679// SetCreatedTimeStamp sets the CreatedTimeStamp field's value. 3680func (s *RecommendationFeedback) SetCreatedTimeStamp(v time.Time) *RecommendationFeedback { 3681 s.CreatedTimeStamp = &v 3682 return s 3683} 3684 3685// SetLastUpdatedTimeStamp sets the LastUpdatedTimeStamp field's value. 3686func (s *RecommendationFeedback) SetLastUpdatedTimeStamp(v time.Time) *RecommendationFeedback { 3687 s.LastUpdatedTimeStamp = &v 3688 return s 3689} 3690 3691// SetReactions sets the Reactions field's value. 3692func (s *RecommendationFeedback) SetReactions(v []*string) *RecommendationFeedback { 3693 s.Reactions = v 3694 return s 3695} 3696 3697// SetRecommendationId sets the RecommendationId field's value. 3698func (s *RecommendationFeedback) SetRecommendationId(v string) *RecommendationFeedback { 3699 s.RecommendationId = &v 3700 return s 3701} 3702 3703// SetUserId sets the UserId field's value. 3704func (s *RecommendationFeedback) SetUserId(v string) *RecommendationFeedback { 3705 s.UserId = &v 3706 return s 3707} 3708 3709// Information about recommendation feedback summaries. 3710type RecommendationFeedbackSummary struct { 3711 _ struct{} `type:"structure"` 3712 3713 // List for storing reactions. Reactions are utf-8 text code for emojis. 3714 Reactions []*string `type:"list"` 3715 3716 // The recommendation ID that can be used to track the provided recommendations. 3717 // Later on it can be used to collect the feedback. 3718 RecommendationId *string `min:"1" type:"string"` 3719 3720 // The ID of the user that gave the feedback. 3721 // 3722 // The UserId is an IAM principal that can be specified as an AWS account ID 3723 // or an Amazon Resource Name (ARN). For more information, see Specifying a 3724 // Principal (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html#Principal_specifying) 3725 // in the AWS Identity and Access Management User Guide. 3726 UserId *string `min:"1" type:"string"` 3727} 3728 3729// String returns the string representation 3730func (s RecommendationFeedbackSummary) String() string { 3731 return awsutil.Prettify(s) 3732} 3733 3734// GoString returns the string representation 3735func (s RecommendationFeedbackSummary) GoString() string { 3736 return s.String() 3737} 3738 3739// SetReactions sets the Reactions field's value. 3740func (s *RecommendationFeedbackSummary) SetReactions(v []*string) *RecommendationFeedbackSummary { 3741 s.Reactions = v 3742 return s 3743} 3744 3745// SetRecommendationId sets the RecommendationId field's value. 3746func (s *RecommendationFeedbackSummary) SetRecommendationId(v string) *RecommendationFeedbackSummary { 3747 s.RecommendationId = &v 3748 return s 3749} 3750 3751// SetUserId sets the UserId field's value. 3752func (s *RecommendationFeedbackSummary) SetUserId(v string) *RecommendationFeedbackSummary { 3753 s.UserId = &v 3754 return s 3755} 3756 3757// Information about recommendations. 3758type RecommendationSummary struct { 3759 _ struct{} `type:"structure"` 3760 3761 // A description of the recommendation generated by CodeGuru Reviewer for the 3762 // lines of code between the start line and the end line. 3763 Description *string `min:"1" type:"string"` 3764 3765 // Last line where the recommendation is applicable in the source commit or 3766 // source branch. For a single line comment the start line and end line values 3767 // are the same. 3768 EndLine *int64 `type:"integer"` 3769 3770 // Name of the file on which a recommendation is provided. 3771 FilePath *string `min:"1" type:"string"` 3772 3773 // The recommendation ID that can be used to track the provided recommendations. 3774 // Later on it can be used to collect the feedback. 3775 RecommendationId *string `min:"1" type:"string"` 3776 3777 // Start line from where the recommendation is applicable in the source commit 3778 // or source branch. 3779 StartLine *int64 `type:"integer"` 3780} 3781 3782// String returns the string representation 3783func (s RecommendationSummary) String() string { 3784 return awsutil.Prettify(s) 3785} 3786 3787// GoString returns the string representation 3788func (s RecommendationSummary) GoString() string { 3789 return s.String() 3790} 3791 3792// SetDescription sets the Description field's value. 3793func (s *RecommendationSummary) SetDescription(v string) *RecommendationSummary { 3794 s.Description = &v 3795 return s 3796} 3797 3798// SetEndLine sets the EndLine field's value. 3799func (s *RecommendationSummary) SetEndLine(v int64) *RecommendationSummary { 3800 s.EndLine = &v 3801 return s 3802} 3803 3804// SetFilePath sets the FilePath field's value. 3805func (s *RecommendationSummary) SetFilePath(v string) *RecommendationSummary { 3806 s.FilePath = &v 3807 return s 3808} 3809 3810// SetRecommendationId sets the RecommendationId field's value. 3811func (s *RecommendationSummary) SetRecommendationId(v string) *RecommendationSummary { 3812 s.RecommendationId = &v 3813 return s 3814} 3815 3816// SetStartLine sets the StartLine field's value. 3817func (s *RecommendationSummary) SetStartLine(v int64) *RecommendationSummary { 3818 s.StartLine = &v 3819 return s 3820} 3821 3822// Information about an associated AWS CodeCommit repository or an associated 3823// repository that is managed by AWS CodeStar Connections (for example, Bitbucket). 3824// This Repository object is not used if your source code is in an associated 3825// GitHub repository. 3826type Repository struct { 3827 _ struct{} `type:"structure"` 3828 3829 // Information about a Bitbucket repository. 3830 Bitbucket *ThirdPartySourceRepository `type:"structure"` 3831 3832 // Information about an AWS CodeCommit repository. 3833 CodeCommit *CodeCommitRepository `type:"structure"` 3834 3835 // Information about a GitHub Enterprise Server repository. 3836 GitHubEnterpriseServer *ThirdPartySourceRepository `type:"structure"` 3837} 3838 3839// String returns the string representation 3840func (s Repository) String() string { 3841 return awsutil.Prettify(s) 3842} 3843 3844// GoString returns the string representation 3845func (s Repository) GoString() string { 3846 return s.String() 3847} 3848 3849// Validate inspects the fields of the type to determine if they are valid. 3850func (s *Repository) Validate() error { 3851 invalidParams := request.ErrInvalidParams{Context: "Repository"} 3852 if s.Bitbucket != nil { 3853 if err := s.Bitbucket.Validate(); err != nil { 3854 invalidParams.AddNested("Bitbucket", err.(request.ErrInvalidParams)) 3855 } 3856 } 3857 if s.CodeCommit != nil { 3858 if err := s.CodeCommit.Validate(); err != nil { 3859 invalidParams.AddNested("CodeCommit", err.(request.ErrInvalidParams)) 3860 } 3861 } 3862 if s.GitHubEnterpriseServer != nil { 3863 if err := s.GitHubEnterpriseServer.Validate(); err != nil { 3864 invalidParams.AddNested("GitHubEnterpriseServer", err.(request.ErrInvalidParams)) 3865 } 3866 } 3867 3868 if invalidParams.Len() > 0 { 3869 return invalidParams 3870 } 3871 return nil 3872} 3873 3874// SetBitbucket sets the Bitbucket field's value. 3875func (s *Repository) SetBitbucket(v *ThirdPartySourceRepository) *Repository { 3876 s.Bitbucket = v 3877 return s 3878} 3879 3880// SetCodeCommit sets the CodeCommit field's value. 3881func (s *Repository) SetCodeCommit(v *CodeCommitRepository) *Repository { 3882 s.CodeCommit = v 3883 return s 3884} 3885 3886// SetGitHubEnterpriseServer sets the GitHubEnterpriseServer field's value. 3887func (s *Repository) SetGitHubEnterpriseServer(v *ThirdPartySourceRepository) *Repository { 3888 s.GitHubEnterpriseServer = v 3889 return s 3890} 3891 3892// A code review type that analyzes all code under a specified branch in an 3893// associated repository. The associated repository is specified using its ARN 3894// when you call CreateCodeReview (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_CreateCodeReview). 3895type RepositoryAnalysis struct { 3896 _ struct{} `type:"structure"` 3897 3898 // A SourceCodeType (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_SourceCodeType) 3899 // that specifies the tip of a branch in an associated repository. 3900 // 3901 // RepositoryHead is a required field 3902 RepositoryHead *RepositoryHeadSourceCodeType `type:"structure" required:"true"` 3903} 3904 3905// String returns the string representation 3906func (s RepositoryAnalysis) String() string { 3907 return awsutil.Prettify(s) 3908} 3909 3910// GoString returns the string representation 3911func (s RepositoryAnalysis) GoString() string { 3912 return s.String() 3913} 3914 3915// Validate inspects the fields of the type to determine if they are valid. 3916func (s *RepositoryAnalysis) Validate() error { 3917 invalidParams := request.ErrInvalidParams{Context: "RepositoryAnalysis"} 3918 if s.RepositoryHead == nil { 3919 invalidParams.Add(request.NewErrParamRequired("RepositoryHead")) 3920 } 3921 if s.RepositoryHead != nil { 3922 if err := s.RepositoryHead.Validate(); err != nil { 3923 invalidParams.AddNested("RepositoryHead", err.(request.ErrInvalidParams)) 3924 } 3925 } 3926 3927 if invalidParams.Len() > 0 { 3928 return invalidParams 3929 } 3930 return nil 3931} 3932 3933// SetRepositoryHead sets the RepositoryHead field's value. 3934func (s *RepositoryAnalysis) SetRepositoryHead(v *RepositoryHeadSourceCodeType) *RepositoryAnalysis { 3935 s.RepositoryHead = v 3936 return s 3937} 3938 3939// Information about a repository association. The DescribeRepositoryAssociation 3940// (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_DescribeRepositoryAssociation.html) 3941// operation returns a RepositoryAssociation object. 3942type RepositoryAssociation struct { 3943 _ struct{} `type:"structure"` 3944 3945 // The Amazon Resource Name (ARN) identifying the repository association. 3946 AssociationArn *string `min:"1" type:"string"` 3947 3948 // The ID of the repository association. 3949 AssociationId *string `min:"1" type:"string"` 3950 3951 // The Amazon Resource Name (ARN) of an AWS CodeStar Connections connection. 3952 // Its format is arn:aws:codestar-connections:region-id:aws-account_id:connection/connection-id. 3953 // For more information, see Connection (https://docs.aws.amazon.com/codestar-connections/latest/APIReference/API_Connection.html) 3954 // in the AWS CodeStar Connections API Reference. 3955 ConnectionArn *string `type:"string"` 3956 3957 // The time, in milliseconds since the epoch, when the repository association 3958 // was created. 3959 CreatedTimeStamp *time.Time `type:"timestamp"` 3960 3961 // A KMSKeyDetails object that contains: 3962 // 3963 // * The encryption option for this repository association. It is either 3964 // owned by AWS Key Management Service (KMS) (AWS_OWNED_CMK) or customer 3965 // managed (CUSTOMER_MANAGED_CMK). 3966 // 3967 // * The ID of the AWS KMS key that is associated with this respository association. 3968 KMSKeyDetails *KMSKeyDetails `type:"structure"` 3969 3970 // The time, in milliseconds since the epoch, when the repository association 3971 // was last updated. 3972 LastUpdatedTimeStamp *time.Time `type:"timestamp"` 3973 3974 // The name of the repository. 3975 Name *string `min:"1" type:"string"` 3976 3977 // The owner of the repository. For an AWS CodeCommit repository, this is the 3978 // AWS account ID of the account that owns the repository. For a GitHub, GitHub 3979 // Enterprise Server, or Bitbucket repository, this is the username for the 3980 // account that owns the repository. 3981 Owner *string `min:"1" type:"string"` 3982 3983 // The provider type of the repository association. 3984 ProviderType *string `type:"string" enum:"ProviderType"` 3985 3986 // The state of the repository association. 3987 // 3988 // The valid repository association states are: 3989 // 3990 // * Associated: The repository association is complete. 3991 // 3992 // * Associating: CodeGuru Reviewer is: Setting up pull request notifications. 3993 // This is required for pull requests to trigger a CodeGuru Reviewer review. 3994 // If your repository ProviderType is GitHub, GitHub Enterprise Server, or 3995 // Bitbucket, CodeGuru Reviewer creates webhooks in your repository to trigger 3996 // CodeGuru Reviewer reviews. If you delete these webhooks, reviews of code 3997 // in your repository cannot be triggered. Setting up source code access. 3998 // This is required for CodeGuru Reviewer to securely clone code in your 3999 // repository. 4000 // 4001 // * Failed: The repository failed to associate or disassociate. 4002 // 4003 // * Disassociating: CodeGuru Reviewer is removing the repository's pull 4004 // request notifications and source code access. 4005 // 4006 // * Disassociated: CodeGuru Reviewer successfully disassociated the repository. 4007 // You can create a new association with this repository if you want to review 4008 // source code in it later. You can control access to code reviews created 4009 // in an associated repository with tags after it has been disassociated. 4010 // For more information, see Using tags to control access to associated repositories 4011 // (https://docs.aws.amazon.com/codeguru/latest/reviewer-ug/auth-and-access-control-using-tags.html) 4012 // in the Amazon CodeGuru Reviewer User Guide. 4013 State *string `type:"string" enum:"RepositoryAssociationState"` 4014 4015 // A description of why the repository association is in the current state. 4016 StateReason *string `type:"string"` 4017} 4018 4019// String returns the string representation 4020func (s RepositoryAssociation) String() string { 4021 return awsutil.Prettify(s) 4022} 4023 4024// GoString returns the string representation 4025func (s RepositoryAssociation) GoString() string { 4026 return s.String() 4027} 4028 4029// SetAssociationArn sets the AssociationArn field's value. 4030func (s *RepositoryAssociation) SetAssociationArn(v string) *RepositoryAssociation { 4031 s.AssociationArn = &v 4032 return s 4033} 4034 4035// SetAssociationId sets the AssociationId field's value. 4036func (s *RepositoryAssociation) SetAssociationId(v string) *RepositoryAssociation { 4037 s.AssociationId = &v 4038 return s 4039} 4040 4041// SetConnectionArn sets the ConnectionArn field's value. 4042func (s *RepositoryAssociation) SetConnectionArn(v string) *RepositoryAssociation { 4043 s.ConnectionArn = &v 4044 return s 4045} 4046 4047// SetCreatedTimeStamp sets the CreatedTimeStamp field's value. 4048func (s *RepositoryAssociation) SetCreatedTimeStamp(v time.Time) *RepositoryAssociation { 4049 s.CreatedTimeStamp = &v 4050 return s 4051} 4052 4053// SetKMSKeyDetails sets the KMSKeyDetails field's value. 4054func (s *RepositoryAssociation) SetKMSKeyDetails(v *KMSKeyDetails) *RepositoryAssociation { 4055 s.KMSKeyDetails = v 4056 return s 4057} 4058 4059// SetLastUpdatedTimeStamp sets the LastUpdatedTimeStamp field's value. 4060func (s *RepositoryAssociation) SetLastUpdatedTimeStamp(v time.Time) *RepositoryAssociation { 4061 s.LastUpdatedTimeStamp = &v 4062 return s 4063} 4064 4065// SetName sets the Name field's value. 4066func (s *RepositoryAssociation) SetName(v string) *RepositoryAssociation { 4067 s.Name = &v 4068 return s 4069} 4070 4071// SetOwner sets the Owner field's value. 4072func (s *RepositoryAssociation) SetOwner(v string) *RepositoryAssociation { 4073 s.Owner = &v 4074 return s 4075} 4076 4077// SetProviderType sets the ProviderType field's value. 4078func (s *RepositoryAssociation) SetProviderType(v string) *RepositoryAssociation { 4079 s.ProviderType = &v 4080 return s 4081} 4082 4083// SetState sets the State field's value. 4084func (s *RepositoryAssociation) SetState(v string) *RepositoryAssociation { 4085 s.State = &v 4086 return s 4087} 4088 4089// SetStateReason sets the StateReason field's value. 4090func (s *RepositoryAssociation) SetStateReason(v string) *RepositoryAssociation { 4091 s.StateReason = &v 4092 return s 4093} 4094 4095// Summary information about a repository association. The ListRepositoryAssociations 4096// (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_ListRepositoryAssociations.html) 4097// operation returns a list of RepositoryAssociationSummary objects. 4098type RepositoryAssociationSummary struct { 4099 _ struct{} `type:"structure"` 4100 4101 // The Amazon Resource Name (ARN) of the RepositoryAssociation (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociation.html) 4102 // object. You can retrieve this ARN by calling ListRepositoryAssociations (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_ListRepositoryAssociations.html). 4103 AssociationArn *string `min:"1" type:"string"` 4104 4105 // The repository association ID. 4106 AssociationId *string `min:"1" type:"string"` 4107 4108 // The Amazon Resource Name (ARN) of an AWS CodeStar Connections connection. 4109 // Its format is arn:aws:codestar-connections:region-id:aws-account_id:connection/connection-id. 4110 // For more information, see Connection (https://docs.aws.amazon.com/codestar-connections/latest/APIReference/API_Connection.html) 4111 // in the AWS CodeStar Connections API Reference. 4112 ConnectionArn *string `type:"string"` 4113 4114 // The time, in milliseconds since the epoch, since the repository association 4115 // was last updated. 4116 LastUpdatedTimeStamp *time.Time `type:"timestamp"` 4117 4118 // The name of the repository association. 4119 Name *string `min:"1" type:"string"` 4120 4121 // The owner of the repository. For an AWS CodeCommit repository, this is the 4122 // AWS account ID of the account that owns the repository. For a GitHub, GitHub 4123 // Enterprise Server, or Bitbucket repository, this is the username for the 4124 // account that owns the repository. 4125 Owner *string `min:"1" type:"string"` 4126 4127 // The provider type of the repository association. 4128 ProviderType *string `type:"string" enum:"ProviderType"` 4129 4130 // The state of the repository association. 4131 // 4132 // The valid repository association states are: 4133 // 4134 // * Associated: The repository association is complete. 4135 // 4136 // * Associating: CodeGuru Reviewer is: Setting up pull request notifications. 4137 // This is required for pull requests to trigger a CodeGuru Reviewer review. 4138 // If your repository ProviderType is GitHub, GitHub Enterprise Server, or 4139 // Bitbucket, CodeGuru Reviewer creates webhooks in your repository to trigger 4140 // CodeGuru Reviewer reviews. If you delete these webhooks, reviews of code 4141 // in your repository cannot be triggered. Setting up source code access. 4142 // This is required for CodeGuru Reviewer to securely clone code in your 4143 // repository. 4144 // 4145 // * Failed: The repository failed to associate or disassociate. 4146 // 4147 // * Disassociating: CodeGuru Reviewer is removing the repository's pull 4148 // request notifications and source code access. 4149 // 4150 // * Disassociated: CodeGuru Reviewer successfully disassociated the repository. 4151 // You can create a new association with this repository if you want to review 4152 // source code in it later. You can control access to code reviews created 4153 // in an associated repository with tags after it has been disassociated. 4154 // For more information, see Using tags to control access to associated repositories 4155 // (https://docs.aws.amazon.com/codeguru/latest/reviewer-ug/auth-and-access-control-using-tags.html) 4156 // in the Amazon CodeGuru Reviewer User Guide. 4157 State *string `type:"string" enum:"RepositoryAssociationState"` 4158} 4159 4160// String returns the string representation 4161func (s RepositoryAssociationSummary) String() string { 4162 return awsutil.Prettify(s) 4163} 4164 4165// GoString returns the string representation 4166func (s RepositoryAssociationSummary) GoString() string { 4167 return s.String() 4168} 4169 4170// SetAssociationArn sets the AssociationArn field's value. 4171func (s *RepositoryAssociationSummary) SetAssociationArn(v string) *RepositoryAssociationSummary { 4172 s.AssociationArn = &v 4173 return s 4174} 4175 4176// SetAssociationId sets the AssociationId field's value. 4177func (s *RepositoryAssociationSummary) SetAssociationId(v string) *RepositoryAssociationSummary { 4178 s.AssociationId = &v 4179 return s 4180} 4181 4182// SetConnectionArn sets the ConnectionArn field's value. 4183func (s *RepositoryAssociationSummary) SetConnectionArn(v string) *RepositoryAssociationSummary { 4184 s.ConnectionArn = &v 4185 return s 4186} 4187 4188// SetLastUpdatedTimeStamp sets the LastUpdatedTimeStamp field's value. 4189func (s *RepositoryAssociationSummary) SetLastUpdatedTimeStamp(v time.Time) *RepositoryAssociationSummary { 4190 s.LastUpdatedTimeStamp = &v 4191 return s 4192} 4193 4194// SetName sets the Name field's value. 4195func (s *RepositoryAssociationSummary) SetName(v string) *RepositoryAssociationSummary { 4196 s.Name = &v 4197 return s 4198} 4199 4200// SetOwner sets the Owner field's value. 4201func (s *RepositoryAssociationSummary) SetOwner(v string) *RepositoryAssociationSummary { 4202 s.Owner = &v 4203 return s 4204} 4205 4206// SetProviderType sets the ProviderType field's value. 4207func (s *RepositoryAssociationSummary) SetProviderType(v string) *RepositoryAssociationSummary { 4208 s.ProviderType = &v 4209 return s 4210} 4211 4212// SetState sets the State field's value. 4213func (s *RepositoryAssociationSummary) SetState(v string) *RepositoryAssociationSummary { 4214 s.State = &v 4215 return s 4216} 4217 4218// A SourceCodeType (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_SourceCodeType) 4219// that specifies the tip of a branch in an associated repository. 4220type RepositoryHeadSourceCodeType struct { 4221 _ struct{} `type:"structure"` 4222 4223 // The name of the branch in an associated repository. The RepositoryHeadSourceCodeType 4224 // specifies the tip of this branch. 4225 // 4226 // BranchName is a required field 4227 BranchName *string `min:"1" type:"string" required:"true"` 4228} 4229 4230// String returns the string representation 4231func (s RepositoryHeadSourceCodeType) String() string { 4232 return awsutil.Prettify(s) 4233} 4234 4235// GoString returns the string representation 4236func (s RepositoryHeadSourceCodeType) GoString() string { 4237 return s.String() 4238} 4239 4240// Validate inspects the fields of the type to determine if they are valid. 4241func (s *RepositoryHeadSourceCodeType) Validate() error { 4242 invalidParams := request.ErrInvalidParams{Context: "RepositoryHeadSourceCodeType"} 4243 if s.BranchName == nil { 4244 invalidParams.Add(request.NewErrParamRequired("BranchName")) 4245 } 4246 if s.BranchName != nil && len(*s.BranchName) < 1 { 4247 invalidParams.Add(request.NewErrParamMinLen("BranchName", 1)) 4248 } 4249 4250 if invalidParams.Len() > 0 { 4251 return invalidParams 4252 } 4253 return nil 4254} 4255 4256// SetBranchName sets the BranchName field's value. 4257func (s *RepositoryHeadSourceCodeType) SetBranchName(v string) *RepositoryHeadSourceCodeType { 4258 s.BranchName = &v 4259 return s 4260} 4261 4262// The resource specified in the request was not found. 4263type ResourceNotFoundException struct { 4264 _ struct{} `type:"structure"` 4265 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 4266 4267 Message_ *string `locationName:"Message" type:"string"` 4268} 4269 4270// String returns the string representation 4271func (s ResourceNotFoundException) String() string { 4272 return awsutil.Prettify(s) 4273} 4274 4275// GoString returns the string representation 4276func (s ResourceNotFoundException) GoString() string { 4277 return s.String() 4278} 4279 4280func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { 4281 return &ResourceNotFoundException{ 4282 RespMetadata: v, 4283 } 4284} 4285 4286// Code returns the exception type name. 4287func (s *ResourceNotFoundException) Code() string { 4288 return "ResourceNotFoundException" 4289} 4290 4291// Message returns the exception's message. 4292func (s *ResourceNotFoundException) Message() string { 4293 if s.Message_ != nil { 4294 return *s.Message_ 4295 } 4296 return "" 4297} 4298 4299// OrigErr always returns nil, satisfies awserr.Error interface. 4300func (s *ResourceNotFoundException) OrigErr() error { 4301 return nil 4302} 4303 4304func (s *ResourceNotFoundException) Error() string { 4305 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 4306} 4307 4308// Status code returns the HTTP status code for the request's response error. 4309func (s *ResourceNotFoundException) StatusCode() int { 4310 return s.RespMetadata.StatusCode 4311} 4312 4313// RequestID returns the service's response RequestID for request. 4314func (s *ResourceNotFoundException) RequestID() string { 4315 return s.RespMetadata.RequestID 4316} 4317 4318// Specifies the source code that is analyzed in a code review. A code review 4319// can analyze the source code that is specified using a pull request diff or 4320// a branch in an associated repository. 4321type SourceCodeType struct { 4322 _ struct{} `type:"structure"` 4323 4324 // A SourceCodeType (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_SourceCodeType) 4325 // that specifies a commit diff created by a pull request on an associated repository. 4326 CommitDiff *CommitDiffSourceCodeType `type:"structure"` 4327 4328 // A SourceCodeType (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_SourceCodeType) 4329 // that specifies the tip of a branch in an associated repository. 4330 RepositoryHead *RepositoryHeadSourceCodeType `type:"structure"` 4331} 4332 4333// String returns the string representation 4334func (s SourceCodeType) String() string { 4335 return awsutil.Prettify(s) 4336} 4337 4338// GoString returns the string representation 4339func (s SourceCodeType) GoString() string { 4340 return s.String() 4341} 4342 4343// SetCommitDiff sets the CommitDiff field's value. 4344func (s *SourceCodeType) SetCommitDiff(v *CommitDiffSourceCodeType) *SourceCodeType { 4345 s.CommitDiff = v 4346 return s 4347} 4348 4349// SetRepositoryHead sets the RepositoryHead field's value. 4350func (s *SourceCodeType) SetRepositoryHead(v *RepositoryHeadSourceCodeType) *SourceCodeType { 4351 s.RepositoryHead = v 4352 return s 4353} 4354 4355type TagResourceInput struct { 4356 _ struct{} `type:"structure"` 4357 4358 // The Amazon Resource Name (ARN) of the RepositoryAssociation (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociation.html) 4359 // object. You can retrieve this ARN by calling ListRepositoryAssociations (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_ListRepositoryAssociations.html). 4360 // 4361 // ResourceArn is a required field 4362 ResourceArn *string `location:"uri" locationName:"resourceArn" min:"1" type:"string" required:"true"` 4363 4364 // An array of key-value pairs used to tag an associated repository. A tag is 4365 // a custom attribute label with two parts: 4366 // 4367 // * A tag key (for example, CostCenter, Environment, Project, or Secret). 4368 // Tag keys are case sensitive. 4369 // 4370 // * An optional field known as a tag value (for example, 111122223333, Production, 4371 // or a team name). Omitting the tag value is the same as using an empty 4372 // string. Like tag keys, tag values are case sensitive. 4373 // 4374 // Tags is a required field 4375 Tags map[string]*string `min:"1" type:"map" required:"true"` 4376} 4377 4378// String returns the string representation 4379func (s TagResourceInput) String() string { 4380 return awsutil.Prettify(s) 4381} 4382 4383// GoString returns the string representation 4384func (s TagResourceInput) GoString() string { 4385 return s.String() 4386} 4387 4388// Validate inspects the fields of the type to determine if they are valid. 4389func (s *TagResourceInput) Validate() error { 4390 invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} 4391 if s.ResourceArn == nil { 4392 invalidParams.Add(request.NewErrParamRequired("ResourceArn")) 4393 } 4394 if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { 4395 invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) 4396 } 4397 if s.Tags == nil { 4398 invalidParams.Add(request.NewErrParamRequired("Tags")) 4399 } 4400 if s.Tags != nil && len(s.Tags) < 1 { 4401 invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) 4402 } 4403 4404 if invalidParams.Len() > 0 { 4405 return invalidParams 4406 } 4407 return nil 4408} 4409 4410// SetResourceArn sets the ResourceArn field's value. 4411func (s *TagResourceInput) SetResourceArn(v string) *TagResourceInput { 4412 s.ResourceArn = &v 4413 return s 4414} 4415 4416// SetTags sets the Tags field's value. 4417func (s *TagResourceInput) SetTags(v map[string]*string) *TagResourceInput { 4418 s.Tags = v 4419 return s 4420} 4421 4422type TagResourceOutput struct { 4423 _ struct{} `type:"structure"` 4424} 4425 4426// String returns the string representation 4427func (s TagResourceOutput) String() string { 4428 return awsutil.Prettify(s) 4429} 4430 4431// GoString returns the string representation 4432func (s TagResourceOutput) GoString() string { 4433 return s.String() 4434} 4435 4436// Information about a third-party source repository connected to CodeGuru Reviewer. 4437type ThirdPartySourceRepository struct { 4438 _ struct{} `type:"structure"` 4439 4440 // The Amazon Resource Name (ARN) of an AWS CodeStar Connections connection. 4441 // Its format is arn:aws:codestar-connections:region-id:aws-account_id:connection/connection-id. 4442 // For more information, see Connection (https://docs.aws.amazon.com/codestar-connections/latest/APIReference/API_Connection.html) 4443 // in the AWS CodeStar Connections API Reference. 4444 // 4445 // ConnectionArn is a required field 4446 ConnectionArn *string `type:"string" required:"true"` 4447 4448 // The name of the third party source repository. 4449 // 4450 // Name is a required field 4451 Name *string `min:"1" type:"string" required:"true"` 4452 4453 // The owner of the repository. For a GitHub, GitHub Enterprise, or Bitbucket 4454 // repository, this is the username for the account that owns the repository. 4455 // 4456 // Owner is a required field 4457 Owner *string `min:"1" type:"string" required:"true"` 4458} 4459 4460// String returns the string representation 4461func (s ThirdPartySourceRepository) String() string { 4462 return awsutil.Prettify(s) 4463} 4464 4465// GoString returns the string representation 4466func (s ThirdPartySourceRepository) GoString() string { 4467 return s.String() 4468} 4469 4470// Validate inspects the fields of the type to determine if they are valid. 4471func (s *ThirdPartySourceRepository) Validate() error { 4472 invalidParams := request.ErrInvalidParams{Context: "ThirdPartySourceRepository"} 4473 if s.ConnectionArn == nil { 4474 invalidParams.Add(request.NewErrParamRequired("ConnectionArn")) 4475 } 4476 if s.Name == nil { 4477 invalidParams.Add(request.NewErrParamRequired("Name")) 4478 } 4479 if s.Name != nil && len(*s.Name) < 1 { 4480 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 4481 } 4482 if s.Owner == nil { 4483 invalidParams.Add(request.NewErrParamRequired("Owner")) 4484 } 4485 if s.Owner != nil && len(*s.Owner) < 1 { 4486 invalidParams.Add(request.NewErrParamMinLen("Owner", 1)) 4487 } 4488 4489 if invalidParams.Len() > 0 { 4490 return invalidParams 4491 } 4492 return nil 4493} 4494 4495// SetConnectionArn sets the ConnectionArn field's value. 4496func (s *ThirdPartySourceRepository) SetConnectionArn(v string) *ThirdPartySourceRepository { 4497 s.ConnectionArn = &v 4498 return s 4499} 4500 4501// SetName sets the Name field's value. 4502func (s *ThirdPartySourceRepository) SetName(v string) *ThirdPartySourceRepository { 4503 s.Name = &v 4504 return s 4505} 4506 4507// SetOwner sets the Owner field's value. 4508func (s *ThirdPartySourceRepository) SetOwner(v string) *ThirdPartySourceRepository { 4509 s.Owner = &v 4510 return s 4511} 4512 4513// The request was denied due to request throttling. 4514type ThrottlingException struct { 4515 _ struct{} `type:"structure"` 4516 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 4517 4518 Message_ *string `locationName:"Message" type:"string"` 4519} 4520 4521// String returns the string representation 4522func (s ThrottlingException) String() string { 4523 return awsutil.Prettify(s) 4524} 4525 4526// GoString returns the string representation 4527func (s ThrottlingException) GoString() string { 4528 return s.String() 4529} 4530 4531func newErrorThrottlingException(v protocol.ResponseMetadata) error { 4532 return &ThrottlingException{ 4533 RespMetadata: v, 4534 } 4535} 4536 4537// Code returns the exception type name. 4538func (s *ThrottlingException) Code() string { 4539 return "ThrottlingException" 4540} 4541 4542// Message returns the exception's message. 4543func (s *ThrottlingException) Message() string { 4544 if s.Message_ != nil { 4545 return *s.Message_ 4546 } 4547 return "" 4548} 4549 4550// OrigErr always returns nil, satisfies awserr.Error interface. 4551func (s *ThrottlingException) OrigErr() error { 4552 return nil 4553} 4554 4555func (s *ThrottlingException) Error() string { 4556 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 4557} 4558 4559// Status code returns the HTTP status code for the request's response error. 4560func (s *ThrottlingException) StatusCode() int { 4561 return s.RespMetadata.StatusCode 4562} 4563 4564// RequestID returns the service's response RequestID for request. 4565func (s *ThrottlingException) RequestID() string { 4566 return s.RespMetadata.RequestID 4567} 4568 4569type UntagResourceInput struct { 4570 _ struct{} `type:"structure"` 4571 4572 // The Amazon Resource Name (ARN) of the RepositoryAssociation (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociation.html) 4573 // object. You can retrieve this ARN by calling ListRepositoryAssociations (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_ListRepositoryAssociations.html). 4574 // 4575 // ResourceArn is a required field 4576 ResourceArn *string `location:"uri" locationName:"resourceArn" min:"1" type:"string" required:"true"` 4577 4578 // A list of the keys for each tag you want to remove from an associated repository. 4579 // 4580 // TagKeys is a required field 4581 TagKeys []*string `location:"querystring" locationName:"tagKeys" min:"1" type:"list" required:"true"` 4582} 4583 4584// String returns the string representation 4585func (s UntagResourceInput) String() string { 4586 return awsutil.Prettify(s) 4587} 4588 4589// GoString returns the string representation 4590func (s UntagResourceInput) GoString() string { 4591 return s.String() 4592} 4593 4594// Validate inspects the fields of the type to determine if they are valid. 4595func (s *UntagResourceInput) Validate() error { 4596 invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"} 4597 if s.ResourceArn == nil { 4598 invalidParams.Add(request.NewErrParamRequired("ResourceArn")) 4599 } 4600 if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { 4601 invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) 4602 } 4603 if s.TagKeys == nil { 4604 invalidParams.Add(request.NewErrParamRequired("TagKeys")) 4605 } 4606 if s.TagKeys != nil && len(s.TagKeys) < 1 { 4607 invalidParams.Add(request.NewErrParamMinLen("TagKeys", 1)) 4608 } 4609 4610 if invalidParams.Len() > 0 { 4611 return invalidParams 4612 } 4613 return nil 4614} 4615 4616// SetResourceArn sets the ResourceArn field's value. 4617func (s *UntagResourceInput) SetResourceArn(v string) *UntagResourceInput { 4618 s.ResourceArn = &v 4619 return s 4620} 4621 4622// SetTagKeys sets the TagKeys field's value. 4623func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput { 4624 s.TagKeys = v 4625 return s 4626} 4627 4628type UntagResourceOutput struct { 4629 _ struct{} `type:"structure"` 4630} 4631 4632// String returns the string representation 4633func (s UntagResourceOutput) String() string { 4634 return awsutil.Prettify(s) 4635} 4636 4637// GoString returns the string representation 4638func (s UntagResourceOutput) GoString() string { 4639 return s.String() 4640} 4641 4642// The input fails to satisfy the specified constraints. 4643type ValidationException struct { 4644 _ struct{} `type:"structure"` 4645 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 4646 4647 Message_ *string `locationName:"Message" type:"string"` 4648} 4649 4650// String returns the string representation 4651func (s ValidationException) String() string { 4652 return awsutil.Prettify(s) 4653} 4654 4655// GoString returns the string representation 4656func (s ValidationException) GoString() string { 4657 return s.String() 4658} 4659 4660func newErrorValidationException(v protocol.ResponseMetadata) error { 4661 return &ValidationException{ 4662 RespMetadata: v, 4663 } 4664} 4665 4666// Code returns the exception type name. 4667func (s *ValidationException) Code() string { 4668 return "ValidationException" 4669} 4670 4671// Message returns the exception's message. 4672func (s *ValidationException) Message() string { 4673 if s.Message_ != nil { 4674 return *s.Message_ 4675 } 4676 return "" 4677} 4678 4679// OrigErr always returns nil, satisfies awserr.Error interface. 4680func (s *ValidationException) OrigErr() error { 4681 return nil 4682} 4683 4684func (s *ValidationException) Error() string { 4685 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 4686} 4687 4688// Status code returns the HTTP status code for the request's response error. 4689func (s *ValidationException) StatusCode() int { 4690 return s.RespMetadata.StatusCode 4691} 4692 4693// RequestID returns the service's response RequestID for request. 4694func (s *ValidationException) RequestID() string { 4695 return s.RespMetadata.RequestID 4696} 4697 4698const ( 4699 // EncryptionOptionAwsOwnedCmk is a EncryptionOption enum value 4700 EncryptionOptionAwsOwnedCmk = "AWS_OWNED_CMK" 4701 4702 // EncryptionOptionCustomerManagedCmk is a EncryptionOption enum value 4703 EncryptionOptionCustomerManagedCmk = "CUSTOMER_MANAGED_CMK" 4704) 4705 4706// EncryptionOption_Values returns all elements of the EncryptionOption enum 4707func EncryptionOption_Values() []string { 4708 return []string{ 4709 EncryptionOptionAwsOwnedCmk, 4710 EncryptionOptionCustomerManagedCmk, 4711 } 4712} 4713 4714const ( 4715 // JobStateCompleted is a JobState enum value 4716 JobStateCompleted = "Completed" 4717 4718 // JobStatePending is a JobState enum value 4719 JobStatePending = "Pending" 4720 4721 // JobStateFailed is a JobState enum value 4722 JobStateFailed = "Failed" 4723 4724 // JobStateDeleting is a JobState enum value 4725 JobStateDeleting = "Deleting" 4726) 4727 4728// JobState_Values returns all elements of the JobState enum 4729func JobState_Values() []string { 4730 return []string{ 4731 JobStateCompleted, 4732 JobStatePending, 4733 JobStateFailed, 4734 JobStateDeleting, 4735 } 4736} 4737 4738const ( 4739 // ProviderTypeCodeCommit is a ProviderType enum value 4740 ProviderTypeCodeCommit = "CodeCommit" 4741 4742 // ProviderTypeGitHub is a ProviderType enum value 4743 ProviderTypeGitHub = "GitHub" 4744 4745 // ProviderTypeBitbucket is a ProviderType enum value 4746 ProviderTypeBitbucket = "Bitbucket" 4747 4748 // ProviderTypeGitHubEnterpriseServer is a ProviderType enum value 4749 ProviderTypeGitHubEnterpriseServer = "GitHubEnterpriseServer" 4750) 4751 4752// ProviderType_Values returns all elements of the ProviderType enum 4753func ProviderType_Values() []string { 4754 return []string{ 4755 ProviderTypeCodeCommit, 4756 ProviderTypeGitHub, 4757 ProviderTypeBitbucket, 4758 ProviderTypeGitHubEnterpriseServer, 4759 } 4760} 4761 4762const ( 4763 // ReactionThumbsUp is a Reaction enum value 4764 ReactionThumbsUp = "ThumbsUp" 4765 4766 // ReactionThumbsDown is a Reaction enum value 4767 ReactionThumbsDown = "ThumbsDown" 4768) 4769 4770// Reaction_Values returns all elements of the Reaction enum 4771func Reaction_Values() []string { 4772 return []string{ 4773 ReactionThumbsUp, 4774 ReactionThumbsDown, 4775 } 4776} 4777 4778const ( 4779 // RepositoryAssociationStateAssociated is a RepositoryAssociationState enum value 4780 RepositoryAssociationStateAssociated = "Associated" 4781 4782 // RepositoryAssociationStateAssociating is a RepositoryAssociationState enum value 4783 RepositoryAssociationStateAssociating = "Associating" 4784 4785 // RepositoryAssociationStateFailed is a RepositoryAssociationState enum value 4786 RepositoryAssociationStateFailed = "Failed" 4787 4788 // RepositoryAssociationStateDisassociating is a RepositoryAssociationState enum value 4789 RepositoryAssociationStateDisassociating = "Disassociating" 4790 4791 // RepositoryAssociationStateDisassociated is a RepositoryAssociationState enum value 4792 RepositoryAssociationStateDisassociated = "Disassociated" 4793) 4794 4795// RepositoryAssociationState_Values returns all elements of the RepositoryAssociationState enum 4796func RepositoryAssociationState_Values() []string { 4797 return []string{ 4798 RepositoryAssociationStateAssociated, 4799 RepositoryAssociationStateAssociating, 4800 RepositoryAssociationStateFailed, 4801 RepositoryAssociationStateDisassociating, 4802 RepositoryAssociationStateDisassociated, 4803 } 4804} 4805 4806const ( 4807 // TypePullRequest is a Type enum value 4808 TypePullRequest = "PullRequest" 4809 4810 // TypeRepositoryAnalysis is a Type enum value 4811 TypeRepositoryAnalysis = "RepositoryAnalysis" 4812) 4813 4814// Type_Values returns all elements of the Type enum 4815func Type_Values() []string { 4816 return []string{ 4817 TypePullRequest, 4818 TypeRepositoryAnalysis, 4819 } 4820} 4821