github.com/aavshr/aws-sdk-go@v1.41.3/service/codegurureviewer/api.go (about) 1 // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. 2 3 package codegurureviewer 4 5 import ( 6 "fmt" 7 "time" 8 9 "github.com/aavshr/aws-sdk-go/aws" 10 "github.com/aavshr/aws-sdk-go/aws/awsutil" 11 "github.com/aavshr/aws-sdk-go/aws/request" 12 "github.com/aavshr/aws-sdk-go/private/protocol" 13 "github.com/aavshr/aws-sdk-go/private/protocol/restjson" 14 ) 15 16 const 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 42 func (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 Amazon Web Services CodeCommit repository or a repostory 61 // managed by Amazon Web Services CodeStar Connections with Amazon CodeGuru 62 // Reviewer. When you associate a repository, CodeGuru Reviewer reviews source 63 // code changes in the repository's pull requests and provides automatic recommendations. 64 // You can view recommendations using the CodeGuru Reviewer console. For more 65 // information, see Recommendations 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 or S3 repository, it must be in the same Amazon 69 // Web Services Region and Amazon Web Services account where its CodeGuru Reviewer 70 // code reviews are configured. 71 // 72 // Bitbucket and GitHub Enterprise Server repositories are managed by Amazon 73 // Web Services CodeStar Connections to connect to CodeGuru Reviewer. For more 74 // information, see Associate a repository (https://docs.aws.amazon.com/codeguru/latest/reviewer-ug/getting-started-associate-repository.html) 75 // in the Amazon CodeGuru Reviewer User Guide. 76 // 77 // You cannot use the CodeGuru Reviewer SDK or the Amazon Web Services CLI to 78 // associate a GitHub repository with Amazon CodeGuru Reviewer. To associate 79 // a GitHub repository, use the console. For more information, see Getting started 80 // with CodeGuru Reviewer (https://docs.aws.amazon.com/codeguru/latest/reviewer-ug/getting-started-with-guru.html) 81 // in the CodeGuru Reviewer User Guide. 82 // 83 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 84 // with awserr.Error's Code and Message methods to get detailed information about 85 // the error. 86 // 87 // See the AWS API reference guide for Amazon CodeGuru Reviewer's 88 // API operation AssociateRepository for usage and error information. 89 // 90 // Returned Error Types: 91 // * InternalServerException 92 // The server encountered an internal error and is unable to complete the request. 93 // 94 // * ValidationException 95 // The input fails to satisfy the specified constraints. 96 // 97 // * AccessDeniedException 98 // You do not have sufficient access to perform this action. 99 // 100 // * ConflictException 101 // The requested operation would cause a conflict with the current state of 102 // a service resource associated with the request. Resolve the conflict before 103 // retrying this request. 104 // 105 // * ThrottlingException 106 // The request was denied due to request throttling. 107 // 108 // See also, https://docs.aws.amazon.com/goto/WebAPI/codeguru-reviewer-2019-09-19/AssociateRepository 109 func (c *CodeGuruReviewer) AssociateRepository(input *AssociateRepositoryInput) (*AssociateRepositoryOutput, error) { 110 req, out := c.AssociateRepositoryRequest(input) 111 return out, req.Send() 112 } 113 114 // AssociateRepositoryWithContext is the same as AssociateRepository with the addition of 115 // the ability to pass a context and additional request options. 116 // 117 // See AssociateRepository for details on how to use this API operation. 118 // 119 // The context must be non-nil and will be used for request cancellation. If 120 // the context is nil a panic will occur. In the future the SDK may create 121 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 122 // for more information on using Contexts. 123 func (c *CodeGuruReviewer) AssociateRepositoryWithContext(ctx aws.Context, input *AssociateRepositoryInput, opts ...request.Option) (*AssociateRepositoryOutput, error) { 124 req, out := c.AssociateRepositoryRequest(input) 125 req.SetContext(ctx) 126 req.ApplyOptions(opts...) 127 return out, req.Send() 128 } 129 130 const opCreateCodeReview = "CreateCodeReview" 131 132 // CreateCodeReviewRequest generates a "aws/request.Request" representing the 133 // client's request for the CreateCodeReview operation. The "output" return 134 // value will be populated with the request's response once the request completes 135 // successfully. 136 // 137 // Use "Send" method on the returned Request to send the API call to the service. 138 // the "output" return value is not valid until after Send returns without error. 139 // 140 // See CreateCodeReview for more information on using the CreateCodeReview 141 // API call, and error handling. 142 // 143 // This method is useful when you want to inject custom logic or configuration 144 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 145 // 146 // 147 // // Example sending a request using the CreateCodeReviewRequest method. 148 // req, resp := client.CreateCodeReviewRequest(params) 149 // 150 // err := req.Send() 151 // if err == nil { // resp is now filled 152 // fmt.Println(resp) 153 // } 154 // 155 // See also, https://docs.aws.amazon.com/goto/WebAPI/codeguru-reviewer-2019-09-19/CreateCodeReview 156 func (c *CodeGuruReviewer) CreateCodeReviewRequest(input *CreateCodeReviewInput) (req *request.Request, output *CreateCodeReviewOutput) { 157 op := &request.Operation{ 158 Name: opCreateCodeReview, 159 HTTPMethod: "POST", 160 HTTPPath: "/codereviews", 161 } 162 163 if input == nil { 164 input = &CreateCodeReviewInput{} 165 } 166 167 output = &CreateCodeReviewOutput{} 168 req = c.newRequest(op, input, output) 169 return 170 } 171 172 // CreateCodeReview API operation for Amazon CodeGuru Reviewer. 173 // 174 // Use to create a code review with a CodeReviewType (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_CodeReviewType.html) 175 // of RepositoryAnalysis. This type of code review analyzes all code under a 176 // specified branch in an associated repository. PullRequest code reviews are 177 // automatically triggered by a pull request. 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 208 func (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. 222 func (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 229 const 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 255 func (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 299 func (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. 313 func (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 320 const 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 346 func (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 390 func (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. 404 func (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 411 const 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 437 func (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 482 func (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. 496 func (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 503 const 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 529 func (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 578 func (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. 592 func (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 599 const 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 625 func (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 672 func (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. 686 func (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 // 710 func (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. 721 func (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 745 const 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 771 func (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 823 func (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. 837 func (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 // 861 func (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. 872 func (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 896 const 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 922 func (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 972 func (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. 986 func (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 // 1010 func (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. 1021 func (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 1045 const 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 1071 func (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 1120 func (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. 1134 func (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 // 1158 func (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. 1169 func (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 1193 const 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 1219 func (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 1257 func (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. 1271 func (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 1278 const 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 1304 func (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 1350 func (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. 1364 func (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 1371 const 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 1397 func (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 1436 func (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. 1450 func (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 1457 const 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 1483 func (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 1522 func (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. 1536 func (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. 1544 type 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. 1552 // 1553 // API parameter values that are decorated as "sensitive" in the API will not 1554 // be included in the string output. The member name will be present, but the 1555 // value will be replaced with "sensitive". 1556 func (s AccessDeniedException) String() string { 1557 return awsutil.Prettify(s) 1558 } 1559 1560 // GoString returns the string representation. 1561 // 1562 // API parameter values that are decorated as "sensitive" in the API will not 1563 // be included in the string output. The member name will be present, but the 1564 // value will be replaced with "sensitive". 1565 func (s AccessDeniedException) GoString() string { 1566 return s.String() 1567 } 1568 1569 func newErrorAccessDeniedException(v protocol.ResponseMetadata) error { 1570 return &AccessDeniedException{ 1571 RespMetadata: v, 1572 } 1573 } 1574 1575 // Code returns the exception type name. 1576 func (s *AccessDeniedException) Code() string { 1577 return "AccessDeniedException" 1578 } 1579 1580 // Message returns the exception's message. 1581 func (s *AccessDeniedException) Message() string { 1582 if s.Message_ != nil { 1583 return *s.Message_ 1584 } 1585 return "" 1586 } 1587 1588 // OrigErr always returns nil, satisfies awserr.Error interface. 1589 func (s *AccessDeniedException) OrigErr() error { 1590 return nil 1591 } 1592 1593 func (s *AccessDeniedException) Error() string { 1594 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1595 } 1596 1597 // Status code returns the HTTP status code for the request's response error. 1598 func (s *AccessDeniedException) StatusCode() int { 1599 return s.RespMetadata.StatusCode 1600 } 1601 1602 // RequestID returns the service's response RequestID for request. 1603 func (s *AccessDeniedException) RequestID() string { 1604 return s.RespMetadata.RequestID 1605 } 1606 1607 type AssociateRepositoryInput struct { 1608 _ struct{} `type:"structure"` 1609 1610 // Amazon CodeGuru Reviewer uses this value to prevent the accidental creation 1611 // of duplicate repository associations if there are failures and retries. 1612 ClientRequestToken *string `min:"1" type:"string" idempotencyToken:"true"` 1613 1614 // A KMSKeyDetails object that contains: 1615 // 1616 // * The encryption option for this repository association. It is either 1617 // owned by Amazon Web Services Key Management Service (KMS) (AWS_OWNED_CMK) 1618 // or customer managed (CUSTOMER_MANAGED_CMK). 1619 // 1620 // * The ID of the Amazon Web Services KMS key that is associated with this 1621 // respository association. 1622 KMSKeyDetails *KMSKeyDetails `type:"structure"` 1623 1624 // The repository to associate. 1625 // 1626 // Repository is a required field 1627 Repository *Repository `type:"structure" required:"true"` 1628 1629 // An array of key-value pairs used to tag an associated repository. A tag is 1630 // a custom attribute label with two parts: 1631 // 1632 // * A tag key (for example, CostCenter, Environment, Project, or Secret). 1633 // Tag keys are case sensitive. 1634 // 1635 // * An optional field known as a tag value (for example, 111122223333, Production, 1636 // or a team name). Omitting the tag value is the same as using an empty 1637 // string. Like tag keys, tag values are case sensitive. 1638 Tags map[string]*string `min:"1" type:"map"` 1639 } 1640 1641 // String returns the string representation. 1642 // 1643 // API parameter values that are decorated as "sensitive" in the API will not 1644 // be included in the string output. The member name will be present, but the 1645 // value will be replaced with "sensitive". 1646 func (s AssociateRepositoryInput) String() string { 1647 return awsutil.Prettify(s) 1648 } 1649 1650 // GoString returns the string representation. 1651 // 1652 // API parameter values that are decorated as "sensitive" in the API will not 1653 // be included in the string output. The member name will be present, but the 1654 // value will be replaced with "sensitive". 1655 func (s AssociateRepositoryInput) GoString() string { 1656 return s.String() 1657 } 1658 1659 // Validate inspects the fields of the type to determine if they are valid. 1660 func (s *AssociateRepositoryInput) Validate() error { 1661 invalidParams := request.ErrInvalidParams{Context: "AssociateRepositoryInput"} 1662 if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 { 1663 invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1)) 1664 } 1665 if s.Repository == nil { 1666 invalidParams.Add(request.NewErrParamRequired("Repository")) 1667 } 1668 if s.Tags != nil && len(s.Tags) < 1 { 1669 invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) 1670 } 1671 if s.KMSKeyDetails != nil { 1672 if err := s.KMSKeyDetails.Validate(); err != nil { 1673 invalidParams.AddNested("KMSKeyDetails", err.(request.ErrInvalidParams)) 1674 } 1675 } 1676 if s.Repository != nil { 1677 if err := s.Repository.Validate(); err != nil { 1678 invalidParams.AddNested("Repository", err.(request.ErrInvalidParams)) 1679 } 1680 } 1681 1682 if invalidParams.Len() > 0 { 1683 return invalidParams 1684 } 1685 return nil 1686 } 1687 1688 // SetClientRequestToken sets the ClientRequestToken field's value. 1689 func (s *AssociateRepositoryInput) SetClientRequestToken(v string) *AssociateRepositoryInput { 1690 s.ClientRequestToken = &v 1691 return s 1692 } 1693 1694 // SetKMSKeyDetails sets the KMSKeyDetails field's value. 1695 func (s *AssociateRepositoryInput) SetKMSKeyDetails(v *KMSKeyDetails) *AssociateRepositoryInput { 1696 s.KMSKeyDetails = v 1697 return s 1698 } 1699 1700 // SetRepository sets the Repository field's value. 1701 func (s *AssociateRepositoryInput) SetRepository(v *Repository) *AssociateRepositoryInput { 1702 s.Repository = v 1703 return s 1704 } 1705 1706 // SetTags sets the Tags field's value. 1707 func (s *AssociateRepositoryInput) SetTags(v map[string]*string) *AssociateRepositoryInput { 1708 s.Tags = v 1709 return s 1710 } 1711 1712 type AssociateRepositoryOutput struct { 1713 _ struct{} `type:"structure"` 1714 1715 // Information about the repository association. 1716 RepositoryAssociation *RepositoryAssociation `type:"structure"` 1717 1718 // An array of key-value pairs used to tag an associated repository. A tag is 1719 // a custom attribute label with two parts: 1720 // 1721 // * A tag key (for example, CostCenter, Environment, Project, or Secret). 1722 // Tag keys are case sensitive. 1723 // 1724 // * An optional field known as a tag value (for example, 111122223333, Production, 1725 // or a team name). Omitting the tag value is the same as using an empty 1726 // string. Like tag keys, tag values are case sensitive. 1727 Tags map[string]*string `min:"1" type:"map"` 1728 } 1729 1730 // String returns the string representation. 1731 // 1732 // API parameter values that are decorated as "sensitive" in the API will not 1733 // be included in the string output. The member name will be present, but the 1734 // value will be replaced with "sensitive". 1735 func (s AssociateRepositoryOutput) String() string { 1736 return awsutil.Prettify(s) 1737 } 1738 1739 // GoString returns the string representation. 1740 // 1741 // API parameter values that are decorated as "sensitive" in the API will not 1742 // be included in the string output. The member name will be present, but the 1743 // value will be replaced with "sensitive". 1744 func (s AssociateRepositoryOutput) GoString() string { 1745 return s.String() 1746 } 1747 1748 // SetRepositoryAssociation sets the RepositoryAssociation field's value. 1749 func (s *AssociateRepositoryOutput) SetRepositoryAssociation(v *RepositoryAssociation) *AssociateRepositoryOutput { 1750 s.RepositoryAssociation = v 1751 return s 1752 } 1753 1754 // SetTags sets the Tags field's value. 1755 func (s *AssociateRepositoryOutput) SetTags(v map[string]*string) *AssociateRepositoryOutput { 1756 s.Tags = v 1757 return s 1758 } 1759 1760 // A type of SourceCodeType (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_SourceCodeType) 1761 // that specifies a code diff between a source and destination branch in an 1762 // associated repository. 1763 type BranchDiffSourceCodeType struct { 1764 _ struct{} `type:"structure"` 1765 1766 // The destination branch for a diff in an associated repository. 1767 // 1768 // DestinationBranchName is a required field 1769 DestinationBranchName *string `min:"1" type:"string" required:"true"` 1770 1771 // The source branch for a diff in an associated repository. 1772 // 1773 // SourceBranchName is a required field 1774 SourceBranchName *string `min:"1" type:"string" required:"true"` 1775 } 1776 1777 // String returns the string representation. 1778 // 1779 // API parameter values that are decorated as "sensitive" in the API will not 1780 // be included in the string output. The member name will be present, but the 1781 // value will be replaced with "sensitive". 1782 func (s BranchDiffSourceCodeType) String() string { 1783 return awsutil.Prettify(s) 1784 } 1785 1786 // GoString returns the string representation. 1787 // 1788 // API parameter values that are decorated as "sensitive" in the API will not 1789 // be included in the string output. The member name will be present, but the 1790 // value will be replaced with "sensitive". 1791 func (s BranchDiffSourceCodeType) GoString() string { 1792 return s.String() 1793 } 1794 1795 // Validate inspects the fields of the type to determine if they are valid. 1796 func (s *BranchDiffSourceCodeType) Validate() error { 1797 invalidParams := request.ErrInvalidParams{Context: "BranchDiffSourceCodeType"} 1798 if s.DestinationBranchName == nil { 1799 invalidParams.Add(request.NewErrParamRequired("DestinationBranchName")) 1800 } 1801 if s.DestinationBranchName != nil && len(*s.DestinationBranchName) < 1 { 1802 invalidParams.Add(request.NewErrParamMinLen("DestinationBranchName", 1)) 1803 } 1804 if s.SourceBranchName == nil { 1805 invalidParams.Add(request.NewErrParamRequired("SourceBranchName")) 1806 } 1807 if s.SourceBranchName != nil && len(*s.SourceBranchName) < 1 { 1808 invalidParams.Add(request.NewErrParamMinLen("SourceBranchName", 1)) 1809 } 1810 1811 if invalidParams.Len() > 0 { 1812 return invalidParams 1813 } 1814 return nil 1815 } 1816 1817 // SetDestinationBranchName sets the DestinationBranchName field's value. 1818 func (s *BranchDiffSourceCodeType) SetDestinationBranchName(v string) *BranchDiffSourceCodeType { 1819 s.DestinationBranchName = &v 1820 return s 1821 } 1822 1823 // SetSourceBranchName sets the SourceBranchName field's value. 1824 func (s *BranchDiffSourceCodeType) SetSourceBranchName(v string) *BranchDiffSourceCodeType { 1825 s.SourceBranchName = &v 1826 return s 1827 } 1828 1829 // Code artifacts are source code artifacts and build artifacts used in a repository 1830 // analysis or a pull request review. 1831 // 1832 // * Source code artifacts are source code files in a Git repository that 1833 // are compressed into a .zip file. 1834 // 1835 // * Build artifacts are .jar or .class files that are compressed in a .zip 1836 // file. 1837 type CodeArtifacts struct { 1838 _ struct{} `type:"structure"` 1839 1840 // The S3 object key for a build artifacts .zip file that contains .jar or .class 1841 // files. This is required for a code review with security analysis. For more 1842 // information, see Create code reviews with security analysis (https://docs.aws.amazon.com/codeguru/latest/reviewer-ug/code-review-security.html) 1843 // in the Amazon CodeGuru Reviewer User Guide. 1844 BuildArtifactsObjectKey *string `min:"1" type:"string"` 1845 1846 // The S3 object key for a source code .zip file. This is required for all code 1847 // reviews. 1848 // 1849 // SourceCodeArtifactsObjectKey is a required field 1850 SourceCodeArtifactsObjectKey *string `min:"1" type:"string" required:"true"` 1851 } 1852 1853 // String returns the string representation. 1854 // 1855 // API parameter values that are decorated as "sensitive" in the API will not 1856 // be included in the string output. The member name will be present, but the 1857 // value will be replaced with "sensitive". 1858 func (s CodeArtifacts) String() string { 1859 return awsutil.Prettify(s) 1860 } 1861 1862 // GoString returns the string representation. 1863 // 1864 // API parameter values that are decorated as "sensitive" in the API will not 1865 // be included in the string output. The member name will be present, but the 1866 // value will be replaced with "sensitive". 1867 func (s CodeArtifacts) GoString() string { 1868 return s.String() 1869 } 1870 1871 // Validate inspects the fields of the type to determine if they are valid. 1872 func (s *CodeArtifacts) Validate() error { 1873 invalidParams := request.ErrInvalidParams{Context: "CodeArtifacts"} 1874 if s.BuildArtifactsObjectKey != nil && len(*s.BuildArtifactsObjectKey) < 1 { 1875 invalidParams.Add(request.NewErrParamMinLen("BuildArtifactsObjectKey", 1)) 1876 } 1877 if s.SourceCodeArtifactsObjectKey == nil { 1878 invalidParams.Add(request.NewErrParamRequired("SourceCodeArtifactsObjectKey")) 1879 } 1880 if s.SourceCodeArtifactsObjectKey != nil && len(*s.SourceCodeArtifactsObjectKey) < 1 { 1881 invalidParams.Add(request.NewErrParamMinLen("SourceCodeArtifactsObjectKey", 1)) 1882 } 1883 1884 if invalidParams.Len() > 0 { 1885 return invalidParams 1886 } 1887 return nil 1888 } 1889 1890 // SetBuildArtifactsObjectKey sets the BuildArtifactsObjectKey field's value. 1891 func (s *CodeArtifacts) SetBuildArtifactsObjectKey(v string) *CodeArtifacts { 1892 s.BuildArtifactsObjectKey = &v 1893 return s 1894 } 1895 1896 // SetSourceCodeArtifactsObjectKey sets the SourceCodeArtifactsObjectKey field's value. 1897 func (s *CodeArtifacts) SetSourceCodeArtifactsObjectKey(v string) *CodeArtifacts { 1898 s.SourceCodeArtifactsObjectKey = &v 1899 return s 1900 } 1901 1902 // Information about an Amazon Web Services CodeCommit repository. The CodeCommit 1903 // repository must be in the same Amazon Web Services Region and Amazon Web 1904 // Services account where its CodeGuru Reviewer code reviews are configured. 1905 type CodeCommitRepository struct { 1906 _ struct{} `type:"structure"` 1907 1908 // The name of the Amazon Web Services CodeCommit repository. For more information, 1909 // see repositoryName (https://docs.aws.amazon.com/codecommit/latest/APIReference/API_GetRepository.html#CodeCommit-GetRepository-request-repositoryName) 1910 // in the Amazon Web Services CodeCommit API Reference. 1911 // 1912 // Name is a required field 1913 Name *string `min:"1" type:"string" required:"true"` 1914 } 1915 1916 // String returns the string representation. 1917 // 1918 // API parameter values that are decorated as "sensitive" in the API will not 1919 // be included in the string output. The member name will be present, but the 1920 // value will be replaced with "sensitive". 1921 func (s CodeCommitRepository) String() string { 1922 return awsutil.Prettify(s) 1923 } 1924 1925 // GoString returns the string representation. 1926 // 1927 // API parameter values that are decorated as "sensitive" in the API will not 1928 // be included in the string output. The member name will be present, but the 1929 // value will be replaced with "sensitive". 1930 func (s CodeCommitRepository) GoString() string { 1931 return s.String() 1932 } 1933 1934 // Validate inspects the fields of the type to determine if they are valid. 1935 func (s *CodeCommitRepository) Validate() error { 1936 invalidParams := request.ErrInvalidParams{Context: "CodeCommitRepository"} 1937 if s.Name == nil { 1938 invalidParams.Add(request.NewErrParamRequired("Name")) 1939 } 1940 if s.Name != nil && len(*s.Name) < 1 { 1941 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 1942 } 1943 1944 if invalidParams.Len() > 0 { 1945 return invalidParams 1946 } 1947 return nil 1948 } 1949 1950 // SetName sets the Name field's value. 1951 func (s *CodeCommitRepository) SetName(v string) *CodeCommitRepository { 1952 s.Name = &v 1953 return s 1954 } 1955 1956 // Information about a code review. A code review belongs to the associated 1957 // repository that contains the reviewed code. 1958 type CodeReview struct { 1959 _ struct{} `type:"structure"` 1960 1961 // They types of analysis performed during a repository analysis or a pull request 1962 // review. You can specify either Security, CodeQuality, or both. 1963 AnalysisTypes []*string `type:"list"` 1964 1965 // The Amazon Resource Name (ARN) of the RepositoryAssociation (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociation.html) 1966 // that contains the reviewed source code. You can retrieve associated repository 1967 // ARNs by calling ListRepositoryAssociations (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_ListRepositoryAssociations.html). 1968 AssociationArn *string `min:"1" type:"string"` 1969 1970 // The Amazon Resource Name (ARN) of the CodeReview (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_CodeReview.html) 1971 // object. 1972 CodeReviewArn *string `min:"1" type:"string"` 1973 1974 // The time, in milliseconds since the epoch, when the code review was created. 1975 CreatedTimeStamp *time.Time `type:"timestamp"` 1976 1977 // The time, in milliseconds since the epoch, when the code review was last 1978 // updated. 1979 LastUpdatedTimeStamp *time.Time `type:"timestamp"` 1980 1981 // The statistics from the code review. 1982 Metrics *Metrics `type:"structure"` 1983 1984 // The name of the code review. 1985 Name *string `min:"1" type:"string"` 1986 1987 // The owner of the repository. For an Amazon Web Services CodeCommit repository, 1988 // this is the Amazon Web Services account ID of the account that owns the repository. 1989 // For a GitHub, GitHub Enterprise Server, or Bitbucket repository, this is 1990 // the username for the account that owns the repository. For an S3 repository, 1991 // it can be the username or Amazon Web Services account ID. 1992 Owner *string `min:"1" type:"string"` 1993 1994 // The type of repository that contains the reviewed code (for example, GitHub 1995 // or Bitbucket). 1996 ProviderType *string `type:"string" enum:"ProviderType"` 1997 1998 // The pull request ID for the code review. 1999 PullRequestId *string `min:"1" type:"string"` 2000 2001 // The name of the repository. 2002 RepositoryName *string `min:"1" type:"string"` 2003 2004 // The type of the source code for the code review. 2005 SourceCodeType *SourceCodeType `type:"structure"` 2006 2007 // The valid code review states are: 2008 // 2009 // * Completed: The code review is complete. 2010 // 2011 // * Pending: The code review started and has not completed or failed. 2012 // 2013 // * Failed: The code review failed. 2014 // 2015 // * Deleting: The code review is being deleted. 2016 State *string `type:"string" enum:"JobState"` 2017 2018 // The reason for the state of the code review. 2019 StateReason *string `type:"string"` 2020 2021 // The type of code review. 2022 Type *string `type:"string" enum:"Type"` 2023 } 2024 2025 // String returns the string representation. 2026 // 2027 // API parameter values that are decorated as "sensitive" in the API will not 2028 // be included in the string output. The member name will be present, but the 2029 // value will be replaced with "sensitive". 2030 func (s CodeReview) String() string { 2031 return awsutil.Prettify(s) 2032 } 2033 2034 // GoString returns the string representation. 2035 // 2036 // API parameter values that are decorated as "sensitive" in the API will not 2037 // be included in the string output. The member name will be present, but the 2038 // value will be replaced with "sensitive". 2039 func (s CodeReview) GoString() string { 2040 return s.String() 2041 } 2042 2043 // SetAnalysisTypes sets the AnalysisTypes field's value. 2044 func (s *CodeReview) SetAnalysisTypes(v []*string) *CodeReview { 2045 s.AnalysisTypes = v 2046 return s 2047 } 2048 2049 // SetAssociationArn sets the AssociationArn field's value. 2050 func (s *CodeReview) SetAssociationArn(v string) *CodeReview { 2051 s.AssociationArn = &v 2052 return s 2053 } 2054 2055 // SetCodeReviewArn sets the CodeReviewArn field's value. 2056 func (s *CodeReview) SetCodeReviewArn(v string) *CodeReview { 2057 s.CodeReviewArn = &v 2058 return s 2059 } 2060 2061 // SetCreatedTimeStamp sets the CreatedTimeStamp field's value. 2062 func (s *CodeReview) SetCreatedTimeStamp(v time.Time) *CodeReview { 2063 s.CreatedTimeStamp = &v 2064 return s 2065 } 2066 2067 // SetLastUpdatedTimeStamp sets the LastUpdatedTimeStamp field's value. 2068 func (s *CodeReview) SetLastUpdatedTimeStamp(v time.Time) *CodeReview { 2069 s.LastUpdatedTimeStamp = &v 2070 return s 2071 } 2072 2073 // SetMetrics sets the Metrics field's value. 2074 func (s *CodeReview) SetMetrics(v *Metrics) *CodeReview { 2075 s.Metrics = v 2076 return s 2077 } 2078 2079 // SetName sets the Name field's value. 2080 func (s *CodeReview) SetName(v string) *CodeReview { 2081 s.Name = &v 2082 return s 2083 } 2084 2085 // SetOwner sets the Owner field's value. 2086 func (s *CodeReview) SetOwner(v string) *CodeReview { 2087 s.Owner = &v 2088 return s 2089 } 2090 2091 // SetProviderType sets the ProviderType field's value. 2092 func (s *CodeReview) SetProviderType(v string) *CodeReview { 2093 s.ProviderType = &v 2094 return s 2095 } 2096 2097 // SetPullRequestId sets the PullRequestId field's value. 2098 func (s *CodeReview) SetPullRequestId(v string) *CodeReview { 2099 s.PullRequestId = &v 2100 return s 2101 } 2102 2103 // SetRepositoryName sets the RepositoryName field's value. 2104 func (s *CodeReview) SetRepositoryName(v string) *CodeReview { 2105 s.RepositoryName = &v 2106 return s 2107 } 2108 2109 // SetSourceCodeType sets the SourceCodeType field's value. 2110 func (s *CodeReview) SetSourceCodeType(v *SourceCodeType) *CodeReview { 2111 s.SourceCodeType = v 2112 return s 2113 } 2114 2115 // SetState sets the State field's value. 2116 func (s *CodeReview) SetState(v string) *CodeReview { 2117 s.State = &v 2118 return s 2119 } 2120 2121 // SetStateReason sets the StateReason field's value. 2122 func (s *CodeReview) SetStateReason(v string) *CodeReview { 2123 s.StateReason = &v 2124 return s 2125 } 2126 2127 // SetType sets the Type field's value. 2128 func (s *CodeReview) SetType(v string) *CodeReview { 2129 s.Type = &v 2130 return s 2131 } 2132 2133 // Information about the summary of the code review. 2134 type CodeReviewSummary struct { 2135 _ struct{} `type:"structure"` 2136 2137 // The Amazon Resource Name (ARN) of the CodeReview (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_CodeReview.html) 2138 // object. 2139 CodeReviewArn *string `min:"1" type:"string"` 2140 2141 // The time, in milliseconds since the epoch, when the code review was created. 2142 CreatedTimeStamp *time.Time `type:"timestamp"` 2143 2144 // The time, in milliseconds since the epoch, when the code review was last 2145 // updated. 2146 LastUpdatedTimeStamp *time.Time `type:"timestamp"` 2147 2148 // The statistics from the code review. 2149 MetricsSummary *MetricsSummary `type:"structure"` 2150 2151 // The name of the code review. 2152 Name *string `min:"1" type:"string"` 2153 2154 // The owner of the repository. For an Amazon Web Services CodeCommit repository, 2155 // this is the Amazon Web Services account ID of the account that owns the repository. 2156 // For a GitHub, GitHub Enterprise Server, or Bitbucket repository, this is 2157 // the username for the account that owns the repository. For an S3 repository, 2158 // it can be the username or Amazon Web Services account ID. 2159 Owner *string `min:"1" type:"string"` 2160 2161 // The provider type of the repository association. 2162 ProviderType *string `type:"string" enum:"ProviderType"` 2163 2164 // The pull request ID for the code review. 2165 PullRequestId *string `min:"1" type:"string"` 2166 2167 // The name of the repository. 2168 RepositoryName *string `min:"1" type:"string"` 2169 2170 // Specifies the source code that is analyzed in a code review. 2171 SourceCodeType *SourceCodeType `type:"structure"` 2172 2173 // The state of the code review. 2174 // 2175 // The valid code review states are: 2176 // 2177 // * Completed: The code review is complete. 2178 // 2179 // * Pending: The code review started and has not completed or failed. 2180 // 2181 // * Failed: The code review failed. 2182 // 2183 // * Deleting: The code review is being deleted. 2184 State *string `type:"string" enum:"JobState"` 2185 2186 // The type of the code review. 2187 Type *string `type:"string" enum:"Type"` 2188 } 2189 2190 // String returns the string representation. 2191 // 2192 // API parameter values that are decorated as "sensitive" in the API will not 2193 // be included in the string output. The member name will be present, but the 2194 // value will be replaced with "sensitive". 2195 func (s CodeReviewSummary) String() string { 2196 return awsutil.Prettify(s) 2197 } 2198 2199 // GoString returns the string representation. 2200 // 2201 // API parameter values that are decorated as "sensitive" in the API will not 2202 // be included in the string output. The member name will be present, but the 2203 // value will be replaced with "sensitive". 2204 func (s CodeReviewSummary) GoString() string { 2205 return s.String() 2206 } 2207 2208 // SetCodeReviewArn sets the CodeReviewArn field's value. 2209 func (s *CodeReviewSummary) SetCodeReviewArn(v string) *CodeReviewSummary { 2210 s.CodeReviewArn = &v 2211 return s 2212 } 2213 2214 // SetCreatedTimeStamp sets the CreatedTimeStamp field's value. 2215 func (s *CodeReviewSummary) SetCreatedTimeStamp(v time.Time) *CodeReviewSummary { 2216 s.CreatedTimeStamp = &v 2217 return s 2218 } 2219 2220 // SetLastUpdatedTimeStamp sets the LastUpdatedTimeStamp field's value. 2221 func (s *CodeReviewSummary) SetLastUpdatedTimeStamp(v time.Time) *CodeReviewSummary { 2222 s.LastUpdatedTimeStamp = &v 2223 return s 2224 } 2225 2226 // SetMetricsSummary sets the MetricsSummary field's value. 2227 func (s *CodeReviewSummary) SetMetricsSummary(v *MetricsSummary) *CodeReviewSummary { 2228 s.MetricsSummary = v 2229 return s 2230 } 2231 2232 // SetName sets the Name field's value. 2233 func (s *CodeReviewSummary) SetName(v string) *CodeReviewSummary { 2234 s.Name = &v 2235 return s 2236 } 2237 2238 // SetOwner sets the Owner field's value. 2239 func (s *CodeReviewSummary) SetOwner(v string) *CodeReviewSummary { 2240 s.Owner = &v 2241 return s 2242 } 2243 2244 // SetProviderType sets the ProviderType field's value. 2245 func (s *CodeReviewSummary) SetProviderType(v string) *CodeReviewSummary { 2246 s.ProviderType = &v 2247 return s 2248 } 2249 2250 // SetPullRequestId sets the PullRequestId field's value. 2251 func (s *CodeReviewSummary) SetPullRequestId(v string) *CodeReviewSummary { 2252 s.PullRequestId = &v 2253 return s 2254 } 2255 2256 // SetRepositoryName sets the RepositoryName field's value. 2257 func (s *CodeReviewSummary) SetRepositoryName(v string) *CodeReviewSummary { 2258 s.RepositoryName = &v 2259 return s 2260 } 2261 2262 // SetSourceCodeType sets the SourceCodeType field's value. 2263 func (s *CodeReviewSummary) SetSourceCodeType(v *SourceCodeType) *CodeReviewSummary { 2264 s.SourceCodeType = v 2265 return s 2266 } 2267 2268 // SetState sets the State field's value. 2269 func (s *CodeReviewSummary) SetState(v string) *CodeReviewSummary { 2270 s.State = &v 2271 return s 2272 } 2273 2274 // SetType sets the Type field's value. 2275 func (s *CodeReviewSummary) SetType(v string) *CodeReviewSummary { 2276 s.Type = &v 2277 return s 2278 } 2279 2280 // The type of a code review. There are two code review types: 2281 // 2282 // * PullRequest - A code review that is automatically triggered by a pull 2283 // request on an associated repository. 2284 // 2285 // * RepositoryAnalysis - A code review that analyzes all code under a specified 2286 // branch in an associated repository. The associated repository is specified 2287 // using its ARN in CreateCodeReview (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_CreateCodeReview). 2288 type CodeReviewType struct { 2289 _ struct{} `type:"structure"` 2290 2291 // They types of analysis performed during a repository analysis or a pull request 2292 // review. You can specify either Security, CodeQuality, or both. 2293 AnalysisTypes []*string `type:"list"` 2294 2295 // A code review that analyzes all code under a specified branch in an associated 2296 // repository. The associated repository is specified using its ARN in CreateCodeReview 2297 // (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_CreateCodeReview). 2298 // 2299 // RepositoryAnalysis is a required field 2300 RepositoryAnalysis *RepositoryAnalysis `type:"structure" required:"true"` 2301 } 2302 2303 // String returns the string representation. 2304 // 2305 // API parameter values that are decorated as "sensitive" in the API will not 2306 // be included in the string output. The member name will be present, but the 2307 // value will be replaced with "sensitive". 2308 func (s CodeReviewType) String() string { 2309 return awsutil.Prettify(s) 2310 } 2311 2312 // GoString returns the string representation. 2313 // 2314 // API parameter values that are decorated as "sensitive" in the API will not 2315 // be included in the string output. The member name will be present, but the 2316 // value will be replaced with "sensitive". 2317 func (s CodeReviewType) GoString() string { 2318 return s.String() 2319 } 2320 2321 // Validate inspects the fields of the type to determine if they are valid. 2322 func (s *CodeReviewType) Validate() error { 2323 invalidParams := request.ErrInvalidParams{Context: "CodeReviewType"} 2324 if s.RepositoryAnalysis == nil { 2325 invalidParams.Add(request.NewErrParamRequired("RepositoryAnalysis")) 2326 } 2327 if s.RepositoryAnalysis != nil { 2328 if err := s.RepositoryAnalysis.Validate(); err != nil { 2329 invalidParams.AddNested("RepositoryAnalysis", err.(request.ErrInvalidParams)) 2330 } 2331 } 2332 2333 if invalidParams.Len() > 0 { 2334 return invalidParams 2335 } 2336 return nil 2337 } 2338 2339 // SetAnalysisTypes sets the AnalysisTypes field's value. 2340 func (s *CodeReviewType) SetAnalysisTypes(v []*string) *CodeReviewType { 2341 s.AnalysisTypes = v 2342 return s 2343 } 2344 2345 // SetRepositoryAnalysis sets the RepositoryAnalysis field's value. 2346 func (s *CodeReviewType) SetRepositoryAnalysis(v *RepositoryAnalysis) *CodeReviewType { 2347 s.RepositoryAnalysis = v 2348 return s 2349 } 2350 2351 // A type of SourceCodeType (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_SourceCodeType) 2352 // that specifies the commit diff for a pull request on an associated repository. 2353 // The SourceCommit and DestinationCommit fields are required to do a pull request 2354 // code review. 2355 type CommitDiffSourceCodeType struct { 2356 _ struct{} `type:"structure"` 2357 2358 // The SHA of the destination commit used to generate a commit diff. This field 2359 // is required for a pull request code review. 2360 DestinationCommit *string `min:"6" type:"string"` 2361 2362 // The SHA of the merge base of a commit. 2363 MergeBaseCommit *string `min:"6" type:"string"` 2364 2365 // The SHA of the source commit used to generate a commit diff. This field is 2366 // required for a pull request code review. 2367 SourceCommit *string `min:"6" type:"string"` 2368 } 2369 2370 // String returns the string representation. 2371 // 2372 // API parameter values that are decorated as "sensitive" in the API will not 2373 // be included in the string output. The member name will be present, but the 2374 // value will be replaced with "sensitive". 2375 func (s CommitDiffSourceCodeType) String() string { 2376 return awsutil.Prettify(s) 2377 } 2378 2379 // GoString returns the string representation. 2380 // 2381 // API parameter values that are decorated as "sensitive" in the API will not 2382 // be included in the string output. The member name will be present, but the 2383 // value will be replaced with "sensitive". 2384 func (s CommitDiffSourceCodeType) GoString() string { 2385 return s.String() 2386 } 2387 2388 // Validate inspects the fields of the type to determine if they are valid. 2389 func (s *CommitDiffSourceCodeType) Validate() error { 2390 invalidParams := request.ErrInvalidParams{Context: "CommitDiffSourceCodeType"} 2391 if s.DestinationCommit != nil && len(*s.DestinationCommit) < 6 { 2392 invalidParams.Add(request.NewErrParamMinLen("DestinationCommit", 6)) 2393 } 2394 if s.MergeBaseCommit != nil && len(*s.MergeBaseCommit) < 6 { 2395 invalidParams.Add(request.NewErrParamMinLen("MergeBaseCommit", 6)) 2396 } 2397 if s.SourceCommit != nil && len(*s.SourceCommit) < 6 { 2398 invalidParams.Add(request.NewErrParamMinLen("SourceCommit", 6)) 2399 } 2400 2401 if invalidParams.Len() > 0 { 2402 return invalidParams 2403 } 2404 return nil 2405 } 2406 2407 // SetDestinationCommit sets the DestinationCommit field's value. 2408 func (s *CommitDiffSourceCodeType) SetDestinationCommit(v string) *CommitDiffSourceCodeType { 2409 s.DestinationCommit = &v 2410 return s 2411 } 2412 2413 // SetMergeBaseCommit sets the MergeBaseCommit field's value. 2414 func (s *CommitDiffSourceCodeType) SetMergeBaseCommit(v string) *CommitDiffSourceCodeType { 2415 s.MergeBaseCommit = &v 2416 return s 2417 } 2418 2419 // SetSourceCommit sets the SourceCommit field's value. 2420 func (s *CommitDiffSourceCodeType) SetSourceCommit(v string) *CommitDiffSourceCodeType { 2421 s.SourceCommit = &v 2422 return s 2423 } 2424 2425 // The requested operation would cause a conflict with the current state of 2426 // a service resource associated with the request. Resolve the conflict before 2427 // retrying this request. 2428 type ConflictException struct { 2429 _ struct{} `type:"structure"` 2430 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2431 2432 Message_ *string `locationName:"Message" type:"string"` 2433 } 2434 2435 // String returns the string representation. 2436 // 2437 // API parameter values that are decorated as "sensitive" in the API will not 2438 // be included in the string output. The member name will be present, but the 2439 // value will be replaced with "sensitive". 2440 func (s ConflictException) String() string { 2441 return awsutil.Prettify(s) 2442 } 2443 2444 // GoString returns the string representation. 2445 // 2446 // API parameter values that are decorated as "sensitive" in the API will not 2447 // be included in the string output. The member name will be present, but the 2448 // value will be replaced with "sensitive". 2449 func (s ConflictException) GoString() string { 2450 return s.String() 2451 } 2452 2453 func newErrorConflictException(v protocol.ResponseMetadata) error { 2454 return &ConflictException{ 2455 RespMetadata: v, 2456 } 2457 } 2458 2459 // Code returns the exception type name. 2460 func (s *ConflictException) Code() string { 2461 return "ConflictException" 2462 } 2463 2464 // Message returns the exception's message. 2465 func (s *ConflictException) Message() string { 2466 if s.Message_ != nil { 2467 return *s.Message_ 2468 } 2469 return "" 2470 } 2471 2472 // OrigErr always returns nil, satisfies awserr.Error interface. 2473 func (s *ConflictException) OrigErr() error { 2474 return nil 2475 } 2476 2477 func (s *ConflictException) Error() string { 2478 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 2479 } 2480 2481 // Status code returns the HTTP status code for the request's response error. 2482 func (s *ConflictException) StatusCode() int { 2483 return s.RespMetadata.StatusCode 2484 } 2485 2486 // RequestID returns the service's response RequestID for request. 2487 func (s *ConflictException) RequestID() string { 2488 return s.RespMetadata.RequestID 2489 } 2490 2491 type CreateCodeReviewInput struct { 2492 _ struct{} `type:"structure"` 2493 2494 // Amazon CodeGuru Reviewer uses this value to prevent the accidental creation 2495 // of duplicate code reviews if there are failures and retries. 2496 ClientRequestToken *string `min:"1" type:"string" idempotencyToken:"true"` 2497 2498 // The name of the code review. The name of each code review in your Amazon 2499 // Web Services account must be unique. 2500 // 2501 // Name is a required field 2502 Name *string `min:"1" type:"string" required:"true"` 2503 2504 // The Amazon Resource Name (ARN) of the RepositoryAssociation (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociation.html) 2505 // object. You can retrieve this ARN by calling ListRepositoryAssociations (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_ListRepositoryAssociations.html). 2506 // 2507 // A code review can only be created on an associated repository. This is the 2508 // ARN of the associated repository. 2509 // 2510 // RepositoryAssociationArn is a required field 2511 RepositoryAssociationArn *string `min:"1" type:"string" required:"true"` 2512 2513 // The type of code review to create. This is specified using a CodeReviewType 2514 // (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_CodeReviewType.html) 2515 // object. You can create a code review only of type RepositoryAnalysis. 2516 // 2517 // Type is a required field 2518 Type *CodeReviewType `type:"structure" required:"true"` 2519 } 2520 2521 // String returns the string representation. 2522 // 2523 // API parameter values that are decorated as "sensitive" in the API will not 2524 // be included in the string output. The member name will be present, but the 2525 // value will be replaced with "sensitive". 2526 func (s CreateCodeReviewInput) String() string { 2527 return awsutil.Prettify(s) 2528 } 2529 2530 // GoString returns the string representation. 2531 // 2532 // API parameter values that are decorated as "sensitive" in the API will not 2533 // be included in the string output. The member name will be present, but the 2534 // value will be replaced with "sensitive". 2535 func (s CreateCodeReviewInput) GoString() string { 2536 return s.String() 2537 } 2538 2539 // Validate inspects the fields of the type to determine if they are valid. 2540 func (s *CreateCodeReviewInput) Validate() error { 2541 invalidParams := request.ErrInvalidParams{Context: "CreateCodeReviewInput"} 2542 if s.ClientRequestToken != nil && len(*s.ClientRequestToken) < 1 { 2543 invalidParams.Add(request.NewErrParamMinLen("ClientRequestToken", 1)) 2544 } 2545 if s.Name == nil { 2546 invalidParams.Add(request.NewErrParamRequired("Name")) 2547 } 2548 if s.Name != nil && len(*s.Name) < 1 { 2549 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 2550 } 2551 if s.RepositoryAssociationArn == nil { 2552 invalidParams.Add(request.NewErrParamRequired("RepositoryAssociationArn")) 2553 } 2554 if s.RepositoryAssociationArn != nil && len(*s.RepositoryAssociationArn) < 1 { 2555 invalidParams.Add(request.NewErrParamMinLen("RepositoryAssociationArn", 1)) 2556 } 2557 if s.Type == nil { 2558 invalidParams.Add(request.NewErrParamRequired("Type")) 2559 } 2560 if s.Type != nil { 2561 if err := s.Type.Validate(); err != nil { 2562 invalidParams.AddNested("Type", err.(request.ErrInvalidParams)) 2563 } 2564 } 2565 2566 if invalidParams.Len() > 0 { 2567 return invalidParams 2568 } 2569 return nil 2570 } 2571 2572 // SetClientRequestToken sets the ClientRequestToken field's value. 2573 func (s *CreateCodeReviewInput) SetClientRequestToken(v string) *CreateCodeReviewInput { 2574 s.ClientRequestToken = &v 2575 return s 2576 } 2577 2578 // SetName sets the Name field's value. 2579 func (s *CreateCodeReviewInput) SetName(v string) *CreateCodeReviewInput { 2580 s.Name = &v 2581 return s 2582 } 2583 2584 // SetRepositoryAssociationArn sets the RepositoryAssociationArn field's value. 2585 func (s *CreateCodeReviewInput) SetRepositoryAssociationArn(v string) *CreateCodeReviewInput { 2586 s.RepositoryAssociationArn = &v 2587 return s 2588 } 2589 2590 // SetType sets the Type field's value. 2591 func (s *CreateCodeReviewInput) SetType(v *CodeReviewType) *CreateCodeReviewInput { 2592 s.Type = v 2593 return s 2594 } 2595 2596 type CreateCodeReviewOutput struct { 2597 _ struct{} `type:"structure"` 2598 2599 // Information about a code review. A code review belongs to the associated 2600 // repository that contains the reviewed code. 2601 CodeReview *CodeReview `type:"structure"` 2602 } 2603 2604 // String returns the string representation. 2605 // 2606 // API parameter values that are decorated as "sensitive" in the API will not 2607 // be included in the string output. The member name will be present, but the 2608 // value will be replaced with "sensitive". 2609 func (s CreateCodeReviewOutput) String() string { 2610 return awsutil.Prettify(s) 2611 } 2612 2613 // GoString returns the string representation. 2614 // 2615 // API parameter values that are decorated as "sensitive" in the API will not 2616 // be included in the string output. The member name will be present, but the 2617 // value will be replaced with "sensitive". 2618 func (s CreateCodeReviewOutput) GoString() string { 2619 return s.String() 2620 } 2621 2622 // SetCodeReview sets the CodeReview field's value. 2623 func (s *CreateCodeReviewOutput) SetCodeReview(v *CodeReview) *CreateCodeReviewOutput { 2624 s.CodeReview = v 2625 return s 2626 } 2627 2628 type DescribeCodeReviewInput struct { 2629 _ struct{} `type:"structure" nopayload:"true"` 2630 2631 // The Amazon Resource Name (ARN) of the CodeReview (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_CodeReview.html) 2632 // object. 2633 // 2634 // CodeReviewArn is a required field 2635 CodeReviewArn *string `location:"uri" locationName:"CodeReviewArn" min:"1" type:"string" required:"true"` 2636 } 2637 2638 // String returns the string representation. 2639 // 2640 // API parameter values that are decorated as "sensitive" in the API will not 2641 // be included in the string output. The member name will be present, but the 2642 // value will be replaced with "sensitive". 2643 func (s DescribeCodeReviewInput) String() string { 2644 return awsutil.Prettify(s) 2645 } 2646 2647 // GoString returns the string representation. 2648 // 2649 // API parameter values that are decorated as "sensitive" in the API will not 2650 // be included in the string output. The member name will be present, but the 2651 // value will be replaced with "sensitive". 2652 func (s DescribeCodeReviewInput) GoString() string { 2653 return s.String() 2654 } 2655 2656 // Validate inspects the fields of the type to determine if they are valid. 2657 func (s *DescribeCodeReviewInput) Validate() error { 2658 invalidParams := request.ErrInvalidParams{Context: "DescribeCodeReviewInput"} 2659 if s.CodeReviewArn == nil { 2660 invalidParams.Add(request.NewErrParamRequired("CodeReviewArn")) 2661 } 2662 if s.CodeReviewArn != nil && len(*s.CodeReviewArn) < 1 { 2663 invalidParams.Add(request.NewErrParamMinLen("CodeReviewArn", 1)) 2664 } 2665 2666 if invalidParams.Len() > 0 { 2667 return invalidParams 2668 } 2669 return nil 2670 } 2671 2672 // SetCodeReviewArn sets the CodeReviewArn field's value. 2673 func (s *DescribeCodeReviewInput) SetCodeReviewArn(v string) *DescribeCodeReviewInput { 2674 s.CodeReviewArn = &v 2675 return s 2676 } 2677 2678 type DescribeCodeReviewOutput struct { 2679 _ struct{} `type:"structure"` 2680 2681 // Information about the code review. 2682 CodeReview *CodeReview `type:"structure"` 2683 } 2684 2685 // String returns the string representation. 2686 // 2687 // API parameter values that are decorated as "sensitive" in the API will not 2688 // be included in the string output. The member name will be present, but the 2689 // value will be replaced with "sensitive". 2690 func (s DescribeCodeReviewOutput) String() string { 2691 return awsutil.Prettify(s) 2692 } 2693 2694 // GoString returns the string representation. 2695 // 2696 // API parameter values that are decorated as "sensitive" in the API will not 2697 // be included in the string output. The member name will be present, but the 2698 // value will be replaced with "sensitive". 2699 func (s DescribeCodeReviewOutput) GoString() string { 2700 return s.String() 2701 } 2702 2703 // SetCodeReview sets the CodeReview field's value. 2704 func (s *DescribeCodeReviewOutput) SetCodeReview(v *CodeReview) *DescribeCodeReviewOutput { 2705 s.CodeReview = v 2706 return s 2707 } 2708 2709 type DescribeRecommendationFeedbackInput struct { 2710 _ struct{} `type:"structure" nopayload:"true"` 2711 2712 // The Amazon Resource Name (ARN) of the CodeReview (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_CodeReview.html) 2713 // object. 2714 // 2715 // CodeReviewArn is a required field 2716 CodeReviewArn *string `location:"uri" locationName:"CodeReviewArn" min:"1" type:"string" required:"true"` 2717 2718 // The recommendation ID that can be used to track the provided recommendations 2719 // and then to collect the feedback. 2720 // 2721 // RecommendationId is a required field 2722 RecommendationId *string `location:"querystring" locationName:"RecommendationId" min:"1" type:"string" required:"true"` 2723 2724 // Optional parameter to describe the feedback for a given user. If this is 2725 // not supplied, it defaults to the user making the request. 2726 // 2727 // The UserId is an IAM principal that can be specified as an Amazon Web Services 2728 // account ID or an Amazon Resource Name (ARN). For more information, see Specifying 2729 // a Principal (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html#Principal_specifying) 2730 // in the Amazon Web Services Identity and Access Management User Guide. 2731 UserId *string `location:"querystring" locationName:"UserId" min:"1" type:"string"` 2732 } 2733 2734 // String returns the string representation. 2735 // 2736 // API parameter values that are decorated as "sensitive" in the API will not 2737 // be included in the string output. The member name will be present, but the 2738 // value will be replaced with "sensitive". 2739 func (s DescribeRecommendationFeedbackInput) String() string { 2740 return awsutil.Prettify(s) 2741 } 2742 2743 // GoString returns the string representation. 2744 // 2745 // API parameter values that are decorated as "sensitive" in the API will not 2746 // be included in the string output. The member name will be present, but the 2747 // value will be replaced with "sensitive". 2748 func (s DescribeRecommendationFeedbackInput) GoString() string { 2749 return s.String() 2750 } 2751 2752 // Validate inspects the fields of the type to determine if they are valid. 2753 func (s *DescribeRecommendationFeedbackInput) Validate() error { 2754 invalidParams := request.ErrInvalidParams{Context: "DescribeRecommendationFeedbackInput"} 2755 if s.CodeReviewArn == nil { 2756 invalidParams.Add(request.NewErrParamRequired("CodeReviewArn")) 2757 } 2758 if s.CodeReviewArn != nil && len(*s.CodeReviewArn) < 1 { 2759 invalidParams.Add(request.NewErrParamMinLen("CodeReviewArn", 1)) 2760 } 2761 if s.RecommendationId == nil { 2762 invalidParams.Add(request.NewErrParamRequired("RecommendationId")) 2763 } 2764 if s.RecommendationId != nil && len(*s.RecommendationId) < 1 { 2765 invalidParams.Add(request.NewErrParamMinLen("RecommendationId", 1)) 2766 } 2767 if s.UserId != nil && len(*s.UserId) < 1 { 2768 invalidParams.Add(request.NewErrParamMinLen("UserId", 1)) 2769 } 2770 2771 if invalidParams.Len() > 0 { 2772 return invalidParams 2773 } 2774 return nil 2775 } 2776 2777 // SetCodeReviewArn sets the CodeReviewArn field's value. 2778 func (s *DescribeRecommendationFeedbackInput) SetCodeReviewArn(v string) *DescribeRecommendationFeedbackInput { 2779 s.CodeReviewArn = &v 2780 return s 2781 } 2782 2783 // SetRecommendationId sets the RecommendationId field's value. 2784 func (s *DescribeRecommendationFeedbackInput) SetRecommendationId(v string) *DescribeRecommendationFeedbackInput { 2785 s.RecommendationId = &v 2786 return s 2787 } 2788 2789 // SetUserId sets the UserId field's value. 2790 func (s *DescribeRecommendationFeedbackInput) SetUserId(v string) *DescribeRecommendationFeedbackInput { 2791 s.UserId = &v 2792 return s 2793 } 2794 2795 type DescribeRecommendationFeedbackOutput struct { 2796 _ struct{} `type:"structure"` 2797 2798 // The recommendation feedback given by the user. 2799 RecommendationFeedback *RecommendationFeedback `type:"structure"` 2800 } 2801 2802 // String returns the string representation. 2803 // 2804 // API parameter values that are decorated as "sensitive" in the API will not 2805 // be included in the string output. The member name will be present, but the 2806 // value will be replaced with "sensitive". 2807 func (s DescribeRecommendationFeedbackOutput) String() string { 2808 return awsutil.Prettify(s) 2809 } 2810 2811 // GoString returns the string representation. 2812 // 2813 // API parameter values that are decorated as "sensitive" in the API will not 2814 // be included in the string output. The member name will be present, but the 2815 // value will be replaced with "sensitive". 2816 func (s DescribeRecommendationFeedbackOutput) GoString() string { 2817 return s.String() 2818 } 2819 2820 // SetRecommendationFeedback sets the RecommendationFeedback field's value. 2821 func (s *DescribeRecommendationFeedbackOutput) SetRecommendationFeedback(v *RecommendationFeedback) *DescribeRecommendationFeedbackOutput { 2822 s.RecommendationFeedback = v 2823 return s 2824 } 2825 2826 type DescribeRepositoryAssociationInput struct { 2827 _ struct{} `type:"structure" nopayload:"true"` 2828 2829 // The Amazon Resource Name (ARN) of the RepositoryAssociation (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociation.html) 2830 // object. You can retrieve this ARN by calling ListRepositoryAssociations (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_ListRepositoryAssociations.html). 2831 // 2832 // AssociationArn is a required field 2833 AssociationArn *string `location:"uri" locationName:"AssociationArn" min:"1" type:"string" required:"true"` 2834 } 2835 2836 // String returns the string representation. 2837 // 2838 // API parameter values that are decorated as "sensitive" in the API will not 2839 // be included in the string output. The member name will be present, but the 2840 // value will be replaced with "sensitive". 2841 func (s DescribeRepositoryAssociationInput) String() string { 2842 return awsutil.Prettify(s) 2843 } 2844 2845 // GoString returns the string representation. 2846 // 2847 // API parameter values that are decorated as "sensitive" in the API will not 2848 // be included in the string output. The member name will be present, but the 2849 // value will be replaced with "sensitive". 2850 func (s DescribeRepositoryAssociationInput) GoString() string { 2851 return s.String() 2852 } 2853 2854 // Validate inspects the fields of the type to determine if they are valid. 2855 func (s *DescribeRepositoryAssociationInput) Validate() error { 2856 invalidParams := request.ErrInvalidParams{Context: "DescribeRepositoryAssociationInput"} 2857 if s.AssociationArn == nil { 2858 invalidParams.Add(request.NewErrParamRequired("AssociationArn")) 2859 } 2860 if s.AssociationArn != nil && len(*s.AssociationArn) < 1 { 2861 invalidParams.Add(request.NewErrParamMinLen("AssociationArn", 1)) 2862 } 2863 2864 if invalidParams.Len() > 0 { 2865 return invalidParams 2866 } 2867 return nil 2868 } 2869 2870 // SetAssociationArn sets the AssociationArn field's value. 2871 func (s *DescribeRepositoryAssociationInput) SetAssociationArn(v string) *DescribeRepositoryAssociationInput { 2872 s.AssociationArn = &v 2873 return s 2874 } 2875 2876 type DescribeRepositoryAssociationOutput struct { 2877 _ struct{} `type:"structure"` 2878 2879 // Information about the repository association. 2880 RepositoryAssociation *RepositoryAssociation `type:"structure"` 2881 2882 // An array of key-value pairs used to tag an associated repository. A tag is 2883 // a custom attribute label with two parts: 2884 // 2885 // * A tag key (for example, CostCenter, Environment, Project, or Secret). 2886 // Tag keys are case sensitive. 2887 // 2888 // * An optional field known as a tag value (for example, 111122223333, Production, 2889 // or a team name). Omitting the tag value is the same as using an empty 2890 // string. Like tag keys, tag values are case sensitive. 2891 Tags map[string]*string `min:"1" type:"map"` 2892 } 2893 2894 // String returns the string representation. 2895 // 2896 // API parameter values that are decorated as "sensitive" in the API will not 2897 // be included in the string output. The member name will be present, but the 2898 // value will be replaced with "sensitive". 2899 func (s DescribeRepositoryAssociationOutput) String() string { 2900 return awsutil.Prettify(s) 2901 } 2902 2903 // GoString returns the string representation. 2904 // 2905 // API parameter values that are decorated as "sensitive" in the API will not 2906 // be included in the string output. The member name will be present, but the 2907 // value will be replaced with "sensitive". 2908 func (s DescribeRepositoryAssociationOutput) GoString() string { 2909 return s.String() 2910 } 2911 2912 // SetRepositoryAssociation sets the RepositoryAssociation field's value. 2913 func (s *DescribeRepositoryAssociationOutput) SetRepositoryAssociation(v *RepositoryAssociation) *DescribeRepositoryAssociationOutput { 2914 s.RepositoryAssociation = v 2915 return s 2916 } 2917 2918 // SetTags sets the Tags field's value. 2919 func (s *DescribeRepositoryAssociationOutput) SetTags(v map[string]*string) *DescribeRepositoryAssociationOutput { 2920 s.Tags = v 2921 return s 2922 } 2923 2924 type DisassociateRepositoryInput struct { 2925 _ struct{} `type:"structure" nopayload:"true"` 2926 2927 // The Amazon Resource Name (ARN) of the RepositoryAssociation (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociation.html) 2928 // object. You can retrieve this ARN by calling ListRepositoryAssociations (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_ListRepositoryAssociations.html). 2929 // 2930 // AssociationArn is a required field 2931 AssociationArn *string `location:"uri" locationName:"AssociationArn" min:"1" type:"string" required:"true"` 2932 } 2933 2934 // String returns the string representation. 2935 // 2936 // API parameter values that are decorated as "sensitive" in the API will not 2937 // be included in the string output. The member name will be present, but the 2938 // value will be replaced with "sensitive". 2939 func (s DisassociateRepositoryInput) String() string { 2940 return awsutil.Prettify(s) 2941 } 2942 2943 // GoString returns the string representation. 2944 // 2945 // API parameter values that are decorated as "sensitive" in the API will not 2946 // be included in the string output. The member name will be present, but the 2947 // value will be replaced with "sensitive". 2948 func (s DisassociateRepositoryInput) GoString() string { 2949 return s.String() 2950 } 2951 2952 // Validate inspects the fields of the type to determine if they are valid. 2953 func (s *DisassociateRepositoryInput) Validate() error { 2954 invalidParams := request.ErrInvalidParams{Context: "DisassociateRepositoryInput"} 2955 if s.AssociationArn == nil { 2956 invalidParams.Add(request.NewErrParamRequired("AssociationArn")) 2957 } 2958 if s.AssociationArn != nil && len(*s.AssociationArn) < 1 { 2959 invalidParams.Add(request.NewErrParamMinLen("AssociationArn", 1)) 2960 } 2961 2962 if invalidParams.Len() > 0 { 2963 return invalidParams 2964 } 2965 return nil 2966 } 2967 2968 // SetAssociationArn sets the AssociationArn field's value. 2969 func (s *DisassociateRepositoryInput) SetAssociationArn(v string) *DisassociateRepositoryInput { 2970 s.AssociationArn = &v 2971 return s 2972 } 2973 2974 type DisassociateRepositoryOutput struct { 2975 _ struct{} `type:"structure"` 2976 2977 // Information about the disassociated repository. 2978 RepositoryAssociation *RepositoryAssociation `type:"structure"` 2979 2980 // An array of key-value pairs used to tag an associated repository. A tag is 2981 // a custom attribute label with two parts: 2982 // 2983 // * A tag key (for example, CostCenter, Environment, Project, or Secret). 2984 // Tag keys are case sensitive. 2985 // 2986 // * An optional field known as a tag value (for example, 111122223333, Production, 2987 // or a team name). Omitting the tag value is the same as using an empty 2988 // string. Like tag keys, tag values are case sensitive. 2989 Tags map[string]*string `min:"1" type:"map"` 2990 } 2991 2992 // String returns the string representation. 2993 // 2994 // API parameter values that are decorated as "sensitive" in the API will not 2995 // be included in the string output. The member name will be present, but the 2996 // value will be replaced with "sensitive". 2997 func (s DisassociateRepositoryOutput) String() string { 2998 return awsutil.Prettify(s) 2999 } 3000 3001 // GoString returns the string representation. 3002 // 3003 // API parameter values that are decorated as "sensitive" in the API will not 3004 // be included in the string output. The member name will be present, but the 3005 // value will be replaced with "sensitive". 3006 func (s DisassociateRepositoryOutput) GoString() string { 3007 return s.String() 3008 } 3009 3010 // SetRepositoryAssociation sets the RepositoryAssociation field's value. 3011 func (s *DisassociateRepositoryOutput) SetRepositoryAssociation(v *RepositoryAssociation) *DisassociateRepositoryOutput { 3012 s.RepositoryAssociation = v 3013 return s 3014 } 3015 3016 // SetTags sets the Tags field's value. 3017 func (s *DisassociateRepositoryOutput) SetTags(v map[string]*string) *DisassociateRepositoryOutput { 3018 s.Tags = v 3019 return s 3020 } 3021 3022 // Information about an event. The event might be a push, pull request, scheduled 3023 // request, or another type of event. 3024 type EventInfo struct { 3025 _ struct{} `type:"structure"` 3026 3027 // The name of the event. The possible names are pull_request, workflow_dispatch, 3028 // schedule, and push 3029 Name *string `min:"1" type:"string"` 3030 3031 // The state of an event. The state might be open, closed, or another state. 3032 State *string `min:"1" type:"string"` 3033 } 3034 3035 // String returns the string representation. 3036 // 3037 // API parameter values that are decorated as "sensitive" in the API will not 3038 // be included in the string output. The member name will be present, but the 3039 // value will be replaced with "sensitive". 3040 func (s EventInfo) String() string { 3041 return awsutil.Prettify(s) 3042 } 3043 3044 // GoString returns the string representation. 3045 // 3046 // API parameter values that are decorated as "sensitive" in the API will not 3047 // be included in the string output. The member name will be present, but the 3048 // value will be replaced with "sensitive". 3049 func (s EventInfo) GoString() string { 3050 return s.String() 3051 } 3052 3053 // Validate inspects the fields of the type to determine if they are valid. 3054 func (s *EventInfo) Validate() error { 3055 invalidParams := request.ErrInvalidParams{Context: "EventInfo"} 3056 if s.Name != nil && len(*s.Name) < 1 { 3057 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 3058 } 3059 if s.State != nil && len(*s.State) < 1 { 3060 invalidParams.Add(request.NewErrParamMinLen("State", 1)) 3061 } 3062 3063 if invalidParams.Len() > 0 { 3064 return invalidParams 3065 } 3066 return nil 3067 } 3068 3069 // SetName sets the Name field's value. 3070 func (s *EventInfo) SetName(v string) *EventInfo { 3071 s.Name = &v 3072 return s 3073 } 3074 3075 // SetState sets the State field's value. 3076 func (s *EventInfo) SetState(v string) *EventInfo { 3077 s.State = &v 3078 return s 3079 } 3080 3081 // The server encountered an internal error and is unable to complete the request. 3082 type InternalServerException struct { 3083 _ struct{} `type:"structure"` 3084 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 3085 3086 Message_ *string `locationName:"Message" type:"string"` 3087 } 3088 3089 // String returns the string representation. 3090 // 3091 // API parameter values that are decorated as "sensitive" in the API will not 3092 // be included in the string output. The member name will be present, but the 3093 // value will be replaced with "sensitive". 3094 func (s InternalServerException) String() string { 3095 return awsutil.Prettify(s) 3096 } 3097 3098 // GoString returns the string representation. 3099 // 3100 // API parameter values that are decorated as "sensitive" in the API will not 3101 // be included in the string output. The member name will be present, but the 3102 // value will be replaced with "sensitive". 3103 func (s InternalServerException) GoString() string { 3104 return s.String() 3105 } 3106 3107 func newErrorInternalServerException(v protocol.ResponseMetadata) error { 3108 return &InternalServerException{ 3109 RespMetadata: v, 3110 } 3111 } 3112 3113 // Code returns the exception type name. 3114 func (s *InternalServerException) Code() string { 3115 return "InternalServerException" 3116 } 3117 3118 // Message returns the exception's message. 3119 func (s *InternalServerException) Message() string { 3120 if s.Message_ != nil { 3121 return *s.Message_ 3122 } 3123 return "" 3124 } 3125 3126 // OrigErr always returns nil, satisfies awserr.Error interface. 3127 func (s *InternalServerException) OrigErr() error { 3128 return nil 3129 } 3130 3131 func (s *InternalServerException) Error() string { 3132 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 3133 } 3134 3135 // Status code returns the HTTP status code for the request's response error. 3136 func (s *InternalServerException) StatusCode() int { 3137 return s.RespMetadata.StatusCode 3138 } 3139 3140 // RequestID returns the service's response RequestID for request. 3141 func (s *InternalServerException) RequestID() string { 3142 return s.RespMetadata.RequestID 3143 } 3144 3145 // An object that contains: 3146 // 3147 // * The encryption option for a repository association. It is either owned 3148 // by Amazon Web Services Key Management Service (KMS) (AWS_OWNED_CMK) or 3149 // customer managed (CUSTOMER_MANAGED_CMK). 3150 // 3151 // * The ID of the Amazon Web Services KMS key that is associated with a 3152 // respository association. 3153 type KMSKeyDetails struct { 3154 _ struct{} `type:"structure"` 3155 3156 // The encryption option for a repository association. It is either owned by 3157 // Amazon Web Services Key Management Service (KMS) (AWS_OWNED_CMK) or customer 3158 // managed (CUSTOMER_MANAGED_CMK). 3159 EncryptionOption *string `type:"string" enum:"EncryptionOption"` 3160 3161 // The ID of the Amazon Web Services KMS key that is associated with a respository 3162 // association. 3163 KMSKeyId *string `min:"1" type:"string"` 3164 } 3165 3166 // String returns the string representation. 3167 // 3168 // API parameter values that are decorated as "sensitive" in the API will not 3169 // be included in the string output. The member name will be present, but the 3170 // value will be replaced with "sensitive". 3171 func (s KMSKeyDetails) String() string { 3172 return awsutil.Prettify(s) 3173 } 3174 3175 // GoString returns the string representation. 3176 // 3177 // API parameter values that are decorated as "sensitive" in the API will not 3178 // be included in the string output. The member name will be present, but the 3179 // value will be replaced with "sensitive". 3180 func (s KMSKeyDetails) GoString() string { 3181 return s.String() 3182 } 3183 3184 // Validate inspects the fields of the type to determine if they are valid. 3185 func (s *KMSKeyDetails) Validate() error { 3186 invalidParams := request.ErrInvalidParams{Context: "KMSKeyDetails"} 3187 if s.KMSKeyId != nil && len(*s.KMSKeyId) < 1 { 3188 invalidParams.Add(request.NewErrParamMinLen("KMSKeyId", 1)) 3189 } 3190 3191 if invalidParams.Len() > 0 { 3192 return invalidParams 3193 } 3194 return nil 3195 } 3196 3197 // SetEncryptionOption sets the EncryptionOption field's value. 3198 func (s *KMSKeyDetails) SetEncryptionOption(v string) *KMSKeyDetails { 3199 s.EncryptionOption = &v 3200 return s 3201 } 3202 3203 // SetKMSKeyId sets the KMSKeyId field's value. 3204 func (s *KMSKeyDetails) SetKMSKeyId(v string) *KMSKeyDetails { 3205 s.KMSKeyId = &v 3206 return s 3207 } 3208 3209 type ListCodeReviewsInput struct { 3210 _ struct{} `type:"structure" nopayload:"true"` 3211 3212 // The maximum number of results that are returned per call. The default is 3213 // 100. 3214 MaxResults *int64 `location:"querystring" locationName:"MaxResults" min:"1" type:"integer"` 3215 3216 // If nextToken is returned, there are more results available. The value of 3217 // nextToken is a unique pagination token for each page. Make the call again 3218 // using the returned token to retrieve the next page. Keep all other arguments 3219 // unchanged. 3220 NextToken *string `location:"querystring" locationName:"NextToken" min:"1" type:"string"` 3221 3222 // List of provider types for filtering that needs to be applied before displaying 3223 // the result. For example, providerTypes=[GitHub] lists code reviews from GitHub. 3224 ProviderTypes []*string `location:"querystring" locationName:"ProviderTypes" min:"1" type:"list"` 3225 3226 // List of repository names for filtering that needs to be applied before displaying 3227 // the result. 3228 RepositoryNames []*string `location:"querystring" locationName:"RepositoryNames" min:"1" type:"list"` 3229 3230 // List of states for filtering that needs to be applied before displaying the 3231 // result. For example, states=[Pending] lists code reviews in the Pending state. 3232 // 3233 // The valid code review states are: 3234 // 3235 // * Completed: The code review is complete. 3236 // 3237 // * Pending: The code review started and has not completed or failed. 3238 // 3239 // * Failed: The code review failed. 3240 // 3241 // * Deleting: The code review is being deleted. 3242 States []*string `location:"querystring" locationName:"States" min:"1" type:"list"` 3243 3244 // The type of code reviews to list in the response. 3245 // 3246 // Type is a required field 3247 Type *string `location:"querystring" locationName:"Type" type:"string" required:"true" enum:"Type"` 3248 } 3249 3250 // String returns the string representation. 3251 // 3252 // API parameter values that are decorated as "sensitive" in the API will not 3253 // be included in the string output. The member name will be present, but the 3254 // value will be replaced with "sensitive". 3255 func (s ListCodeReviewsInput) String() string { 3256 return awsutil.Prettify(s) 3257 } 3258 3259 // GoString returns the string representation. 3260 // 3261 // API parameter values that are decorated as "sensitive" in the API will not 3262 // be included in the string output. The member name will be present, but the 3263 // value will be replaced with "sensitive". 3264 func (s ListCodeReviewsInput) GoString() string { 3265 return s.String() 3266 } 3267 3268 // Validate inspects the fields of the type to determine if they are valid. 3269 func (s *ListCodeReviewsInput) Validate() error { 3270 invalidParams := request.ErrInvalidParams{Context: "ListCodeReviewsInput"} 3271 if s.MaxResults != nil && *s.MaxResults < 1 { 3272 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 3273 } 3274 if s.NextToken != nil && len(*s.NextToken) < 1 { 3275 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 3276 } 3277 if s.ProviderTypes != nil && len(s.ProviderTypes) < 1 { 3278 invalidParams.Add(request.NewErrParamMinLen("ProviderTypes", 1)) 3279 } 3280 if s.RepositoryNames != nil && len(s.RepositoryNames) < 1 { 3281 invalidParams.Add(request.NewErrParamMinLen("RepositoryNames", 1)) 3282 } 3283 if s.States != nil && len(s.States) < 1 { 3284 invalidParams.Add(request.NewErrParamMinLen("States", 1)) 3285 } 3286 if s.Type == nil { 3287 invalidParams.Add(request.NewErrParamRequired("Type")) 3288 } 3289 3290 if invalidParams.Len() > 0 { 3291 return invalidParams 3292 } 3293 return nil 3294 } 3295 3296 // SetMaxResults sets the MaxResults field's value. 3297 func (s *ListCodeReviewsInput) SetMaxResults(v int64) *ListCodeReviewsInput { 3298 s.MaxResults = &v 3299 return s 3300 } 3301 3302 // SetNextToken sets the NextToken field's value. 3303 func (s *ListCodeReviewsInput) SetNextToken(v string) *ListCodeReviewsInput { 3304 s.NextToken = &v 3305 return s 3306 } 3307 3308 // SetProviderTypes sets the ProviderTypes field's value. 3309 func (s *ListCodeReviewsInput) SetProviderTypes(v []*string) *ListCodeReviewsInput { 3310 s.ProviderTypes = v 3311 return s 3312 } 3313 3314 // SetRepositoryNames sets the RepositoryNames field's value. 3315 func (s *ListCodeReviewsInput) SetRepositoryNames(v []*string) *ListCodeReviewsInput { 3316 s.RepositoryNames = v 3317 return s 3318 } 3319 3320 // SetStates sets the States field's value. 3321 func (s *ListCodeReviewsInput) SetStates(v []*string) *ListCodeReviewsInput { 3322 s.States = v 3323 return s 3324 } 3325 3326 // SetType sets the Type field's value. 3327 func (s *ListCodeReviewsInput) SetType(v string) *ListCodeReviewsInput { 3328 s.Type = &v 3329 return s 3330 } 3331 3332 type ListCodeReviewsOutput struct { 3333 _ struct{} `type:"structure"` 3334 3335 // A list of code reviews that meet the criteria of the request. 3336 CodeReviewSummaries []*CodeReviewSummary `type:"list"` 3337 3338 // Pagination token. 3339 NextToken *string `min:"1" type:"string"` 3340 } 3341 3342 // String returns the string representation. 3343 // 3344 // API parameter values that are decorated as "sensitive" in the API will not 3345 // be included in the string output. The member name will be present, but the 3346 // value will be replaced with "sensitive". 3347 func (s ListCodeReviewsOutput) String() string { 3348 return awsutil.Prettify(s) 3349 } 3350 3351 // GoString returns the string representation. 3352 // 3353 // API parameter values that are decorated as "sensitive" in the API will not 3354 // be included in the string output. The member name will be present, but the 3355 // value will be replaced with "sensitive". 3356 func (s ListCodeReviewsOutput) GoString() string { 3357 return s.String() 3358 } 3359 3360 // SetCodeReviewSummaries sets the CodeReviewSummaries field's value. 3361 func (s *ListCodeReviewsOutput) SetCodeReviewSummaries(v []*CodeReviewSummary) *ListCodeReviewsOutput { 3362 s.CodeReviewSummaries = v 3363 return s 3364 } 3365 3366 // SetNextToken sets the NextToken field's value. 3367 func (s *ListCodeReviewsOutput) SetNextToken(v string) *ListCodeReviewsOutput { 3368 s.NextToken = &v 3369 return s 3370 } 3371 3372 type ListRecommendationFeedbackInput struct { 3373 _ struct{} `type:"structure" nopayload:"true"` 3374 3375 // The Amazon Resource Name (ARN) of the CodeReview (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_CodeReview.html) 3376 // object. 3377 // 3378 // CodeReviewArn is a required field 3379 CodeReviewArn *string `location:"uri" locationName:"CodeReviewArn" min:"1" type:"string" required:"true"` 3380 3381 // The maximum number of results that are returned per call. The default is 3382 // 100. 3383 MaxResults *int64 `location:"querystring" locationName:"MaxResults" min:"1" type:"integer"` 3384 3385 // If nextToken is returned, there are more results available. The value of 3386 // nextToken is a unique pagination token for each page. Make the call again 3387 // using the returned token to retrieve the next page. Keep all other arguments 3388 // unchanged. 3389 NextToken *string `location:"querystring" locationName:"NextToken" min:"1" type:"string"` 3390 3391 // Used to query the recommendation feedback for a given recommendation. 3392 RecommendationIds []*string `location:"querystring" locationName:"RecommendationIds" min:"1" type:"list"` 3393 3394 // An Amazon Web Services user's account ID or Amazon Resource Name (ARN). Use 3395 // this ID to query the recommendation feedback for a code review from that 3396 // user. 3397 // 3398 // The UserId is an IAM principal that can be specified as an Amazon Web Services 3399 // account ID or an Amazon Resource Name (ARN). For more information, see Specifying 3400 // a Principal (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html#Principal_specifying) 3401 // in the Amazon Web Services Identity and Access Management User Guide. 3402 UserIds []*string `location:"querystring" locationName:"UserIds" min:"1" type:"list"` 3403 } 3404 3405 // String returns the string representation. 3406 // 3407 // API parameter values that are decorated as "sensitive" in the API will not 3408 // be included in the string output. The member name will be present, but the 3409 // value will be replaced with "sensitive". 3410 func (s ListRecommendationFeedbackInput) String() string { 3411 return awsutil.Prettify(s) 3412 } 3413 3414 // GoString returns the string representation. 3415 // 3416 // API parameter values that are decorated as "sensitive" in the API will not 3417 // be included in the string output. The member name will be present, but the 3418 // value will be replaced with "sensitive". 3419 func (s ListRecommendationFeedbackInput) GoString() string { 3420 return s.String() 3421 } 3422 3423 // Validate inspects the fields of the type to determine if they are valid. 3424 func (s *ListRecommendationFeedbackInput) Validate() error { 3425 invalidParams := request.ErrInvalidParams{Context: "ListRecommendationFeedbackInput"} 3426 if s.CodeReviewArn == nil { 3427 invalidParams.Add(request.NewErrParamRequired("CodeReviewArn")) 3428 } 3429 if s.CodeReviewArn != nil && len(*s.CodeReviewArn) < 1 { 3430 invalidParams.Add(request.NewErrParamMinLen("CodeReviewArn", 1)) 3431 } 3432 if s.MaxResults != nil && *s.MaxResults < 1 { 3433 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 3434 } 3435 if s.NextToken != nil && len(*s.NextToken) < 1 { 3436 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 3437 } 3438 if s.RecommendationIds != nil && len(s.RecommendationIds) < 1 { 3439 invalidParams.Add(request.NewErrParamMinLen("RecommendationIds", 1)) 3440 } 3441 if s.UserIds != nil && len(s.UserIds) < 1 { 3442 invalidParams.Add(request.NewErrParamMinLen("UserIds", 1)) 3443 } 3444 3445 if invalidParams.Len() > 0 { 3446 return invalidParams 3447 } 3448 return nil 3449 } 3450 3451 // SetCodeReviewArn sets the CodeReviewArn field's value. 3452 func (s *ListRecommendationFeedbackInput) SetCodeReviewArn(v string) *ListRecommendationFeedbackInput { 3453 s.CodeReviewArn = &v 3454 return s 3455 } 3456 3457 // SetMaxResults sets the MaxResults field's value. 3458 func (s *ListRecommendationFeedbackInput) SetMaxResults(v int64) *ListRecommendationFeedbackInput { 3459 s.MaxResults = &v 3460 return s 3461 } 3462 3463 // SetNextToken sets the NextToken field's value. 3464 func (s *ListRecommendationFeedbackInput) SetNextToken(v string) *ListRecommendationFeedbackInput { 3465 s.NextToken = &v 3466 return s 3467 } 3468 3469 // SetRecommendationIds sets the RecommendationIds field's value. 3470 func (s *ListRecommendationFeedbackInput) SetRecommendationIds(v []*string) *ListRecommendationFeedbackInput { 3471 s.RecommendationIds = v 3472 return s 3473 } 3474 3475 // SetUserIds sets the UserIds field's value. 3476 func (s *ListRecommendationFeedbackInput) SetUserIds(v []*string) *ListRecommendationFeedbackInput { 3477 s.UserIds = v 3478 return s 3479 } 3480 3481 type ListRecommendationFeedbackOutput struct { 3482 _ struct{} `type:"structure"` 3483 3484 // If nextToken is returned, there are more results available. The value of 3485 // nextToken is a unique pagination token for each page. Make the call again 3486 // using the returned token to retrieve the next page. Keep all other arguments 3487 // unchanged. 3488 NextToken *string `min:"1" type:"string"` 3489 3490 // Recommendation feedback summaries corresponding to the code review ARN. 3491 RecommendationFeedbackSummaries []*RecommendationFeedbackSummary `type:"list"` 3492 } 3493 3494 // String returns the string representation. 3495 // 3496 // API parameter values that are decorated as "sensitive" in the API will not 3497 // be included in the string output. The member name will be present, but the 3498 // value will be replaced with "sensitive". 3499 func (s ListRecommendationFeedbackOutput) String() string { 3500 return awsutil.Prettify(s) 3501 } 3502 3503 // GoString returns the string representation. 3504 // 3505 // API parameter values that are decorated as "sensitive" in the API will not 3506 // be included in the string output. The member name will be present, but the 3507 // value will be replaced with "sensitive". 3508 func (s ListRecommendationFeedbackOutput) GoString() string { 3509 return s.String() 3510 } 3511 3512 // SetNextToken sets the NextToken field's value. 3513 func (s *ListRecommendationFeedbackOutput) SetNextToken(v string) *ListRecommendationFeedbackOutput { 3514 s.NextToken = &v 3515 return s 3516 } 3517 3518 // SetRecommendationFeedbackSummaries sets the RecommendationFeedbackSummaries field's value. 3519 func (s *ListRecommendationFeedbackOutput) SetRecommendationFeedbackSummaries(v []*RecommendationFeedbackSummary) *ListRecommendationFeedbackOutput { 3520 s.RecommendationFeedbackSummaries = v 3521 return s 3522 } 3523 3524 type ListRecommendationsInput struct { 3525 _ struct{} `type:"structure" nopayload:"true"` 3526 3527 // The Amazon Resource Name (ARN) of the CodeReview (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_CodeReview.html) 3528 // object. 3529 // 3530 // CodeReviewArn is a required field 3531 CodeReviewArn *string `location:"uri" locationName:"CodeReviewArn" min:"1" type:"string" required:"true"` 3532 3533 // The maximum number of results that are returned per call. The default is 3534 // 100. 3535 MaxResults *int64 `location:"querystring" locationName:"MaxResults" min:"1" type:"integer"` 3536 3537 // Pagination token. 3538 NextToken *string `location:"querystring" locationName:"NextToken" min:"1" type:"string"` 3539 } 3540 3541 // String returns the string representation. 3542 // 3543 // API parameter values that are decorated as "sensitive" in the API will not 3544 // be included in the string output. The member name will be present, but the 3545 // value will be replaced with "sensitive". 3546 func (s ListRecommendationsInput) String() string { 3547 return awsutil.Prettify(s) 3548 } 3549 3550 // GoString returns the string representation. 3551 // 3552 // API parameter values that are decorated as "sensitive" in the API will not 3553 // be included in the string output. The member name will be present, but the 3554 // value will be replaced with "sensitive". 3555 func (s ListRecommendationsInput) GoString() string { 3556 return s.String() 3557 } 3558 3559 // Validate inspects the fields of the type to determine if they are valid. 3560 func (s *ListRecommendationsInput) Validate() error { 3561 invalidParams := request.ErrInvalidParams{Context: "ListRecommendationsInput"} 3562 if s.CodeReviewArn == nil { 3563 invalidParams.Add(request.NewErrParamRequired("CodeReviewArn")) 3564 } 3565 if s.CodeReviewArn != nil && len(*s.CodeReviewArn) < 1 { 3566 invalidParams.Add(request.NewErrParamMinLen("CodeReviewArn", 1)) 3567 } 3568 if s.MaxResults != nil && *s.MaxResults < 1 { 3569 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 3570 } 3571 if s.NextToken != nil && len(*s.NextToken) < 1 { 3572 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 3573 } 3574 3575 if invalidParams.Len() > 0 { 3576 return invalidParams 3577 } 3578 return nil 3579 } 3580 3581 // SetCodeReviewArn sets the CodeReviewArn field's value. 3582 func (s *ListRecommendationsInput) SetCodeReviewArn(v string) *ListRecommendationsInput { 3583 s.CodeReviewArn = &v 3584 return s 3585 } 3586 3587 // SetMaxResults sets the MaxResults field's value. 3588 func (s *ListRecommendationsInput) SetMaxResults(v int64) *ListRecommendationsInput { 3589 s.MaxResults = &v 3590 return s 3591 } 3592 3593 // SetNextToken sets the NextToken field's value. 3594 func (s *ListRecommendationsInput) SetNextToken(v string) *ListRecommendationsInput { 3595 s.NextToken = &v 3596 return s 3597 } 3598 3599 type ListRecommendationsOutput struct { 3600 _ struct{} `type:"structure"` 3601 3602 // Pagination token. 3603 NextToken *string `min:"1" type:"string"` 3604 3605 // List of recommendations for the requested code review. 3606 RecommendationSummaries []*RecommendationSummary `type:"list"` 3607 } 3608 3609 // String returns the string representation. 3610 // 3611 // API parameter values that are decorated as "sensitive" in the API will not 3612 // be included in the string output. The member name will be present, but the 3613 // value will be replaced with "sensitive". 3614 func (s ListRecommendationsOutput) String() string { 3615 return awsutil.Prettify(s) 3616 } 3617 3618 // GoString returns the string representation. 3619 // 3620 // API parameter values that are decorated as "sensitive" in the API will not 3621 // be included in the string output. The member name will be present, but the 3622 // value will be replaced with "sensitive". 3623 func (s ListRecommendationsOutput) GoString() string { 3624 return s.String() 3625 } 3626 3627 // SetNextToken sets the NextToken field's value. 3628 func (s *ListRecommendationsOutput) SetNextToken(v string) *ListRecommendationsOutput { 3629 s.NextToken = &v 3630 return s 3631 } 3632 3633 // SetRecommendationSummaries sets the RecommendationSummaries field's value. 3634 func (s *ListRecommendationsOutput) SetRecommendationSummaries(v []*RecommendationSummary) *ListRecommendationsOutput { 3635 s.RecommendationSummaries = v 3636 return s 3637 } 3638 3639 type ListRepositoryAssociationsInput struct { 3640 _ struct{} `type:"structure" nopayload:"true"` 3641 3642 // The maximum number of repository association results returned by ListRepositoryAssociations 3643 // in paginated output. When this parameter is used, ListRepositoryAssociations 3644 // only returns maxResults results in a single page with a nextToken response 3645 // element. The remaining results of the initial request can be seen by sending 3646 // another ListRepositoryAssociations request with the returned nextToken value. 3647 // This value can be between 1 and 100. If this parameter is not used, ListRepositoryAssociations 3648 // returns up to 100 results and a nextToken value if applicable. 3649 MaxResults *int64 `location:"querystring" locationName:"MaxResults" min:"1" type:"integer"` 3650 3651 // List of repository names to use as a filter. 3652 Names []*string `location:"querystring" locationName:"Name" min:"1" type:"list"` 3653 3654 // The nextToken value returned from a previous paginated ListRepositoryAssociations 3655 // request where maxResults was used and the results exceeded the value of that 3656 // parameter. Pagination continues from the end of the previous results that 3657 // returned the nextToken value. 3658 // 3659 // Treat this token as an opaque identifier that is only used to retrieve the 3660 // next items in a list and not for other programmatic purposes. 3661 NextToken *string `location:"querystring" locationName:"NextToken" min:"1" type:"string"` 3662 3663 // List of owners to use as a filter. For Amazon Web Services CodeCommit, it 3664 // is the name of the CodeCommit account that was used to associate the repository. 3665 // For other repository source providers, such as Bitbucket and GitHub Enterprise 3666 // Server, this is name of the account that was used to associate the repository. 3667 Owners []*string `location:"querystring" locationName:"Owner" min:"1" type:"list"` 3668 3669 // List of provider types to use as a filter. 3670 ProviderTypes []*string `location:"querystring" locationName:"ProviderType" min:"1" type:"list"` 3671 3672 // List of repository association states to use as a filter. 3673 // 3674 // The valid repository association states are: 3675 // 3676 // * Associated: The repository association is complete. 3677 // 3678 // * Associating: CodeGuru Reviewer is: Setting up pull request notifications. 3679 // This is required for pull requests to trigger a CodeGuru Reviewer review. 3680 // If your repository ProviderType is GitHub, GitHub Enterprise Server, or 3681 // Bitbucket, CodeGuru Reviewer creates webhooks in your repository to trigger 3682 // CodeGuru Reviewer reviews. If you delete these webhooks, reviews of code 3683 // in your repository cannot be triggered. Setting up source code access. 3684 // This is required for CodeGuru Reviewer to securely clone code in your 3685 // repository. 3686 // 3687 // * Failed: The repository failed to associate or disassociate. 3688 // 3689 // * Disassociating: CodeGuru Reviewer is removing the repository's pull 3690 // request notifications and source code access. 3691 // 3692 // * Disassociated: CodeGuru Reviewer successfully disassociated the repository. 3693 // You can create a new association with this repository if you want to review 3694 // source code in it later. You can control access to code reviews created 3695 // in an associated repository with tags after it has been disassociated. 3696 // For more information, see Using tags to control access to associated repositories 3697 // (https://docs.aws.amazon.com/codeguru/latest/reviewer-ug/auth-and-access-control-using-tags.html) 3698 // in the Amazon CodeGuru Reviewer User Guide. 3699 States []*string `location:"querystring" locationName:"State" min:"1" type:"list"` 3700 } 3701 3702 // String returns the string representation. 3703 // 3704 // API parameter values that are decorated as "sensitive" in the API will not 3705 // be included in the string output. The member name will be present, but the 3706 // value will be replaced with "sensitive". 3707 func (s ListRepositoryAssociationsInput) String() string { 3708 return awsutil.Prettify(s) 3709 } 3710 3711 // GoString returns the string representation. 3712 // 3713 // API parameter values that are decorated as "sensitive" in the API will not 3714 // be included in the string output. The member name will be present, but the 3715 // value will be replaced with "sensitive". 3716 func (s ListRepositoryAssociationsInput) GoString() string { 3717 return s.String() 3718 } 3719 3720 // Validate inspects the fields of the type to determine if they are valid. 3721 func (s *ListRepositoryAssociationsInput) Validate() error { 3722 invalidParams := request.ErrInvalidParams{Context: "ListRepositoryAssociationsInput"} 3723 if s.MaxResults != nil && *s.MaxResults < 1 { 3724 invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) 3725 } 3726 if s.Names != nil && len(s.Names) < 1 { 3727 invalidParams.Add(request.NewErrParamMinLen("Names", 1)) 3728 } 3729 if s.NextToken != nil && len(*s.NextToken) < 1 { 3730 invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) 3731 } 3732 if s.Owners != nil && len(s.Owners) < 1 { 3733 invalidParams.Add(request.NewErrParamMinLen("Owners", 1)) 3734 } 3735 if s.ProviderTypes != nil && len(s.ProviderTypes) < 1 { 3736 invalidParams.Add(request.NewErrParamMinLen("ProviderTypes", 1)) 3737 } 3738 if s.States != nil && len(s.States) < 1 { 3739 invalidParams.Add(request.NewErrParamMinLen("States", 1)) 3740 } 3741 3742 if invalidParams.Len() > 0 { 3743 return invalidParams 3744 } 3745 return nil 3746 } 3747 3748 // SetMaxResults sets the MaxResults field's value. 3749 func (s *ListRepositoryAssociationsInput) SetMaxResults(v int64) *ListRepositoryAssociationsInput { 3750 s.MaxResults = &v 3751 return s 3752 } 3753 3754 // SetNames sets the Names field's value. 3755 func (s *ListRepositoryAssociationsInput) SetNames(v []*string) *ListRepositoryAssociationsInput { 3756 s.Names = v 3757 return s 3758 } 3759 3760 // SetNextToken sets the NextToken field's value. 3761 func (s *ListRepositoryAssociationsInput) SetNextToken(v string) *ListRepositoryAssociationsInput { 3762 s.NextToken = &v 3763 return s 3764 } 3765 3766 // SetOwners sets the Owners field's value. 3767 func (s *ListRepositoryAssociationsInput) SetOwners(v []*string) *ListRepositoryAssociationsInput { 3768 s.Owners = v 3769 return s 3770 } 3771 3772 // SetProviderTypes sets the ProviderTypes field's value. 3773 func (s *ListRepositoryAssociationsInput) SetProviderTypes(v []*string) *ListRepositoryAssociationsInput { 3774 s.ProviderTypes = v 3775 return s 3776 } 3777 3778 // SetStates sets the States field's value. 3779 func (s *ListRepositoryAssociationsInput) SetStates(v []*string) *ListRepositoryAssociationsInput { 3780 s.States = v 3781 return s 3782 } 3783 3784 type ListRepositoryAssociationsOutput struct { 3785 _ struct{} `type:"structure"` 3786 3787 // The nextToken value to include in a future ListRecommendations request. When 3788 // the results of a ListRecommendations request exceed maxResults, this value 3789 // can be used to retrieve the next page of results. This value is null when 3790 // there are no more results to return. 3791 NextToken *string `min:"1" type:"string"` 3792 3793 // A list of repository associations that meet the criteria of the request. 3794 RepositoryAssociationSummaries []*RepositoryAssociationSummary `type:"list"` 3795 } 3796 3797 // String returns the string representation. 3798 // 3799 // API parameter values that are decorated as "sensitive" in the API will not 3800 // be included in the string output. The member name will be present, but the 3801 // value will be replaced with "sensitive". 3802 func (s ListRepositoryAssociationsOutput) String() string { 3803 return awsutil.Prettify(s) 3804 } 3805 3806 // GoString returns the string representation. 3807 // 3808 // API parameter values that are decorated as "sensitive" in the API will not 3809 // be included in the string output. The member name will be present, but the 3810 // value will be replaced with "sensitive". 3811 func (s ListRepositoryAssociationsOutput) GoString() string { 3812 return s.String() 3813 } 3814 3815 // SetNextToken sets the NextToken field's value. 3816 func (s *ListRepositoryAssociationsOutput) SetNextToken(v string) *ListRepositoryAssociationsOutput { 3817 s.NextToken = &v 3818 return s 3819 } 3820 3821 // SetRepositoryAssociationSummaries sets the RepositoryAssociationSummaries field's value. 3822 func (s *ListRepositoryAssociationsOutput) SetRepositoryAssociationSummaries(v []*RepositoryAssociationSummary) *ListRepositoryAssociationsOutput { 3823 s.RepositoryAssociationSummaries = v 3824 return s 3825 } 3826 3827 type ListTagsForResourceInput struct { 3828 _ struct{} `type:"structure" nopayload:"true"` 3829 3830 // The Amazon Resource Name (ARN) of the RepositoryAssociation (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociation.html) 3831 // object. You can retrieve this ARN by calling ListRepositoryAssociations (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_ListRepositoryAssociations.html). 3832 // 3833 // ResourceArn is a required field 3834 ResourceArn *string `location:"uri" locationName:"resourceArn" min:"1" type:"string" required:"true"` 3835 } 3836 3837 // String returns the string representation. 3838 // 3839 // API parameter values that are decorated as "sensitive" in the API will not 3840 // be included in the string output. The member name will be present, but the 3841 // value will be replaced with "sensitive". 3842 func (s ListTagsForResourceInput) String() string { 3843 return awsutil.Prettify(s) 3844 } 3845 3846 // GoString returns the string representation. 3847 // 3848 // API parameter values that are decorated as "sensitive" in the API will not 3849 // be included in the string output. The member name will be present, but the 3850 // value will be replaced with "sensitive". 3851 func (s ListTagsForResourceInput) GoString() string { 3852 return s.String() 3853 } 3854 3855 // Validate inspects the fields of the type to determine if they are valid. 3856 func (s *ListTagsForResourceInput) Validate() error { 3857 invalidParams := request.ErrInvalidParams{Context: "ListTagsForResourceInput"} 3858 if s.ResourceArn == nil { 3859 invalidParams.Add(request.NewErrParamRequired("ResourceArn")) 3860 } 3861 if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { 3862 invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) 3863 } 3864 3865 if invalidParams.Len() > 0 { 3866 return invalidParams 3867 } 3868 return nil 3869 } 3870 3871 // SetResourceArn sets the ResourceArn field's value. 3872 func (s *ListTagsForResourceInput) SetResourceArn(v string) *ListTagsForResourceInput { 3873 s.ResourceArn = &v 3874 return s 3875 } 3876 3877 type ListTagsForResourceOutput struct { 3878 _ struct{} `type:"structure"` 3879 3880 // An array of key-value pairs used to tag an associated repository. A tag is 3881 // a custom attribute label with two parts: 3882 // 3883 // * A tag key (for example, CostCenter, Environment, Project, or Secret). 3884 // Tag keys are case sensitive. 3885 // 3886 // * An optional field known as a tag value (for example, 111122223333, Production, 3887 // or a team name). Omitting the tag value is the same as using an empty 3888 // string. Like tag keys, tag values are case sensitive. 3889 Tags map[string]*string `min:"1" type:"map"` 3890 } 3891 3892 // String returns the string representation. 3893 // 3894 // API parameter values that are decorated as "sensitive" in the API will not 3895 // be included in the string output. The member name will be present, but the 3896 // value will be replaced with "sensitive". 3897 func (s ListTagsForResourceOutput) String() string { 3898 return awsutil.Prettify(s) 3899 } 3900 3901 // GoString returns the string representation. 3902 // 3903 // API parameter values that are decorated as "sensitive" in the API will not 3904 // be included in the string output. The member name will be present, but the 3905 // value will be replaced with "sensitive". 3906 func (s ListTagsForResourceOutput) GoString() string { 3907 return s.String() 3908 } 3909 3910 // SetTags sets the Tags field's value. 3911 func (s *ListTagsForResourceOutput) SetTags(v map[string]*string) *ListTagsForResourceOutput { 3912 s.Tags = v 3913 return s 3914 } 3915 3916 // Information about the statistics from the code review. 3917 type Metrics struct { 3918 _ struct{} `type:"structure"` 3919 3920 // Total number of recommendations found in the code review. 3921 FindingsCount *int64 `type:"long"` 3922 3923 // MeteredLinesOfCode is the number of lines of code in the repository where 3924 // the code review happened. This does not include non-code lines such as comments 3925 // and blank lines. 3926 MeteredLinesOfCodeCount *int64 `type:"long"` 3927 } 3928 3929 // String returns the string representation. 3930 // 3931 // API parameter values that are decorated as "sensitive" in the API will not 3932 // be included in the string output. The member name will be present, but the 3933 // value will be replaced with "sensitive". 3934 func (s Metrics) String() string { 3935 return awsutil.Prettify(s) 3936 } 3937 3938 // GoString returns the string representation. 3939 // 3940 // API parameter values that are decorated as "sensitive" in the API will not 3941 // be included in the string output. The member name will be present, but the 3942 // value will be replaced with "sensitive". 3943 func (s Metrics) GoString() string { 3944 return s.String() 3945 } 3946 3947 // SetFindingsCount sets the FindingsCount field's value. 3948 func (s *Metrics) SetFindingsCount(v int64) *Metrics { 3949 s.FindingsCount = &v 3950 return s 3951 } 3952 3953 // SetMeteredLinesOfCodeCount sets the MeteredLinesOfCodeCount field's value. 3954 func (s *Metrics) SetMeteredLinesOfCodeCount(v int64) *Metrics { 3955 s.MeteredLinesOfCodeCount = &v 3956 return s 3957 } 3958 3959 // Information about metrics summaries. 3960 type MetricsSummary struct { 3961 _ struct{} `type:"structure"` 3962 3963 // Total number of recommendations found in the code review. 3964 FindingsCount *int64 `type:"long"` 3965 3966 // Lines of code metered in the code review. For the initial code review pull 3967 // request and all subsequent revisions, this includes all lines of code in 3968 // the files added to the pull request. In subsequent revisions, for files that 3969 // already existed in the pull request, this includes only the changed lines 3970 // of code. In both cases, this does not include non-code lines such as comments 3971 // and import statements. For example, if you submit a pull request containing 3972 // 5 files, each with 500 lines of code, and in a subsequent revision you added 3973 // a new file with 200 lines of code, and also modified a total of 25 lines 3974 // across the initial 5 files, MeteredLinesOfCodeCount includes the first 5 3975 // files (5 * 500 = 2,500 lines), the new file (200 lines) and the 25 changed 3976 // lines of code for a total of 2,725 lines of code. 3977 MeteredLinesOfCodeCount *int64 `type:"long"` 3978 } 3979 3980 // String returns the string representation. 3981 // 3982 // API parameter values that are decorated as "sensitive" in the API will not 3983 // be included in the string output. The member name will be present, but the 3984 // value will be replaced with "sensitive". 3985 func (s MetricsSummary) String() string { 3986 return awsutil.Prettify(s) 3987 } 3988 3989 // GoString returns the string representation. 3990 // 3991 // API parameter values that are decorated as "sensitive" in the API will not 3992 // be included in the string output. The member name will be present, but the 3993 // value will be replaced with "sensitive". 3994 func (s MetricsSummary) GoString() string { 3995 return s.String() 3996 } 3997 3998 // SetFindingsCount sets the FindingsCount field's value. 3999 func (s *MetricsSummary) SetFindingsCount(v int64) *MetricsSummary { 4000 s.FindingsCount = &v 4001 return s 4002 } 4003 4004 // SetMeteredLinesOfCodeCount sets the MeteredLinesOfCodeCount field's value. 4005 func (s *MetricsSummary) SetMeteredLinesOfCodeCount(v int64) *MetricsSummary { 4006 s.MeteredLinesOfCodeCount = &v 4007 return s 4008 } 4009 4010 // The resource specified in the request was not found. 4011 type NotFoundException struct { 4012 _ struct{} `type:"structure"` 4013 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 4014 4015 Message_ *string `locationName:"Message" type:"string"` 4016 } 4017 4018 // String returns the string representation. 4019 // 4020 // API parameter values that are decorated as "sensitive" in the API will not 4021 // be included in the string output. The member name will be present, but the 4022 // value will be replaced with "sensitive". 4023 func (s NotFoundException) String() string { 4024 return awsutil.Prettify(s) 4025 } 4026 4027 // GoString returns the string representation. 4028 // 4029 // API parameter values that are decorated as "sensitive" in the API will not 4030 // be included in the string output. The member name will be present, but the 4031 // value will be replaced with "sensitive". 4032 func (s NotFoundException) GoString() string { 4033 return s.String() 4034 } 4035 4036 func newErrorNotFoundException(v protocol.ResponseMetadata) error { 4037 return &NotFoundException{ 4038 RespMetadata: v, 4039 } 4040 } 4041 4042 // Code returns the exception type name. 4043 func (s *NotFoundException) Code() string { 4044 return "NotFoundException" 4045 } 4046 4047 // Message returns the exception's message. 4048 func (s *NotFoundException) Message() string { 4049 if s.Message_ != nil { 4050 return *s.Message_ 4051 } 4052 return "" 4053 } 4054 4055 // OrigErr always returns nil, satisfies awserr.Error interface. 4056 func (s *NotFoundException) OrigErr() error { 4057 return nil 4058 } 4059 4060 func (s *NotFoundException) Error() string { 4061 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 4062 } 4063 4064 // Status code returns the HTTP status code for the request's response error. 4065 func (s *NotFoundException) StatusCode() int { 4066 return s.RespMetadata.StatusCode 4067 } 4068 4069 // RequestID returns the service's response RequestID for request. 4070 func (s *NotFoundException) RequestID() string { 4071 return s.RespMetadata.RequestID 4072 } 4073 4074 type PutRecommendationFeedbackInput struct { 4075 _ struct{} `type:"structure"` 4076 4077 // The Amazon Resource Name (ARN) of the CodeReview (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_CodeReview.html) 4078 // object. 4079 // 4080 // CodeReviewArn is a required field 4081 CodeReviewArn *string `min:"1" type:"string" required:"true"` 4082 4083 // List for storing reactions. Reactions are utf-8 text code for emojis. If 4084 // you send an empty list it clears all your feedback. 4085 // 4086 // Reactions is a required field 4087 Reactions []*string `type:"list" required:"true"` 4088 4089 // The recommendation ID that can be used to track the provided recommendations 4090 // and then to collect the feedback. 4091 // 4092 // RecommendationId is a required field 4093 RecommendationId *string `min:"1" type:"string" required:"true"` 4094 } 4095 4096 // String returns the string representation. 4097 // 4098 // API parameter values that are decorated as "sensitive" in the API will not 4099 // be included in the string output. The member name will be present, but the 4100 // value will be replaced with "sensitive". 4101 func (s PutRecommendationFeedbackInput) String() string { 4102 return awsutil.Prettify(s) 4103 } 4104 4105 // GoString returns the string representation. 4106 // 4107 // API parameter values that are decorated as "sensitive" in the API will not 4108 // be included in the string output. The member name will be present, but the 4109 // value will be replaced with "sensitive". 4110 func (s PutRecommendationFeedbackInput) GoString() string { 4111 return s.String() 4112 } 4113 4114 // Validate inspects the fields of the type to determine if they are valid. 4115 func (s *PutRecommendationFeedbackInput) Validate() error { 4116 invalidParams := request.ErrInvalidParams{Context: "PutRecommendationFeedbackInput"} 4117 if s.CodeReviewArn == nil { 4118 invalidParams.Add(request.NewErrParamRequired("CodeReviewArn")) 4119 } 4120 if s.CodeReviewArn != nil && len(*s.CodeReviewArn) < 1 { 4121 invalidParams.Add(request.NewErrParamMinLen("CodeReviewArn", 1)) 4122 } 4123 if s.Reactions == nil { 4124 invalidParams.Add(request.NewErrParamRequired("Reactions")) 4125 } 4126 if s.RecommendationId == nil { 4127 invalidParams.Add(request.NewErrParamRequired("RecommendationId")) 4128 } 4129 if s.RecommendationId != nil && len(*s.RecommendationId) < 1 { 4130 invalidParams.Add(request.NewErrParamMinLen("RecommendationId", 1)) 4131 } 4132 4133 if invalidParams.Len() > 0 { 4134 return invalidParams 4135 } 4136 return nil 4137 } 4138 4139 // SetCodeReviewArn sets the CodeReviewArn field's value. 4140 func (s *PutRecommendationFeedbackInput) SetCodeReviewArn(v string) *PutRecommendationFeedbackInput { 4141 s.CodeReviewArn = &v 4142 return s 4143 } 4144 4145 // SetReactions sets the Reactions field's value. 4146 func (s *PutRecommendationFeedbackInput) SetReactions(v []*string) *PutRecommendationFeedbackInput { 4147 s.Reactions = v 4148 return s 4149 } 4150 4151 // SetRecommendationId sets the RecommendationId field's value. 4152 func (s *PutRecommendationFeedbackInput) SetRecommendationId(v string) *PutRecommendationFeedbackInput { 4153 s.RecommendationId = &v 4154 return s 4155 } 4156 4157 type PutRecommendationFeedbackOutput struct { 4158 _ struct{} `type:"structure" nopayload:"true"` 4159 } 4160 4161 // String returns the string representation. 4162 // 4163 // API parameter values that are decorated as "sensitive" in the API will not 4164 // be included in the string output. The member name will be present, but the 4165 // value will be replaced with "sensitive". 4166 func (s PutRecommendationFeedbackOutput) String() string { 4167 return awsutil.Prettify(s) 4168 } 4169 4170 // GoString returns the string representation. 4171 // 4172 // API parameter values that are decorated as "sensitive" in the API will not 4173 // be included in the string output. The member name will be present, but the 4174 // value will be replaced with "sensitive". 4175 func (s PutRecommendationFeedbackOutput) GoString() string { 4176 return s.String() 4177 } 4178 4179 // Information about the recommendation feedback. 4180 type RecommendationFeedback struct { 4181 _ struct{} `type:"structure"` 4182 4183 // The Amazon Resource Name (ARN) of the CodeReview (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_CodeReview.html) 4184 // object. 4185 CodeReviewArn *string `min:"1" type:"string"` 4186 4187 // The time at which the feedback was created. 4188 CreatedTimeStamp *time.Time `type:"timestamp"` 4189 4190 // The time at which the feedback was last updated. 4191 LastUpdatedTimeStamp *time.Time `type:"timestamp"` 4192 4193 // List for storing reactions. Reactions are utf-8 text code for emojis. You 4194 // can send an empty list to clear off all your feedback. 4195 Reactions []*string `type:"list"` 4196 4197 // The recommendation ID that can be used to track the provided recommendations. 4198 // Later on it can be used to collect the feedback. 4199 RecommendationId *string `min:"1" type:"string"` 4200 4201 // The ID of the user that made the API call. 4202 // 4203 // The UserId is an IAM principal that can be specified as an Amazon Web Services 4204 // account ID or an Amazon Resource Name (ARN). For more information, see Specifying 4205 // a Principal (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html#Principal_specifying) 4206 // in the Amazon Web Services Identity and Access Management User Guide. 4207 UserId *string `min:"1" type:"string"` 4208 } 4209 4210 // String returns the string representation. 4211 // 4212 // API parameter values that are decorated as "sensitive" in the API will not 4213 // be included in the string output. The member name will be present, but the 4214 // value will be replaced with "sensitive". 4215 func (s RecommendationFeedback) String() string { 4216 return awsutil.Prettify(s) 4217 } 4218 4219 // GoString returns the string representation. 4220 // 4221 // API parameter values that are decorated as "sensitive" in the API will not 4222 // be included in the string output. The member name will be present, but the 4223 // value will be replaced with "sensitive". 4224 func (s RecommendationFeedback) GoString() string { 4225 return s.String() 4226 } 4227 4228 // SetCodeReviewArn sets the CodeReviewArn field's value. 4229 func (s *RecommendationFeedback) SetCodeReviewArn(v string) *RecommendationFeedback { 4230 s.CodeReviewArn = &v 4231 return s 4232 } 4233 4234 // SetCreatedTimeStamp sets the CreatedTimeStamp field's value. 4235 func (s *RecommendationFeedback) SetCreatedTimeStamp(v time.Time) *RecommendationFeedback { 4236 s.CreatedTimeStamp = &v 4237 return s 4238 } 4239 4240 // SetLastUpdatedTimeStamp sets the LastUpdatedTimeStamp field's value. 4241 func (s *RecommendationFeedback) SetLastUpdatedTimeStamp(v time.Time) *RecommendationFeedback { 4242 s.LastUpdatedTimeStamp = &v 4243 return s 4244 } 4245 4246 // SetReactions sets the Reactions field's value. 4247 func (s *RecommendationFeedback) SetReactions(v []*string) *RecommendationFeedback { 4248 s.Reactions = v 4249 return s 4250 } 4251 4252 // SetRecommendationId sets the RecommendationId field's value. 4253 func (s *RecommendationFeedback) SetRecommendationId(v string) *RecommendationFeedback { 4254 s.RecommendationId = &v 4255 return s 4256 } 4257 4258 // SetUserId sets the UserId field's value. 4259 func (s *RecommendationFeedback) SetUserId(v string) *RecommendationFeedback { 4260 s.UserId = &v 4261 return s 4262 } 4263 4264 // Information about recommendation feedback summaries. 4265 type RecommendationFeedbackSummary struct { 4266 _ struct{} `type:"structure"` 4267 4268 // List for storing reactions. Reactions are utf-8 text code for emojis. 4269 Reactions []*string `type:"list"` 4270 4271 // The recommendation ID that can be used to track the provided recommendations. 4272 // Later on it can be used to collect the feedback. 4273 RecommendationId *string `min:"1" type:"string"` 4274 4275 // The ID of the user that gave the feedback. 4276 // 4277 // The UserId is an IAM principal that can be specified as an Amazon Web Services 4278 // account ID or an Amazon Resource Name (ARN). For more information, see Specifying 4279 // a Principal (https://docs.aws.amazon.com/IAM/latest/UserGuide/reference_policies_elements_principal.html#Principal_specifying) 4280 // in the Amazon Web Services Identity and Access Management User Guide. 4281 UserId *string `min:"1" type:"string"` 4282 } 4283 4284 // String returns the string representation. 4285 // 4286 // API parameter values that are decorated as "sensitive" in the API will not 4287 // be included in the string output. The member name will be present, but the 4288 // value will be replaced with "sensitive". 4289 func (s RecommendationFeedbackSummary) String() string { 4290 return awsutil.Prettify(s) 4291 } 4292 4293 // GoString returns the string representation. 4294 // 4295 // API parameter values that are decorated as "sensitive" in the API will not 4296 // be included in the string output. The member name will be present, but the 4297 // value will be replaced with "sensitive". 4298 func (s RecommendationFeedbackSummary) GoString() string { 4299 return s.String() 4300 } 4301 4302 // SetReactions sets the Reactions field's value. 4303 func (s *RecommendationFeedbackSummary) SetReactions(v []*string) *RecommendationFeedbackSummary { 4304 s.Reactions = v 4305 return s 4306 } 4307 4308 // SetRecommendationId sets the RecommendationId field's value. 4309 func (s *RecommendationFeedbackSummary) SetRecommendationId(v string) *RecommendationFeedbackSummary { 4310 s.RecommendationId = &v 4311 return s 4312 } 4313 4314 // SetUserId sets the UserId field's value. 4315 func (s *RecommendationFeedbackSummary) SetUserId(v string) *RecommendationFeedbackSummary { 4316 s.UserId = &v 4317 return s 4318 } 4319 4320 // Information about recommendations. 4321 type RecommendationSummary struct { 4322 _ struct{} `type:"structure"` 4323 4324 // A description of the recommendation generated by CodeGuru Reviewer for the 4325 // lines of code between the start line and the end line. 4326 Description *string `min:"1" type:"string"` 4327 4328 // Last line where the recommendation is applicable in the source commit or 4329 // source branch. For a single line comment the start line and end line values 4330 // are the same. 4331 EndLine *int64 `type:"integer"` 4332 4333 // Name of the file on which a recommendation is provided. 4334 FilePath *string `min:"1" type:"string"` 4335 4336 // The type of a recommendation. 4337 RecommendationCategory *string `type:"string" enum:"RecommendationCategory"` 4338 4339 // The recommendation ID that can be used to track the provided recommendations. 4340 // Later on it can be used to collect the feedback. 4341 RecommendationId *string `min:"1" type:"string"` 4342 4343 // Metadata about a rule. Rule metadata includes an ID, a name, a list of tags, 4344 // and a short and long description. CodeGuru Reviewer uses rules to analyze 4345 // code. A rule's recommendation is included in analysis results if code is 4346 // detected that violates the rule. 4347 RuleMetadata *RuleMetadata `type:"structure"` 4348 4349 // The severity of the issue in the code that generated this recommendation. 4350 Severity *string `type:"string" enum:"Severity"` 4351 4352 // Start line from where the recommendation is applicable in the source commit 4353 // or source branch. 4354 StartLine *int64 `type:"integer"` 4355 } 4356 4357 // String returns the string representation. 4358 // 4359 // API parameter values that are decorated as "sensitive" in the API will not 4360 // be included in the string output. The member name will be present, but the 4361 // value will be replaced with "sensitive". 4362 func (s RecommendationSummary) String() string { 4363 return awsutil.Prettify(s) 4364 } 4365 4366 // GoString returns the string representation. 4367 // 4368 // API parameter values that are decorated as "sensitive" in the API will not 4369 // be included in the string output. The member name will be present, but the 4370 // value will be replaced with "sensitive". 4371 func (s RecommendationSummary) GoString() string { 4372 return s.String() 4373 } 4374 4375 // SetDescription sets the Description field's value. 4376 func (s *RecommendationSummary) SetDescription(v string) *RecommendationSummary { 4377 s.Description = &v 4378 return s 4379 } 4380 4381 // SetEndLine sets the EndLine field's value. 4382 func (s *RecommendationSummary) SetEndLine(v int64) *RecommendationSummary { 4383 s.EndLine = &v 4384 return s 4385 } 4386 4387 // SetFilePath sets the FilePath field's value. 4388 func (s *RecommendationSummary) SetFilePath(v string) *RecommendationSummary { 4389 s.FilePath = &v 4390 return s 4391 } 4392 4393 // SetRecommendationCategory sets the RecommendationCategory field's value. 4394 func (s *RecommendationSummary) SetRecommendationCategory(v string) *RecommendationSummary { 4395 s.RecommendationCategory = &v 4396 return s 4397 } 4398 4399 // SetRecommendationId sets the RecommendationId field's value. 4400 func (s *RecommendationSummary) SetRecommendationId(v string) *RecommendationSummary { 4401 s.RecommendationId = &v 4402 return s 4403 } 4404 4405 // SetRuleMetadata sets the RuleMetadata field's value. 4406 func (s *RecommendationSummary) SetRuleMetadata(v *RuleMetadata) *RecommendationSummary { 4407 s.RuleMetadata = v 4408 return s 4409 } 4410 4411 // SetSeverity sets the Severity field's value. 4412 func (s *RecommendationSummary) SetSeverity(v string) *RecommendationSummary { 4413 s.Severity = &v 4414 return s 4415 } 4416 4417 // SetStartLine sets the StartLine field's value. 4418 func (s *RecommendationSummary) SetStartLine(v int64) *RecommendationSummary { 4419 s.StartLine = &v 4420 return s 4421 } 4422 4423 // Information about an associated Amazon Web Services CodeCommit repository 4424 // or an associated repository that is managed by Amazon Web Services CodeStar 4425 // Connections (for example, Bitbucket). This Repository object is not used 4426 // if your source code is in an associated GitHub repository. 4427 type Repository struct { 4428 _ struct{} `type:"structure"` 4429 4430 // Information about a Bitbucket repository. 4431 Bitbucket *ThirdPartySourceRepository `type:"structure"` 4432 4433 // Information about an Amazon Web Services CodeCommit repository. 4434 CodeCommit *CodeCommitRepository `type:"structure"` 4435 4436 // Information about a GitHub Enterprise Server repository. 4437 GitHubEnterpriseServer *ThirdPartySourceRepository `type:"structure"` 4438 4439 // Information about a repository in an S3 bucket. 4440 S3Bucket *S3Repository `type:"structure"` 4441 } 4442 4443 // String returns the string representation. 4444 // 4445 // API parameter values that are decorated as "sensitive" in the API will not 4446 // be included in the string output. The member name will be present, but the 4447 // value will be replaced with "sensitive". 4448 func (s Repository) String() string { 4449 return awsutil.Prettify(s) 4450 } 4451 4452 // GoString returns the string representation. 4453 // 4454 // API parameter values that are decorated as "sensitive" in the API will not 4455 // be included in the string output. The member name will be present, but the 4456 // value will be replaced with "sensitive". 4457 func (s Repository) GoString() string { 4458 return s.String() 4459 } 4460 4461 // Validate inspects the fields of the type to determine if they are valid. 4462 func (s *Repository) Validate() error { 4463 invalidParams := request.ErrInvalidParams{Context: "Repository"} 4464 if s.Bitbucket != nil { 4465 if err := s.Bitbucket.Validate(); err != nil { 4466 invalidParams.AddNested("Bitbucket", err.(request.ErrInvalidParams)) 4467 } 4468 } 4469 if s.CodeCommit != nil { 4470 if err := s.CodeCommit.Validate(); err != nil { 4471 invalidParams.AddNested("CodeCommit", err.(request.ErrInvalidParams)) 4472 } 4473 } 4474 if s.GitHubEnterpriseServer != nil { 4475 if err := s.GitHubEnterpriseServer.Validate(); err != nil { 4476 invalidParams.AddNested("GitHubEnterpriseServer", err.(request.ErrInvalidParams)) 4477 } 4478 } 4479 if s.S3Bucket != nil { 4480 if err := s.S3Bucket.Validate(); err != nil { 4481 invalidParams.AddNested("S3Bucket", err.(request.ErrInvalidParams)) 4482 } 4483 } 4484 4485 if invalidParams.Len() > 0 { 4486 return invalidParams 4487 } 4488 return nil 4489 } 4490 4491 // SetBitbucket sets the Bitbucket field's value. 4492 func (s *Repository) SetBitbucket(v *ThirdPartySourceRepository) *Repository { 4493 s.Bitbucket = v 4494 return s 4495 } 4496 4497 // SetCodeCommit sets the CodeCommit field's value. 4498 func (s *Repository) SetCodeCommit(v *CodeCommitRepository) *Repository { 4499 s.CodeCommit = v 4500 return s 4501 } 4502 4503 // SetGitHubEnterpriseServer sets the GitHubEnterpriseServer field's value. 4504 func (s *Repository) SetGitHubEnterpriseServer(v *ThirdPartySourceRepository) *Repository { 4505 s.GitHubEnterpriseServer = v 4506 return s 4507 } 4508 4509 // SetS3Bucket sets the S3Bucket field's value. 4510 func (s *Repository) SetS3Bucket(v *S3Repository) *Repository { 4511 s.S3Bucket = v 4512 return s 4513 } 4514 4515 // A code review type that analyzes all code under a specified branch in an 4516 // associated repository. The associated repository is specified using its ARN 4517 // when you call CreateCodeReview (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_CreateCodeReview). 4518 type RepositoryAnalysis struct { 4519 _ struct{} `type:"structure"` 4520 4521 // A SourceCodeType (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_SourceCodeType) 4522 // that specifies the tip of a branch in an associated repository. 4523 RepositoryHead *RepositoryHeadSourceCodeType `type:"structure"` 4524 4525 // Specifies the source code that is analyzed in a code review. 4526 SourceCodeType *SourceCodeType `type:"structure"` 4527 } 4528 4529 // String returns the string representation. 4530 // 4531 // API parameter values that are decorated as "sensitive" in the API will not 4532 // be included in the string output. The member name will be present, but the 4533 // value will be replaced with "sensitive". 4534 func (s RepositoryAnalysis) String() string { 4535 return awsutil.Prettify(s) 4536 } 4537 4538 // GoString returns the string representation. 4539 // 4540 // API parameter values that are decorated as "sensitive" in the API will not 4541 // be included in the string output. The member name will be present, but the 4542 // value will be replaced with "sensitive". 4543 func (s RepositoryAnalysis) GoString() string { 4544 return s.String() 4545 } 4546 4547 // Validate inspects the fields of the type to determine if they are valid. 4548 func (s *RepositoryAnalysis) Validate() error { 4549 invalidParams := request.ErrInvalidParams{Context: "RepositoryAnalysis"} 4550 if s.RepositoryHead != nil { 4551 if err := s.RepositoryHead.Validate(); err != nil { 4552 invalidParams.AddNested("RepositoryHead", err.(request.ErrInvalidParams)) 4553 } 4554 } 4555 if s.SourceCodeType != nil { 4556 if err := s.SourceCodeType.Validate(); err != nil { 4557 invalidParams.AddNested("SourceCodeType", err.(request.ErrInvalidParams)) 4558 } 4559 } 4560 4561 if invalidParams.Len() > 0 { 4562 return invalidParams 4563 } 4564 return nil 4565 } 4566 4567 // SetRepositoryHead sets the RepositoryHead field's value. 4568 func (s *RepositoryAnalysis) SetRepositoryHead(v *RepositoryHeadSourceCodeType) *RepositoryAnalysis { 4569 s.RepositoryHead = v 4570 return s 4571 } 4572 4573 // SetSourceCodeType sets the SourceCodeType field's value. 4574 func (s *RepositoryAnalysis) SetSourceCodeType(v *SourceCodeType) *RepositoryAnalysis { 4575 s.SourceCodeType = v 4576 return s 4577 } 4578 4579 // Information about a repository association. The DescribeRepositoryAssociation 4580 // (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_DescribeRepositoryAssociation.html) 4581 // operation returns a RepositoryAssociation object. 4582 type RepositoryAssociation struct { 4583 _ struct{} `type:"structure"` 4584 4585 // The Amazon Resource Name (ARN) identifying the repository association. 4586 AssociationArn *string `min:"1" type:"string"` 4587 4588 // The ID of the repository association. 4589 AssociationId *string `min:"1" type:"string"` 4590 4591 // The Amazon Resource Name (ARN) of an Amazon Web Services CodeStar Connections 4592 // connection. Its format is arn:aws:codestar-connections:region-id:aws-account_id:connection/connection-id. 4593 // For more information, see Connection (https://docs.aws.amazon.com/codestar-connections/latest/APIReference/API_Connection.html) 4594 // in the Amazon Web Services CodeStar Connections API Reference. 4595 ConnectionArn *string `type:"string"` 4596 4597 // The time, in milliseconds since the epoch, when the repository association 4598 // was created. 4599 CreatedTimeStamp *time.Time `type:"timestamp"` 4600 4601 // A KMSKeyDetails object that contains: 4602 // 4603 // * The encryption option for this repository association. It is either 4604 // owned by Amazon Web Services Key Management Service (KMS) (AWS_OWNED_CMK) 4605 // or customer managed (CUSTOMER_MANAGED_CMK). 4606 // 4607 // * The ID of the Amazon Web Services KMS key that is associated with this 4608 // respository association. 4609 KMSKeyDetails *KMSKeyDetails `type:"structure"` 4610 4611 // The time, in milliseconds since the epoch, when the repository association 4612 // was last updated. 4613 LastUpdatedTimeStamp *time.Time `type:"timestamp"` 4614 4615 // The name of the repository. 4616 Name *string `min:"1" type:"string"` 4617 4618 // The owner of the repository. For an Amazon Web Services CodeCommit repository, 4619 // this is the Amazon Web Services account ID of the account that owns the repository. 4620 // For a GitHub, GitHub Enterprise Server, or Bitbucket repository, this is 4621 // the username for the account that owns the repository. For an S3 repository, 4622 // it can be the username or Amazon Web Services account ID. 4623 Owner *string `min:"1" type:"string"` 4624 4625 // The provider type of the repository association. 4626 ProviderType *string `type:"string" enum:"ProviderType"` 4627 4628 // Specifies the name of an S3 bucket and a CodeArtifacts object that contains 4629 // the S3 object keys for a source code .zip file and for a build artifacts 4630 // .zip file that contains .jar or .class files. 4631 S3RepositoryDetails *S3RepositoryDetails `type:"structure"` 4632 4633 // The state of the repository association. 4634 // 4635 // The valid repository association states are: 4636 // 4637 // * Associated: The repository association is complete. 4638 // 4639 // * Associating: CodeGuru Reviewer is: Setting up pull request notifications. 4640 // This is required for pull requests to trigger a CodeGuru Reviewer review. 4641 // If your repository ProviderType is GitHub, GitHub Enterprise Server, or 4642 // Bitbucket, CodeGuru Reviewer creates webhooks in your repository to trigger 4643 // CodeGuru Reviewer reviews. If you delete these webhooks, reviews of code 4644 // in your repository cannot be triggered. Setting up source code access. 4645 // This is required for CodeGuru Reviewer to securely clone code in your 4646 // repository. 4647 // 4648 // * Failed: The repository failed to associate or disassociate. 4649 // 4650 // * Disassociating: CodeGuru Reviewer is removing the repository's pull 4651 // request notifications and source code access. 4652 // 4653 // * Disassociated: CodeGuru Reviewer successfully disassociated the repository. 4654 // You can create a new association with this repository if you want to review 4655 // source code in it later. You can control access to code reviews created 4656 // in an associated repository with tags after it has been disassociated. 4657 // For more information, see Using tags to control access to associated repositories 4658 // (https://docs.aws.amazon.com/codeguru/latest/reviewer-ug/auth-and-access-control-using-tags.html) 4659 // in the Amazon CodeGuru Reviewer User Guide. 4660 State *string `type:"string" enum:"RepositoryAssociationState"` 4661 4662 // A description of why the repository association is in the current state. 4663 StateReason *string `type:"string"` 4664 } 4665 4666 // String returns the string representation. 4667 // 4668 // API parameter values that are decorated as "sensitive" in the API will not 4669 // be included in the string output. The member name will be present, but the 4670 // value will be replaced with "sensitive". 4671 func (s RepositoryAssociation) String() string { 4672 return awsutil.Prettify(s) 4673 } 4674 4675 // GoString returns the string representation. 4676 // 4677 // API parameter values that are decorated as "sensitive" in the API will not 4678 // be included in the string output. The member name will be present, but the 4679 // value will be replaced with "sensitive". 4680 func (s RepositoryAssociation) GoString() string { 4681 return s.String() 4682 } 4683 4684 // SetAssociationArn sets the AssociationArn field's value. 4685 func (s *RepositoryAssociation) SetAssociationArn(v string) *RepositoryAssociation { 4686 s.AssociationArn = &v 4687 return s 4688 } 4689 4690 // SetAssociationId sets the AssociationId field's value. 4691 func (s *RepositoryAssociation) SetAssociationId(v string) *RepositoryAssociation { 4692 s.AssociationId = &v 4693 return s 4694 } 4695 4696 // SetConnectionArn sets the ConnectionArn field's value. 4697 func (s *RepositoryAssociation) SetConnectionArn(v string) *RepositoryAssociation { 4698 s.ConnectionArn = &v 4699 return s 4700 } 4701 4702 // SetCreatedTimeStamp sets the CreatedTimeStamp field's value. 4703 func (s *RepositoryAssociation) SetCreatedTimeStamp(v time.Time) *RepositoryAssociation { 4704 s.CreatedTimeStamp = &v 4705 return s 4706 } 4707 4708 // SetKMSKeyDetails sets the KMSKeyDetails field's value. 4709 func (s *RepositoryAssociation) SetKMSKeyDetails(v *KMSKeyDetails) *RepositoryAssociation { 4710 s.KMSKeyDetails = v 4711 return s 4712 } 4713 4714 // SetLastUpdatedTimeStamp sets the LastUpdatedTimeStamp field's value. 4715 func (s *RepositoryAssociation) SetLastUpdatedTimeStamp(v time.Time) *RepositoryAssociation { 4716 s.LastUpdatedTimeStamp = &v 4717 return s 4718 } 4719 4720 // SetName sets the Name field's value. 4721 func (s *RepositoryAssociation) SetName(v string) *RepositoryAssociation { 4722 s.Name = &v 4723 return s 4724 } 4725 4726 // SetOwner sets the Owner field's value. 4727 func (s *RepositoryAssociation) SetOwner(v string) *RepositoryAssociation { 4728 s.Owner = &v 4729 return s 4730 } 4731 4732 // SetProviderType sets the ProviderType field's value. 4733 func (s *RepositoryAssociation) SetProviderType(v string) *RepositoryAssociation { 4734 s.ProviderType = &v 4735 return s 4736 } 4737 4738 // SetS3RepositoryDetails sets the S3RepositoryDetails field's value. 4739 func (s *RepositoryAssociation) SetS3RepositoryDetails(v *S3RepositoryDetails) *RepositoryAssociation { 4740 s.S3RepositoryDetails = v 4741 return s 4742 } 4743 4744 // SetState sets the State field's value. 4745 func (s *RepositoryAssociation) SetState(v string) *RepositoryAssociation { 4746 s.State = &v 4747 return s 4748 } 4749 4750 // SetStateReason sets the StateReason field's value. 4751 func (s *RepositoryAssociation) SetStateReason(v string) *RepositoryAssociation { 4752 s.StateReason = &v 4753 return s 4754 } 4755 4756 // Summary information about a repository association. The ListRepositoryAssociations 4757 // (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_ListRepositoryAssociations.html) 4758 // operation returns a list of RepositoryAssociationSummary objects. 4759 type RepositoryAssociationSummary struct { 4760 _ struct{} `type:"structure"` 4761 4762 // The Amazon Resource Name (ARN) of the RepositoryAssociation (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociation.html) 4763 // object. You can retrieve this ARN by calling ListRepositoryAssociations (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_ListRepositoryAssociations.html). 4764 AssociationArn *string `min:"1" type:"string"` 4765 4766 // The repository association ID. 4767 AssociationId *string `min:"1" type:"string"` 4768 4769 // The Amazon Resource Name (ARN) of an Amazon Web Services CodeStar Connections 4770 // connection. Its format is arn:aws:codestar-connections:region-id:aws-account_id:connection/connection-id. 4771 // For more information, see Connection (https://docs.aws.amazon.com/codestar-connections/latest/APIReference/API_Connection.html) 4772 // in the Amazon Web Services CodeStar Connections API Reference. 4773 ConnectionArn *string `type:"string"` 4774 4775 // The time, in milliseconds since the epoch, since the repository association 4776 // was last updated. 4777 LastUpdatedTimeStamp *time.Time `type:"timestamp"` 4778 4779 // The name of the repository association. 4780 Name *string `min:"1" type:"string"` 4781 4782 // The owner of the repository. For an Amazon Web Services CodeCommit repository, 4783 // this is the Amazon Web Services account ID of the account that owns the repository. 4784 // For a GitHub, GitHub Enterprise Server, or Bitbucket repository, this is 4785 // the username for the account that owns the repository. For an S3 repository, 4786 // it can be the username or Amazon Web Services account ID. 4787 Owner *string `min:"1" type:"string"` 4788 4789 // The provider type of the repository association. 4790 ProviderType *string `type:"string" enum:"ProviderType"` 4791 4792 // The state of the repository association. 4793 // 4794 // The valid repository association states are: 4795 // 4796 // * Associated: The repository association is complete. 4797 // 4798 // * Associating: CodeGuru Reviewer is: Setting up pull request notifications. 4799 // This is required for pull requests to trigger a CodeGuru Reviewer review. 4800 // If your repository ProviderType is GitHub, GitHub Enterprise Server, or 4801 // Bitbucket, CodeGuru Reviewer creates webhooks in your repository to trigger 4802 // CodeGuru Reviewer reviews. If you delete these webhooks, reviews of code 4803 // in your repository cannot be triggered. Setting up source code access. 4804 // This is required for CodeGuru Reviewer to securely clone code in your 4805 // repository. 4806 // 4807 // * Failed: The repository failed to associate or disassociate. 4808 // 4809 // * Disassociating: CodeGuru Reviewer is removing the repository's pull 4810 // request notifications and source code access. 4811 // 4812 // * Disassociated: CodeGuru Reviewer successfully disassociated the repository. 4813 // You can create a new association with this repository if you want to review 4814 // source code in it later. You can control access to code reviews created 4815 // in an associated repository with tags after it has been disassociated. 4816 // For more information, see Using tags to control access to associated repositories 4817 // (https://docs.aws.amazon.com/codeguru/latest/reviewer-ug/auth-and-access-control-using-tags.html) 4818 // in the Amazon CodeGuru Reviewer User Guide. 4819 State *string `type:"string" enum:"RepositoryAssociationState"` 4820 } 4821 4822 // String returns the string representation. 4823 // 4824 // API parameter values that are decorated as "sensitive" in the API will not 4825 // be included in the string output. The member name will be present, but the 4826 // value will be replaced with "sensitive". 4827 func (s RepositoryAssociationSummary) String() string { 4828 return awsutil.Prettify(s) 4829 } 4830 4831 // GoString returns the string representation. 4832 // 4833 // API parameter values that are decorated as "sensitive" in the API will not 4834 // be included in the string output. The member name will be present, but the 4835 // value will be replaced with "sensitive". 4836 func (s RepositoryAssociationSummary) GoString() string { 4837 return s.String() 4838 } 4839 4840 // SetAssociationArn sets the AssociationArn field's value. 4841 func (s *RepositoryAssociationSummary) SetAssociationArn(v string) *RepositoryAssociationSummary { 4842 s.AssociationArn = &v 4843 return s 4844 } 4845 4846 // SetAssociationId sets the AssociationId field's value. 4847 func (s *RepositoryAssociationSummary) SetAssociationId(v string) *RepositoryAssociationSummary { 4848 s.AssociationId = &v 4849 return s 4850 } 4851 4852 // SetConnectionArn sets the ConnectionArn field's value. 4853 func (s *RepositoryAssociationSummary) SetConnectionArn(v string) *RepositoryAssociationSummary { 4854 s.ConnectionArn = &v 4855 return s 4856 } 4857 4858 // SetLastUpdatedTimeStamp sets the LastUpdatedTimeStamp field's value. 4859 func (s *RepositoryAssociationSummary) SetLastUpdatedTimeStamp(v time.Time) *RepositoryAssociationSummary { 4860 s.LastUpdatedTimeStamp = &v 4861 return s 4862 } 4863 4864 // SetName sets the Name field's value. 4865 func (s *RepositoryAssociationSummary) SetName(v string) *RepositoryAssociationSummary { 4866 s.Name = &v 4867 return s 4868 } 4869 4870 // SetOwner sets the Owner field's value. 4871 func (s *RepositoryAssociationSummary) SetOwner(v string) *RepositoryAssociationSummary { 4872 s.Owner = &v 4873 return s 4874 } 4875 4876 // SetProviderType sets the ProviderType field's value. 4877 func (s *RepositoryAssociationSummary) SetProviderType(v string) *RepositoryAssociationSummary { 4878 s.ProviderType = &v 4879 return s 4880 } 4881 4882 // SetState sets the State field's value. 4883 func (s *RepositoryAssociationSummary) SetState(v string) *RepositoryAssociationSummary { 4884 s.State = &v 4885 return s 4886 } 4887 4888 // A SourceCodeType (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_SourceCodeType) 4889 // that specifies the tip of a branch in an associated repository. 4890 type RepositoryHeadSourceCodeType struct { 4891 _ struct{} `type:"structure"` 4892 4893 // The name of the branch in an associated repository. The RepositoryHeadSourceCodeType 4894 // specifies the tip of this branch. 4895 // 4896 // BranchName is a required field 4897 BranchName *string `min:"1" type:"string" required:"true"` 4898 } 4899 4900 // String returns the string representation. 4901 // 4902 // API parameter values that are decorated as "sensitive" in the API will not 4903 // be included in the string output. The member name will be present, but the 4904 // value will be replaced with "sensitive". 4905 func (s RepositoryHeadSourceCodeType) String() string { 4906 return awsutil.Prettify(s) 4907 } 4908 4909 // GoString returns the string representation. 4910 // 4911 // API parameter values that are decorated as "sensitive" in the API will not 4912 // be included in the string output. The member name will be present, but the 4913 // value will be replaced with "sensitive". 4914 func (s RepositoryHeadSourceCodeType) GoString() string { 4915 return s.String() 4916 } 4917 4918 // Validate inspects the fields of the type to determine if they are valid. 4919 func (s *RepositoryHeadSourceCodeType) Validate() error { 4920 invalidParams := request.ErrInvalidParams{Context: "RepositoryHeadSourceCodeType"} 4921 if s.BranchName == nil { 4922 invalidParams.Add(request.NewErrParamRequired("BranchName")) 4923 } 4924 if s.BranchName != nil && len(*s.BranchName) < 1 { 4925 invalidParams.Add(request.NewErrParamMinLen("BranchName", 1)) 4926 } 4927 4928 if invalidParams.Len() > 0 { 4929 return invalidParams 4930 } 4931 return nil 4932 } 4933 4934 // SetBranchName sets the BranchName field's value. 4935 func (s *RepositoryHeadSourceCodeType) SetBranchName(v string) *RepositoryHeadSourceCodeType { 4936 s.BranchName = &v 4937 return s 4938 } 4939 4940 // Metadata that is associated with a code review. This applies to both pull 4941 // request and repository analysis code reviews. 4942 type RequestMetadata struct { 4943 _ struct{} `type:"structure"` 4944 4945 // Information about the event associated with a code review. 4946 EventInfo *EventInfo `type:"structure"` 4947 4948 // The ID of the request. This is required for a pull request code review. 4949 RequestId *string `min:"1" type:"string"` 4950 4951 // An identifier, such as a name or account ID, that is associated with the 4952 // requester. The Requester is used to capture the author/actor name of the 4953 // event request. 4954 Requester *string `min:"1" type:"string"` 4955 4956 // The name of the repository vendor used to upload code to an S3 bucket for 4957 // a CI/CD code review. For example, if code and artifacts are uploaded to an 4958 // S3 bucket for a CI/CD code review by GitHub scripts from a GitHub repository, 4959 // then the repository association's ProviderType is S3Bucket and the CI/CD 4960 // repository vendor name is GitHub. For more information, see the definition 4961 // for ProviderType in RepositoryAssociation (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociation.html). 4962 VendorName *string `type:"string" enum:"VendorName"` 4963 } 4964 4965 // String returns the string representation. 4966 // 4967 // API parameter values that are decorated as "sensitive" in the API will not 4968 // be included in the string output. The member name will be present, but the 4969 // value will be replaced with "sensitive". 4970 func (s RequestMetadata) String() string { 4971 return awsutil.Prettify(s) 4972 } 4973 4974 // GoString returns the string representation. 4975 // 4976 // API parameter values that are decorated as "sensitive" in the API will not 4977 // be included in the string output. The member name will be present, but the 4978 // value will be replaced with "sensitive". 4979 func (s RequestMetadata) GoString() string { 4980 return s.String() 4981 } 4982 4983 // Validate inspects the fields of the type to determine if they are valid. 4984 func (s *RequestMetadata) Validate() error { 4985 invalidParams := request.ErrInvalidParams{Context: "RequestMetadata"} 4986 if s.RequestId != nil && len(*s.RequestId) < 1 { 4987 invalidParams.Add(request.NewErrParamMinLen("RequestId", 1)) 4988 } 4989 if s.Requester != nil && len(*s.Requester) < 1 { 4990 invalidParams.Add(request.NewErrParamMinLen("Requester", 1)) 4991 } 4992 if s.EventInfo != nil { 4993 if err := s.EventInfo.Validate(); err != nil { 4994 invalidParams.AddNested("EventInfo", err.(request.ErrInvalidParams)) 4995 } 4996 } 4997 4998 if invalidParams.Len() > 0 { 4999 return invalidParams 5000 } 5001 return nil 5002 } 5003 5004 // SetEventInfo sets the EventInfo field's value. 5005 func (s *RequestMetadata) SetEventInfo(v *EventInfo) *RequestMetadata { 5006 s.EventInfo = v 5007 return s 5008 } 5009 5010 // SetRequestId sets the RequestId field's value. 5011 func (s *RequestMetadata) SetRequestId(v string) *RequestMetadata { 5012 s.RequestId = &v 5013 return s 5014 } 5015 5016 // SetRequester sets the Requester field's value. 5017 func (s *RequestMetadata) SetRequester(v string) *RequestMetadata { 5018 s.Requester = &v 5019 return s 5020 } 5021 5022 // SetVendorName sets the VendorName field's value. 5023 func (s *RequestMetadata) SetVendorName(v string) *RequestMetadata { 5024 s.VendorName = &v 5025 return s 5026 } 5027 5028 // The resource specified in the request was not found. 5029 type ResourceNotFoundException struct { 5030 _ struct{} `type:"structure"` 5031 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 5032 5033 Message_ *string `locationName:"Message" type:"string"` 5034 } 5035 5036 // String returns the string representation. 5037 // 5038 // API parameter values that are decorated as "sensitive" in the API will not 5039 // be included in the string output. The member name will be present, but the 5040 // value will be replaced with "sensitive". 5041 func (s ResourceNotFoundException) String() string { 5042 return awsutil.Prettify(s) 5043 } 5044 5045 // GoString returns the string representation. 5046 // 5047 // API parameter values that are decorated as "sensitive" in the API will not 5048 // be included in the string output. The member name will be present, but the 5049 // value will be replaced with "sensitive". 5050 func (s ResourceNotFoundException) GoString() string { 5051 return s.String() 5052 } 5053 5054 func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { 5055 return &ResourceNotFoundException{ 5056 RespMetadata: v, 5057 } 5058 } 5059 5060 // Code returns the exception type name. 5061 func (s *ResourceNotFoundException) Code() string { 5062 return "ResourceNotFoundException" 5063 } 5064 5065 // Message returns the exception's message. 5066 func (s *ResourceNotFoundException) Message() string { 5067 if s.Message_ != nil { 5068 return *s.Message_ 5069 } 5070 return "" 5071 } 5072 5073 // OrigErr always returns nil, satisfies awserr.Error interface. 5074 func (s *ResourceNotFoundException) OrigErr() error { 5075 return nil 5076 } 5077 5078 func (s *ResourceNotFoundException) Error() string { 5079 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 5080 } 5081 5082 // Status code returns the HTTP status code for the request's response error. 5083 func (s *ResourceNotFoundException) StatusCode() int { 5084 return s.RespMetadata.StatusCode 5085 } 5086 5087 // RequestID returns the service's response RequestID for request. 5088 func (s *ResourceNotFoundException) RequestID() string { 5089 return s.RespMetadata.RequestID 5090 } 5091 5092 // Metadata about a rule. Rule metadata includes an ID, a name, a list of tags, 5093 // and a short and long description. CodeGuru Reviewer uses rules to analyze 5094 // code. A rule's recommendation is included in analysis results if code is 5095 // detected that violates the rule. 5096 type RuleMetadata struct { 5097 _ struct{} `type:"structure"` 5098 5099 // A long description of the rule. 5100 LongDescription *string `min:"1" type:"string"` 5101 5102 // The ID of the rule. 5103 RuleId *string `min:"1" type:"string"` 5104 5105 // The name of the rule. 5106 RuleName *string `min:"1" type:"string"` 5107 5108 // Tags that are associated with the rule. 5109 RuleTags []*string `min:"1" type:"list"` 5110 5111 // A short description of the rule. 5112 ShortDescription *string `min:"1" type:"string"` 5113 } 5114 5115 // String returns the string representation. 5116 // 5117 // API parameter values that are decorated as "sensitive" in the API will not 5118 // be included in the string output. The member name will be present, but the 5119 // value will be replaced with "sensitive". 5120 func (s RuleMetadata) String() string { 5121 return awsutil.Prettify(s) 5122 } 5123 5124 // GoString returns the string representation. 5125 // 5126 // API parameter values that are decorated as "sensitive" in the API will not 5127 // be included in the string output. The member name will be present, but the 5128 // value will be replaced with "sensitive". 5129 func (s RuleMetadata) GoString() string { 5130 return s.String() 5131 } 5132 5133 // SetLongDescription sets the LongDescription field's value. 5134 func (s *RuleMetadata) SetLongDescription(v string) *RuleMetadata { 5135 s.LongDescription = &v 5136 return s 5137 } 5138 5139 // SetRuleId sets the RuleId field's value. 5140 func (s *RuleMetadata) SetRuleId(v string) *RuleMetadata { 5141 s.RuleId = &v 5142 return s 5143 } 5144 5145 // SetRuleName sets the RuleName field's value. 5146 func (s *RuleMetadata) SetRuleName(v string) *RuleMetadata { 5147 s.RuleName = &v 5148 return s 5149 } 5150 5151 // SetRuleTags sets the RuleTags field's value. 5152 func (s *RuleMetadata) SetRuleTags(v []*string) *RuleMetadata { 5153 s.RuleTags = v 5154 return s 5155 } 5156 5157 // SetShortDescription sets the ShortDescription field's value. 5158 func (s *RuleMetadata) SetShortDescription(v string) *RuleMetadata { 5159 s.ShortDescription = &v 5160 return s 5161 } 5162 5163 // Information about an associated repository in an S3 bucket. The associated 5164 // repository contains a source code .zip file and a build artifacts .zip file 5165 // that contains .jar or .class files. 5166 type S3BucketRepository struct { 5167 _ struct{} `type:"structure"` 5168 5169 // An S3RepositoryDetails object that specifies the name of an S3 bucket and 5170 // a CodeArtifacts object. The CodeArtifacts object includes the S3 object keys 5171 // for a source code .zip file and for a build artifacts .zip file. 5172 Details *S3RepositoryDetails `type:"structure"` 5173 5174 // The name of the repository when the ProviderType is S3Bucket. 5175 // 5176 // Name is a required field 5177 Name *string `min:"1" type:"string" required:"true"` 5178 } 5179 5180 // String returns the string representation. 5181 // 5182 // API parameter values that are decorated as "sensitive" in the API will not 5183 // be included in the string output. The member name will be present, but the 5184 // value will be replaced with "sensitive". 5185 func (s S3BucketRepository) String() string { 5186 return awsutil.Prettify(s) 5187 } 5188 5189 // GoString returns the string representation. 5190 // 5191 // API parameter values that are decorated as "sensitive" in the API will not 5192 // be included in the string output. The member name will be present, but the 5193 // value will be replaced with "sensitive". 5194 func (s S3BucketRepository) GoString() string { 5195 return s.String() 5196 } 5197 5198 // Validate inspects the fields of the type to determine if they are valid. 5199 func (s *S3BucketRepository) Validate() error { 5200 invalidParams := request.ErrInvalidParams{Context: "S3BucketRepository"} 5201 if s.Name == nil { 5202 invalidParams.Add(request.NewErrParamRequired("Name")) 5203 } 5204 if s.Name != nil && len(*s.Name) < 1 { 5205 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 5206 } 5207 if s.Details != nil { 5208 if err := s.Details.Validate(); err != nil { 5209 invalidParams.AddNested("Details", err.(request.ErrInvalidParams)) 5210 } 5211 } 5212 5213 if invalidParams.Len() > 0 { 5214 return invalidParams 5215 } 5216 return nil 5217 } 5218 5219 // SetDetails sets the Details field's value. 5220 func (s *S3BucketRepository) SetDetails(v *S3RepositoryDetails) *S3BucketRepository { 5221 s.Details = v 5222 return s 5223 } 5224 5225 // SetName sets the Name field's value. 5226 func (s *S3BucketRepository) SetName(v string) *S3BucketRepository { 5227 s.Name = &v 5228 return s 5229 } 5230 5231 // Information about a repository in an S3 bucket. 5232 type S3Repository struct { 5233 _ struct{} `type:"structure"` 5234 5235 // The name of the S3 bucket used for associating a new S3 repository. It must 5236 // begin with codeguru-reviewer-. 5237 // 5238 // BucketName is a required field 5239 BucketName *string `min:"3" type:"string" required:"true"` 5240 5241 // The name of the repository in the S3 bucket. 5242 // 5243 // Name is a required field 5244 Name *string `min:"1" type:"string" required:"true"` 5245 } 5246 5247 // String returns the string representation. 5248 // 5249 // API parameter values that are decorated as "sensitive" in the API will not 5250 // be included in the string output. The member name will be present, but the 5251 // value will be replaced with "sensitive". 5252 func (s S3Repository) String() string { 5253 return awsutil.Prettify(s) 5254 } 5255 5256 // GoString returns the string representation. 5257 // 5258 // API parameter values that are decorated as "sensitive" in the API will not 5259 // be included in the string output. The member name will be present, but the 5260 // value will be replaced with "sensitive". 5261 func (s S3Repository) GoString() string { 5262 return s.String() 5263 } 5264 5265 // Validate inspects the fields of the type to determine if they are valid. 5266 func (s *S3Repository) Validate() error { 5267 invalidParams := request.ErrInvalidParams{Context: "S3Repository"} 5268 if s.BucketName == nil { 5269 invalidParams.Add(request.NewErrParamRequired("BucketName")) 5270 } 5271 if s.BucketName != nil && len(*s.BucketName) < 3 { 5272 invalidParams.Add(request.NewErrParamMinLen("BucketName", 3)) 5273 } 5274 if s.Name == nil { 5275 invalidParams.Add(request.NewErrParamRequired("Name")) 5276 } 5277 if s.Name != nil && len(*s.Name) < 1 { 5278 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 5279 } 5280 5281 if invalidParams.Len() > 0 { 5282 return invalidParams 5283 } 5284 return nil 5285 } 5286 5287 // SetBucketName sets the BucketName field's value. 5288 func (s *S3Repository) SetBucketName(v string) *S3Repository { 5289 s.BucketName = &v 5290 return s 5291 } 5292 5293 // SetName sets the Name field's value. 5294 func (s *S3Repository) SetName(v string) *S3Repository { 5295 s.Name = &v 5296 return s 5297 } 5298 5299 // Specifies the name of an S3 bucket and a CodeArtifacts object that contains 5300 // the S3 object keys for a source code .zip file and for a build artifacts 5301 // .zip file that contains .jar or .class files. 5302 type S3RepositoryDetails struct { 5303 _ struct{} `type:"structure"` 5304 5305 // The name of the S3 bucket used for associating a new S3 repository. It must 5306 // begin with codeguru-reviewer-. 5307 BucketName *string `min:"3" type:"string"` 5308 5309 // A CodeArtifacts object. The CodeArtifacts object includes the S3 object key 5310 // for a source code .zip file and for a build artifacts .zip file that contains 5311 // .jar or .class files. 5312 CodeArtifacts *CodeArtifacts `type:"structure"` 5313 } 5314 5315 // String returns the string representation. 5316 // 5317 // API parameter values that are decorated as "sensitive" in the API will not 5318 // be included in the string output. The member name will be present, but the 5319 // value will be replaced with "sensitive". 5320 func (s S3RepositoryDetails) String() string { 5321 return awsutil.Prettify(s) 5322 } 5323 5324 // GoString returns the string representation. 5325 // 5326 // API parameter values that are decorated as "sensitive" in the API will not 5327 // be included in the string output. The member name will be present, but the 5328 // value will be replaced with "sensitive". 5329 func (s S3RepositoryDetails) GoString() string { 5330 return s.String() 5331 } 5332 5333 // Validate inspects the fields of the type to determine if they are valid. 5334 func (s *S3RepositoryDetails) Validate() error { 5335 invalidParams := request.ErrInvalidParams{Context: "S3RepositoryDetails"} 5336 if s.BucketName != nil && len(*s.BucketName) < 3 { 5337 invalidParams.Add(request.NewErrParamMinLen("BucketName", 3)) 5338 } 5339 if s.CodeArtifacts != nil { 5340 if err := s.CodeArtifacts.Validate(); err != nil { 5341 invalidParams.AddNested("CodeArtifacts", err.(request.ErrInvalidParams)) 5342 } 5343 } 5344 5345 if invalidParams.Len() > 0 { 5346 return invalidParams 5347 } 5348 return nil 5349 } 5350 5351 // SetBucketName sets the BucketName field's value. 5352 func (s *S3RepositoryDetails) SetBucketName(v string) *S3RepositoryDetails { 5353 s.BucketName = &v 5354 return s 5355 } 5356 5357 // SetCodeArtifacts sets the CodeArtifacts field's value. 5358 func (s *S3RepositoryDetails) SetCodeArtifacts(v *CodeArtifacts) *S3RepositoryDetails { 5359 s.CodeArtifacts = v 5360 return s 5361 } 5362 5363 // Specifies the source code that is analyzed in a code review. 5364 type SourceCodeType struct { 5365 _ struct{} `type:"structure"` 5366 5367 // A type of SourceCodeType (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_SourceCodeType) 5368 // that specifies a source branch name and a destination branch name in an associated 5369 // repository. 5370 BranchDiff *BranchDiffSourceCodeType `type:"structure"` 5371 5372 // A SourceCodeType (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_SourceCodeType) 5373 // that specifies a commit diff created by a pull request on an associated repository. 5374 CommitDiff *CommitDiffSourceCodeType `type:"structure"` 5375 5376 // A SourceCodeType (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_SourceCodeType) 5377 // that specifies the tip of a branch in an associated repository. 5378 RepositoryHead *RepositoryHeadSourceCodeType `type:"structure"` 5379 5380 // Metadata that is associated with a code review. This applies to any type 5381 // of code review supported by CodeGuru Reviewer. The RequestMetadaa field captures 5382 // any event metadata. For example, it might capture metadata associated with 5383 // an event trigger, such as a push or a pull request. 5384 RequestMetadata *RequestMetadata `type:"structure"` 5385 5386 // Information about an associated repository in an S3 bucket that includes 5387 // its name and an S3RepositoryDetails object. The S3RepositoryDetails object 5388 // includes the name of an S3 bucket, an S3 key for a source code .zip file, 5389 // and an S3 key for a build artifacts .zip file. S3BucketRepository is required 5390 // in SourceCodeType (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_SourceCodeType) 5391 // for S3BucketRepository based code reviews. 5392 S3BucketRepository *S3BucketRepository `type:"structure"` 5393 } 5394 5395 // String returns the string representation. 5396 // 5397 // API parameter values that are decorated as "sensitive" in the API will not 5398 // be included in the string output. The member name will be present, but the 5399 // value will be replaced with "sensitive". 5400 func (s SourceCodeType) String() string { 5401 return awsutil.Prettify(s) 5402 } 5403 5404 // GoString returns the string representation. 5405 // 5406 // API parameter values that are decorated as "sensitive" in the API will not 5407 // be included in the string output. The member name will be present, but the 5408 // value will be replaced with "sensitive". 5409 func (s SourceCodeType) GoString() string { 5410 return s.String() 5411 } 5412 5413 // Validate inspects the fields of the type to determine if they are valid. 5414 func (s *SourceCodeType) Validate() error { 5415 invalidParams := request.ErrInvalidParams{Context: "SourceCodeType"} 5416 if s.BranchDiff != nil { 5417 if err := s.BranchDiff.Validate(); err != nil { 5418 invalidParams.AddNested("BranchDiff", err.(request.ErrInvalidParams)) 5419 } 5420 } 5421 if s.CommitDiff != nil { 5422 if err := s.CommitDiff.Validate(); err != nil { 5423 invalidParams.AddNested("CommitDiff", err.(request.ErrInvalidParams)) 5424 } 5425 } 5426 if s.RepositoryHead != nil { 5427 if err := s.RepositoryHead.Validate(); err != nil { 5428 invalidParams.AddNested("RepositoryHead", err.(request.ErrInvalidParams)) 5429 } 5430 } 5431 if s.RequestMetadata != nil { 5432 if err := s.RequestMetadata.Validate(); err != nil { 5433 invalidParams.AddNested("RequestMetadata", err.(request.ErrInvalidParams)) 5434 } 5435 } 5436 if s.S3BucketRepository != nil { 5437 if err := s.S3BucketRepository.Validate(); err != nil { 5438 invalidParams.AddNested("S3BucketRepository", err.(request.ErrInvalidParams)) 5439 } 5440 } 5441 5442 if invalidParams.Len() > 0 { 5443 return invalidParams 5444 } 5445 return nil 5446 } 5447 5448 // SetBranchDiff sets the BranchDiff field's value. 5449 func (s *SourceCodeType) SetBranchDiff(v *BranchDiffSourceCodeType) *SourceCodeType { 5450 s.BranchDiff = v 5451 return s 5452 } 5453 5454 // SetCommitDiff sets the CommitDiff field's value. 5455 func (s *SourceCodeType) SetCommitDiff(v *CommitDiffSourceCodeType) *SourceCodeType { 5456 s.CommitDiff = v 5457 return s 5458 } 5459 5460 // SetRepositoryHead sets the RepositoryHead field's value. 5461 func (s *SourceCodeType) SetRepositoryHead(v *RepositoryHeadSourceCodeType) *SourceCodeType { 5462 s.RepositoryHead = v 5463 return s 5464 } 5465 5466 // SetRequestMetadata sets the RequestMetadata field's value. 5467 func (s *SourceCodeType) SetRequestMetadata(v *RequestMetadata) *SourceCodeType { 5468 s.RequestMetadata = v 5469 return s 5470 } 5471 5472 // SetS3BucketRepository sets the S3BucketRepository field's value. 5473 func (s *SourceCodeType) SetS3BucketRepository(v *S3BucketRepository) *SourceCodeType { 5474 s.S3BucketRepository = v 5475 return s 5476 } 5477 5478 type TagResourceInput struct { 5479 _ struct{} `type:"structure"` 5480 5481 // The Amazon Resource Name (ARN) of the RepositoryAssociation (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociation.html) 5482 // object. You can retrieve this ARN by calling ListRepositoryAssociations (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_ListRepositoryAssociations.html). 5483 // 5484 // ResourceArn is a required field 5485 ResourceArn *string `location:"uri" locationName:"resourceArn" min:"1" type:"string" required:"true"` 5486 5487 // An array of key-value pairs used to tag an associated repository. A tag is 5488 // a custom attribute label with two parts: 5489 // 5490 // * A tag key (for example, CostCenter, Environment, Project, or Secret). 5491 // Tag keys are case sensitive. 5492 // 5493 // * An optional field known as a tag value (for example, 111122223333, Production, 5494 // or a team name). Omitting the tag value is the same as using an empty 5495 // string. Like tag keys, tag values are case sensitive. 5496 // 5497 // Tags is a required field 5498 Tags map[string]*string `min:"1" type:"map" required:"true"` 5499 } 5500 5501 // String returns the string representation. 5502 // 5503 // API parameter values that are decorated as "sensitive" in the API will not 5504 // be included in the string output. The member name will be present, but the 5505 // value will be replaced with "sensitive". 5506 func (s TagResourceInput) String() string { 5507 return awsutil.Prettify(s) 5508 } 5509 5510 // GoString returns the string representation. 5511 // 5512 // API parameter values that are decorated as "sensitive" in the API will not 5513 // be included in the string output. The member name will be present, but the 5514 // value will be replaced with "sensitive". 5515 func (s TagResourceInput) GoString() string { 5516 return s.String() 5517 } 5518 5519 // Validate inspects the fields of the type to determine if they are valid. 5520 func (s *TagResourceInput) Validate() error { 5521 invalidParams := request.ErrInvalidParams{Context: "TagResourceInput"} 5522 if s.ResourceArn == nil { 5523 invalidParams.Add(request.NewErrParamRequired("ResourceArn")) 5524 } 5525 if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { 5526 invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) 5527 } 5528 if s.Tags == nil { 5529 invalidParams.Add(request.NewErrParamRequired("Tags")) 5530 } 5531 if s.Tags != nil && len(s.Tags) < 1 { 5532 invalidParams.Add(request.NewErrParamMinLen("Tags", 1)) 5533 } 5534 5535 if invalidParams.Len() > 0 { 5536 return invalidParams 5537 } 5538 return nil 5539 } 5540 5541 // SetResourceArn sets the ResourceArn field's value. 5542 func (s *TagResourceInput) SetResourceArn(v string) *TagResourceInput { 5543 s.ResourceArn = &v 5544 return s 5545 } 5546 5547 // SetTags sets the Tags field's value. 5548 func (s *TagResourceInput) SetTags(v map[string]*string) *TagResourceInput { 5549 s.Tags = v 5550 return s 5551 } 5552 5553 type TagResourceOutput struct { 5554 _ struct{} `type:"structure" nopayload:"true"` 5555 } 5556 5557 // String returns the string representation. 5558 // 5559 // API parameter values that are decorated as "sensitive" in the API will not 5560 // be included in the string output. The member name will be present, but the 5561 // value will be replaced with "sensitive". 5562 func (s TagResourceOutput) String() string { 5563 return awsutil.Prettify(s) 5564 } 5565 5566 // GoString returns the string representation. 5567 // 5568 // API parameter values that are decorated as "sensitive" in the API will not 5569 // be included in the string output. The member name will be present, but the 5570 // value will be replaced with "sensitive". 5571 func (s TagResourceOutput) GoString() string { 5572 return s.String() 5573 } 5574 5575 // Information about a third-party source repository connected to CodeGuru Reviewer. 5576 type ThirdPartySourceRepository struct { 5577 _ struct{} `type:"structure"` 5578 5579 // The Amazon Resource Name (ARN) of an Amazon Web Services CodeStar Connections 5580 // connection. Its format is arn:aws:codestar-connections:region-id:aws-account_id:connection/connection-id. 5581 // For more information, see Connection (https://docs.aws.amazon.com/codestar-connections/latest/APIReference/API_Connection.html) 5582 // in the Amazon Web Services CodeStar Connections API Reference. 5583 // 5584 // ConnectionArn is a required field 5585 ConnectionArn *string `type:"string" required:"true"` 5586 5587 // The name of the third party source repository. 5588 // 5589 // Name is a required field 5590 Name *string `min:"1" type:"string" required:"true"` 5591 5592 // The owner of the repository. For a GitHub, GitHub Enterprise, or Bitbucket 5593 // repository, this is the username for the account that owns the repository. 5594 // For an S3 repository, this can be the username or Amazon Web Services account 5595 // ID. 5596 // 5597 // Owner is a required field 5598 Owner *string `min:"1" type:"string" required:"true"` 5599 } 5600 5601 // String returns the string representation. 5602 // 5603 // API parameter values that are decorated as "sensitive" in the API will not 5604 // be included in the string output. The member name will be present, but the 5605 // value will be replaced with "sensitive". 5606 func (s ThirdPartySourceRepository) String() string { 5607 return awsutil.Prettify(s) 5608 } 5609 5610 // GoString returns the string representation. 5611 // 5612 // API parameter values that are decorated as "sensitive" in the API will not 5613 // be included in the string output. The member name will be present, but the 5614 // value will be replaced with "sensitive". 5615 func (s ThirdPartySourceRepository) GoString() string { 5616 return s.String() 5617 } 5618 5619 // Validate inspects the fields of the type to determine if they are valid. 5620 func (s *ThirdPartySourceRepository) Validate() error { 5621 invalidParams := request.ErrInvalidParams{Context: "ThirdPartySourceRepository"} 5622 if s.ConnectionArn == nil { 5623 invalidParams.Add(request.NewErrParamRequired("ConnectionArn")) 5624 } 5625 if s.Name == nil { 5626 invalidParams.Add(request.NewErrParamRequired("Name")) 5627 } 5628 if s.Name != nil && len(*s.Name) < 1 { 5629 invalidParams.Add(request.NewErrParamMinLen("Name", 1)) 5630 } 5631 if s.Owner == nil { 5632 invalidParams.Add(request.NewErrParamRequired("Owner")) 5633 } 5634 if s.Owner != nil && len(*s.Owner) < 1 { 5635 invalidParams.Add(request.NewErrParamMinLen("Owner", 1)) 5636 } 5637 5638 if invalidParams.Len() > 0 { 5639 return invalidParams 5640 } 5641 return nil 5642 } 5643 5644 // SetConnectionArn sets the ConnectionArn field's value. 5645 func (s *ThirdPartySourceRepository) SetConnectionArn(v string) *ThirdPartySourceRepository { 5646 s.ConnectionArn = &v 5647 return s 5648 } 5649 5650 // SetName sets the Name field's value. 5651 func (s *ThirdPartySourceRepository) SetName(v string) *ThirdPartySourceRepository { 5652 s.Name = &v 5653 return s 5654 } 5655 5656 // SetOwner sets the Owner field's value. 5657 func (s *ThirdPartySourceRepository) SetOwner(v string) *ThirdPartySourceRepository { 5658 s.Owner = &v 5659 return s 5660 } 5661 5662 // The request was denied due to request throttling. 5663 type ThrottlingException struct { 5664 _ struct{} `type:"structure"` 5665 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 5666 5667 Message_ *string `locationName:"Message" type:"string"` 5668 } 5669 5670 // String returns the string representation. 5671 // 5672 // API parameter values that are decorated as "sensitive" in the API will not 5673 // be included in the string output. The member name will be present, but the 5674 // value will be replaced with "sensitive". 5675 func (s ThrottlingException) String() string { 5676 return awsutil.Prettify(s) 5677 } 5678 5679 // GoString returns the string representation. 5680 // 5681 // API parameter values that are decorated as "sensitive" in the API will not 5682 // be included in the string output. The member name will be present, but the 5683 // value will be replaced with "sensitive". 5684 func (s ThrottlingException) GoString() string { 5685 return s.String() 5686 } 5687 5688 func newErrorThrottlingException(v protocol.ResponseMetadata) error { 5689 return &ThrottlingException{ 5690 RespMetadata: v, 5691 } 5692 } 5693 5694 // Code returns the exception type name. 5695 func (s *ThrottlingException) Code() string { 5696 return "ThrottlingException" 5697 } 5698 5699 // Message returns the exception's message. 5700 func (s *ThrottlingException) Message() string { 5701 if s.Message_ != nil { 5702 return *s.Message_ 5703 } 5704 return "" 5705 } 5706 5707 // OrigErr always returns nil, satisfies awserr.Error interface. 5708 func (s *ThrottlingException) OrigErr() error { 5709 return nil 5710 } 5711 5712 func (s *ThrottlingException) Error() string { 5713 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 5714 } 5715 5716 // Status code returns the HTTP status code for the request's response error. 5717 func (s *ThrottlingException) StatusCode() int { 5718 return s.RespMetadata.StatusCode 5719 } 5720 5721 // RequestID returns the service's response RequestID for request. 5722 func (s *ThrottlingException) RequestID() string { 5723 return s.RespMetadata.RequestID 5724 } 5725 5726 type UntagResourceInput struct { 5727 _ struct{} `type:"structure" nopayload:"true"` 5728 5729 // The Amazon Resource Name (ARN) of the RepositoryAssociation (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_RepositoryAssociation.html) 5730 // object. You can retrieve this ARN by calling ListRepositoryAssociations (https://docs.aws.amazon.com/codeguru/latest/reviewer-api/API_ListRepositoryAssociations.html). 5731 // 5732 // ResourceArn is a required field 5733 ResourceArn *string `location:"uri" locationName:"resourceArn" min:"1" type:"string" required:"true"` 5734 5735 // A list of the keys for each tag you want to remove from an associated repository. 5736 // 5737 // TagKeys is a required field 5738 TagKeys []*string `location:"querystring" locationName:"tagKeys" min:"1" type:"list" required:"true"` 5739 } 5740 5741 // String returns the string representation. 5742 // 5743 // API parameter values that are decorated as "sensitive" in the API will not 5744 // be included in the string output. The member name will be present, but the 5745 // value will be replaced with "sensitive". 5746 func (s UntagResourceInput) String() string { 5747 return awsutil.Prettify(s) 5748 } 5749 5750 // GoString returns the string representation. 5751 // 5752 // API parameter values that are decorated as "sensitive" in the API will not 5753 // be included in the string output. The member name will be present, but the 5754 // value will be replaced with "sensitive". 5755 func (s UntagResourceInput) GoString() string { 5756 return s.String() 5757 } 5758 5759 // Validate inspects the fields of the type to determine if they are valid. 5760 func (s *UntagResourceInput) Validate() error { 5761 invalidParams := request.ErrInvalidParams{Context: "UntagResourceInput"} 5762 if s.ResourceArn == nil { 5763 invalidParams.Add(request.NewErrParamRequired("ResourceArn")) 5764 } 5765 if s.ResourceArn != nil && len(*s.ResourceArn) < 1 { 5766 invalidParams.Add(request.NewErrParamMinLen("ResourceArn", 1)) 5767 } 5768 if s.TagKeys == nil { 5769 invalidParams.Add(request.NewErrParamRequired("TagKeys")) 5770 } 5771 if s.TagKeys != nil && len(s.TagKeys) < 1 { 5772 invalidParams.Add(request.NewErrParamMinLen("TagKeys", 1)) 5773 } 5774 5775 if invalidParams.Len() > 0 { 5776 return invalidParams 5777 } 5778 return nil 5779 } 5780 5781 // SetResourceArn sets the ResourceArn field's value. 5782 func (s *UntagResourceInput) SetResourceArn(v string) *UntagResourceInput { 5783 s.ResourceArn = &v 5784 return s 5785 } 5786 5787 // SetTagKeys sets the TagKeys field's value. 5788 func (s *UntagResourceInput) SetTagKeys(v []*string) *UntagResourceInput { 5789 s.TagKeys = v 5790 return s 5791 } 5792 5793 type UntagResourceOutput struct { 5794 _ struct{} `type:"structure" nopayload:"true"` 5795 } 5796 5797 // String returns the string representation. 5798 // 5799 // API parameter values that are decorated as "sensitive" in the API will not 5800 // be included in the string output. The member name will be present, but the 5801 // value will be replaced with "sensitive". 5802 func (s UntagResourceOutput) String() string { 5803 return awsutil.Prettify(s) 5804 } 5805 5806 // GoString returns the string representation. 5807 // 5808 // API parameter values that are decorated as "sensitive" in the API will not 5809 // be included in the string output. The member name will be present, but the 5810 // value will be replaced with "sensitive". 5811 func (s UntagResourceOutput) GoString() string { 5812 return s.String() 5813 } 5814 5815 // The input fails to satisfy the specified constraints. 5816 type ValidationException struct { 5817 _ struct{} `type:"structure"` 5818 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 5819 5820 Message_ *string `locationName:"Message" type:"string"` 5821 } 5822 5823 // String returns the string representation. 5824 // 5825 // API parameter values that are decorated as "sensitive" in the API will not 5826 // be included in the string output. The member name will be present, but the 5827 // value will be replaced with "sensitive". 5828 func (s ValidationException) String() string { 5829 return awsutil.Prettify(s) 5830 } 5831 5832 // GoString returns the string representation. 5833 // 5834 // API parameter values that are decorated as "sensitive" in the API will not 5835 // be included in the string output. The member name will be present, but the 5836 // value will be replaced with "sensitive". 5837 func (s ValidationException) GoString() string { 5838 return s.String() 5839 } 5840 5841 func newErrorValidationException(v protocol.ResponseMetadata) error { 5842 return &ValidationException{ 5843 RespMetadata: v, 5844 } 5845 } 5846 5847 // Code returns the exception type name. 5848 func (s *ValidationException) Code() string { 5849 return "ValidationException" 5850 } 5851 5852 // Message returns the exception's message. 5853 func (s *ValidationException) Message() string { 5854 if s.Message_ != nil { 5855 return *s.Message_ 5856 } 5857 return "" 5858 } 5859 5860 // OrigErr always returns nil, satisfies awserr.Error interface. 5861 func (s *ValidationException) OrigErr() error { 5862 return nil 5863 } 5864 5865 func (s *ValidationException) Error() string { 5866 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 5867 } 5868 5869 // Status code returns the HTTP status code for the request's response error. 5870 func (s *ValidationException) StatusCode() int { 5871 return s.RespMetadata.StatusCode 5872 } 5873 5874 // RequestID returns the service's response RequestID for request. 5875 func (s *ValidationException) RequestID() string { 5876 return s.RespMetadata.RequestID 5877 } 5878 5879 const ( 5880 // AnalysisTypeSecurity is a AnalysisType enum value 5881 AnalysisTypeSecurity = "Security" 5882 5883 // AnalysisTypeCodeQuality is a AnalysisType enum value 5884 AnalysisTypeCodeQuality = "CodeQuality" 5885 ) 5886 5887 // AnalysisType_Values returns all elements of the AnalysisType enum 5888 func AnalysisType_Values() []string { 5889 return []string{ 5890 AnalysisTypeSecurity, 5891 AnalysisTypeCodeQuality, 5892 } 5893 } 5894 5895 const ( 5896 // EncryptionOptionAwsOwnedCmk is a EncryptionOption enum value 5897 EncryptionOptionAwsOwnedCmk = "AWS_OWNED_CMK" 5898 5899 // EncryptionOptionCustomerManagedCmk is a EncryptionOption enum value 5900 EncryptionOptionCustomerManagedCmk = "CUSTOMER_MANAGED_CMK" 5901 ) 5902 5903 // EncryptionOption_Values returns all elements of the EncryptionOption enum 5904 func EncryptionOption_Values() []string { 5905 return []string{ 5906 EncryptionOptionAwsOwnedCmk, 5907 EncryptionOptionCustomerManagedCmk, 5908 } 5909 } 5910 5911 const ( 5912 // JobStateCompleted is a JobState enum value 5913 JobStateCompleted = "Completed" 5914 5915 // JobStatePending is a JobState enum value 5916 JobStatePending = "Pending" 5917 5918 // JobStateFailed is a JobState enum value 5919 JobStateFailed = "Failed" 5920 5921 // JobStateDeleting is a JobState enum value 5922 JobStateDeleting = "Deleting" 5923 ) 5924 5925 // JobState_Values returns all elements of the JobState enum 5926 func JobState_Values() []string { 5927 return []string{ 5928 JobStateCompleted, 5929 JobStatePending, 5930 JobStateFailed, 5931 JobStateDeleting, 5932 } 5933 } 5934 5935 const ( 5936 // ProviderTypeCodeCommit is a ProviderType enum value 5937 ProviderTypeCodeCommit = "CodeCommit" 5938 5939 // ProviderTypeGitHub is a ProviderType enum value 5940 ProviderTypeGitHub = "GitHub" 5941 5942 // ProviderTypeBitbucket is a ProviderType enum value 5943 ProviderTypeBitbucket = "Bitbucket" 5944 5945 // ProviderTypeGitHubEnterpriseServer is a ProviderType enum value 5946 ProviderTypeGitHubEnterpriseServer = "GitHubEnterpriseServer" 5947 5948 // ProviderTypeS3bucket is a ProviderType enum value 5949 ProviderTypeS3bucket = "S3Bucket" 5950 ) 5951 5952 // ProviderType_Values returns all elements of the ProviderType enum 5953 func ProviderType_Values() []string { 5954 return []string{ 5955 ProviderTypeCodeCommit, 5956 ProviderTypeGitHub, 5957 ProviderTypeBitbucket, 5958 ProviderTypeGitHubEnterpriseServer, 5959 ProviderTypeS3bucket, 5960 } 5961 } 5962 5963 const ( 5964 // ReactionThumbsUp is a Reaction enum value 5965 ReactionThumbsUp = "ThumbsUp" 5966 5967 // ReactionThumbsDown is a Reaction enum value 5968 ReactionThumbsDown = "ThumbsDown" 5969 ) 5970 5971 // Reaction_Values returns all elements of the Reaction enum 5972 func Reaction_Values() []string { 5973 return []string{ 5974 ReactionThumbsUp, 5975 ReactionThumbsDown, 5976 } 5977 } 5978 5979 const ( 5980 // RecommendationCategoryAwsbestPractices is a RecommendationCategory enum value 5981 RecommendationCategoryAwsbestPractices = "AWSBestPractices" 5982 5983 // RecommendationCategoryAwscloudFormationIssues is a RecommendationCategory enum value 5984 RecommendationCategoryAwscloudFormationIssues = "AWSCloudFormationIssues" 5985 5986 // RecommendationCategoryDuplicateCode is a RecommendationCategory enum value 5987 RecommendationCategoryDuplicateCode = "DuplicateCode" 5988 5989 // RecommendationCategoryCodeMaintenanceIssues is a RecommendationCategory enum value 5990 RecommendationCategoryCodeMaintenanceIssues = "CodeMaintenanceIssues" 5991 5992 // RecommendationCategoryConcurrencyIssues is a RecommendationCategory enum value 5993 RecommendationCategoryConcurrencyIssues = "ConcurrencyIssues" 5994 5995 // RecommendationCategoryInputValidations is a RecommendationCategory enum value 5996 RecommendationCategoryInputValidations = "InputValidations" 5997 5998 // RecommendationCategoryPythonBestPractices is a RecommendationCategory enum value 5999 RecommendationCategoryPythonBestPractices = "PythonBestPractices" 6000 6001 // RecommendationCategoryJavaBestPractices is a RecommendationCategory enum value 6002 RecommendationCategoryJavaBestPractices = "JavaBestPractices" 6003 6004 // RecommendationCategoryResourceLeaks is a RecommendationCategory enum value 6005 RecommendationCategoryResourceLeaks = "ResourceLeaks" 6006 6007 // RecommendationCategorySecurityIssues is a RecommendationCategory enum value 6008 RecommendationCategorySecurityIssues = "SecurityIssues" 6009 6010 // RecommendationCategoryCodeInconsistencies is a RecommendationCategory enum value 6011 RecommendationCategoryCodeInconsistencies = "CodeInconsistencies" 6012 ) 6013 6014 // RecommendationCategory_Values returns all elements of the RecommendationCategory enum 6015 func RecommendationCategory_Values() []string { 6016 return []string{ 6017 RecommendationCategoryAwsbestPractices, 6018 RecommendationCategoryAwscloudFormationIssues, 6019 RecommendationCategoryDuplicateCode, 6020 RecommendationCategoryCodeMaintenanceIssues, 6021 RecommendationCategoryConcurrencyIssues, 6022 RecommendationCategoryInputValidations, 6023 RecommendationCategoryPythonBestPractices, 6024 RecommendationCategoryJavaBestPractices, 6025 RecommendationCategoryResourceLeaks, 6026 RecommendationCategorySecurityIssues, 6027 RecommendationCategoryCodeInconsistencies, 6028 } 6029 } 6030 6031 const ( 6032 // RepositoryAssociationStateAssociated is a RepositoryAssociationState enum value 6033 RepositoryAssociationStateAssociated = "Associated" 6034 6035 // RepositoryAssociationStateAssociating is a RepositoryAssociationState enum value 6036 RepositoryAssociationStateAssociating = "Associating" 6037 6038 // RepositoryAssociationStateFailed is a RepositoryAssociationState enum value 6039 RepositoryAssociationStateFailed = "Failed" 6040 6041 // RepositoryAssociationStateDisassociating is a RepositoryAssociationState enum value 6042 RepositoryAssociationStateDisassociating = "Disassociating" 6043 6044 // RepositoryAssociationStateDisassociated is a RepositoryAssociationState enum value 6045 RepositoryAssociationStateDisassociated = "Disassociated" 6046 ) 6047 6048 // RepositoryAssociationState_Values returns all elements of the RepositoryAssociationState enum 6049 func RepositoryAssociationState_Values() []string { 6050 return []string{ 6051 RepositoryAssociationStateAssociated, 6052 RepositoryAssociationStateAssociating, 6053 RepositoryAssociationStateFailed, 6054 RepositoryAssociationStateDisassociating, 6055 RepositoryAssociationStateDisassociated, 6056 } 6057 } 6058 6059 const ( 6060 // SeverityInfo is a Severity enum value 6061 SeverityInfo = "Info" 6062 6063 // SeverityLow is a Severity enum value 6064 SeverityLow = "Low" 6065 6066 // SeverityMedium is a Severity enum value 6067 SeverityMedium = "Medium" 6068 6069 // SeverityHigh is a Severity enum value 6070 SeverityHigh = "High" 6071 6072 // SeverityCritical is a Severity enum value 6073 SeverityCritical = "Critical" 6074 ) 6075 6076 // Severity_Values returns all elements of the Severity enum 6077 func Severity_Values() []string { 6078 return []string{ 6079 SeverityInfo, 6080 SeverityLow, 6081 SeverityMedium, 6082 SeverityHigh, 6083 SeverityCritical, 6084 } 6085 } 6086 6087 const ( 6088 // TypePullRequest is a Type enum value 6089 TypePullRequest = "PullRequest" 6090 6091 // TypeRepositoryAnalysis is a Type enum value 6092 TypeRepositoryAnalysis = "RepositoryAnalysis" 6093 ) 6094 6095 // Type_Values returns all elements of the Type enum 6096 func Type_Values() []string { 6097 return []string{ 6098 TypePullRequest, 6099 TypeRepositoryAnalysis, 6100 } 6101 } 6102 6103 const ( 6104 // VendorNameGitHub is a VendorName enum value 6105 VendorNameGitHub = "GitHub" 6106 6107 // VendorNameGitLab is a VendorName enum value 6108 VendorNameGitLab = "GitLab" 6109 6110 // VendorNameNativeS3 is a VendorName enum value 6111 VendorNameNativeS3 = "NativeS3" 6112 ) 6113 6114 // VendorName_Values returns all elements of the VendorName enum 6115 func VendorName_Values() []string { 6116 return []string{ 6117 VendorNameGitHub, 6118 VendorNameGitLab, 6119 VendorNameNativeS3, 6120 } 6121 }