github.com/aavshr/aws-sdk-go@v1.41.3/service/cognitosync/api.go (about) 1 // Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. 2 3 package cognitosync 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 opBulkPublish = "BulkPublish" 17 18 // BulkPublishRequest generates a "aws/request.Request" representing the 19 // client's request for the BulkPublish 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 BulkPublish for more information on using the BulkPublish 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 BulkPublishRequest method. 34 // req, resp := client.BulkPublishRequest(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/cognito-sync-2014-06-30/BulkPublish 42 func (c *CognitoSync) BulkPublishRequest(input *BulkPublishInput) (req *request.Request, output *BulkPublishOutput) { 43 op := &request.Operation{ 44 Name: opBulkPublish, 45 HTTPMethod: "POST", 46 HTTPPath: "/identitypools/{IdentityPoolId}/bulkpublish", 47 } 48 49 if input == nil { 50 input = &BulkPublishInput{} 51 } 52 53 output = &BulkPublishOutput{} 54 req = c.newRequest(op, input, output) 55 return 56 } 57 58 // BulkPublish API operation for Amazon Cognito Sync. 59 // 60 // Initiates a bulk publish of all existing datasets for an Identity Pool to 61 // the configured stream. Customers are limited to one successful bulk publish 62 // per 24 hours. Bulk publish is an asynchronous request, customers can see 63 // the status of the request via the GetBulkPublishDetails operation. 64 // 65 // This API can only be called with developer credentials. You cannot call this 66 // API with the temporary user credentials provided by Cognito Identity. 67 // 68 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 69 // with awserr.Error's Code and Message methods to get detailed information about 70 // the error. 71 // 72 // See the AWS API reference guide for Amazon Cognito Sync's 73 // API operation BulkPublish for usage and error information. 74 // 75 // Returned Error Types: 76 // * NotAuthorizedException 77 // Thrown when a user is not authorized to access the requested resource. 78 // 79 // * InvalidParameterException 80 // Thrown when a request parameter does not comply with the associated constraints. 81 // 82 // * ResourceNotFoundException 83 // Thrown if the resource doesn't exist. 84 // 85 // * InternalErrorException 86 // Indicates an internal service error. 87 // 88 // * DuplicateRequestException 89 // An exception thrown when there is an IN_PROGRESS bulk publish operation for 90 // the given identity pool. 91 // 92 // * AlreadyStreamedException 93 // An exception thrown when a bulk publish operation is requested less than 94 // 24 hours after a previous bulk publish operation completed successfully. 95 // 96 // See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/BulkPublish 97 func (c *CognitoSync) BulkPublish(input *BulkPublishInput) (*BulkPublishOutput, error) { 98 req, out := c.BulkPublishRequest(input) 99 return out, req.Send() 100 } 101 102 // BulkPublishWithContext is the same as BulkPublish with the addition of 103 // the ability to pass a context and additional request options. 104 // 105 // See BulkPublish for details on how to use this API operation. 106 // 107 // The context must be non-nil and will be used for request cancellation. If 108 // the context is nil a panic will occur. In the future the SDK may create 109 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 110 // for more information on using Contexts. 111 func (c *CognitoSync) BulkPublishWithContext(ctx aws.Context, input *BulkPublishInput, opts ...request.Option) (*BulkPublishOutput, error) { 112 req, out := c.BulkPublishRequest(input) 113 req.SetContext(ctx) 114 req.ApplyOptions(opts...) 115 return out, req.Send() 116 } 117 118 const opDeleteDataset = "DeleteDataset" 119 120 // DeleteDatasetRequest generates a "aws/request.Request" representing the 121 // client's request for the DeleteDataset operation. The "output" return 122 // value will be populated with the request's response once the request completes 123 // successfully. 124 // 125 // Use "Send" method on the returned Request to send the API call to the service. 126 // the "output" return value is not valid until after Send returns without error. 127 // 128 // See DeleteDataset for more information on using the DeleteDataset 129 // API call, and error handling. 130 // 131 // This method is useful when you want to inject custom logic or configuration 132 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 133 // 134 // 135 // // Example sending a request using the DeleteDatasetRequest method. 136 // req, resp := client.DeleteDatasetRequest(params) 137 // 138 // err := req.Send() 139 // if err == nil { // resp is now filled 140 // fmt.Println(resp) 141 // } 142 // 143 // See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/DeleteDataset 144 func (c *CognitoSync) DeleteDatasetRequest(input *DeleteDatasetInput) (req *request.Request, output *DeleteDatasetOutput) { 145 op := &request.Operation{ 146 Name: opDeleteDataset, 147 HTTPMethod: "DELETE", 148 HTTPPath: "/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}", 149 } 150 151 if input == nil { 152 input = &DeleteDatasetInput{} 153 } 154 155 output = &DeleteDatasetOutput{} 156 req = c.newRequest(op, input, output) 157 return 158 } 159 160 // DeleteDataset API operation for Amazon Cognito Sync. 161 // 162 // Deletes the specific dataset. The dataset will be deleted permanently, and 163 // the action can't be undone. Datasets that this dataset was merged with will 164 // no longer report the merge. Any subsequent operation on this dataset will 165 // result in a ResourceNotFoundException. 166 // 167 // This API can be called with temporary user credentials provided by Cognito 168 // Identity or with developer credentials. 169 // 170 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 171 // with awserr.Error's Code and Message methods to get detailed information about 172 // the error. 173 // 174 // See the AWS API reference guide for Amazon Cognito Sync's 175 // API operation DeleteDataset for usage and error information. 176 // 177 // Returned Error Types: 178 // * NotAuthorizedException 179 // Thrown when a user is not authorized to access the requested resource. 180 // 181 // * InvalidParameterException 182 // Thrown when a request parameter does not comply with the associated constraints. 183 // 184 // * ResourceNotFoundException 185 // Thrown if the resource doesn't exist. 186 // 187 // * InternalErrorException 188 // Indicates an internal service error. 189 // 190 // * TooManyRequestsException 191 // Thrown if the request is throttled. 192 // 193 // * ResourceConflictException 194 // Thrown if an update can't be applied because the resource was changed by 195 // another call and this would result in a conflict. 196 // 197 // See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/DeleteDataset 198 func (c *CognitoSync) DeleteDataset(input *DeleteDatasetInput) (*DeleteDatasetOutput, error) { 199 req, out := c.DeleteDatasetRequest(input) 200 return out, req.Send() 201 } 202 203 // DeleteDatasetWithContext is the same as DeleteDataset with the addition of 204 // the ability to pass a context and additional request options. 205 // 206 // See DeleteDataset for details on how to use this API operation. 207 // 208 // The context must be non-nil and will be used for request cancellation. If 209 // the context is nil a panic will occur. In the future the SDK may create 210 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 211 // for more information on using Contexts. 212 func (c *CognitoSync) DeleteDatasetWithContext(ctx aws.Context, input *DeleteDatasetInput, opts ...request.Option) (*DeleteDatasetOutput, error) { 213 req, out := c.DeleteDatasetRequest(input) 214 req.SetContext(ctx) 215 req.ApplyOptions(opts...) 216 return out, req.Send() 217 } 218 219 const opDescribeDataset = "DescribeDataset" 220 221 // DescribeDatasetRequest generates a "aws/request.Request" representing the 222 // client's request for the DescribeDataset operation. The "output" return 223 // value will be populated with the request's response once the request completes 224 // successfully. 225 // 226 // Use "Send" method on the returned Request to send the API call to the service. 227 // the "output" return value is not valid until after Send returns without error. 228 // 229 // See DescribeDataset for more information on using the DescribeDataset 230 // API call, and error handling. 231 // 232 // This method is useful when you want to inject custom logic or configuration 233 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 234 // 235 // 236 // // Example sending a request using the DescribeDatasetRequest method. 237 // req, resp := client.DescribeDatasetRequest(params) 238 // 239 // err := req.Send() 240 // if err == nil { // resp is now filled 241 // fmt.Println(resp) 242 // } 243 // 244 // See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/DescribeDataset 245 func (c *CognitoSync) DescribeDatasetRequest(input *DescribeDatasetInput) (req *request.Request, output *DescribeDatasetOutput) { 246 op := &request.Operation{ 247 Name: opDescribeDataset, 248 HTTPMethod: "GET", 249 HTTPPath: "/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}", 250 } 251 252 if input == nil { 253 input = &DescribeDatasetInput{} 254 } 255 256 output = &DescribeDatasetOutput{} 257 req = c.newRequest(op, input, output) 258 return 259 } 260 261 // DescribeDataset API operation for Amazon Cognito Sync. 262 // 263 // Gets meta data about a dataset by identity and dataset name. With Amazon 264 // Cognito Sync, each identity has access only to its own data. Thus, the credentials 265 // used to make this API call need to have access to the identity data. 266 // 267 // This API can be called with temporary user credentials provided by Cognito 268 // Identity or with developer credentials. You should use Cognito Identity credentials 269 // to make this API call. 270 // 271 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 272 // with awserr.Error's Code and Message methods to get detailed information about 273 // the error. 274 // 275 // See the AWS API reference guide for Amazon Cognito Sync's 276 // API operation DescribeDataset for usage and error information. 277 // 278 // Returned Error Types: 279 // * NotAuthorizedException 280 // Thrown when a user is not authorized to access the requested resource. 281 // 282 // * InvalidParameterException 283 // Thrown when a request parameter does not comply with the associated constraints. 284 // 285 // * ResourceNotFoundException 286 // Thrown if the resource doesn't exist. 287 // 288 // * InternalErrorException 289 // Indicates an internal service error. 290 // 291 // * TooManyRequestsException 292 // Thrown if the request is throttled. 293 // 294 // See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/DescribeDataset 295 func (c *CognitoSync) DescribeDataset(input *DescribeDatasetInput) (*DescribeDatasetOutput, error) { 296 req, out := c.DescribeDatasetRequest(input) 297 return out, req.Send() 298 } 299 300 // DescribeDatasetWithContext is the same as DescribeDataset with the addition of 301 // the ability to pass a context and additional request options. 302 // 303 // See DescribeDataset for details on how to use this API operation. 304 // 305 // The context must be non-nil and will be used for request cancellation. If 306 // the context is nil a panic will occur. In the future the SDK may create 307 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 308 // for more information on using Contexts. 309 func (c *CognitoSync) DescribeDatasetWithContext(ctx aws.Context, input *DescribeDatasetInput, opts ...request.Option) (*DescribeDatasetOutput, error) { 310 req, out := c.DescribeDatasetRequest(input) 311 req.SetContext(ctx) 312 req.ApplyOptions(opts...) 313 return out, req.Send() 314 } 315 316 const opDescribeIdentityPoolUsage = "DescribeIdentityPoolUsage" 317 318 // DescribeIdentityPoolUsageRequest generates a "aws/request.Request" representing the 319 // client's request for the DescribeIdentityPoolUsage operation. The "output" return 320 // value will be populated with the request's response once the request completes 321 // successfully. 322 // 323 // Use "Send" method on the returned Request to send the API call to the service. 324 // the "output" return value is not valid until after Send returns without error. 325 // 326 // See DescribeIdentityPoolUsage for more information on using the DescribeIdentityPoolUsage 327 // API call, and error handling. 328 // 329 // This method is useful when you want to inject custom logic or configuration 330 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 331 // 332 // 333 // // Example sending a request using the DescribeIdentityPoolUsageRequest method. 334 // req, resp := client.DescribeIdentityPoolUsageRequest(params) 335 // 336 // err := req.Send() 337 // if err == nil { // resp is now filled 338 // fmt.Println(resp) 339 // } 340 // 341 // See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/DescribeIdentityPoolUsage 342 func (c *CognitoSync) DescribeIdentityPoolUsageRequest(input *DescribeIdentityPoolUsageInput) (req *request.Request, output *DescribeIdentityPoolUsageOutput) { 343 op := &request.Operation{ 344 Name: opDescribeIdentityPoolUsage, 345 HTTPMethod: "GET", 346 HTTPPath: "/identitypools/{IdentityPoolId}", 347 } 348 349 if input == nil { 350 input = &DescribeIdentityPoolUsageInput{} 351 } 352 353 output = &DescribeIdentityPoolUsageOutput{} 354 req = c.newRequest(op, input, output) 355 return 356 } 357 358 // DescribeIdentityPoolUsage API operation for Amazon Cognito Sync. 359 // 360 // Gets usage details (for example, data storage) about a particular identity 361 // pool. 362 // 363 // This API can only be called with developer credentials. You cannot call this 364 // API with the temporary user credentials provided by Cognito Identity. 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 Cognito Sync's 371 // API operation DescribeIdentityPoolUsage for usage and error information. 372 // 373 // Returned Error Types: 374 // * NotAuthorizedException 375 // Thrown when a user is not authorized to access the requested resource. 376 // 377 // * InvalidParameterException 378 // Thrown when a request parameter does not comply with the associated constraints. 379 // 380 // * ResourceNotFoundException 381 // Thrown if the resource doesn't exist. 382 // 383 // * InternalErrorException 384 // Indicates an internal service error. 385 // 386 // * TooManyRequestsException 387 // Thrown if the request is throttled. 388 // 389 // See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/DescribeIdentityPoolUsage 390 func (c *CognitoSync) DescribeIdentityPoolUsage(input *DescribeIdentityPoolUsageInput) (*DescribeIdentityPoolUsageOutput, error) { 391 req, out := c.DescribeIdentityPoolUsageRequest(input) 392 return out, req.Send() 393 } 394 395 // DescribeIdentityPoolUsageWithContext is the same as DescribeIdentityPoolUsage with the addition of 396 // the ability to pass a context and additional request options. 397 // 398 // See DescribeIdentityPoolUsage 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 *CognitoSync) DescribeIdentityPoolUsageWithContext(ctx aws.Context, input *DescribeIdentityPoolUsageInput, opts ...request.Option) (*DescribeIdentityPoolUsageOutput, error) { 405 req, out := c.DescribeIdentityPoolUsageRequest(input) 406 req.SetContext(ctx) 407 req.ApplyOptions(opts...) 408 return out, req.Send() 409 } 410 411 const opDescribeIdentityUsage = "DescribeIdentityUsage" 412 413 // DescribeIdentityUsageRequest generates a "aws/request.Request" representing the 414 // client's request for the DescribeIdentityUsage 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 DescribeIdentityUsage for more information on using the DescribeIdentityUsage 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 DescribeIdentityUsageRequest method. 429 // req, resp := client.DescribeIdentityUsageRequest(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/cognito-sync-2014-06-30/DescribeIdentityUsage 437 func (c *CognitoSync) DescribeIdentityUsageRequest(input *DescribeIdentityUsageInput) (req *request.Request, output *DescribeIdentityUsageOutput) { 438 op := &request.Operation{ 439 Name: opDescribeIdentityUsage, 440 HTTPMethod: "GET", 441 HTTPPath: "/identitypools/{IdentityPoolId}/identities/{IdentityId}", 442 } 443 444 if input == nil { 445 input = &DescribeIdentityUsageInput{} 446 } 447 448 output = &DescribeIdentityUsageOutput{} 449 req = c.newRequest(op, input, output) 450 return 451 } 452 453 // DescribeIdentityUsage API operation for Amazon Cognito Sync. 454 // 455 // Gets usage information for an identity, including number of datasets and 456 // data usage. 457 // 458 // This API can be called with temporary user credentials provided by Cognito 459 // Identity or with developer credentials. 460 // 461 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 462 // with awserr.Error's Code and Message methods to get detailed information about 463 // the error. 464 // 465 // See the AWS API reference guide for Amazon Cognito Sync's 466 // API operation DescribeIdentityUsage for usage and error information. 467 // 468 // Returned Error Types: 469 // * NotAuthorizedException 470 // Thrown when a user is not authorized to access the requested resource. 471 // 472 // * InvalidParameterException 473 // Thrown when a request parameter does not comply with the associated constraints. 474 // 475 // * ResourceNotFoundException 476 // Thrown if the resource doesn't exist. 477 // 478 // * InternalErrorException 479 // Indicates an internal service error. 480 // 481 // * TooManyRequestsException 482 // Thrown if the request is throttled. 483 // 484 // See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/DescribeIdentityUsage 485 func (c *CognitoSync) DescribeIdentityUsage(input *DescribeIdentityUsageInput) (*DescribeIdentityUsageOutput, error) { 486 req, out := c.DescribeIdentityUsageRequest(input) 487 return out, req.Send() 488 } 489 490 // DescribeIdentityUsageWithContext is the same as DescribeIdentityUsage with the addition of 491 // the ability to pass a context and additional request options. 492 // 493 // See DescribeIdentityUsage for details on how to use this API operation. 494 // 495 // The context must be non-nil and will be used for request cancellation. If 496 // the context is nil a panic will occur. In the future the SDK may create 497 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 498 // for more information on using Contexts. 499 func (c *CognitoSync) DescribeIdentityUsageWithContext(ctx aws.Context, input *DescribeIdentityUsageInput, opts ...request.Option) (*DescribeIdentityUsageOutput, error) { 500 req, out := c.DescribeIdentityUsageRequest(input) 501 req.SetContext(ctx) 502 req.ApplyOptions(opts...) 503 return out, req.Send() 504 } 505 506 const opGetBulkPublishDetails = "GetBulkPublishDetails" 507 508 // GetBulkPublishDetailsRequest generates a "aws/request.Request" representing the 509 // client's request for the GetBulkPublishDetails operation. The "output" return 510 // value will be populated with the request's response once the request completes 511 // successfully. 512 // 513 // Use "Send" method on the returned Request to send the API call to the service. 514 // the "output" return value is not valid until after Send returns without error. 515 // 516 // See GetBulkPublishDetails for more information on using the GetBulkPublishDetails 517 // API call, and error handling. 518 // 519 // This method is useful when you want to inject custom logic or configuration 520 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 521 // 522 // 523 // // Example sending a request using the GetBulkPublishDetailsRequest method. 524 // req, resp := client.GetBulkPublishDetailsRequest(params) 525 // 526 // err := req.Send() 527 // if err == nil { // resp is now filled 528 // fmt.Println(resp) 529 // } 530 // 531 // See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/GetBulkPublishDetails 532 func (c *CognitoSync) GetBulkPublishDetailsRequest(input *GetBulkPublishDetailsInput) (req *request.Request, output *GetBulkPublishDetailsOutput) { 533 op := &request.Operation{ 534 Name: opGetBulkPublishDetails, 535 HTTPMethod: "POST", 536 HTTPPath: "/identitypools/{IdentityPoolId}/getBulkPublishDetails", 537 } 538 539 if input == nil { 540 input = &GetBulkPublishDetailsInput{} 541 } 542 543 output = &GetBulkPublishDetailsOutput{} 544 req = c.newRequest(op, input, output) 545 return 546 } 547 548 // GetBulkPublishDetails API operation for Amazon Cognito Sync. 549 // 550 // Get the status of the last BulkPublish operation for an identity pool. 551 // 552 // This API can only be called with developer credentials. You cannot call this 553 // API with the temporary user credentials provided by Cognito Identity. 554 // 555 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 556 // with awserr.Error's Code and Message methods to get detailed information about 557 // the error. 558 // 559 // See the AWS API reference guide for Amazon Cognito Sync's 560 // API operation GetBulkPublishDetails for usage and error information. 561 // 562 // Returned Error Types: 563 // * NotAuthorizedException 564 // Thrown when a user is not authorized to access the requested resource. 565 // 566 // * InvalidParameterException 567 // Thrown when a request parameter does not comply with the associated constraints. 568 // 569 // * ResourceNotFoundException 570 // Thrown if the resource doesn't exist. 571 // 572 // * InternalErrorException 573 // Indicates an internal service error. 574 // 575 // See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/GetBulkPublishDetails 576 func (c *CognitoSync) GetBulkPublishDetails(input *GetBulkPublishDetailsInput) (*GetBulkPublishDetailsOutput, error) { 577 req, out := c.GetBulkPublishDetailsRequest(input) 578 return out, req.Send() 579 } 580 581 // GetBulkPublishDetailsWithContext is the same as GetBulkPublishDetails with the addition of 582 // the ability to pass a context and additional request options. 583 // 584 // See GetBulkPublishDetails for details on how to use this API operation. 585 // 586 // The context must be non-nil and will be used for request cancellation. If 587 // the context is nil a panic will occur. In the future the SDK may create 588 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 589 // for more information on using Contexts. 590 func (c *CognitoSync) GetBulkPublishDetailsWithContext(ctx aws.Context, input *GetBulkPublishDetailsInput, opts ...request.Option) (*GetBulkPublishDetailsOutput, error) { 591 req, out := c.GetBulkPublishDetailsRequest(input) 592 req.SetContext(ctx) 593 req.ApplyOptions(opts...) 594 return out, req.Send() 595 } 596 597 const opGetCognitoEvents = "GetCognitoEvents" 598 599 // GetCognitoEventsRequest generates a "aws/request.Request" representing the 600 // client's request for the GetCognitoEvents operation. The "output" return 601 // value will be populated with the request's response once the request completes 602 // successfully. 603 // 604 // Use "Send" method on the returned Request to send the API call to the service. 605 // the "output" return value is not valid until after Send returns without error. 606 // 607 // See GetCognitoEvents for more information on using the GetCognitoEvents 608 // API call, and error handling. 609 // 610 // This method is useful when you want to inject custom logic or configuration 611 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 612 // 613 // 614 // // Example sending a request using the GetCognitoEventsRequest method. 615 // req, resp := client.GetCognitoEventsRequest(params) 616 // 617 // err := req.Send() 618 // if err == nil { // resp is now filled 619 // fmt.Println(resp) 620 // } 621 // 622 // See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/GetCognitoEvents 623 func (c *CognitoSync) GetCognitoEventsRequest(input *GetCognitoEventsInput) (req *request.Request, output *GetCognitoEventsOutput) { 624 op := &request.Operation{ 625 Name: opGetCognitoEvents, 626 HTTPMethod: "GET", 627 HTTPPath: "/identitypools/{IdentityPoolId}/events", 628 } 629 630 if input == nil { 631 input = &GetCognitoEventsInput{} 632 } 633 634 output = &GetCognitoEventsOutput{} 635 req = c.newRequest(op, input, output) 636 return 637 } 638 639 // GetCognitoEvents API operation for Amazon Cognito Sync. 640 // 641 // Gets the events and the corresponding Lambda functions associated with an 642 // identity pool. 643 // 644 // This API can only be called with developer credentials. You cannot call this 645 // API with the temporary user credentials provided by Cognito Identity. 646 // 647 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 648 // with awserr.Error's Code and Message methods to get detailed information about 649 // the error. 650 // 651 // See the AWS API reference guide for Amazon Cognito Sync's 652 // API operation GetCognitoEvents for usage and error information. 653 // 654 // Returned Error Types: 655 // * InvalidParameterException 656 // Thrown when a request parameter does not comply with the associated constraints. 657 // 658 // * ResourceNotFoundException 659 // Thrown if the resource doesn't exist. 660 // 661 // * NotAuthorizedException 662 // Thrown when a user is not authorized to access the requested resource. 663 // 664 // * InternalErrorException 665 // Indicates an internal service error. 666 // 667 // * TooManyRequestsException 668 // Thrown if the request is throttled. 669 // 670 // See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/GetCognitoEvents 671 func (c *CognitoSync) GetCognitoEvents(input *GetCognitoEventsInput) (*GetCognitoEventsOutput, error) { 672 req, out := c.GetCognitoEventsRequest(input) 673 return out, req.Send() 674 } 675 676 // GetCognitoEventsWithContext is the same as GetCognitoEvents with the addition of 677 // the ability to pass a context and additional request options. 678 // 679 // See GetCognitoEvents for details on how to use this API operation. 680 // 681 // The context must be non-nil and will be used for request cancellation. If 682 // the context is nil a panic will occur. In the future the SDK may create 683 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 684 // for more information on using Contexts. 685 func (c *CognitoSync) GetCognitoEventsWithContext(ctx aws.Context, input *GetCognitoEventsInput, opts ...request.Option) (*GetCognitoEventsOutput, error) { 686 req, out := c.GetCognitoEventsRequest(input) 687 req.SetContext(ctx) 688 req.ApplyOptions(opts...) 689 return out, req.Send() 690 } 691 692 const opGetIdentityPoolConfiguration = "GetIdentityPoolConfiguration" 693 694 // GetIdentityPoolConfigurationRequest generates a "aws/request.Request" representing the 695 // client's request for the GetIdentityPoolConfiguration operation. The "output" return 696 // value will be populated with the request's response once the request completes 697 // successfully. 698 // 699 // Use "Send" method on the returned Request to send the API call to the service. 700 // the "output" return value is not valid until after Send returns without error. 701 // 702 // See GetIdentityPoolConfiguration for more information on using the GetIdentityPoolConfiguration 703 // API call, and error handling. 704 // 705 // This method is useful when you want to inject custom logic or configuration 706 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 707 // 708 // 709 // // Example sending a request using the GetIdentityPoolConfigurationRequest method. 710 // req, resp := client.GetIdentityPoolConfigurationRequest(params) 711 // 712 // err := req.Send() 713 // if err == nil { // resp is now filled 714 // fmt.Println(resp) 715 // } 716 // 717 // See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/GetIdentityPoolConfiguration 718 func (c *CognitoSync) GetIdentityPoolConfigurationRequest(input *GetIdentityPoolConfigurationInput) (req *request.Request, output *GetIdentityPoolConfigurationOutput) { 719 op := &request.Operation{ 720 Name: opGetIdentityPoolConfiguration, 721 HTTPMethod: "GET", 722 HTTPPath: "/identitypools/{IdentityPoolId}/configuration", 723 } 724 725 if input == nil { 726 input = &GetIdentityPoolConfigurationInput{} 727 } 728 729 output = &GetIdentityPoolConfigurationOutput{} 730 req = c.newRequest(op, input, output) 731 return 732 } 733 734 // GetIdentityPoolConfiguration API operation for Amazon Cognito Sync. 735 // 736 // Gets the configuration settings of an identity pool. 737 // 738 // This API can only be called with developer credentials. You cannot call this 739 // API with the temporary user credentials provided by Cognito Identity. 740 // 741 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 742 // with awserr.Error's Code and Message methods to get detailed information about 743 // the error. 744 // 745 // See the AWS API reference guide for Amazon Cognito Sync's 746 // API operation GetIdentityPoolConfiguration for usage and error information. 747 // 748 // Returned Error Types: 749 // * NotAuthorizedException 750 // Thrown when a user is not authorized to access the requested resource. 751 // 752 // * InvalidParameterException 753 // Thrown when a request parameter does not comply with the associated constraints. 754 // 755 // * ResourceNotFoundException 756 // Thrown if the resource doesn't exist. 757 // 758 // * InternalErrorException 759 // Indicates an internal service error. 760 // 761 // * TooManyRequestsException 762 // Thrown if the request is throttled. 763 // 764 // See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/GetIdentityPoolConfiguration 765 func (c *CognitoSync) GetIdentityPoolConfiguration(input *GetIdentityPoolConfigurationInput) (*GetIdentityPoolConfigurationOutput, error) { 766 req, out := c.GetIdentityPoolConfigurationRequest(input) 767 return out, req.Send() 768 } 769 770 // GetIdentityPoolConfigurationWithContext is the same as GetIdentityPoolConfiguration with the addition of 771 // the ability to pass a context and additional request options. 772 // 773 // See GetIdentityPoolConfiguration for details on how to use this API operation. 774 // 775 // The context must be non-nil and will be used for request cancellation. If 776 // the context is nil a panic will occur. In the future the SDK may create 777 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 778 // for more information on using Contexts. 779 func (c *CognitoSync) GetIdentityPoolConfigurationWithContext(ctx aws.Context, input *GetIdentityPoolConfigurationInput, opts ...request.Option) (*GetIdentityPoolConfigurationOutput, error) { 780 req, out := c.GetIdentityPoolConfigurationRequest(input) 781 req.SetContext(ctx) 782 req.ApplyOptions(opts...) 783 return out, req.Send() 784 } 785 786 const opListDatasets = "ListDatasets" 787 788 // ListDatasetsRequest generates a "aws/request.Request" representing the 789 // client's request for the ListDatasets operation. The "output" return 790 // value will be populated with the request's response once the request completes 791 // successfully. 792 // 793 // Use "Send" method on the returned Request to send the API call to the service. 794 // the "output" return value is not valid until after Send returns without error. 795 // 796 // See ListDatasets for more information on using the ListDatasets 797 // API call, and error handling. 798 // 799 // This method is useful when you want to inject custom logic or configuration 800 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 801 // 802 // 803 // // Example sending a request using the ListDatasetsRequest method. 804 // req, resp := client.ListDatasetsRequest(params) 805 // 806 // err := req.Send() 807 // if err == nil { // resp is now filled 808 // fmt.Println(resp) 809 // } 810 // 811 // See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/ListDatasets 812 func (c *CognitoSync) ListDatasetsRequest(input *ListDatasetsInput) (req *request.Request, output *ListDatasetsOutput) { 813 op := &request.Operation{ 814 Name: opListDatasets, 815 HTTPMethod: "GET", 816 HTTPPath: "/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets", 817 } 818 819 if input == nil { 820 input = &ListDatasetsInput{} 821 } 822 823 output = &ListDatasetsOutput{} 824 req = c.newRequest(op, input, output) 825 return 826 } 827 828 // ListDatasets API operation for Amazon Cognito Sync. 829 // 830 // Lists datasets for an identity. With Amazon Cognito Sync, each identity has 831 // access only to its own data. Thus, the credentials used to make this API 832 // call need to have access to the identity data. 833 // 834 // ListDatasets can be called with temporary user credentials provided by Cognito 835 // Identity or with developer credentials. You should use the Cognito Identity 836 // credentials to make this API call. 837 // 838 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 839 // with awserr.Error's Code and Message methods to get detailed information about 840 // the error. 841 // 842 // See the AWS API reference guide for Amazon Cognito Sync's 843 // API operation ListDatasets for usage and error information. 844 // 845 // Returned Error Types: 846 // * NotAuthorizedException 847 // Thrown when a user is not authorized to access the requested resource. 848 // 849 // * InvalidParameterException 850 // Thrown when a request parameter does not comply with the associated constraints. 851 // 852 // * InternalErrorException 853 // Indicates an internal service error. 854 // 855 // * TooManyRequestsException 856 // Thrown if the request is throttled. 857 // 858 // See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/ListDatasets 859 func (c *CognitoSync) ListDatasets(input *ListDatasetsInput) (*ListDatasetsOutput, error) { 860 req, out := c.ListDatasetsRequest(input) 861 return out, req.Send() 862 } 863 864 // ListDatasetsWithContext is the same as ListDatasets with the addition of 865 // the ability to pass a context and additional request options. 866 // 867 // See ListDatasets for details on how to use this API operation. 868 // 869 // The context must be non-nil and will be used for request cancellation. If 870 // the context is nil a panic will occur. In the future the SDK may create 871 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 872 // for more information on using Contexts. 873 func (c *CognitoSync) ListDatasetsWithContext(ctx aws.Context, input *ListDatasetsInput, opts ...request.Option) (*ListDatasetsOutput, error) { 874 req, out := c.ListDatasetsRequest(input) 875 req.SetContext(ctx) 876 req.ApplyOptions(opts...) 877 return out, req.Send() 878 } 879 880 const opListIdentityPoolUsage = "ListIdentityPoolUsage" 881 882 // ListIdentityPoolUsageRequest generates a "aws/request.Request" representing the 883 // client's request for the ListIdentityPoolUsage operation. The "output" return 884 // value will be populated with the request's response once the request completes 885 // successfully. 886 // 887 // Use "Send" method on the returned Request to send the API call to the service. 888 // the "output" return value is not valid until after Send returns without error. 889 // 890 // See ListIdentityPoolUsage for more information on using the ListIdentityPoolUsage 891 // API call, and error handling. 892 // 893 // This method is useful when you want to inject custom logic or configuration 894 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 895 // 896 // 897 // // Example sending a request using the ListIdentityPoolUsageRequest method. 898 // req, resp := client.ListIdentityPoolUsageRequest(params) 899 // 900 // err := req.Send() 901 // if err == nil { // resp is now filled 902 // fmt.Println(resp) 903 // } 904 // 905 // See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/ListIdentityPoolUsage 906 func (c *CognitoSync) ListIdentityPoolUsageRequest(input *ListIdentityPoolUsageInput) (req *request.Request, output *ListIdentityPoolUsageOutput) { 907 op := &request.Operation{ 908 Name: opListIdentityPoolUsage, 909 HTTPMethod: "GET", 910 HTTPPath: "/identitypools", 911 } 912 913 if input == nil { 914 input = &ListIdentityPoolUsageInput{} 915 } 916 917 output = &ListIdentityPoolUsageOutput{} 918 req = c.newRequest(op, input, output) 919 return 920 } 921 922 // ListIdentityPoolUsage API operation for Amazon Cognito Sync. 923 // 924 // Gets a list of identity pools registered with Cognito. 925 // 926 // ListIdentityPoolUsage can only be called with developer credentials. You 927 // cannot make this API call with the temporary user credentials provided by 928 // Cognito Identity. 929 // 930 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 931 // with awserr.Error's Code and Message methods to get detailed information about 932 // the error. 933 // 934 // See the AWS API reference guide for Amazon Cognito Sync's 935 // API operation ListIdentityPoolUsage for usage and error information. 936 // 937 // Returned Error Types: 938 // * NotAuthorizedException 939 // Thrown when a user is not authorized to access the requested resource. 940 // 941 // * InvalidParameterException 942 // Thrown when a request parameter does not comply with the associated constraints. 943 // 944 // * InternalErrorException 945 // Indicates an internal service error. 946 // 947 // * TooManyRequestsException 948 // Thrown if the request is throttled. 949 // 950 // See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/ListIdentityPoolUsage 951 func (c *CognitoSync) ListIdentityPoolUsage(input *ListIdentityPoolUsageInput) (*ListIdentityPoolUsageOutput, error) { 952 req, out := c.ListIdentityPoolUsageRequest(input) 953 return out, req.Send() 954 } 955 956 // ListIdentityPoolUsageWithContext is the same as ListIdentityPoolUsage with the addition of 957 // the ability to pass a context and additional request options. 958 // 959 // See ListIdentityPoolUsage for details on how to use this API operation. 960 // 961 // The context must be non-nil and will be used for request cancellation. If 962 // the context is nil a panic will occur. In the future the SDK may create 963 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 964 // for more information on using Contexts. 965 func (c *CognitoSync) ListIdentityPoolUsageWithContext(ctx aws.Context, input *ListIdentityPoolUsageInput, opts ...request.Option) (*ListIdentityPoolUsageOutput, error) { 966 req, out := c.ListIdentityPoolUsageRequest(input) 967 req.SetContext(ctx) 968 req.ApplyOptions(opts...) 969 return out, req.Send() 970 } 971 972 const opListRecords = "ListRecords" 973 974 // ListRecordsRequest generates a "aws/request.Request" representing the 975 // client's request for the ListRecords operation. The "output" return 976 // value will be populated with the request's response once the request completes 977 // successfully. 978 // 979 // Use "Send" method on the returned Request to send the API call to the service. 980 // the "output" return value is not valid until after Send returns without error. 981 // 982 // See ListRecords for more information on using the ListRecords 983 // API call, and error handling. 984 // 985 // This method is useful when you want to inject custom logic or configuration 986 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 987 // 988 // 989 // // Example sending a request using the ListRecordsRequest method. 990 // req, resp := client.ListRecordsRequest(params) 991 // 992 // err := req.Send() 993 // if err == nil { // resp is now filled 994 // fmt.Println(resp) 995 // } 996 // 997 // See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/ListRecords 998 func (c *CognitoSync) ListRecordsRequest(input *ListRecordsInput) (req *request.Request, output *ListRecordsOutput) { 999 op := &request.Operation{ 1000 Name: opListRecords, 1001 HTTPMethod: "GET", 1002 HTTPPath: "/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}/records", 1003 } 1004 1005 if input == nil { 1006 input = &ListRecordsInput{} 1007 } 1008 1009 output = &ListRecordsOutput{} 1010 req = c.newRequest(op, input, output) 1011 return 1012 } 1013 1014 // ListRecords API operation for Amazon Cognito Sync. 1015 // 1016 // Gets paginated records, optionally changed after a particular sync count 1017 // for a dataset and identity. With Amazon Cognito Sync, each identity has access 1018 // only to its own data. Thus, the credentials used to make this API call need 1019 // to have access to the identity data. 1020 // 1021 // ListRecords can be called with temporary user credentials provided by Cognito 1022 // Identity or with developer credentials. You should use Cognito Identity credentials 1023 // to make this API call. 1024 // 1025 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1026 // with awserr.Error's Code and Message methods to get detailed information about 1027 // the error. 1028 // 1029 // See the AWS API reference guide for Amazon Cognito Sync's 1030 // API operation ListRecords for usage and error information. 1031 // 1032 // Returned Error Types: 1033 // * InvalidParameterException 1034 // Thrown when a request parameter does not comply with the associated constraints. 1035 // 1036 // * NotAuthorizedException 1037 // Thrown when a user is not authorized to access the requested resource. 1038 // 1039 // * TooManyRequestsException 1040 // Thrown if the request is throttled. 1041 // 1042 // * InternalErrorException 1043 // Indicates an internal service error. 1044 // 1045 // See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/ListRecords 1046 func (c *CognitoSync) ListRecords(input *ListRecordsInput) (*ListRecordsOutput, error) { 1047 req, out := c.ListRecordsRequest(input) 1048 return out, req.Send() 1049 } 1050 1051 // ListRecordsWithContext is the same as ListRecords with the addition of 1052 // the ability to pass a context and additional request options. 1053 // 1054 // See ListRecords for details on how to use this API operation. 1055 // 1056 // The context must be non-nil and will be used for request cancellation. If 1057 // the context is nil a panic will occur. In the future the SDK may create 1058 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1059 // for more information on using Contexts. 1060 func (c *CognitoSync) ListRecordsWithContext(ctx aws.Context, input *ListRecordsInput, opts ...request.Option) (*ListRecordsOutput, error) { 1061 req, out := c.ListRecordsRequest(input) 1062 req.SetContext(ctx) 1063 req.ApplyOptions(opts...) 1064 return out, req.Send() 1065 } 1066 1067 const opRegisterDevice = "RegisterDevice" 1068 1069 // RegisterDeviceRequest generates a "aws/request.Request" representing the 1070 // client's request for the RegisterDevice operation. The "output" return 1071 // value will be populated with the request's response once the request completes 1072 // successfully. 1073 // 1074 // Use "Send" method on the returned Request to send the API call to the service. 1075 // the "output" return value is not valid until after Send returns without error. 1076 // 1077 // See RegisterDevice for more information on using the RegisterDevice 1078 // API call, and error handling. 1079 // 1080 // This method is useful when you want to inject custom logic or configuration 1081 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1082 // 1083 // 1084 // // Example sending a request using the RegisterDeviceRequest method. 1085 // req, resp := client.RegisterDeviceRequest(params) 1086 // 1087 // err := req.Send() 1088 // if err == nil { // resp is now filled 1089 // fmt.Println(resp) 1090 // } 1091 // 1092 // See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/RegisterDevice 1093 func (c *CognitoSync) RegisterDeviceRequest(input *RegisterDeviceInput) (req *request.Request, output *RegisterDeviceOutput) { 1094 op := &request.Operation{ 1095 Name: opRegisterDevice, 1096 HTTPMethod: "POST", 1097 HTTPPath: "/identitypools/{IdentityPoolId}/identity/{IdentityId}/device", 1098 } 1099 1100 if input == nil { 1101 input = &RegisterDeviceInput{} 1102 } 1103 1104 output = &RegisterDeviceOutput{} 1105 req = c.newRequest(op, input, output) 1106 return 1107 } 1108 1109 // RegisterDevice API operation for Amazon Cognito Sync. 1110 // 1111 // Registers a device to receive push sync notifications. 1112 // 1113 // This API can only be called with temporary credentials provided by Cognito 1114 // Identity. You cannot call this API with developer credentials. 1115 // 1116 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1117 // with awserr.Error's Code and Message methods to get detailed information about 1118 // the error. 1119 // 1120 // See the AWS API reference guide for Amazon Cognito Sync's 1121 // API operation RegisterDevice for usage and error information. 1122 // 1123 // Returned Error Types: 1124 // * NotAuthorizedException 1125 // Thrown when a user is not authorized to access the requested resource. 1126 // 1127 // * InvalidParameterException 1128 // Thrown when a request parameter does not comply with the associated constraints. 1129 // 1130 // * ResourceNotFoundException 1131 // Thrown if the resource doesn't exist. 1132 // 1133 // * InternalErrorException 1134 // Indicates an internal service error. 1135 // 1136 // * InvalidConfigurationException 1137 // 1138 // * TooManyRequestsException 1139 // Thrown if the request is throttled. 1140 // 1141 // See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/RegisterDevice 1142 func (c *CognitoSync) RegisterDevice(input *RegisterDeviceInput) (*RegisterDeviceOutput, error) { 1143 req, out := c.RegisterDeviceRequest(input) 1144 return out, req.Send() 1145 } 1146 1147 // RegisterDeviceWithContext is the same as RegisterDevice with the addition of 1148 // the ability to pass a context and additional request options. 1149 // 1150 // See RegisterDevice for details on how to use this API operation. 1151 // 1152 // The context must be non-nil and will be used for request cancellation. If 1153 // the context is nil a panic will occur. In the future the SDK may create 1154 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1155 // for more information on using Contexts. 1156 func (c *CognitoSync) RegisterDeviceWithContext(ctx aws.Context, input *RegisterDeviceInput, opts ...request.Option) (*RegisterDeviceOutput, error) { 1157 req, out := c.RegisterDeviceRequest(input) 1158 req.SetContext(ctx) 1159 req.ApplyOptions(opts...) 1160 return out, req.Send() 1161 } 1162 1163 const opSetCognitoEvents = "SetCognitoEvents" 1164 1165 // SetCognitoEventsRequest generates a "aws/request.Request" representing the 1166 // client's request for the SetCognitoEvents operation. The "output" return 1167 // value will be populated with the request's response once the request completes 1168 // successfully. 1169 // 1170 // Use "Send" method on the returned Request to send the API call to the service. 1171 // the "output" return value is not valid until after Send returns without error. 1172 // 1173 // See SetCognitoEvents for more information on using the SetCognitoEvents 1174 // API call, and error handling. 1175 // 1176 // This method is useful when you want to inject custom logic or configuration 1177 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1178 // 1179 // 1180 // // Example sending a request using the SetCognitoEventsRequest method. 1181 // req, resp := client.SetCognitoEventsRequest(params) 1182 // 1183 // err := req.Send() 1184 // if err == nil { // resp is now filled 1185 // fmt.Println(resp) 1186 // } 1187 // 1188 // See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/SetCognitoEvents 1189 func (c *CognitoSync) SetCognitoEventsRequest(input *SetCognitoEventsInput) (req *request.Request, output *SetCognitoEventsOutput) { 1190 op := &request.Operation{ 1191 Name: opSetCognitoEvents, 1192 HTTPMethod: "POST", 1193 HTTPPath: "/identitypools/{IdentityPoolId}/events", 1194 } 1195 1196 if input == nil { 1197 input = &SetCognitoEventsInput{} 1198 } 1199 1200 output = &SetCognitoEventsOutput{} 1201 req = c.newRequest(op, input, output) 1202 req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 1203 return 1204 } 1205 1206 // SetCognitoEvents API operation for Amazon Cognito Sync. 1207 // 1208 // Sets the AWS Lambda function for a given event type for an identity pool. 1209 // This request only updates the key/value pair specified. Other key/values 1210 // pairs are not updated. To remove a key value pair, pass a empty value for 1211 // the particular key. 1212 // 1213 // This API can only be called with developer credentials. You cannot call this 1214 // API with the temporary user credentials provided by Cognito Identity. 1215 // 1216 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1217 // with awserr.Error's Code and Message methods to get detailed information about 1218 // the error. 1219 // 1220 // See the AWS API reference guide for Amazon Cognito Sync's 1221 // API operation SetCognitoEvents for usage and error information. 1222 // 1223 // Returned Error Types: 1224 // * InvalidParameterException 1225 // Thrown when a request parameter does not comply with the associated constraints. 1226 // 1227 // * ResourceNotFoundException 1228 // Thrown if the resource doesn't exist. 1229 // 1230 // * NotAuthorizedException 1231 // Thrown when a user is not authorized to access the requested resource. 1232 // 1233 // * InternalErrorException 1234 // Indicates an internal service error. 1235 // 1236 // * TooManyRequestsException 1237 // Thrown if the request is throttled. 1238 // 1239 // See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/SetCognitoEvents 1240 func (c *CognitoSync) SetCognitoEvents(input *SetCognitoEventsInput) (*SetCognitoEventsOutput, error) { 1241 req, out := c.SetCognitoEventsRequest(input) 1242 return out, req.Send() 1243 } 1244 1245 // SetCognitoEventsWithContext is the same as SetCognitoEvents with the addition of 1246 // the ability to pass a context and additional request options. 1247 // 1248 // See SetCognitoEvents for details on how to use this API operation. 1249 // 1250 // The context must be non-nil and will be used for request cancellation. If 1251 // the context is nil a panic will occur. In the future the SDK may create 1252 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1253 // for more information on using Contexts. 1254 func (c *CognitoSync) SetCognitoEventsWithContext(ctx aws.Context, input *SetCognitoEventsInput, opts ...request.Option) (*SetCognitoEventsOutput, error) { 1255 req, out := c.SetCognitoEventsRequest(input) 1256 req.SetContext(ctx) 1257 req.ApplyOptions(opts...) 1258 return out, req.Send() 1259 } 1260 1261 const opSetIdentityPoolConfiguration = "SetIdentityPoolConfiguration" 1262 1263 // SetIdentityPoolConfigurationRequest generates a "aws/request.Request" representing the 1264 // client's request for the SetIdentityPoolConfiguration operation. The "output" return 1265 // value will be populated with the request's response once the request completes 1266 // successfully. 1267 // 1268 // Use "Send" method on the returned Request to send the API call to the service. 1269 // the "output" return value is not valid until after Send returns without error. 1270 // 1271 // See SetIdentityPoolConfiguration for more information on using the SetIdentityPoolConfiguration 1272 // API call, and error handling. 1273 // 1274 // This method is useful when you want to inject custom logic or configuration 1275 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1276 // 1277 // 1278 // // Example sending a request using the SetIdentityPoolConfigurationRequest method. 1279 // req, resp := client.SetIdentityPoolConfigurationRequest(params) 1280 // 1281 // err := req.Send() 1282 // if err == nil { // resp is now filled 1283 // fmt.Println(resp) 1284 // } 1285 // 1286 // See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/SetIdentityPoolConfiguration 1287 func (c *CognitoSync) SetIdentityPoolConfigurationRequest(input *SetIdentityPoolConfigurationInput) (req *request.Request, output *SetIdentityPoolConfigurationOutput) { 1288 op := &request.Operation{ 1289 Name: opSetIdentityPoolConfiguration, 1290 HTTPMethod: "POST", 1291 HTTPPath: "/identitypools/{IdentityPoolId}/configuration", 1292 } 1293 1294 if input == nil { 1295 input = &SetIdentityPoolConfigurationInput{} 1296 } 1297 1298 output = &SetIdentityPoolConfigurationOutput{} 1299 req = c.newRequest(op, input, output) 1300 return 1301 } 1302 1303 // SetIdentityPoolConfiguration API operation for Amazon Cognito Sync. 1304 // 1305 // Sets the necessary configuration for push sync. 1306 // 1307 // This API can only be called with developer credentials. You cannot call this 1308 // API with the temporary user credentials provided by Cognito Identity. 1309 // 1310 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1311 // with awserr.Error's Code and Message methods to get detailed information about 1312 // the error. 1313 // 1314 // See the AWS API reference guide for Amazon Cognito Sync's 1315 // API operation SetIdentityPoolConfiguration for usage and error information. 1316 // 1317 // Returned Error Types: 1318 // * NotAuthorizedException 1319 // Thrown when a user is not authorized to access the requested resource. 1320 // 1321 // * InvalidParameterException 1322 // Thrown when a request parameter does not comply with the associated constraints. 1323 // 1324 // * ResourceNotFoundException 1325 // Thrown if the resource doesn't exist. 1326 // 1327 // * InternalErrorException 1328 // Indicates an internal service error. 1329 // 1330 // * TooManyRequestsException 1331 // Thrown if the request is throttled. 1332 // 1333 // * ConcurrentModificationException 1334 // Thrown if there are parallel requests to modify a resource. 1335 // 1336 // See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/SetIdentityPoolConfiguration 1337 func (c *CognitoSync) SetIdentityPoolConfiguration(input *SetIdentityPoolConfigurationInput) (*SetIdentityPoolConfigurationOutput, error) { 1338 req, out := c.SetIdentityPoolConfigurationRequest(input) 1339 return out, req.Send() 1340 } 1341 1342 // SetIdentityPoolConfigurationWithContext is the same as SetIdentityPoolConfiguration with the addition of 1343 // the ability to pass a context and additional request options. 1344 // 1345 // See SetIdentityPoolConfiguration for details on how to use this API operation. 1346 // 1347 // The context must be non-nil and will be used for request cancellation. If 1348 // the context is nil a panic will occur. In the future the SDK may create 1349 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1350 // for more information on using Contexts. 1351 func (c *CognitoSync) SetIdentityPoolConfigurationWithContext(ctx aws.Context, input *SetIdentityPoolConfigurationInput, opts ...request.Option) (*SetIdentityPoolConfigurationOutput, error) { 1352 req, out := c.SetIdentityPoolConfigurationRequest(input) 1353 req.SetContext(ctx) 1354 req.ApplyOptions(opts...) 1355 return out, req.Send() 1356 } 1357 1358 const opSubscribeToDataset = "SubscribeToDataset" 1359 1360 // SubscribeToDatasetRequest generates a "aws/request.Request" representing the 1361 // client's request for the SubscribeToDataset operation. The "output" return 1362 // value will be populated with the request's response once the request completes 1363 // successfully. 1364 // 1365 // Use "Send" method on the returned Request to send the API call to the service. 1366 // the "output" return value is not valid until after Send returns without error. 1367 // 1368 // See SubscribeToDataset for more information on using the SubscribeToDataset 1369 // API call, and error handling. 1370 // 1371 // This method is useful when you want to inject custom logic or configuration 1372 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1373 // 1374 // 1375 // // Example sending a request using the SubscribeToDatasetRequest method. 1376 // req, resp := client.SubscribeToDatasetRequest(params) 1377 // 1378 // err := req.Send() 1379 // if err == nil { // resp is now filled 1380 // fmt.Println(resp) 1381 // } 1382 // 1383 // See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/SubscribeToDataset 1384 func (c *CognitoSync) SubscribeToDatasetRequest(input *SubscribeToDatasetInput) (req *request.Request, output *SubscribeToDatasetOutput) { 1385 op := &request.Operation{ 1386 Name: opSubscribeToDataset, 1387 HTTPMethod: "POST", 1388 HTTPPath: "/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}/subscriptions/{DeviceId}", 1389 } 1390 1391 if input == nil { 1392 input = &SubscribeToDatasetInput{} 1393 } 1394 1395 output = &SubscribeToDatasetOutput{} 1396 req = c.newRequest(op, input, output) 1397 req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 1398 return 1399 } 1400 1401 // SubscribeToDataset API operation for Amazon Cognito Sync. 1402 // 1403 // Subscribes to receive notifications when a dataset is modified by another 1404 // device. 1405 // 1406 // This API can only be called with temporary credentials provided by Cognito 1407 // Identity. You cannot call this API with developer credentials. 1408 // 1409 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1410 // with awserr.Error's Code and Message methods to get detailed information about 1411 // the error. 1412 // 1413 // See the AWS API reference guide for Amazon Cognito Sync's 1414 // API operation SubscribeToDataset for usage and error information. 1415 // 1416 // Returned Error Types: 1417 // * NotAuthorizedException 1418 // Thrown when a user is not authorized to access the requested resource. 1419 // 1420 // * InvalidParameterException 1421 // Thrown when a request parameter does not comply with the associated constraints. 1422 // 1423 // * ResourceNotFoundException 1424 // Thrown if the resource doesn't exist. 1425 // 1426 // * InternalErrorException 1427 // Indicates an internal service error. 1428 // 1429 // * InvalidConfigurationException 1430 // 1431 // * TooManyRequestsException 1432 // Thrown if the request is throttled. 1433 // 1434 // See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/SubscribeToDataset 1435 func (c *CognitoSync) SubscribeToDataset(input *SubscribeToDatasetInput) (*SubscribeToDatasetOutput, error) { 1436 req, out := c.SubscribeToDatasetRequest(input) 1437 return out, req.Send() 1438 } 1439 1440 // SubscribeToDatasetWithContext is the same as SubscribeToDataset with the addition of 1441 // the ability to pass a context and additional request options. 1442 // 1443 // See SubscribeToDataset for details on how to use this API operation. 1444 // 1445 // The context must be non-nil and will be used for request cancellation. If 1446 // the context is nil a panic will occur. In the future the SDK may create 1447 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1448 // for more information on using Contexts. 1449 func (c *CognitoSync) SubscribeToDatasetWithContext(ctx aws.Context, input *SubscribeToDatasetInput, opts ...request.Option) (*SubscribeToDatasetOutput, error) { 1450 req, out := c.SubscribeToDatasetRequest(input) 1451 req.SetContext(ctx) 1452 req.ApplyOptions(opts...) 1453 return out, req.Send() 1454 } 1455 1456 const opUnsubscribeFromDataset = "UnsubscribeFromDataset" 1457 1458 // UnsubscribeFromDatasetRequest generates a "aws/request.Request" representing the 1459 // client's request for the UnsubscribeFromDataset operation. The "output" return 1460 // value will be populated with the request's response once the request completes 1461 // successfully. 1462 // 1463 // Use "Send" method on the returned Request to send the API call to the service. 1464 // the "output" return value is not valid until after Send returns without error. 1465 // 1466 // See UnsubscribeFromDataset for more information on using the UnsubscribeFromDataset 1467 // API call, and error handling. 1468 // 1469 // This method is useful when you want to inject custom logic or configuration 1470 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1471 // 1472 // 1473 // // Example sending a request using the UnsubscribeFromDatasetRequest method. 1474 // req, resp := client.UnsubscribeFromDatasetRequest(params) 1475 // 1476 // err := req.Send() 1477 // if err == nil { // resp is now filled 1478 // fmt.Println(resp) 1479 // } 1480 // 1481 // See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/UnsubscribeFromDataset 1482 func (c *CognitoSync) UnsubscribeFromDatasetRequest(input *UnsubscribeFromDatasetInput) (req *request.Request, output *UnsubscribeFromDatasetOutput) { 1483 op := &request.Operation{ 1484 Name: opUnsubscribeFromDataset, 1485 HTTPMethod: "DELETE", 1486 HTTPPath: "/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}/subscriptions/{DeviceId}", 1487 } 1488 1489 if input == nil { 1490 input = &UnsubscribeFromDatasetInput{} 1491 } 1492 1493 output = &UnsubscribeFromDatasetOutput{} 1494 req = c.newRequest(op, input, output) 1495 req.Handlers.Unmarshal.Swap(restjson.UnmarshalHandler.Name, protocol.UnmarshalDiscardBodyHandler) 1496 return 1497 } 1498 1499 // UnsubscribeFromDataset API operation for Amazon Cognito Sync. 1500 // 1501 // Unsubscribes from receiving notifications when a dataset is modified by another 1502 // device. 1503 // 1504 // This API can only be called with temporary credentials provided by Cognito 1505 // Identity. You cannot call this API with developer credentials. 1506 // 1507 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1508 // with awserr.Error's Code and Message methods to get detailed information about 1509 // the error. 1510 // 1511 // See the AWS API reference guide for Amazon Cognito Sync's 1512 // API operation UnsubscribeFromDataset for usage and error information. 1513 // 1514 // Returned Error Types: 1515 // * NotAuthorizedException 1516 // Thrown when a user is not authorized to access the requested resource. 1517 // 1518 // * InvalidParameterException 1519 // Thrown when a request parameter does not comply with the associated constraints. 1520 // 1521 // * ResourceNotFoundException 1522 // Thrown if the resource doesn't exist. 1523 // 1524 // * InternalErrorException 1525 // Indicates an internal service error. 1526 // 1527 // * InvalidConfigurationException 1528 // 1529 // * TooManyRequestsException 1530 // Thrown if the request is throttled. 1531 // 1532 // See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/UnsubscribeFromDataset 1533 func (c *CognitoSync) UnsubscribeFromDataset(input *UnsubscribeFromDatasetInput) (*UnsubscribeFromDatasetOutput, error) { 1534 req, out := c.UnsubscribeFromDatasetRequest(input) 1535 return out, req.Send() 1536 } 1537 1538 // UnsubscribeFromDatasetWithContext is the same as UnsubscribeFromDataset with the addition of 1539 // the ability to pass a context and additional request options. 1540 // 1541 // See UnsubscribeFromDataset for details on how to use this API operation. 1542 // 1543 // The context must be non-nil and will be used for request cancellation. If 1544 // the context is nil a panic will occur. In the future the SDK may create 1545 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1546 // for more information on using Contexts. 1547 func (c *CognitoSync) UnsubscribeFromDatasetWithContext(ctx aws.Context, input *UnsubscribeFromDatasetInput, opts ...request.Option) (*UnsubscribeFromDatasetOutput, error) { 1548 req, out := c.UnsubscribeFromDatasetRequest(input) 1549 req.SetContext(ctx) 1550 req.ApplyOptions(opts...) 1551 return out, req.Send() 1552 } 1553 1554 const opUpdateRecords = "UpdateRecords" 1555 1556 // UpdateRecordsRequest generates a "aws/request.Request" representing the 1557 // client's request for the UpdateRecords operation. The "output" return 1558 // value will be populated with the request's response once the request completes 1559 // successfully. 1560 // 1561 // Use "Send" method on the returned Request to send the API call to the service. 1562 // the "output" return value is not valid until after Send returns without error. 1563 // 1564 // See UpdateRecords for more information on using the UpdateRecords 1565 // API call, and error handling. 1566 // 1567 // This method is useful when you want to inject custom logic or configuration 1568 // into the SDK's request lifecycle. Such as custom headers, or retry logic. 1569 // 1570 // 1571 // // Example sending a request using the UpdateRecordsRequest method. 1572 // req, resp := client.UpdateRecordsRequest(params) 1573 // 1574 // err := req.Send() 1575 // if err == nil { // resp is now filled 1576 // fmt.Println(resp) 1577 // } 1578 // 1579 // See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/UpdateRecords 1580 func (c *CognitoSync) UpdateRecordsRequest(input *UpdateRecordsInput) (req *request.Request, output *UpdateRecordsOutput) { 1581 op := &request.Operation{ 1582 Name: opUpdateRecords, 1583 HTTPMethod: "POST", 1584 HTTPPath: "/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}", 1585 } 1586 1587 if input == nil { 1588 input = &UpdateRecordsInput{} 1589 } 1590 1591 output = &UpdateRecordsOutput{} 1592 req = c.newRequest(op, input, output) 1593 return 1594 } 1595 1596 // UpdateRecords API operation for Amazon Cognito Sync. 1597 // 1598 // Posts updates to records and adds and deletes records for a dataset and user. 1599 // 1600 // The sync count in the record patch is your last known sync count for that 1601 // record. The server will reject an UpdateRecords request with a ResourceConflictException 1602 // if you try to patch a record with a new value but a stale sync count. 1603 // 1604 // For example, if the sync count on the server is 5 for a key called highScore 1605 // and you try and submit a new highScore with sync count of 4, the request 1606 // will be rejected. To obtain the current sync count for a record, call ListRecords. 1607 // On a successful update of the record, the response returns the new sync count 1608 // for that record. You should present that sync count the next time you try 1609 // to update that same record. When the record does not exist, specify the sync 1610 // count as 0. 1611 // 1612 // This API can be called with temporary user credentials provided by Cognito 1613 // Identity or with developer credentials. 1614 // 1615 // Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1616 // with awserr.Error's Code and Message methods to get detailed information about 1617 // the error. 1618 // 1619 // See the AWS API reference guide for Amazon Cognito Sync's 1620 // API operation UpdateRecords for usage and error information. 1621 // 1622 // Returned Error Types: 1623 // * InvalidParameterException 1624 // Thrown when a request parameter does not comply with the associated constraints. 1625 // 1626 // * LimitExceededException 1627 // Thrown when the limit on the number of objects or operations has been exceeded. 1628 // 1629 // * NotAuthorizedException 1630 // Thrown when a user is not authorized to access the requested resource. 1631 // 1632 // * ResourceNotFoundException 1633 // Thrown if the resource doesn't exist. 1634 // 1635 // * ResourceConflictException 1636 // Thrown if an update can't be applied because the resource was changed by 1637 // another call and this would result in a conflict. 1638 // 1639 // * InvalidLambdaFunctionOutputException 1640 // The AWS Lambda function returned invalid output or an exception. 1641 // 1642 // * LambdaThrottledException 1643 // AWS Lambda throttled your account, please contact AWS Support 1644 // 1645 // * TooManyRequestsException 1646 // Thrown if the request is throttled. 1647 // 1648 // * InternalErrorException 1649 // Indicates an internal service error. 1650 // 1651 // See also, https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/UpdateRecords 1652 func (c *CognitoSync) UpdateRecords(input *UpdateRecordsInput) (*UpdateRecordsOutput, error) { 1653 req, out := c.UpdateRecordsRequest(input) 1654 return out, req.Send() 1655 } 1656 1657 // UpdateRecordsWithContext is the same as UpdateRecords with the addition of 1658 // the ability to pass a context and additional request options. 1659 // 1660 // See UpdateRecords for details on how to use this API operation. 1661 // 1662 // The context must be non-nil and will be used for request cancellation. If 1663 // the context is nil a panic will occur. In the future the SDK may create 1664 // sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1665 // for more information on using Contexts. 1666 func (c *CognitoSync) UpdateRecordsWithContext(ctx aws.Context, input *UpdateRecordsInput, opts ...request.Option) (*UpdateRecordsOutput, error) { 1667 req, out := c.UpdateRecordsRequest(input) 1668 req.SetContext(ctx) 1669 req.ApplyOptions(opts...) 1670 return out, req.Send() 1671 } 1672 1673 // An exception thrown when a bulk publish operation is requested less than 1674 // 24 hours after a previous bulk publish operation completed successfully. 1675 type AlreadyStreamedException struct { 1676 _ struct{} `type:"structure"` 1677 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1678 1679 // The message associated with the AlreadyStreamedException exception. 1680 Message_ *string `locationName:"message" type:"string"` 1681 } 1682 1683 // String returns the string representation. 1684 // 1685 // API parameter values that are decorated as "sensitive" in the API will not 1686 // be included in the string output. The member name will be present, but the 1687 // value will be replaced with "sensitive". 1688 func (s AlreadyStreamedException) String() string { 1689 return awsutil.Prettify(s) 1690 } 1691 1692 // GoString returns the string representation. 1693 // 1694 // API parameter values that are decorated as "sensitive" in the API will not 1695 // be included in the string output. The member name will be present, but the 1696 // value will be replaced with "sensitive". 1697 func (s AlreadyStreamedException) GoString() string { 1698 return s.String() 1699 } 1700 1701 func newErrorAlreadyStreamedException(v protocol.ResponseMetadata) error { 1702 return &AlreadyStreamedException{ 1703 RespMetadata: v, 1704 } 1705 } 1706 1707 // Code returns the exception type name. 1708 func (s *AlreadyStreamedException) Code() string { 1709 return "AlreadyStreamedException" 1710 } 1711 1712 // Message returns the exception's message. 1713 func (s *AlreadyStreamedException) Message() string { 1714 if s.Message_ != nil { 1715 return *s.Message_ 1716 } 1717 return "" 1718 } 1719 1720 // OrigErr always returns nil, satisfies awserr.Error interface. 1721 func (s *AlreadyStreamedException) OrigErr() error { 1722 return nil 1723 } 1724 1725 func (s *AlreadyStreamedException) Error() string { 1726 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1727 } 1728 1729 // Status code returns the HTTP status code for the request's response error. 1730 func (s *AlreadyStreamedException) StatusCode() int { 1731 return s.RespMetadata.StatusCode 1732 } 1733 1734 // RequestID returns the service's response RequestID for request. 1735 func (s *AlreadyStreamedException) RequestID() string { 1736 return s.RespMetadata.RequestID 1737 } 1738 1739 // The input for the BulkPublish operation. 1740 type BulkPublishInput struct { 1741 _ struct{} `type:"structure" nopayload:"true"` 1742 1743 // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) 1744 // created by Amazon Cognito. GUID generation is unique within a region. 1745 // 1746 // IdentityPoolId is a required field 1747 IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"` 1748 } 1749 1750 // String returns the string representation. 1751 // 1752 // API parameter values that are decorated as "sensitive" in the API will not 1753 // be included in the string output. The member name will be present, but the 1754 // value will be replaced with "sensitive". 1755 func (s BulkPublishInput) String() string { 1756 return awsutil.Prettify(s) 1757 } 1758 1759 // GoString returns the string representation. 1760 // 1761 // API parameter values that are decorated as "sensitive" in the API will not 1762 // be included in the string output. The member name will be present, but the 1763 // value will be replaced with "sensitive". 1764 func (s BulkPublishInput) GoString() string { 1765 return s.String() 1766 } 1767 1768 // Validate inspects the fields of the type to determine if they are valid. 1769 func (s *BulkPublishInput) Validate() error { 1770 invalidParams := request.ErrInvalidParams{Context: "BulkPublishInput"} 1771 if s.IdentityPoolId == nil { 1772 invalidParams.Add(request.NewErrParamRequired("IdentityPoolId")) 1773 } 1774 if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 { 1775 invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1)) 1776 } 1777 1778 if invalidParams.Len() > 0 { 1779 return invalidParams 1780 } 1781 return nil 1782 } 1783 1784 // SetIdentityPoolId sets the IdentityPoolId field's value. 1785 func (s *BulkPublishInput) SetIdentityPoolId(v string) *BulkPublishInput { 1786 s.IdentityPoolId = &v 1787 return s 1788 } 1789 1790 // The output for the BulkPublish operation. 1791 type BulkPublishOutput struct { 1792 _ struct{} `type:"structure"` 1793 1794 // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) 1795 // created by Amazon Cognito. GUID generation is unique within a region. 1796 IdentityPoolId *string `min:"1" type:"string"` 1797 } 1798 1799 // String returns the string representation. 1800 // 1801 // API parameter values that are decorated as "sensitive" in the API will not 1802 // be included in the string output. The member name will be present, but the 1803 // value will be replaced with "sensitive". 1804 func (s BulkPublishOutput) String() string { 1805 return awsutil.Prettify(s) 1806 } 1807 1808 // GoString returns the string representation. 1809 // 1810 // API parameter values that are decorated as "sensitive" in the API will not 1811 // be included in the string output. The member name will be present, but the 1812 // value will be replaced with "sensitive". 1813 func (s BulkPublishOutput) GoString() string { 1814 return s.String() 1815 } 1816 1817 // SetIdentityPoolId sets the IdentityPoolId field's value. 1818 func (s *BulkPublishOutput) SetIdentityPoolId(v string) *BulkPublishOutput { 1819 s.IdentityPoolId = &v 1820 return s 1821 } 1822 1823 // Configuration options for configure Cognito streams. 1824 type CognitoStreams struct { 1825 _ struct{} `type:"structure"` 1826 1827 // The ARN of the role Amazon Cognito can assume in order to publish to the 1828 // stream. This role must grant access to Amazon Cognito (cognito-sync) to invoke 1829 // PutRecord on your Cognito stream. 1830 RoleArn *string `min:"20" type:"string"` 1831 1832 // The name of the Cognito stream to receive updates. This stream must be in 1833 // the developers account and in the same region as the identity pool. 1834 StreamName *string `min:"1" type:"string"` 1835 1836 // Status of the Cognito streams. Valid values are: 1837 // ENABLED - Streaming of updates to identity pool is enabled. 1838 // 1839 // DISABLED - Streaming of updates to identity pool is disabled. Bulk publish 1840 // will also fail if StreamingStatus is DISABLED. 1841 StreamingStatus *string `type:"string" enum:"StreamingStatus"` 1842 } 1843 1844 // String returns the string representation. 1845 // 1846 // API parameter values that are decorated as "sensitive" in the API will not 1847 // be included in the string output. The member name will be present, but the 1848 // value will be replaced with "sensitive". 1849 func (s CognitoStreams) String() string { 1850 return awsutil.Prettify(s) 1851 } 1852 1853 // GoString 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 CognitoStreams) GoString() string { 1859 return s.String() 1860 } 1861 1862 // Validate inspects the fields of the type to determine if they are valid. 1863 func (s *CognitoStreams) Validate() error { 1864 invalidParams := request.ErrInvalidParams{Context: "CognitoStreams"} 1865 if s.RoleArn != nil && len(*s.RoleArn) < 20 { 1866 invalidParams.Add(request.NewErrParamMinLen("RoleArn", 20)) 1867 } 1868 if s.StreamName != nil && len(*s.StreamName) < 1 { 1869 invalidParams.Add(request.NewErrParamMinLen("StreamName", 1)) 1870 } 1871 1872 if invalidParams.Len() > 0 { 1873 return invalidParams 1874 } 1875 return nil 1876 } 1877 1878 // SetRoleArn sets the RoleArn field's value. 1879 func (s *CognitoStreams) SetRoleArn(v string) *CognitoStreams { 1880 s.RoleArn = &v 1881 return s 1882 } 1883 1884 // SetStreamName sets the StreamName field's value. 1885 func (s *CognitoStreams) SetStreamName(v string) *CognitoStreams { 1886 s.StreamName = &v 1887 return s 1888 } 1889 1890 // SetStreamingStatus sets the StreamingStatus field's value. 1891 func (s *CognitoStreams) SetStreamingStatus(v string) *CognitoStreams { 1892 s.StreamingStatus = &v 1893 return s 1894 } 1895 1896 // Thrown if there are parallel requests to modify a resource. 1897 type ConcurrentModificationException struct { 1898 _ struct{} `type:"structure"` 1899 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 1900 1901 // The message returned by a ConcurrentModicationException. 1902 Message_ *string `locationName:"message" type:"string"` 1903 } 1904 1905 // String returns the string representation. 1906 // 1907 // API parameter values that are decorated as "sensitive" in the API will not 1908 // be included in the string output. The member name will be present, but the 1909 // value will be replaced with "sensitive". 1910 func (s ConcurrentModificationException) String() string { 1911 return awsutil.Prettify(s) 1912 } 1913 1914 // GoString returns the string representation. 1915 // 1916 // API parameter values that are decorated as "sensitive" in the API will not 1917 // be included in the string output. The member name will be present, but the 1918 // value will be replaced with "sensitive". 1919 func (s ConcurrentModificationException) GoString() string { 1920 return s.String() 1921 } 1922 1923 func newErrorConcurrentModificationException(v protocol.ResponseMetadata) error { 1924 return &ConcurrentModificationException{ 1925 RespMetadata: v, 1926 } 1927 } 1928 1929 // Code returns the exception type name. 1930 func (s *ConcurrentModificationException) Code() string { 1931 return "ConcurrentModificationException" 1932 } 1933 1934 // Message returns the exception's message. 1935 func (s *ConcurrentModificationException) Message() string { 1936 if s.Message_ != nil { 1937 return *s.Message_ 1938 } 1939 return "" 1940 } 1941 1942 // OrigErr always returns nil, satisfies awserr.Error interface. 1943 func (s *ConcurrentModificationException) OrigErr() error { 1944 return nil 1945 } 1946 1947 func (s *ConcurrentModificationException) Error() string { 1948 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 1949 } 1950 1951 // Status code returns the HTTP status code for the request's response error. 1952 func (s *ConcurrentModificationException) StatusCode() int { 1953 return s.RespMetadata.StatusCode 1954 } 1955 1956 // RequestID returns the service's response RequestID for request. 1957 func (s *ConcurrentModificationException) RequestID() string { 1958 return s.RespMetadata.RequestID 1959 } 1960 1961 // A collection of data for an identity pool. An identity pool can have multiple 1962 // datasets. A dataset is per identity and can be general or associated with 1963 // a particular entity in an application (like a saved game). Datasets are automatically 1964 // created if they don't exist. Data is synced by dataset, and a dataset can 1965 // hold up to 1MB of key-value pairs. 1966 type Dataset struct { 1967 _ struct{} `type:"structure"` 1968 1969 // Date on which the dataset was created. 1970 CreationDate *time.Time `type:"timestamp"` 1971 1972 // Total size in bytes of the records in this dataset. 1973 DataStorage *int64 `type:"long"` 1974 1975 // A string of up to 128 characters. Allowed characters are a-z, A-Z, 0-9, '_' 1976 // (underscore), '-' (dash), and '.' (dot). 1977 DatasetName *string `min:"1" type:"string"` 1978 1979 // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) 1980 // created by Amazon Cognito. GUID generation is unique within a region. 1981 IdentityId *string `min:"1" type:"string"` 1982 1983 // The device that made the last change to this dataset. 1984 LastModifiedBy *string `type:"string"` 1985 1986 // Date when the dataset was last modified. 1987 LastModifiedDate *time.Time `type:"timestamp"` 1988 1989 // Number of records in this dataset. 1990 NumRecords *int64 `type:"long"` 1991 } 1992 1993 // String returns the string representation. 1994 // 1995 // API parameter values that are decorated as "sensitive" in the API will not 1996 // be included in the string output. The member name will be present, but the 1997 // value will be replaced with "sensitive". 1998 func (s Dataset) String() string { 1999 return awsutil.Prettify(s) 2000 } 2001 2002 // GoString returns the string representation. 2003 // 2004 // API parameter values that are decorated as "sensitive" in the API will not 2005 // be included in the string output. The member name will be present, but the 2006 // value will be replaced with "sensitive". 2007 func (s Dataset) GoString() string { 2008 return s.String() 2009 } 2010 2011 // SetCreationDate sets the CreationDate field's value. 2012 func (s *Dataset) SetCreationDate(v time.Time) *Dataset { 2013 s.CreationDate = &v 2014 return s 2015 } 2016 2017 // SetDataStorage sets the DataStorage field's value. 2018 func (s *Dataset) SetDataStorage(v int64) *Dataset { 2019 s.DataStorage = &v 2020 return s 2021 } 2022 2023 // SetDatasetName sets the DatasetName field's value. 2024 func (s *Dataset) SetDatasetName(v string) *Dataset { 2025 s.DatasetName = &v 2026 return s 2027 } 2028 2029 // SetIdentityId sets the IdentityId field's value. 2030 func (s *Dataset) SetIdentityId(v string) *Dataset { 2031 s.IdentityId = &v 2032 return s 2033 } 2034 2035 // SetLastModifiedBy sets the LastModifiedBy field's value. 2036 func (s *Dataset) SetLastModifiedBy(v string) *Dataset { 2037 s.LastModifiedBy = &v 2038 return s 2039 } 2040 2041 // SetLastModifiedDate sets the LastModifiedDate field's value. 2042 func (s *Dataset) SetLastModifiedDate(v time.Time) *Dataset { 2043 s.LastModifiedDate = &v 2044 return s 2045 } 2046 2047 // SetNumRecords sets the NumRecords field's value. 2048 func (s *Dataset) SetNumRecords(v int64) *Dataset { 2049 s.NumRecords = &v 2050 return s 2051 } 2052 2053 // A request to delete the specific dataset. 2054 type DeleteDatasetInput struct { 2055 _ struct{} `type:"structure" nopayload:"true"` 2056 2057 // A string of up to 128 characters. Allowed characters are a-z, A-Z, 0-9, '_' 2058 // (underscore), '-' (dash), and '.' (dot). 2059 // 2060 // DatasetName is a required field 2061 DatasetName *string `location:"uri" locationName:"DatasetName" min:"1" type:"string" required:"true"` 2062 2063 // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) 2064 // created by Amazon Cognito. GUID generation is unique within a region. 2065 // 2066 // IdentityId is a required field 2067 IdentityId *string `location:"uri" locationName:"IdentityId" min:"1" type:"string" required:"true"` 2068 2069 // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) 2070 // created by Amazon Cognito. GUID generation is unique within a region. 2071 // 2072 // IdentityPoolId is a required field 2073 IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"` 2074 } 2075 2076 // String returns the string representation. 2077 // 2078 // API parameter values that are decorated as "sensitive" in the API will not 2079 // be included in the string output. The member name will be present, but the 2080 // value will be replaced with "sensitive". 2081 func (s DeleteDatasetInput) String() string { 2082 return awsutil.Prettify(s) 2083 } 2084 2085 // GoString returns the string representation. 2086 // 2087 // API parameter values that are decorated as "sensitive" in the API will not 2088 // be included in the string output. The member name will be present, but the 2089 // value will be replaced with "sensitive". 2090 func (s DeleteDatasetInput) GoString() string { 2091 return s.String() 2092 } 2093 2094 // Validate inspects the fields of the type to determine if they are valid. 2095 func (s *DeleteDatasetInput) Validate() error { 2096 invalidParams := request.ErrInvalidParams{Context: "DeleteDatasetInput"} 2097 if s.DatasetName == nil { 2098 invalidParams.Add(request.NewErrParamRequired("DatasetName")) 2099 } 2100 if s.DatasetName != nil && len(*s.DatasetName) < 1 { 2101 invalidParams.Add(request.NewErrParamMinLen("DatasetName", 1)) 2102 } 2103 if s.IdentityId == nil { 2104 invalidParams.Add(request.NewErrParamRequired("IdentityId")) 2105 } 2106 if s.IdentityId != nil && len(*s.IdentityId) < 1 { 2107 invalidParams.Add(request.NewErrParamMinLen("IdentityId", 1)) 2108 } 2109 if s.IdentityPoolId == nil { 2110 invalidParams.Add(request.NewErrParamRequired("IdentityPoolId")) 2111 } 2112 if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 { 2113 invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1)) 2114 } 2115 2116 if invalidParams.Len() > 0 { 2117 return invalidParams 2118 } 2119 return nil 2120 } 2121 2122 // SetDatasetName sets the DatasetName field's value. 2123 func (s *DeleteDatasetInput) SetDatasetName(v string) *DeleteDatasetInput { 2124 s.DatasetName = &v 2125 return s 2126 } 2127 2128 // SetIdentityId sets the IdentityId field's value. 2129 func (s *DeleteDatasetInput) SetIdentityId(v string) *DeleteDatasetInput { 2130 s.IdentityId = &v 2131 return s 2132 } 2133 2134 // SetIdentityPoolId sets the IdentityPoolId field's value. 2135 func (s *DeleteDatasetInput) SetIdentityPoolId(v string) *DeleteDatasetInput { 2136 s.IdentityPoolId = &v 2137 return s 2138 } 2139 2140 // Response to a successful DeleteDataset request. 2141 type DeleteDatasetOutput struct { 2142 _ struct{} `type:"structure"` 2143 2144 // A collection of data for an identity pool. An identity pool can have multiple 2145 // datasets. A dataset is per identity and can be general or associated with 2146 // a particular entity in an application (like a saved game). Datasets are automatically 2147 // created if they don't exist. Data is synced by dataset, and a dataset can 2148 // hold up to 1MB of key-value pairs. 2149 Dataset *Dataset `type:"structure"` 2150 } 2151 2152 // String returns the string representation. 2153 // 2154 // API parameter values that are decorated as "sensitive" in the API will not 2155 // be included in the string output. The member name will be present, but the 2156 // value will be replaced with "sensitive". 2157 func (s DeleteDatasetOutput) String() string { 2158 return awsutil.Prettify(s) 2159 } 2160 2161 // GoString returns the string representation. 2162 // 2163 // API parameter values that are decorated as "sensitive" in the API will not 2164 // be included in the string output. The member name will be present, but the 2165 // value will be replaced with "sensitive". 2166 func (s DeleteDatasetOutput) GoString() string { 2167 return s.String() 2168 } 2169 2170 // SetDataset sets the Dataset field's value. 2171 func (s *DeleteDatasetOutput) SetDataset(v *Dataset) *DeleteDatasetOutput { 2172 s.Dataset = v 2173 return s 2174 } 2175 2176 // A request for meta data about a dataset (creation date, number of records, 2177 // size) by owner and dataset name. 2178 type DescribeDatasetInput struct { 2179 _ struct{} `type:"structure" nopayload:"true"` 2180 2181 // A string of up to 128 characters. Allowed characters are a-z, A-Z, 0-9, '_' 2182 // (underscore), '-' (dash), and '.' (dot). 2183 // 2184 // DatasetName is a required field 2185 DatasetName *string `location:"uri" locationName:"DatasetName" min:"1" type:"string" required:"true"` 2186 2187 // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) 2188 // created by Amazon Cognito. GUID generation is unique within a region. 2189 // 2190 // IdentityId is a required field 2191 IdentityId *string `location:"uri" locationName:"IdentityId" min:"1" type:"string" required:"true"` 2192 2193 // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) 2194 // created by Amazon Cognito. GUID generation is unique within a region. 2195 // 2196 // IdentityPoolId is a required field 2197 IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"` 2198 } 2199 2200 // String returns the string representation. 2201 // 2202 // API parameter values that are decorated as "sensitive" in the API will not 2203 // be included in the string output. The member name will be present, but the 2204 // value will be replaced with "sensitive". 2205 func (s DescribeDatasetInput) String() string { 2206 return awsutil.Prettify(s) 2207 } 2208 2209 // GoString returns the string representation. 2210 // 2211 // API parameter values that are decorated as "sensitive" in the API will not 2212 // be included in the string output. The member name will be present, but the 2213 // value will be replaced with "sensitive". 2214 func (s DescribeDatasetInput) GoString() string { 2215 return s.String() 2216 } 2217 2218 // Validate inspects the fields of the type to determine if they are valid. 2219 func (s *DescribeDatasetInput) Validate() error { 2220 invalidParams := request.ErrInvalidParams{Context: "DescribeDatasetInput"} 2221 if s.DatasetName == nil { 2222 invalidParams.Add(request.NewErrParamRequired("DatasetName")) 2223 } 2224 if s.DatasetName != nil && len(*s.DatasetName) < 1 { 2225 invalidParams.Add(request.NewErrParamMinLen("DatasetName", 1)) 2226 } 2227 if s.IdentityId == nil { 2228 invalidParams.Add(request.NewErrParamRequired("IdentityId")) 2229 } 2230 if s.IdentityId != nil && len(*s.IdentityId) < 1 { 2231 invalidParams.Add(request.NewErrParamMinLen("IdentityId", 1)) 2232 } 2233 if s.IdentityPoolId == nil { 2234 invalidParams.Add(request.NewErrParamRequired("IdentityPoolId")) 2235 } 2236 if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 { 2237 invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1)) 2238 } 2239 2240 if invalidParams.Len() > 0 { 2241 return invalidParams 2242 } 2243 return nil 2244 } 2245 2246 // SetDatasetName sets the DatasetName field's value. 2247 func (s *DescribeDatasetInput) SetDatasetName(v string) *DescribeDatasetInput { 2248 s.DatasetName = &v 2249 return s 2250 } 2251 2252 // SetIdentityId sets the IdentityId field's value. 2253 func (s *DescribeDatasetInput) SetIdentityId(v string) *DescribeDatasetInput { 2254 s.IdentityId = &v 2255 return s 2256 } 2257 2258 // SetIdentityPoolId sets the IdentityPoolId field's value. 2259 func (s *DescribeDatasetInput) SetIdentityPoolId(v string) *DescribeDatasetInput { 2260 s.IdentityPoolId = &v 2261 return s 2262 } 2263 2264 // Response to a successful DescribeDataset request. 2265 type DescribeDatasetOutput struct { 2266 _ struct{} `type:"structure"` 2267 2268 // Meta data for a collection of data for an identity. An identity can have 2269 // multiple datasets. A dataset can be general or associated with a particular 2270 // entity in an application (like a saved game). Datasets are automatically 2271 // created if they don't exist. Data is synced by dataset, and a dataset can 2272 // hold up to 1MB of key-value pairs. 2273 Dataset *Dataset `type:"structure"` 2274 } 2275 2276 // String returns the string representation. 2277 // 2278 // API parameter values that are decorated as "sensitive" in the API will not 2279 // be included in the string output. The member name will be present, but the 2280 // value will be replaced with "sensitive". 2281 func (s DescribeDatasetOutput) String() string { 2282 return awsutil.Prettify(s) 2283 } 2284 2285 // GoString returns the string representation. 2286 // 2287 // API parameter values that are decorated as "sensitive" in the API will not 2288 // be included in the string output. The member name will be present, but the 2289 // value will be replaced with "sensitive". 2290 func (s DescribeDatasetOutput) GoString() string { 2291 return s.String() 2292 } 2293 2294 // SetDataset sets the Dataset field's value. 2295 func (s *DescribeDatasetOutput) SetDataset(v *Dataset) *DescribeDatasetOutput { 2296 s.Dataset = v 2297 return s 2298 } 2299 2300 // A request for usage information about the identity pool. 2301 type DescribeIdentityPoolUsageInput struct { 2302 _ struct{} `type:"structure" nopayload:"true"` 2303 2304 // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) 2305 // created by Amazon Cognito. GUID generation is unique within a region. 2306 // 2307 // IdentityPoolId is a required field 2308 IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"` 2309 } 2310 2311 // String returns the string representation. 2312 // 2313 // API parameter values that are decorated as "sensitive" in the API will not 2314 // be included in the string output. The member name will be present, but the 2315 // value will be replaced with "sensitive". 2316 func (s DescribeIdentityPoolUsageInput) String() string { 2317 return awsutil.Prettify(s) 2318 } 2319 2320 // GoString returns the string representation. 2321 // 2322 // API parameter values that are decorated as "sensitive" in the API will not 2323 // be included in the string output. The member name will be present, but the 2324 // value will be replaced with "sensitive". 2325 func (s DescribeIdentityPoolUsageInput) GoString() string { 2326 return s.String() 2327 } 2328 2329 // Validate inspects the fields of the type to determine if they are valid. 2330 func (s *DescribeIdentityPoolUsageInput) Validate() error { 2331 invalidParams := request.ErrInvalidParams{Context: "DescribeIdentityPoolUsageInput"} 2332 if s.IdentityPoolId == nil { 2333 invalidParams.Add(request.NewErrParamRequired("IdentityPoolId")) 2334 } 2335 if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 { 2336 invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1)) 2337 } 2338 2339 if invalidParams.Len() > 0 { 2340 return invalidParams 2341 } 2342 return nil 2343 } 2344 2345 // SetIdentityPoolId sets the IdentityPoolId field's value. 2346 func (s *DescribeIdentityPoolUsageInput) SetIdentityPoolId(v string) *DescribeIdentityPoolUsageInput { 2347 s.IdentityPoolId = &v 2348 return s 2349 } 2350 2351 // Response to a successful DescribeIdentityPoolUsage request. 2352 type DescribeIdentityPoolUsageOutput struct { 2353 _ struct{} `type:"structure"` 2354 2355 // Information about the usage of the identity pool. 2356 IdentityPoolUsage *IdentityPoolUsage `type:"structure"` 2357 } 2358 2359 // String returns the string representation. 2360 // 2361 // API parameter values that are decorated as "sensitive" in the API will not 2362 // be included in the string output. The member name will be present, but the 2363 // value will be replaced with "sensitive". 2364 func (s DescribeIdentityPoolUsageOutput) String() string { 2365 return awsutil.Prettify(s) 2366 } 2367 2368 // GoString returns the string representation. 2369 // 2370 // API parameter values that are decorated as "sensitive" in the API will not 2371 // be included in the string output. The member name will be present, but the 2372 // value will be replaced with "sensitive". 2373 func (s DescribeIdentityPoolUsageOutput) GoString() string { 2374 return s.String() 2375 } 2376 2377 // SetIdentityPoolUsage sets the IdentityPoolUsage field's value. 2378 func (s *DescribeIdentityPoolUsageOutput) SetIdentityPoolUsage(v *IdentityPoolUsage) *DescribeIdentityPoolUsageOutput { 2379 s.IdentityPoolUsage = v 2380 return s 2381 } 2382 2383 // A request for information about the usage of an identity pool. 2384 type DescribeIdentityUsageInput struct { 2385 _ struct{} `type:"structure" nopayload:"true"` 2386 2387 // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) 2388 // created by Amazon Cognito. GUID generation is unique within a region. 2389 // 2390 // IdentityId is a required field 2391 IdentityId *string `location:"uri" locationName:"IdentityId" min:"1" type:"string" required:"true"` 2392 2393 // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) 2394 // created by Amazon Cognito. GUID generation is unique within a region. 2395 // 2396 // IdentityPoolId is a required field 2397 IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"` 2398 } 2399 2400 // String returns the string representation. 2401 // 2402 // API parameter values that are decorated as "sensitive" in the API will not 2403 // be included in the string output. The member name will be present, but the 2404 // value will be replaced with "sensitive". 2405 func (s DescribeIdentityUsageInput) String() string { 2406 return awsutil.Prettify(s) 2407 } 2408 2409 // GoString returns the string representation. 2410 // 2411 // API parameter values that are decorated as "sensitive" in the API will not 2412 // be included in the string output. The member name will be present, but the 2413 // value will be replaced with "sensitive". 2414 func (s DescribeIdentityUsageInput) GoString() string { 2415 return s.String() 2416 } 2417 2418 // Validate inspects the fields of the type to determine if they are valid. 2419 func (s *DescribeIdentityUsageInput) Validate() error { 2420 invalidParams := request.ErrInvalidParams{Context: "DescribeIdentityUsageInput"} 2421 if s.IdentityId == nil { 2422 invalidParams.Add(request.NewErrParamRequired("IdentityId")) 2423 } 2424 if s.IdentityId != nil && len(*s.IdentityId) < 1 { 2425 invalidParams.Add(request.NewErrParamMinLen("IdentityId", 1)) 2426 } 2427 if s.IdentityPoolId == nil { 2428 invalidParams.Add(request.NewErrParamRequired("IdentityPoolId")) 2429 } 2430 if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 { 2431 invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1)) 2432 } 2433 2434 if invalidParams.Len() > 0 { 2435 return invalidParams 2436 } 2437 return nil 2438 } 2439 2440 // SetIdentityId sets the IdentityId field's value. 2441 func (s *DescribeIdentityUsageInput) SetIdentityId(v string) *DescribeIdentityUsageInput { 2442 s.IdentityId = &v 2443 return s 2444 } 2445 2446 // SetIdentityPoolId sets the IdentityPoolId field's value. 2447 func (s *DescribeIdentityUsageInput) SetIdentityPoolId(v string) *DescribeIdentityUsageInput { 2448 s.IdentityPoolId = &v 2449 return s 2450 } 2451 2452 // The response to a successful DescribeIdentityUsage request. 2453 type DescribeIdentityUsageOutput struct { 2454 _ struct{} `type:"structure"` 2455 2456 // Usage information for the identity. 2457 IdentityUsage *IdentityUsage `type:"structure"` 2458 } 2459 2460 // String returns the string representation. 2461 // 2462 // API parameter values that are decorated as "sensitive" in the API will not 2463 // be included in the string output. The member name will be present, but the 2464 // value will be replaced with "sensitive". 2465 func (s DescribeIdentityUsageOutput) String() string { 2466 return awsutil.Prettify(s) 2467 } 2468 2469 // GoString returns the string representation. 2470 // 2471 // API parameter values that are decorated as "sensitive" in the API will not 2472 // be included in the string output. The member name will be present, but the 2473 // value will be replaced with "sensitive". 2474 func (s DescribeIdentityUsageOutput) GoString() string { 2475 return s.String() 2476 } 2477 2478 // SetIdentityUsage sets the IdentityUsage field's value. 2479 func (s *DescribeIdentityUsageOutput) SetIdentityUsage(v *IdentityUsage) *DescribeIdentityUsageOutput { 2480 s.IdentityUsage = v 2481 return s 2482 } 2483 2484 // An exception thrown when there is an IN_PROGRESS bulk publish operation for 2485 // the given identity pool. 2486 type DuplicateRequestException struct { 2487 _ struct{} `type:"structure"` 2488 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 2489 2490 // The message associated with the DuplicateRequestException exception. 2491 Message_ *string `locationName:"message" type:"string"` 2492 } 2493 2494 // String returns the string representation. 2495 // 2496 // API parameter values that are decorated as "sensitive" in the API will not 2497 // be included in the string output. The member name will be present, but the 2498 // value will be replaced with "sensitive". 2499 func (s DuplicateRequestException) String() string { 2500 return awsutil.Prettify(s) 2501 } 2502 2503 // GoString returns the string representation. 2504 // 2505 // API parameter values that are decorated as "sensitive" in the API will not 2506 // be included in the string output. The member name will be present, but the 2507 // value will be replaced with "sensitive". 2508 func (s DuplicateRequestException) GoString() string { 2509 return s.String() 2510 } 2511 2512 func newErrorDuplicateRequestException(v protocol.ResponseMetadata) error { 2513 return &DuplicateRequestException{ 2514 RespMetadata: v, 2515 } 2516 } 2517 2518 // Code returns the exception type name. 2519 func (s *DuplicateRequestException) Code() string { 2520 return "DuplicateRequestException" 2521 } 2522 2523 // Message returns the exception's message. 2524 func (s *DuplicateRequestException) Message() string { 2525 if s.Message_ != nil { 2526 return *s.Message_ 2527 } 2528 return "" 2529 } 2530 2531 // OrigErr always returns nil, satisfies awserr.Error interface. 2532 func (s *DuplicateRequestException) OrigErr() error { 2533 return nil 2534 } 2535 2536 func (s *DuplicateRequestException) Error() string { 2537 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 2538 } 2539 2540 // Status code returns the HTTP status code for the request's response error. 2541 func (s *DuplicateRequestException) StatusCode() int { 2542 return s.RespMetadata.StatusCode 2543 } 2544 2545 // RequestID returns the service's response RequestID for request. 2546 func (s *DuplicateRequestException) RequestID() string { 2547 return s.RespMetadata.RequestID 2548 } 2549 2550 // The input for the GetBulkPublishDetails operation. 2551 type GetBulkPublishDetailsInput struct { 2552 _ struct{} `type:"structure" nopayload:"true"` 2553 2554 // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) 2555 // created by Amazon Cognito. GUID generation is unique within a region. 2556 // 2557 // IdentityPoolId is a required field 2558 IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"` 2559 } 2560 2561 // String returns the string representation. 2562 // 2563 // API parameter values that are decorated as "sensitive" in the API will not 2564 // be included in the string output. The member name will be present, but the 2565 // value will be replaced with "sensitive". 2566 func (s GetBulkPublishDetailsInput) String() string { 2567 return awsutil.Prettify(s) 2568 } 2569 2570 // GoString returns the string representation. 2571 // 2572 // API parameter values that are decorated as "sensitive" in the API will not 2573 // be included in the string output. The member name will be present, but the 2574 // value will be replaced with "sensitive". 2575 func (s GetBulkPublishDetailsInput) GoString() string { 2576 return s.String() 2577 } 2578 2579 // Validate inspects the fields of the type to determine if they are valid. 2580 func (s *GetBulkPublishDetailsInput) Validate() error { 2581 invalidParams := request.ErrInvalidParams{Context: "GetBulkPublishDetailsInput"} 2582 if s.IdentityPoolId == nil { 2583 invalidParams.Add(request.NewErrParamRequired("IdentityPoolId")) 2584 } 2585 if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 { 2586 invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1)) 2587 } 2588 2589 if invalidParams.Len() > 0 { 2590 return invalidParams 2591 } 2592 return nil 2593 } 2594 2595 // SetIdentityPoolId sets the IdentityPoolId field's value. 2596 func (s *GetBulkPublishDetailsInput) SetIdentityPoolId(v string) *GetBulkPublishDetailsInput { 2597 s.IdentityPoolId = &v 2598 return s 2599 } 2600 2601 // The output for the GetBulkPublishDetails operation. 2602 type GetBulkPublishDetailsOutput struct { 2603 _ struct{} `type:"structure"` 2604 2605 // If BulkPublishStatus is SUCCEEDED, the time the last bulk publish operation 2606 // completed. 2607 BulkPublishCompleteTime *time.Time `type:"timestamp"` 2608 2609 // The date/time at which the last bulk publish was initiated. 2610 BulkPublishStartTime *time.Time `type:"timestamp"` 2611 2612 // Status of the last bulk publish operation, valid values are: 2613 // NOT_STARTED - No bulk publish has been requested for this identity pool 2614 // 2615 // IN_PROGRESS - Data is being published to the configured stream 2616 // 2617 // SUCCEEDED - All data for the identity pool has been published to the configured 2618 // stream 2619 // 2620 // FAILED - Some portion of the data has failed to publish, check FailureMessage 2621 // for the cause. 2622 BulkPublishStatus *string `type:"string" enum:"BulkPublishStatus"` 2623 2624 // If BulkPublishStatus is FAILED this field will contain the error message 2625 // that caused the bulk publish to fail. 2626 FailureMessage *string `type:"string"` 2627 2628 // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) 2629 // created by Amazon Cognito. GUID generation is unique within a region. 2630 IdentityPoolId *string `min:"1" type:"string"` 2631 } 2632 2633 // String returns the string representation. 2634 // 2635 // API parameter values that are decorated as "sensitive" in the API will not 2636 // be included in the string output. The member name will be present, but the 2637 // value will be replaced with "sensitive". 2638 func (s GetBulkPublishDetailsOutput) String() string { 2639 return awsutil.Prettify(s) 2640 } 2641 2642 // GoString returns the string representation. 2643 // 2644 // API parameter values that are decorated as "sensitive" in the API will not 2645 // be included in the string output. The member name will be present, but the 2646 // value will be replaced with "sensitive". 2647 func (s GetBulkPublishDetailsOutput) GoString() string { 2648 return s.String() 2649 } 2650 2651 // SetBulkPublishCompleteTime sets the BulkPublishCompleteTime field's value. 2652 func (s *GetBulkPublishDetailsOutput) SetBulkPublishCompleteTime(v time.Time) *GetBulkPublishDetailsOutput { 2653 s.BulkPublishCompleteTime = &v 2654 return s 2655 } 2656 2657 // SetBulkPublishStartTime sets the BulkPublishStartTime field's value. 2658 func (s *GetBulkPublishDetailsOutput) SetBulkPublishStartTime(v time.Time) *GetBulkPublishDetailsOutput { 2659 s.BulkPublishStartTime = &v 2660 return s 2661 } 2662 2663 // SetBulkPublishStatus sets the BulkPublishStatus field's value. 2664 func (s *GetBulkPublishDetailsOutput) SetBulkPublishStatus(v string) *GetBulkPublishDetailsOutput { 2665 s.BulkPublishStatus = &v 2666 return s 2667 } 2668 2669 // SetFailureMessage sets the FailureMessage field's value. 2670 func (s *GetBulkPublishDetailsOutput) SetFailureMessage(v string) *GetBulkPublishDetailsOutput { 2671 s.FailureMessage = &v 2672 return s 2673 } 2674 2675 // SetIdentityPoolId sets the IdentityPoolId field's value. 2676 func (s *GetBulkPublishDetailsOutput) SetIdentityPoolId(v string) *GetBulkPublishDetailsOutput { 2677 s.IdentityPoolId = &v 2678 return s 2679 } 2680 2681 // A request for a list of the configured Cognito Events 2682 type GetCognitoEventsInput struct { 2683 _ struct{} `type:"structure" nopayload:"true"` 2684 2685 // The Cognito Identity Pool ID for the request 2686 // 2687 // IdentityPoolId is a required field 2688 IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"` 2689 } 2690 2691 // String returns the string representation. 2692 // 2693 // API parameter values that are decorated as "sensitive" in the API will not 2694 // be included in the string output. The member name will be present, but the 2695 // value will be replaced with "sensitive". 2696 func (s GetCognitoEventsInput) String() string { 2697 return awsutil.Prettify(s) 2698 } 2699 2700 // GoString returns the string representation. 2701 // 2702 // API parameter values that are decorated as "sensitive" in the API will not 2703 // be included in the string output. The member name will be present, but the 2704 // value will be replaced with "sensitive". 2705 func (s GetCognitoEventsInput) GoString() string { 2706 return s.String() 2707 } 2708 2709 // Validate inspects the fields of the type to determine if they are valid. 2710 func (s *GetCognitoEventsInput) Validate() error { 2711 invalidParams := request.ErrInvalidParams{Context: "GetCognitoEventsInput"} 2712 if s.IdentityPoolId == nil { 2713 invalidParams.Add(request.NewErrParamRequired("IdentityPoolId")) 2714 } 2715 if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 { 2716 invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1)) 2717 } 2718 2719 if invalidParams.Len() > 0 { 2720 return invalidParams 2721 } 2722 return nil 2723 } 2724 2725 // SetIdentityPoolId sets the IdentityPoolId field's value. 2726 func (s *GetCognitoEventsInput) SetIdentityPoolId(v string) *GetCognitoEventsInput { 2727 s.IdentityPoolId = &v 2728 return s 2729 } 2730 2731 // The response from the GetCognitoEvents request 2732 type GetCognitoEventsOutput struct { 2733 _ struct{} `type:"structure"` 2734 2735 // The Cognito Events returned from the GetCognitoEvents request 2736 Events map[string]*string `type:"map"` 2737 } 2738 2739 // String returns the string representation. 2740 // 2741 // API parameter values that are decorated as "sensitive" in the API will not 2742 // be included in the string output. The member name will be present, but the 2743 // value will be replaced with "sensitive". 2744 func (s GetCognitoEventsOutput) String() string { 2745 return awsutil.Prettify(s) 2746 } 2747 2748 // GoString returns the string representation. 2749 // 2750 // API parameter values that are decorated as "sensitive" in the API will not 2751 // be included in the string output. The member name will be present, but the 2752 // value will be replaced with "sensitive". 2753 func (s GetCognitoEventsOutput) GoString() string { 2754 return s.String() 2755 } 2756 2757 // SetEvents sets the Events field's value. 2758 func (s *GetCognitoEventsOutput) SetEvents(v map[string]*string) *GetCognitoEventsOutput { 2759 s.Events = v 2760 return s 2761 } 2762 2763 // The input for the GetIdentityPoolConfiguration operation. 2764 type GetIdentityPoolConfigurationInput struct { 2765 _ struct{} `type:"structure" nopayload:"true"` 2766 2767 // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) 2768 // created by Amazon Cognito. This is the ID of the pool for which to return 2769 // a configuration. 2770 // 2771 // IdentityPoolId is a required field 2772 IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"` 2773 } 2774 2775 // String returns the string representation. 2776 // 2777 // API parameter values that are decorated as "sensitive" in the API will not 2778 // be included in the string output. The member name will be present, but the 2779 // value will be replaced with "sensitive". 2780 func (s GetIdentityPoolConfigurationInput) String() string { 2781 return awsutil.Prettify(s) 2782 } 2783 2784 // GoString returns the string representation. 2785 // 2786 // API parameter values that are decorated as "sensitive" in the API will not 2787 // be included in the string output. The member name will be present, but the 2788 // value will be replaced with "sensitive". 2789 func (s GetIdentityPoolConfigurationInput) GoString() string { 2790 return s.String() 2791 } 2792 2793 // Validate inspects the fields of the type to determine if they are valid. 2794 func (s *GetIdentityPoolConfigurationInput) Validate() error { 2795 invalidParams := request.ErrInvalidParams{Context: "GetIdentityPoolConfigurationInput"} 2796 if s.IdentityPoolId == nil { 2797 invalidParams.Add(request.NewErrParamRequired("IdentityPoolId")) 2798 } 2799 if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 { 2800 invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1)) 2801 } 2802 2803 if invalidParams.Len() > 0 { 2804 return invalidParams 2805 } 2806 return nil 2807 } 2808 2809 // SetIdentityPoolId sets the IdentityPoolId field's value. 2810 func (s *GetIdentityPoolConfigurationInput) SetIdentityPoolId(v string) *GetIdentityPoolConfigurationInput { 2811 s.IdentityPoolId = &v 2812 return s 2813 } 2814 2815 // The output for the GetIdentityPoolConfiguration operation. 2816 type GetIdentityPoolConfigurationOutput struct { 2817 _ struct{} `type:"structure"` 2818 2819 // Options to apply to this identity pool for Amazon Cognito streams. 2820 CognitoStreams *CognitoStreams `type:"structure"` 2821 2822 // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) 2823 // created by Amazon Cognito. 2824 IdentityPoolId *string `min:"1" type:"string"` 2825 2826 // Options to apply to this identity pool for push synchronization. 2827 PushSync *PushSync `type:"structure"` 2828 } 2829 2830 // String returns the string representation. 2831 // 2832 // API parameter values that are decorated as "sensitive" in the API will not 2833 // be included in the string output. The member name will be present, but the 2834 // value will be replaced with "sensitive". 2835 func (s GetIdentityPoolConfigurationOutput) String() string { 2836 return awsutil.Prettify(s) 2837 } 2838 2839 // GoString returns the string representation. 2840 // 2841 // API parameter values that are decorated as "sensitive" in the API will not 2842 // be included in the string output. The member name will be present, but the 2843 // value will be replaced with "sensitive". 2844 func (s GetIdentityPoolConfigurationOutput) GoString() string { 2845 return s.String() 2846 } 2847 2848 // SetCognitoStreams sets the CognitoStreams field's value. 2849 func (s *GetIdentityPoolConfigurationOutput) SetCognitoStreams(v *CognitoStreams) *GetIdentityPoolConfigurationOutput { 2850 s.CognitoStreams = v 2851 return s 2852 } 2853 2854 // SetIdentityPoolId sets the IdentityPoolId field's value. 2855 func (s *GetIdentityPoolConfigurationOutput) SetIdentityPoolId(v string) *GetIdentityPoolConfigurationOutput { 2856 s.IdentityPoolId = &v 2857 return s 2858 } 2859 2860 // SetPushSync sets the PushSync field's value. 2861 func (s *GetIdentityPoolConfigurationOutput) SetPushSync(v *PushSync) *GetIdentityPoolConfigurationOutput { 2862 s.PushSync = v 2863 return s 2864 } 2865 2866 // Usage information for the identity pool. 2867 type IdentityPoolUsage struct { 2868 _ struct{} `type:"structure"` 2869 2870 // Data storage information for the identity pool. 2871 DataStorage *int64 `type:"long"` 2872 2873 // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) 2874 // created by Amazon Cognito. GUID generation is unique within a region. 2875 IdentityPoolId *string `min:"1" type:"string"` 2876 2877 // Date on which the identity pool was last modified. 2878 LastModifiedDate *time.Time `type:"timestamp"` 2879 2880 // Number of sync sessions for the identity pool. 2881 SyncSessionsCount *int64 `type:"long"` 2882 } 2883 2884 // String returns the string representation. 2885 // 2886 // API parameter values that are decorated as "sensitive" in the API will not 2887 // be included in the string output. The member name will be present, but the 2888 // value will be replaced with "sensitive". 2889 func (s IdentityPoolUsage) String() string { 2890 return awsutil.Prettify(s) 2891 } 2892 2893 // GoString returns the string representation. 2894 // 2895 // API parameter values that are decorated as "sensitive" in the API will not 2896 // be included in the string output. The member name will be present, but the 2897 // value will be replaced with "sensitive". 2898 func (s IdentityPoolUsage) GoString() string { 2899 return s.String() 2900 } 2901 2902 // SetDataStorage sets the DataStorage field's value. 2903 func (s *IdentityPoolUsage) SetDataStorage(v int64) *IdentityPoolUsage { 2904 s.DataStorage = &v 2905 return s 2906 } 2907 2908 // SetIdentityPoolId sets the IdentityPoolId field's value. 2909 func (s *IdentityPoolUsage) SetIdentityPoolId(v string) *IdentityPoolUsage { 2910 s.IdentityPoolId = &v 2911 return s 2912 } 2913 2914 // SetLastModifiedDate sets the LastModifiedDate field's value. 2915 func (s *IdentityPoolUsage) SetLastModifiedDate(v time.Time) *IdentityPoolUsage { 2916 s.LastModifiedDate = &v 2917 return s 2918 } 2919 2920 // SetSyncSessionsCount sets the SyncSessionsCount field's value. 2921 func (s *IdentityPoolUsage) SetSyncSessionsCount(v int64) *IdentityPoolUsage { 2922 s.SyncSessionsCount = &v 2923 return s 2924 } 2925 2926 // Usage information for the identity. 2927 type IdentityUsage struct { 2928 _ struct{} `type:"structure"` 2929 2930 // Total data storage for this identity. 2931 DataStorage *int64 `type:"long"` 2932 2933 // Number of datasets for the identity. 2934 DatasetCount *int64 `type:"integer"` 2935 2936 // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) 2937 // created by Amazon Cognito. GUID generation is unique within a region. 2938 IdentityId *string `min:"1" type:"string"` 2939 2940 // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) 2941 // created by Amazon Cognito. GUID generation is unique within a region. 2942 IdentityPoolId *string `min:"1" type:"string"` 2943 2944 // Date on which the identity was last modified. 2945 LastModifiedDate *time.Time `type:"timestamp"` 2946 } 2947 2948 // String returns the string representation. 2949 // 2950 // API parameter values that are decorated as "sensitive" in the API will not 2951 // be included in the string output. The member name will be present, but the 2952 // value will be replaced with "sensitive". 2953 func (s IdentityUsage) String() string { 2954 return awsutil.Prettify(s) 2955 } 2956 2957 // GoString returns the string representation. 2958 // 2959 // API parameter values that are decorated as "sensitive" in the API will not 2960 // be included in the string output. The member name will be present, but the 2961 // value will be replaced with "sensitive". 2962 func (s IdentityUsage) GoString() string { 2963 return s.String() 2964 } 2965 2966 // SetDataStorage sets the DataStorage field's value. 2967 func (s *IdentityUsage) SetDataStorage(v int64) *IdentityUsage { 2968 s.DataStorage = &v 2969 return s 2970 } 2971 2972 // SetDatasetCount sets the DatasetCount field's value. 2973 func (s *IdentityUsage) SetDatasetCount(v int64) *IdentityUsage { 2974 s.DatasetCount = &v 2975 return s 2976 } 2977 2978 // SetIdentityId sets the IdentityId field's value. 2979 func (s *IdentityUsage) SetIdentityId(v string) *IdentityUsage { 2980 s.IdentityId = &v 2981 return s 2982 } 2983 2984 // SetIdentityPoolId sets the IdentityPoolId field's value. 2985 func (s *IdentityUsage) SetIdentityPoolId(v string) *IdentityUsage { 2986 s.IdentityPoolId = &v 2987 return s 2988 } 2989 2990 // SetLastModifiedDate sets the LastModifiedDate field's value. 2991 func (s *IdentityUsage) SetLastModifiedDate(v time.Time) *IdentityUsage { 2992 s.LastModifiedDate = &v 2993 return s 2994 } 2995 2996 // Indicates an internal service error. 2997 type InternalErrorException struct { 2998 _ struct{} `type:"structure"` 2999 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 3000 3001 // Message returned by InternalErrorException. 3002 Message_ *string `locationName:"message" type:"string"` 3003 } 3004 3005 // String returns the string representation. 3006 // 3007 // API parameter values that are decorated as "sensitive" in the API will not 3008 // be included in the string output. The member name will be present, but the 3009 // value will be replaced with "sensitive". 3010 func (s InternalErrorException) String() string { 3011 return awsutil.Prettify(s) 3012 } 3013 3014 // GoString returns the string representation. 3015 // 3016 // API parameter values that are decorated as "sensitive" in the API will not 3017 // be included in the string output. The member name will be present, but the 3018 // value will be replaced with "sensitive". 3019 func (s InternalErrorException) GoString() string { 3020 return s.String() 3021 } 3022 3023 func newErrorInternalErrorException(v protocol.ResponseMetadata) error { 3024 return &InternalErrorException{ 3025 RespMetadata: v, 3026 } 3027 } 3028 3029 // Code returns the exception type name. 3030 func (s *InternalErrorException) Code() string { 3031 return "InternalErrorException" 3032 } 3033 3034 // Message returns the exception's message. 3035 func (s *InternalErrorException) Message() string { 3036 if s.Message_ != nil { 3037 return *s.Message_ 3038 } 3039 return "" 3040 } 3041 3042 // OrigErr always returns nil, satisfies awserr.Error interface. 3043 func (s *InternalErrorException) OrigErr() error { 3044 return nil 3045 } 3046 3047 func (s *InternalErrorException) Error() string { 3048 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 3049 } 3050 3051 // Status code returns the HTTP status code for the request's response error. 3052 func (s *InternalErrorException) StatusCode() int { 3053 return s.RespMetadata.StatusCode 3054 } 3055 3056 // RequestID returns the service's response RequestID for request. 3057 func (s *InternalErrorException) RequestID() string { 3058 return s.RespMetadata.RequestID 3059 } 3060 3061 type InvalidConfigurationException struct { 3062 _ struct{} `type:"structure"` 3063 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 3064 3065 // Message returned by InvalidConfigurationException. 3066 Message_ *string `locationName:"message" type:"string"` 3067 } 3068 3069 // String returns the string representation. 3070 // 3071 // API parameter values that are decorated as "sensitive" in the API will not 3072 // be included in the string output. The member name will be present, but the 3073 // value will be replaced with "sensitive". 3074 func (s InvalidConfigurationException) String() string { 3075 return awsutil.Prettify(s) 3076 } 3077 3078 // GoString returns the string representation. 3079 // 3080 // API parameter values that are decorated as "sensitive" in the API will not 3081 // be included in the string output. The member name will be present, but the 3082 // value will be replaced with "sensitive". 3083 func (s InvalidConfigurationException) GoString() string { 3084 return s.String() 3085 } 3086 3087 func newErrorInvalidConfigurationException(v protocol.ResponseMetadata) error { 3088 return &InvalidConfigurationException{ 3089 RespMetadata: v, 3090 } 3091 } 3092 3093 // Code returns the exception type name. 3094 func (s *InvalidConfigurationException) Code() string { 3095 return "InvalidConfigurationException" 3096 } 3097 3098 // Message returns the exception's message. 3099 func (s *InvalidConfigurationException) Message() string { 3100 if s.Message_ != nil { 3101 return *s.Message_ 3102 } 3103 return "" 3104 } 3105 3106 // OrigErr always returns nil, satisfies awserr.Error interface. 3107 func (s *InvalidConfigurationException) OrigErr() error { 3108 return nil 3109 } 3110 3111 func (s *InvalidConfigurationException) Error() string { 3112 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 3113 } 3114 3115 // Status code returns the HTTP status code for the request's response error. 3116 func (s *InvalidConfigurationException) StatusCode() int { 3117 return s.RespMetadata.StatusCode 3118 } 3119 3120 // RequestID returns the service's response RequestID for request. 3121 func (s *InvalidConfigurationException) RequestID() string { 3122 return s.RespMetadata.RequestID 3123 } 3124 3125 // The AWS Lambda function returned invalid output or an exception. 3126 type InvalidLambdaFunctionOutputException struct { 3127 _ struct{} `type:"structure"` 3128 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 3129 3130 // A message returned when an InvalidLambdaFunctionOutputException occurs 3131 Message_ *string `locationName:"message" type:"string"` 3132 } 3133 3134 // String returns the string representation. 3135 // 3136 // API parameter values that are decorated as "sensitive" in the API will not 3137 // be included in the string output. The member name will be present, but the 3138 // value will be replaced with "sensitive". 3139 func (s InvalidLambdaFunctionOutputException) String() string { 3140 return awsutil.Prettify(s) 3141 } 3142 3143 // GoString returns the string representation. 3144 // 3145 // API parameter values that are decorated as "sensitive" in the API will not 3146 // be included in the string output. The member name will be present, but the 3147 // value will be replaced with "sensitive". 3148 func (s InvalidLambdaFunctionOutputException) GoString() string { 3149 return s.String() 3150 } 3151 3152 func newErrorInvalidLambdaFunctionOutputException(v protocol.ResponseMetadata) error { 3153 return &InvalidLambdaFunctionOutputException{ 3154 RespMetadata: v, 3155 } 3156 } 3157 3158 // Code returns the exception type name. 3159 func (s *InvalidLambdaFunctionOutputException) Code() string { 3160 return "InvalidLambdaFunctionOutputException" 3161 } 3162 3163 // Message returns the exception's message. 3164 func (s *InvalidLambdaFunctionOutputException) Message() string { 3165 if s.Message_ != nil { 3166 return *s.Message_ 3167 } 3168 return "" 3169 } 3170 3171 // OrigErr always returns nil, satisfies awserr.Error interface. 3172 func (s *InvalidLambdaFunctionOutputException) OrigErr() error { 3173 return nil 3174 } 3175 3176 func (s *InvalidLambdaFunctionOutputException) Error() string { 3177 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 3178 } 3179 3180 // Status code returns the HTTP status code for the request's response error. 3181 func (s *InvalidLambdaFunctionOutputException) StatusCode() int { 3182 return s.RespMetadata.StatusCode 3183 } 3184 3185 // RequestID returns the service's response RequestID for request. 3186 func (s *InvalidLambdaFunctionOutputException) RequestID() string { 3187 return s.RespMetadata.RequestID 3188 } 3189 3190 // Thrown when a request parameter does not comply with the associated constraints. 3191 type InvalidParameterException struct { 3192 _ struct{} `type:"structure"` 3193 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 3194 3195 // Message returned by InvalidParameterException. 3196 Message_ *string `locationName:"message" type:"string"` 3197 } 3198 3199 // String returns the string representation. 3200 // 3201 // API parameter values that are decorated as "sensitive" in the API will not 3202 // be included in the string output. The member name will be present, but the 3203 // value will be replaced with "sensitive". 3204 func (s InvalidParameterException) String() string { 3205 return awsutil.Prettify(s) 3206 } 3207 3208 // GoString returns the string representation. 3209 // 3210 // API parameter values that are decorated as "sensitive" in the API will not 3211 // be included in the string output. The member name will be present, but the 3212 // value will be replaced with "sensitive". 3213 func (s InvalidParameterException) GoString() string { 3214 return s.String() 3215 } 3216 3217 func newErrorInvalidParameterException(v protocol.ResponseMetadata) error { 3218 return &InvalidParameterException{ 3219 RespMetadata: v, 3220 } 3221 } 3222 3223 // Code returns the exception type name. 3224 func (s *InvalidParameterException) Code() string { 3225 return "InvalidParameterException" 3226 } 3227 3228 // Message returns the exception's message. 3229 func (s *InvalidParameterException) Message() string { 3230 if s.Message_ != nil { 3231 return *s.Message_ 3232 } 3233 return "" 3234 } 3235 3236 // OrigErr always returns nil, satisfies awserr.Error interface. 3237 func (s *InvalidParameterException) OrigErr() error { 3238 return nil 3239 } 3240 3241 func (s *InvalidParameterException) Error() string { 3242 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 3243 } 3244 3245 // Status code returns the HTTP status code for the request's response error. 3246 func (s *InvalidParameterException) StatusCode() int { 3247 return s.RespMetadata.StatusCode 3248 } 3249 3250 // RequestID returns the service's response RequestID for request. 3251 func (s *InvalidParameterException) RequestID() string { 3252 return s.RespMetadata.RequestID 3253 } 3254 3255 // AWS Lambda throttled your account, please contact AWS Support 3256 type LambdaThrottledException struct { 3257 _ struct{} `type:"structure"` 3258 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 3259 3260 // A message returned when an LambdaThrottledException is thrown 3261 Message_ *string `locationName:"message" type:"string"` 3262 } 3263 3264 // String returns the string representation. 3265 // 3266 // API parameter values that are decorated as "sensitive" in the API will not 3267 // be included in the string output. The member name will be present, but the 3268 // value will be replaced with "sensitive". 3269 func (s LambdaThrottledException) String() string { 3270 return awsutil.Prettify(s) 3271 } 3272 3273 // GoString returns the string representation. 3274 // 3275 // API parameter values that are decorated as "sensitive" in the API will not 3276 // be included in the string output. The member name will be present, but the 3277 // value will be replaced with "sensitive". 3278 func (s LambdaThrottledException) GoString() string { 3279 return s.String() 3280 } 3281 3282 func newErrorLambdaThrottledException(v protocol.ResponseMetadata) error { 3283 return &LambdaThrottledException{ 3284 RespMetadata: v, 3285 } 3286 } 3287 3288 // Code returns the exception type name. 3289 func (s *LambdaThrottledException) Code() string { 3290 return "LambdaThrottledException" 3291 } 3292 3293 // Message returns the exception's message. 3294 func (s *LambdaThrottledException) Message() string { 3295 if s.Message_ != nil { 3296 return *s.Message_ 3297 } 3298 return "" 3299 } 3300 3301 // OrigErr always returns nil, satisfies awserr.Error interface. 3302 func (s *LambdaThrottledException) OrigErr() error { 3303 return nil 3304 } 3305 3306 func (s *LambdaThrottledException) Error() string { 3307 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 3308 } 3309 3310 // Status code returns the HTTP status code for the request's response error. 3311 func (s *LambdaThrottledException) StatusCode() int { 3312 return s.RespMetadata.StatusCode 3313 } 3314 3315 // RequestID returns the service's response RequestID for request. 3316 func (s *LambdaThrottledException) RequestID() string { 3317 return s.RespMetadata.RequestID 3318 } 3319 3320 // Thrown when the limit on the number of objects or operations has been exceeded. 3321 type LimitExceededException struct { 3322 _ struct{} `type:"structure"` 3323 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 3324 3325 // Message returned by LimitExceededException. 3326 Message_ *string `locationName:"message" type:"string"` 3327 } 3328 3329 // String returns the string representation. 3330 // 3331 // API parameter values that are decorated as "sensitive" in the API will not 3332 // be included in the string output. The member name will be present, but the 3333 // value will be replaced with "sensitive". 3334 func (s LimitExceededException) String() string { 3335 return awsutil.Prettify(s) 3336 } 3337 3338 // GoString returns the string representation. 3339 // 3340 // API parameter values that are decorated as "sensitive" in the API will not 3341 // be included in the string output. The member name will be present, but the 3342 // value will be replaced with "sensitive". 3343 func (s LimitExceededException) GoString() string { 3344 return s.String() 3345 } 3346 3347 func newErrorLimitExceededException(v protocol.ResponseMetadata) error { 3348 return &LimitExceededException{ 3349 RespMetadata: v, 3350 } 3351 } 3352 3353 // Code returns the exception type name. 3354 func (s *LimitExceededException) Code() string { 3355 return "LimitExceededException" 3356 } 3357 3358 // Message returns the exception's message. 3359 func (s *LimitExceededException) Message() string { 3360 if s.Message_ != nil { 3361 return *s.Message_ 3362 } 3363 return "" 3364 } 3365 3366 // OrigErr always returns nil, satisfies awserr.Error interface. 3367 func (s *LimitExceededException) OrigErr() error { 3368 return nil 3369 } 3370 3371 func (s *LimitExceededException) Error() string { 3372 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 3373 } 3374 3375 // Status code returns the HTTP status code for the request's response error. 3376 func (s *LimitExceededException) StatusCode() int { 3377 return s.RespMetadata.StatusCode 3378 } 3379 3380 // RequestID returns the service's response RequestID for request. 3381 func (s *LimitExceededException) RequestID() string { 3382 return s.RespMetadata.RequestID 3383 } 3384 3385 // Request for a list of datasets for an identity. 3386 type ListDatasetsInput struct { 3387 _ struct{} `type:"structure" nopayload:"true"` 3388 3389 // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) 3390 // created by Amazon Cognito. GUID generation is unique within a region. 3391 // 3392 // IdentityId is a required field 3393 IdentityId *string `location:"uri" locationName:"IdentityId" min:"1" type:"string" required:"true"` 3394 3395 // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) 3396 // created by Amazon Cognito. GUID generation is unique within a region. 3397 // 3398 // IdentityPoolId is a required field 3399 IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"` 3400 3401 // The maximum number of results to be returned. 3402 MaxResults *int64 `location:"querystring" locationName:"maxResults" type:"integer"` 3403 3404 // A pagination token for obtaining the next page of results. 3405 NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` 3406 } 3407 3408 // String returns the string representation. 3409 // 3410 // API parameter values that are decorated as "sensitive" in the API will not 3411 // be included in the string output. The member name will be present, but the 3412 // value will be replaced with "sensitive". 3413 func (s ListDatasetsInput) String() string { 3414 return awsutil.Prettify(s) 3415 } 3416 3417 // GoString returns the string representation. 3418 // 3419 // API parameter values that are decorated as "sensitive" in the API will not 3420 // be included in the string output. The member name will be present, but the 3421 // value will be replaced with "sensitive". 3422 func (s ListDatasetsInput) GoString() string { 3423 return s.String() 3424 } 3425 3426 // Validate inspects the fields of the type to determine if they are valid. 3427 func (s *ListDatasetsInput) Validate() error { 3428 invalidParams := request.ErrInvalidParams{Context: "ListDatasetsInput"} 3429 if s.IdentityId == nil { 3430 invalidParams.Add(request.NewErrParamRequired("IdentityId")) 3431 } 3432 if s.IdentityId != nil && len(*s.IdentityId) < 1 { 3433 invalidParams.Add(request.NewErrParamMinLen("IdentityId", 1)) 3434 } 3435 if s.IdentityPoolId == nil { 3436 invalidParams.Add(request.NewErrParamRequired("IdentityPoolId")) 3437 } 3438 if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 { 3439 invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1)) 3440 } 3441 3442 if invalidParams.Len() > 0 { 3443 return invalidParams 3444 } 3445 return nil 3446 } 3447 3448 // SetIdentityId sets the IdentityId field's value. 3449 func (s *ListDatasetsInput) SetIdentityId(v string) *ListDatasetsInput { 3450 s.IdentityId = &v 3451 return s 3452 } 3453 3454 // SetIdentityPoolId sets the IdentityPoolId field's value. 3455 func (s *ListDatasetsInput) SetIdentityPoolId(v string) *ListDatasetsInput { 3456 s.IdentityPoolId = &v 3457 return s 3458 } 3459 3460 // SetMaxResults sets the MaxResults field's value. 3461 func (s *ListDatasetsInput) SetMaxResults(v int64) *ListDatasetsInput { 3462 s.MaxResults = &v 3463 return s 3464 } 3465 3466 // SetNextToken sets the NextToken field's value. 3467 func (s *ListDatasetsInput) SetNextToken(v string) *ListDatasetsInput { 3468 s.NextToken = &v 3469 return s 3470 } 3471 3472 // Returned for a successful ListDatasets request. 3473 type ListDatasetsOutput struct { 3474 _ struct{} `type:"structure"` 3475 3476 // Number of datasets returned. 3477 Count *int64 `type:"integer"` 3478 3479 // A set of datasets. 3480 Datasets []*Dataset `type:"list"` 3481 3482 // A pagination token for obtaining the next page of results. 3483 NextToken *string `type:"string"` 3484 } 3485 3486 // String returns the string representation. 3487 // 3488 // API parameter values that are decorated as "sensitive" in the API will not 3489 // be included in the string output. The member name will be present, but the 3490 // value will be replaced with "sensitive". 3491 func (s ListDatasetsOutput) String() string { 3492 return awsutil.Prettify(s) 3493 } 3494 3495 // GoString returns the string representation. 3496 // 3497 // API parameter values that are decorated as "sensitive" in the API will not 3498 // be included in the string output. The member name will be present, but the 3499 // value will be replaced with "sensitive". 3500 func (s ListDatasetsOutput) GoString() string { 3501 return s.String() 3502 } 3503 3504 // SetCount sets the Count field's value. 3505 func (s *ListDatasetsOutput) SetCount(v int64) *ListDatasetsOutput { 3506 s.Count = &v 3507 return s 3508 } 3509 3510 // SetDatasets sets the Datasets field's value. 3511 func (s *ListDatasetsOutput) SetDatasets(v []*Dataset) *ListDatasetsOutput { 3512 s.Datasets = v 3513 return s 3514 } 3515 3516 // SetNextToken sets the NextToken field's value. 3517 func (s *ListDatasetsOutput) SetNextToken(v string) *ListDatasetsOutput { 3518 s.NextToken = &v 3519 return s 3520 } 3521 3522 // A request for usage information on an identity pool. 3523 type ListIdentityPoolUsageInput struct { 3524 _ struct{} `type:"structure" nopayload:"true"` 3525 3526 // The maximum number of results to be returned. 3527 MaxResults *int64 `location:"querystring" locationName:"maxResults" type:"integer"` 3528 3529 // A pagination token for obtaining the next page of results. 3530 NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` 3531 } 3532 3533 // String returns the string representation. 3534 // 3535 // API parameter values that are decorated as "sensitive" in the API will not 3536 // be included in the string output. The member name will be present, but the 3537 // value will be replaced with "sensitive". 3538 func (s ListIdentityPoolUsageInput) String() string { 3539 return awsutil.Prettify(s) 3540 } 3541 3542 // GoString returns the string representation. 3543 // 3544 // API parameter values that are decorated as "sensitive" in the API will not 3545 // be included in the string output. The member name will be present, but the 3546 // value will be replaced with "sensitive". 3547 func (s ListIdentityPoolUsageInput) GoString() string { 3548 return s.String() 3549 } 3550 3551 // SetMaxResults sets the MaxResults field's value. 3552 func (s *ListIdentityPoolUsageInput) SetMaxResults(v int64) *ListIdentityPoolUsageInput { 3553 s.MaxResults = &v 3554 return s 3555 } 3556 3557 // SetNextToken sets the NextToken field's value. 3558 func (s *ListIdentityPoolUsageInput) SetNextToken(v string) *ListIdentityPoolUsageInput { 3559 s.NextToken = &v 3560 return s 3561 } 3562 3563 // Returned for a successful ListIdentityPoolUsage request. 3564 type ListIdentityPoolUsageOutput struct { 3565 _ struct{} `type:"structure"` 3566 3567 // Total number of identities for the identity pool. 3568 Count *int64 `type:"integer"` 3569 3570 // Usage information for the identity pools. 3571 IdentityPoolUsages []*IdentityPoolUsage `type:"list"` 3572 3573 // The maximum number of results to be returned. 3574 MaxResults *int64 `type:"integer"` 3575 3576 // A pagination token for obtaining the next page of results. 3577 NextToken *string `type:"string"` 3578 } 3579 3580 // String returns the string representation. 3581 // 3582 // API parameter values that are decorated as "sensitive" in the API will not 3583 // be included in the string output. The member name will be present, but the 3584 // value will be replaced with "sensitive". 3585 func (s ListIdentityPoolUsageOutput) String() string { 3586 return awsutil.Prettify(s) 3587 } 3588 3589 // GoString returns the string representation. 3590 // 3591 // API parameter values that are decorated as "sensitive" in the API will not 3592 // be included in the string output. The member name will be present, but the 3593 // value will be replaced with "sensitive". 3594 func (s ListIdentityPoolUsageOutput) GoString() string { 3595 return s.String() 3596 } 3597 3598 // SetCount sets the Count field's value. 3599 func (s *ListIdentityPoolUsageOutput) SetCount(v int64) *ListIdentityPoolUsageOutput { 3600 s.Count = &v 3601 return s 3602 } 3603 3604 // SetIdentityPoolUsages sets the IdentityPoolUsages field's value. 3605 func (s *ListIdentityPoolUsageOutput) SetIdentityPoolUsages(v []*IdentityPoolUsage) *ListIdentityPoolUsageOutput { 3606 s.IdentityPoolUsages = v 3607 return s 3608 } 3609 3610 // SetMaxResults sets the MaxResults field's value. 3611 func (s *ListIdentityPoolUsageOutput) SetMaxResults(v int64) *ListIdentityPoolUsageOutput { 3612 s.MaxResults = &v 3613 return s 3614 } 3615 3616 // SetNextToken sets the NextToken field's value. 3617 func (s *ListIdentityPoolUsageOutput) SetNextToken(v string) *ListIdentityPoolUsageOutput { 3618 s.NextToken = &v 3619 return s 3620 } 3621 3622 // A request for a list of records. 3623 type ListRecordsInput struct { 3624 _ struct{} `type:"structure" nopayload:"true"` 3625 3626 // A string of up to 128 characters. Allowed characters are a-z, A-Z, 0-9, '_' 3627 // (underscore), '-' (dash), and '.' (dot). 3628 // 3629 // DatasetName is a required field 3630 DatasetName *string `location:"uri" locationName:"DatasetName" min:"1" type:"string" required:"true"` 3631 3632 // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) 3633 // created by Amazon Cognito. GUID generation is unique within a region. 3634 // 3635 // IdentityId is a required field 3636 IdentityId *string `location:"uri" locationName:"IdentityId" min:"1" type:"string" required:"true"` 3637 3638 // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) 3639 // created by Amazon Cognito. GUID generation is unique within a region. 3640 // 3641 // IdentityPoolId is a required field 3642 IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"` 3643 3644 // The last server sync count for this record. 3645 LastSyncCount *int64 `location:"querystring" locationName:"lastSyncCount" type:"long"` 3646 3647 // The maximum number of results to be returned. 3648 MaxResults *int64 `location:"querystring" locationName:"maxResults" type:"integer"` 3649 3650 // A pagination token for obtaining the next page of results. 3651 NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` 3652 3653 // A token containing a session ID, identity ID, and expiration. 3654 SyncSessionToken *string `location:"querystring" locationName:"syncSessionToken" type:"string"` 3655 } 3656 3657 // String returns the string representation. 3658 // 3659 // API parameter values that are decorated as "sensitive" in the API will not 3660 // be included in the string output. The member name will be present, but the 3661 // value will be replaced with "sensitive". 3662 func (s ListRecordsInput) String() string { 3663 return awsutil.Prettify(s) 3664 } 3665 3666 // GoString returns the string representation. 3667 // 3668 // API parameter values that are decorated as "sensitive" in the API will not 3669 // be included in the string output. The member name will be present, but the 3670 // value will be replaced with "sensitive". 3671 func (s ListRecordsInput) GoString() string { 3672 return s.String() 3673 } 3674 3675 // Validate inspects the fields of the type to determine if they are valid. 3676 func (s *ListRecordsInput) Validate() error { 3677 invalidParams := request.ErrInvalidParams{Context: "ListRecordsInput"} 3678 if s.DatasetName == nil { 3679 invalidParams.Add(request.NewErrParamRequired("DatasetName")) 3680 } 3681 if s.DatasetName != nil && len(*s.DatasetName) < 1 { 3682 invalidParams.Add(request.NewErrParamMinLen("DatasetName", 1)) 3683 } 3684 if s.IdentityId == nil { 3685 invalidParams.Add(request.NewErrParamRequired("IdentityId")) 3686 } 3687 if s.IdentityId != nil && len(*s.IdentityId) < 1 { 3688 invalidParams.Add(request.NewErrParamMinLen("IdentityId", 1)) 3689 } 3690 if s.IdentityPoolId == nil { 3691 invalidParams.Add(request.NewErrParamRequired("IdentityPoolId")) 3692 } 3693 if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 { 3694 invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1)) 3695 } 3696 3697 if invalidParams.Len() > 0 { 3698 return invalidParams 3699 } 3700 return nil 3701 } 3702 3703 // SetDatasetName sets the DatasetName field's value. 3704 func (s *ListRecordsInput) SetDatasetName(v string) *ListRecordsInput { 3705 s.DatasetName = &v 3706 return s 3707 } 3708 3709 // SetIdentityId sets the IdentityId field's value. 3710 func (s *ListRecordsInput) SetIdentityId(v string) *ListRecordsInput { 3711 s.IdentityId = &v 3712 return s 3713 } 3714 3715 // SetIdentityPoolId sets the IdentityPoolId field's value. 3716 func (s *ListRecordsInput) SetIdentityPoolId(v string) *ListRecordsInput { 3717 s.IdentityPoolId = &v 3718 return s 3719 } 3720 3721 // SetLastSyncCount sets the LastSyncCount field's value. 3722 func (s *ListRecordsInput) SetLastSyncCount(v int64) *ListRecordsInput { 3723 s.LastSyncCount = &v 3724 return s 3725 } 3726 3727 // SetMaxResults sets the MaxResults field's value. 3728 func (s *ListRecordsInput) SetMaxResults(v int64) *ListRecordsInput { 3729 s.MaxResults = &v 3730 return s 3731 } 3732 3733 // SetNextToken sets the NextToken field's value. 3734 func (s *ListRecordsInput) SetNextToken(v string) *ListRecordsInput { 3735 s.NextToken = &v 3736 return s 3737 } 3738 3739 // SetSyncSessionToken sets the SyncSessionToken field's value. 3740 func (s *ListRecordsInput) SetSyncSessionToken(v string) *ListRecordsInput { 3741 s.SyncSessionToken = &v 3742 return s 3743 } 3744 3745 // Returned for a successful ListRecordsRequest. 3746 type ListRecordsOutput struct { 3747 _ struct{} `type:"structure"` 3748 3749 // Total number of records. 3750 Count *int64 `type:"integer"` 3751 3752 // A boolean value specifying whether to delete the dataset locally. 3753 DatasetDeletedAfterRequestedSyncCount *bool `type:"boolean"` 3754 3755 // Indicates whether the dataset exists. 3756 DatasetExists *bool `type:"boolean"` 3757 3758 // Server sync count for this dataset. 3759 DatasetSyncCount *int64 `type:"long"` 3760 3761 // The user/device that made the last change to this record. 3762 LastModifiedBy *string `type:"string"` 3763 3764 // Names of merged datasets. 3765 MergedDatasetNames []*string `type:"list"` 3766 3767 // A pagination token for obtaining the next page of results. 3768 NextToken *string `type:"string"` 3769 3770 // A list of all records. 3771 Records []*Record `type:"list"` 3772 3773 // A token containing a session ID, identity ID, and expiration. 3774 SyncSessionToken *string `type:"string"` 3775 } 3776 3777 // String returns the string representation. 3778 // 3779 // API parameter values that are decorated as "sensitive" in the API will not 3780 // be included in the string output. The member name will be present, but the 3781 // value will be replaced with "sensitive". 3782 func (s ListRecordsOutput) String() string { 3783 return awsutil.Prettify(s) 3784 } 3785 3786 // GoString returns the string representation. 3787 // 3788 // API parameter values that are decorated as "sensitive" in the API will not 3789 // be included in the string output. The member name will be present, but the 3790 // value will be replaced with "sensitive". 3791 func (s ListRecordsOutput) GoString() string { 3792 return s.String() 3793 } 3794 3795 // SetCount sets the Count field's value. 3796 func (s *ListRecordsOutput) SetCount(v int64) *ListRecordsOutput { 3797 s.Count = &v 3798 return s 3799 } 3800 3801 // SetDatasetDeletedAfterRequestedSyncCount sets the DatasetDeletedAfterRequestedSyncCount field's value. 3802 func (s *ListRecordsOutput) SetDatasetDeletedAfterRequestedSyncCount(v bool) *ListRecordsOutput { 3803 s.DatasetDeletedAfterRequestedSyncCount = &v 3804 return s 3805 } 3806 3807 // SetDatasetExists sets the DatasetExists field's value. 3808 func (s *ListRecordsOutput) SetDatasetExists(v bool) *ListRecordsOutput { 3809 s.DatasetExists = &v 3810 return s 3811 } 3812 3813 // SetDatasetSyncCount sets the DatasetSyncCount field's value. 3814 func (s *ListRecordsOutput) SetDatasetSyncCount(v int64) *ListRecordsOutput { 3815 s.DatasetSyncCount = &v 3816 return s 3817 } 3818 3819 // SetLastModifiedBy sets the LastModifiedBy field's value. 3820 func (s *ListRecordsOutput) SetLastModifiedBy(v string) *ListRecordsOutput { 3821 s.LastModifiedBy = &v 3822 return s 3823 } 3824 3825 // SetMergedDatasetNames sets the MergedDatasetNames field's value. 3826 func (s *ListRecordsOutput) SetMergedDatasetNames(v []*string) *ListRecordsOutput { 3827 s.MergedDatasetNames = v 3828 return s 3829 } 3830 3831 // SetNextToken sets the NextToken field's value. 3832 func (s *ListRecordsOutput) SetNextToken(v string) *ListRecordsOutput { 3833 s.NextToken = &v 3834 return s 3835 } 3836 3837 // SetRecords sets the Records field's value. 3838 func (s *ListRecordsOutput) SetRecords(v []*Record) *ListRecordsOutput { 3839 s.Records = v 3840 return s 3841 } 3842 3843 // SetSyncSessionToken sets the SyncSessionToken field's value. 3844 func (s *ListRecordsOutput) SetSyncSessionToken(v string) *ListRecordsOutput { 3845 s.SyncSessionToken = &v 3846 return s 3847 } 3848 3849 // Thrown when a user is not authorized to access the requested resource. 3850 type NotAuthorizedException struct { 3851 _ struct{} `type:"structure"` 3852 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 3853 3854 // The message returned by a NotAuthorizedException. 3855 Message_ *string `locationName:"message" type:"string"` 3856 } 3857 3858 // String returns the string representation. 3859 // 3860 // API parameter values that are decorated as "sensitive" in the API will not 3861 // be included in the string output. The member name will be present, but the 3862 // value will be replaced with "sensitive". 3863 func (s NotAuthorizedException) String() string { 3864 return awsutil.Prettify(s) 3865 } 3866 3867 // GoString returns the string representation. 3868 // 3869 // API parameter values that are decorated as "sensitive" in the API will not 3870 // be included in the string output. The member name will be present, but the 3871 // value will be replaced with "sensitive". 3872 func (s NotAuthorizedException) GoString() string { 3873 return s.String() 3874 } 3875 3876 func newErrorNotAuthorizedException(v protocol.ResponseMetadata) error { 3877 return &NotAuthorizedException{ 3878 RespMetadata: v, 3879 } 3880 } 3881 3882 // Code returns the exception type name. 3883 func (s *NotAuthorizedException) Code() string { 3884 return "NotAuthorizedException" 3885 } 3886 3887 // Message returns the exception's message. 3888 func (s *NotAuthorizedException) Message() string { 3889 if s.Message_ != nil { 3890 return *s.Message_ 3891 } 3892 return "" 3893 } 3894 3895 // OrigErr always returns nil, satisfies awserr.Error interface. 3896 func (s *NotAuthorizedException) OrigErr() error { 3897 return nil 3898 } 3899 3900 func (s *NotAuthorizedException) Error() string { 3901 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 3902 } 3903 3904 // Status code returns the HTTP status code for the request's response error. 3905 func (s *NotAuthorizedException) StatusCode() int { 3906 return s.RespMetadata.StatusCode 3907 } 3908 3909 // RequestID returns the service's response RequestID for request. 3910 func (s *NotAuthorizedException) RequestID() string { 3911 return s.RespMetadata.RequestID 3912 } 3913 3914 // Configuration options to be applied to the identity pool. 3915 type PushSync struct { 3916 _ struct{} `type:"structure"` 3917 3918 // List of SNS platform application ARNs that could be used by clients. 3919 ApplicationArns []*string `type:"list"` 3920 3921 // A role configured to allow Cognito to call SNS on behalf of the developer. 3922 RoleArn *string `min:"20" type:"string"` 3923 } 3924 3925 // String returns the string representation. 3926 // 3927 // API parameter values that are decorated as "sensitive" in the API will not 3928 // be included in the string output. The member name will be present, but the 3929 // value will be replaced with "sensitive". 3930 func (s PushSync) String() string { 3931 return awsutil.Prettify(s) 3932 } 3933 3934 // GoString returns the string representation. 3935 // 3936 // API parameter values that are decorated as "sensitive" in the API will not 3937 // be included in the string output. The member name will be present, but the 3938 // value will be replaced with "sensitive". 3939 func (s PushSync) GoString() string { 3940 return s.String() 3941 } 3942 3943 // Validate inspects the fields of the type to determine if they are valid. 3944 func (s *PushSync) Validate() error { 3945 invalidParams := request.ErrInvalidParams{Context: "PushSync"} 3946 if s.RoleArn != nil && len(*s.RoleArn) < 20 { 3947 invalidParams.Add(request.NewErrParamMinLen("RoleArn", 20)) 3948 } 3949 3950 if invalidParams.Len() > 0 { 3951 return invalidParams 3952 } 3953 return nil 3954 } 3955 3956 // SetApplicationArns sets the ApplicationArns field's value. 3957 func (s *PushSync) SetApplicationArns(v []*string) *PushSync { 3958 s.ApplicationArns = v 3959 return s 3960 } 3961 3962 // SetRoleArn sets the RoleArn field's value. 3963 func (s *PushSync) SetRoleArn(v string) *PushSync { 3964 s.RoleArn = &v 3965 return s 3966 } 3967 3968 // The basic data structure of a dataset. 3969 type Record struct { 3970 _ struct{} `type:"structure"` 3971 3972 // The last modified date of the client device. 3973 DeviceLastModifiedDate *time.Time `type:"timestamp"` 3974 3975 // The key for the record. 3976 Key *string `min:"1" type:"string"` 3977 3978 // The user/device that made the last change to this record. 3979 LastModifiedBy *string `type:"string"` 3980 3981 // The date on which the record was last modified. 3982 LastModifiedDate *time.Time `type:"timestamp"` 3983 3984 // The server sync count for this record. 3985 SyncCount *int64 `type:"long"` 3986 3987 // The value for the record. 3988 Value *string `type:"string"` 3989 } 3990 3991 // String returns the string representation. 3992 // 3993 // API parameter values that are decorated as "sensitive" in the API will not 3994 // be included in the string output. The member name will be present, but the 3995 // value will be replaced with "sensitive". 3996 func (s Record) String() string { 3997 return awsutil.Prettify(s) 3998 } 3999 4000 // GoString returns the string representation. 4001 // 4002 // API parameter values that are decorated as "sensitive" in the API will not 4003 // be included in the string output. The member name will be present, but the 4004 // value will be replaced with "sensitive". 4005 func (s Record) GoString() string { 4006 return s.String() 4007 } 4008 4009 // SetDeviceLastModifiedDate sets the DeviceLastModifiedDate field's value. 4010 func (s *Record) SetDeviceLastModifiedDate(v time.Time) *Record { 4011 s.DeviceLastModifiedDate = &v 4012 return s 4013 } 4014 4015 // SetKey sets the Key field's value. 4016 func (s *Record) SetKey(v string) *Record { 4017 s.Key = &v 4018 return s 4019 } 4020 4021 // SetLastModifiedBy sets the LastModifiedBy field's value. 4022 func (s *Record) SetLastModifiedBy(v string) *Record { 4023 s.LastModifiedBy = &v 4024 return s 4025 } 4026 4027 // SetLastModifiedDate sets the LastModifiedDate field's value. 4028 func (s *Record) SetLastModifiedDate(v time.Time) *Record { 4029 s.LastModifiedDate = &v 4030 return s 4031 } 4032 4033 // SetSyncCount sets the SyncCount field's value. 4034 func (s *Record) SetSyncCount(v int64) *Record { 4035 s.SyncCount = &v 4036 return s 4037 } 4038 4039 // SetValue sets the Value field's value. 4040 func (s *Record) SetValue(v string) *Record { 4041 s.Value = &v 4042 return s 4043 } 4044 4045 // An update operation for a record. 4046 type RecordPatch struct { 4047 _ struct{} `type:"structure"` 4048 4049 // The last modified date of the client device. 4050 DeviceLastModifiedDate *time.Time `type:"timestamp"` 4051 4052 // The key associated with the record patch. 4053 // 4054 // Key is a required field 4055 Key *string `min:"1" type:"string" required:"true"` 4056 4057 // An operation, either replace or remove. 4058 // 4059 // Op is a required field 4060 Op *string `type:"string" required:"true" enum:"Operation"` 4061 4062 // Last known server sync count for this record. Set to 0 if unknown. 4063 // 4064 // SyncCount is a required field 4065 SyncCount *int64 `type:"long" required:"true"` 4066 4067 // The value associated with the record patch. 4068 Value *string `type:"string"` 4069 } 4070 4071 // String returns the string representation. 4072 // 4073 // API parameter values that are decorated as "sensitive" in the API will not 4074 // be included in the string output. The member name will be present, but the 4075 // value will be replaced with "sensitive". 4076 func (s RecordPatch) String() string { 4077 return awsutil.Prettify(s) 4078 } 4079 4080 // GoString returns the string representation. 4081 // 4082 // API parameter values that are decorated as "sensitive" in the API will not 4083 // be included in the string output. The member name will be present, but the 4084 // value will be replaced with "sensitive". 4085 func (s RecordPatch) GoString() string { 4086 return s.String() 4087 } 4088 4089 // Validate inspects the fields of the type to determine if they are valid. 4090 func (s *RecordPatch) Validate() error { 4091 invalidParams := request.ErrInvalidParams{Context: "RecordPatch"} 4092 if s.Key == nil { 4093 invalidParams.Add(request.NewErrParamRequired("Key")) 4094 } 4095 if s.Key != nil && len(*s.Key) < 1 { 4096 invalidParams.Add(request.NewErrParamMinLen("Key", 1)) 4097 } 4098 if s.Op == nil { 4099 invalidParams.Add(request.NewErrParamRequired("Op")) 4100 } 4101 if s.SyncCount == nil { 4102 invalidParams.Add(request.NewErrParamRequired("SyncCount")) 4103 } 4104 4105 if invalidParams.Len() > 0 { 4106 return invalidParams 4107 } 4108 return nil 4109 } 4110 4111 // SetDeviceLastModifiedDate sets the DeviceLastModifiedDate field's value. 4112 func (s *RecordPatch) SetDeviceLastModifiedDate(v time.Time) *RecordPatch { 4113 s.DeviceLastModifiedDate = &v 4114 return s 4115 } 4116 4117 // SetKey sets the Key field's value. 4118 func (s *RecordPatch) SetKey(v string) *RecordPatch { 4119 s.Key = &v 4120 return s 4121 } 4122 4123 // SetOp sets the Op field's value. 4124 func (s *RecordPatch) SetOp(v string) *RecordPatch { 4125 s.Op = &v 4126 return s 4127 } 4128 4129 // SetSyncCount sets the SyncCount field's value. 4130 func (s *RecordPatch) SetSyncCount(v int64) *RecordPatch { 4131 s.SyncCount = &v 4132 return s 4133 } 4134 4135 // SetValue sets the Value field's value. 4136 func (s *RecordPatch) SetValue(v string) *RecordPatch { 4137 s.Value = &v 4138 return s 4139 } 4140 4141 // A request to RegisterDevice. 4142 type RegisterDeviceInput struct { 4143 _ struct{} `type:"structure"` 4144 4145 // The unique ID for this identity. 4146 // 4147 // IdentityId is a required field 4148 IdentityId *string `location:"uri" locationName:"IdentityId" min:"1" type:"string" required:"true"` 4149 4150 // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) 4151 // created by Amazon Cognito. Here, the ID of the pool that the identity belongs 4152 // to. 4153 // 4154 // IdentityPoolId is a required field 4155 IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"` 4156 4157 // The SNS platform type (e.g. GCM, SDM, APNS, APNS_SANDBOX). 4158 // 4159 // Platform is a required field 4160 Platform *string `type:"string" required:"true" enum:"Platform"` 4161 4162 // The push token. 4163 // 4164 // Token is a required field 4165 Token *string `type:"string" required:"true"` 4166 } 4167 4168 // String returns the string representation. 4169 // 4170 // API parameter values that are decorated as "sensitive" in the API will not 4171 // be included in the string output. The member name will be present, but the 4172 // value will be replaced with "sensitive". 4173 func (s RegisterDeviceInput) String() string { 4174 return awsutil.Prettify(s) 4175 } 4176 4177 // GoString returns the string representation. 4178 // 4179 // API parameter values that are decorated as "sensitive" in the API will not 4180 // be included in the string output. The member name will be present, but the 4181 // value will be replaced with "sensitive". 4182 func (s RegisterDeviceInput) GoString() string { 4183 return s.String() 4184 } 4185 4186 // Validate inspects the fields of the type to determine if they are valid. 4187 func (s *RegisterDeviceInput) Validate() error { 4188 invalidParams := request.ErrInvalidParams{Context: "RegisterDeviceInput"} 4189 if s.IdentityId == nil { 4190 invalidParams.Add(request.NewErrParamRequired("IdentityId")) 4191 } 4192 if s.IdentityId != nil && len(*s.IdentityId) < 1 { 4193 invalidParams.Add(request.NewErrParamMinLen("IdentityId", 1)) 4194 } 4195 if s.IdentityPoolId == nil { 4196 invalidParams.Add(request.NewErrParamRequired("IdentityPoolId")) 4197 } 4198 if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 { 4199 invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1)) 4200 } 4201 if s.Platform == nil { 4202 invalidParams.Add(request.NewErrParamRequired("Platform")) 4203 } 4204 if s.Token == nil { 4205 invalidParams.Add(request.NewErrParamRequired("Token")) 4206 } 4207 4208 if invalidParams.Len() > 0 { 4209 return invalidParams 4210 } 4211 return nil 4212 } 4213 4214 // SetIdentityId sets the IdentityId field's value. 4215 func (s *RegisterDeviceInput) SetIdentityId(v string) *RegisterDeviceInput { 4216 s.IdentityId = &v 4217 return s 4218 } 4219 4220 // SetIdentityPoolId sets the IdentityPoolId field's value. 4221 func (s *RegisterDeviceInput) SetIdentityPoolId(v string) *RegisterDeviceInput { 4222 s.IdentityPoolId = &v 4223 return s 4224 } 4225 4226 // SetPlatform sets the Platform field's value. 4227 func (s *RegisterDeviceInput) SetPlatform(v string) *RegisterDeviceInput { 4228 s.Platform = &v 4229 return s 4230 } 4231 4232 // SetToken sets the Token field's value. 4233 func (s *RegisterDeviceInput) SetToken(v string) *RegisterDeviceInput { 4234 s.Token = &v 4235 return s 4236 } 4237 4238 // Response to a RegisterDevice request. 4239 type RegisterDeviceOutput struct { 4240 _ struct{} `type:"structure"` 4241 4242 // The unique ID generated for this device by Cognito. 4243 DeviceId *string `min:"1" type:"string"` 4244 } 4245 4246 // String returns the string representation. 4247 // 4248 // API parameter values that are decorated as "sensitive" in the API will not 4249 // be included in the string output. The member name will be present, but the 4250 // value will be replaced with "sensitive". 4251 func (s RegisterDeviceOutput) String() string { 4252 return awsutil.Prettify(s) 4253 } 4254 4255 // GoString returns the string representation. 4256 // 4257 // API parameter values that are decorated as "sensitive" in the API will not 4258 // be included in the string output. The member name will be present, but the 4259 // value will be replaced with "sensitive". 4260 func (s RegisterDeviceOutput) GoString() string { 4261 return s.String() 4262 } 4263 4264 // SetDeviceId sets the DeviceId field's value. 4265 func (s *RegisterDeviceOutput) SetDeviceId(v string) *RegisterDeviceOutput { 4266 s.DeviceId = &v 4267 return s 4268 } 4269 4270 // Thrown if an update can't be applied because the resource was changed by 4271 // another call and this would result in a conflict. 4272 type ResourceConflictException struct { 4273 _ struct{} `type:"structure"` 4274 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 4275 4276 // The message returned by a ResourceConflictException. 4277 Message_ *string `locationName:"message" type:"string"` 4278 } 4279 4280 // String returns the string representation. 4281 // 4282 // API parameter values that are decorated as "sensitive" in the API will not 4283 // be included in the string output. The member name will be present, but the 4284 // value will be replaced with "sensitive". 4285 func (s ResourceConflictException) String() string { 4286 return awsutil.Prettify(s) 4287 } 4288 4289 // GoString returns the string representation. 4290 // 4291 // API parameter values that are decorated as "sensitive" in the API will not 4292 // be included in the string output. The member name will be present, but the 4293 // value will be replaced with "sensitive". 4294 func (s ResourceConflictException) GoString() string { 4295 return s.String() 4296 } 4297 4298 func newErrorResourceConflictException(v protocol.ResponseMetadata) error { 4299 return &ResourceConflictException{ 4300 RespMetadata: v, 4301 } 4302 } 4303 4304 // Code returns the exception type name. 4305 func (s *ResourceConflictException) Code() string { 4306 return "ResourceConflictException" 4307 } 4308 4309 // Message returns the exception's message. 4310 func (s *ResourceConflictException) Message() string { 4311 if s.Message_ != nil { 4312 return *s.Message_ 4313 } 4314 return "" 4315 } 4316 4317 // OrigErr always returns nil, satisfies awserr.Error interface. 4318 func (s *ResourceConflictException) OrigErr() error { 4319 return nil 4320 } 4321 4322 func (s *ResourceConflictException) Error() string { 4323 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 4324 } 4325 4326 // Status code returns the HTTP status code for the request's response error. 4327 func (s *ResourceConflictException) StatusCode() int { 4328 return s.RespMetadata.StatusCode 4329 } 4330 4331 // RequestID returns the service's response RequestID for request. 4332 func (s *ResourceConflictException) RequestID() string { 4333 return s.RespMetadata.RequestID 4334 } 4335 4336 // Thrown if the resource doesn't exist. 4337 type ResourceNotFoundException struct { 4338 _ struct{} `type:"structure"` 4339 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 4340 4341 // Message returned by a ResourceNotFoundException. 4342 Message_ *string `locationName:"message" type:"string"` 4343 } 4344 4345 // String returns the string representation. 4346 // 4347 // API parameter values that are decorated as "sensitive" in the API will not 4348 // be included in the string output. The member name will be present, but the 4349 // value will be replaced with "sensitive". 4350 func (s ResourceNotFoundException) String() string { 4351 return awsutil.Prettify(s) 4352 } 4353 4354 // GoString returns the string representation. 4355 // 4356 // API parameter values that are decorated as "sensitive" in the API will not 4357 // be included in the string output. The member name will be present, but the 4358 // value will be replaced with "sensitive". 4359 func (s ResourceNotFoundException) GoString() string { 4360 return s.String() 4361 } 4362 4363 func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { 4364 return &ResourceNotFoundException{ 4365 RespMetadata: v, 4366 } 4367 } 4368 4369 // Code returns the exception type name. 4370 func (s *ResourceNotFoundException) Code() string { 4371 return "ResourceNotFoundException" 4372 } 4373 4374 // Message returns the exception's message. 4375 func (s *ResourceNotFoundException) Message() string { 4376 if s.Message_ != nil { 4377 return *s.Message_ 4378 } 4379 return "" 4380 } 4381 4382 // OrigErr always returns nil, satisfies awserr.Error interface. 4383 func (s *ResourceNotFoundException) OrigErr() error { 4384 return nil 4385 } 4386 4387 func (s *ResourceNotFoundException) Error() string { 4388 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 4389 } 4390 4391 // Status code returns the HTTP status code for the request's response error. 4392 func (s *ResourceNotFoundException) StatusCode() int { 4393 return s.RespMetadata.StatusCode 4394 } 4395 4396 // RequestID returns the service's response RequestID for request. 4397 func (s *ResourceNotFoundException) RequestID() string { 4398 return s.RespMetadata.RequestID 4399 } 4400 4401 // A request to configure Cognito Events" 4402 // " 4403 type SetCognitoEventsInput struct { 4404 _ struct{} `type:"structure"` 4405 4406 // The events to configure 4407 // 4408 // Events is a required field 4409 Events map[string]*string `type:"map" required:"true"` 4410 4411 // The Cognito Identity Pool to use when configuring Cognito Events 4412 // 4413 // IdentityPoolId is a required field 4414 IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"` 4415 } 4416 4417 // String returns the string representation. 4418 // 4419 // API parameter values that are decorated as "sensitive" in the API will not 4420 // be included in the string output. The member name will be present, but the 4421 // value will be replaced with "sensitive". 4422 func (s SetCognitoEventsInput) String() string { 4423 return awsutil.Prettify(s) 4424 } 4425 4426 // GoString returns the string representation. 4427 // 4428 // API parameter values that are decorated as "sensitive" in the API will not 4429 // be included in the string output. The member name will be present, but the 4430 // value will be replaced with "sensitive". 4431 func (s SetCognitoEventsInput) GoString() string { 4432 return s.String() 4433 } 4434 4435 // Validate inspects the fields of the type to determine if they are valid. 4436 func (s *SetCognitoEventsInput) Validate() error { 4437 invalidParams := request.ErrInvalidParams{Context: "SetCognitoEventsInput"} 4438 if s.Events == nil { 4439 invalidParams.Add(request.NewErrParamRequired("Events")) 4440 } 4441 if s.IdentityPoolId == nil { 4442 invalidParams.Add(request.NewErrParamRequired("IdentityPoolId")) 4443 } 4444 if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 { 4445 invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1)) 4446 } 4447 4448 if invalidParams.Len() > 0 { 4449 return invalidParams 4450 } 4451 return nil 4452 } 4453 4454 // SetEvents sets the Events field's value. 4455 func (s *SetCognitoEventsInput) SetEvents(v map[string]*string) *SetCognitoEventsInput { 4456 s.Events = v 4457 return s 4458 } 4459 4460 // SetIdentityPoolId sets the IdentityPoolId field's value. 4461 func (s *SetCognitoEventsInput) SetIdentityPoolId(v string) *SetCognitoEventsInput { 4462 s.IdentityPoolId = &v 4463 return s 4464 } 4465 4466 type SetCognitoEventsOutput struct { 4467 _ struct{} `type:"structure" nopayload:"true"` 4468 } 4469 4470 // String returns the string representation. 4471 // 4472 // API parameter values that are decorated as "sensitive" in the API will not 4473 // be included in the string output. The member name will be present, but the 4474 // value will be replaced with "sensitive". 4475 func (s SetCognitoEventsOutput) String() string { 4476 return awsutil.Prettify(s) 4477 } 4478 4479 // GoString returns the string representation. 4480 // 4481 // API parameter values that are decorated as "sensitive" in the API will not 4482 // be included in the string output. The member name will be present, but the 4483 // value will be replaced with "sensitive". 4484 func (s SetCognitoEventsOutput) GoString() string { 4485 return s.String() 4486 } 4487 4488 // The input for the SetIdentityPoolConfiguration operation. 4489 type SetIdentityPoolConfigurationInput struct { 4490 _ struct{} `type:"structure"` 4491 4492 // Options to apply to this identity pool for Amazon Cognito streams. 4493 CognitoStreams *CognitoStreams `type:"structure"` 4494 4495 // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) 4496 // created by Amazon Cognito. This is the ID of the pool to modify. 4497 // 4498 // IdentityPoolId is a required field 4499 IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"` 4500 4501 // Options to apply to this identity pool for push synchronization. 4502 PushSync *PushSync `type:"structure"` 4503 } 4504 4505 // String returns the string representation. 4506 // 4507 // API parameter values that are decorated as "sensitive" in the API will not 4508 // be included in the string output. The member name will be present, but the 4509 // value will be replaced with "sensitive". 4510 func (s SetIdentityPoolConfigurationInput) String() string { 4511 return awsutil.Prettify(s) 4512 } 4513 4514 // GoString returns the string representation. 4515 // 4516 // API parameter values that are decorated as "sensitive" in the API will not 4517 // be included in the string output. The member name will be present, but the 4518 // value will be replaced with "sensitive". 4519 func (s SetIdentityPoolConfigurationInput) GoString() string { 4520 return s.String() 4521 } 4522 4523 // Validate inspects the fields of the type to determine if they are valid. 4524 func (s *SetIdentityPoolConfigurationInput) Validate() error { 4525 invalidParams := request.ErrInvalidParams{Context: "SetIdentityPoolConfigurationInput"} 4526 if s.IdentityPoolId == nil { 4527 invalidParams.Add(request.NewErrParamRequired("IdentityPoolId")) 4528 } 4529 if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 { 4530 invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1)) 4531 } 4532 if s.CognitoStreams != nil { 4533 if err := s.CognitoStreams.Validate(); err != nil { 4534 invalidParams.AddNested("CognitoStreams", err.(request.ErrInvalidParams)) 4535 } 4536 } 4537 if s.PushSync != nil { 4538 if err := s.PushSync.Validate(); err != nil { 4539 invalidParams.AddNested("PushSync", err.(request.ErrInvalidParams)) 4540 } 4541 } 4542 4543 if invalidParams.Len() > 0 { 4544 return invalidParams 4545 } 4546 return nil 4547 } 4548 4549 // SetCognitoStreams sets the CognitoStreams field's value. 4550 func (s *SetIdentityPoolConfigurationInput) SetCognitoStreams(v *CognitoStreams) *SetIdentityPoolConfigurationInput { 4551 s.CognitoStreams = v 4552 return s 4553 } 4554 4555 // SetIdentityPoolId sets the IdentityPoolId field's value. 4556 func (s *SetIdentityPoolConfigurationInput) SetIdentityPoolId(v string) *SetIdentityPoolConfigurationInput { 4557 s.IdentityPoolId = &v 4558 return s 4559 } 4560 4561 // SetPushSync sets the PushSync field's value. 4562 func (s *SetIdentityPoolConfigurationInput) SetPushSync(v *PushSync) *SetIdentityPoolConfigurationInput { 4563 s.PushSync = v 4564 return s 4565 } 4566 4567 // The output for the SetIdentityPoolConfiguration operation 4568 type SetIdentityPoolConfigurationOutput struct { 4569 _ struct{} `type:"structure"` 4570 4571 // Options to apply to this identity pool for Amazon Cognito streams. 4572 CognitoStreams *CognitoStreams `type:"structure"` 4573 4574 // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) 4575 // created by Amazon Cognito. 4576 IdentityPoolId *string `min:"1" type:"string"` 4577 4578 // Options to apply to this identity pool for push synchronization. 4579 PushSync *PushSync `type:"structure"` 4580 } 4581 4582 // String returns the string representation. 4583 // 4584 // API parameter values that are decorated as "sensitive" in the API will not 4585 // be included in the string output. The member name will be present, but the 4586 // value will be replaced with "sensitive". 4587 func (s SetIdentityPoolConfigurationOutput) String() string { 4588 return awsutil.Prettify(s) 4589 } 4590 4591 // GoString returns the string representation. 4592 // 4593 // API parameter values that are decorated as "sensitive" in the API will not 4594 // be included in the string output. The member name will be present, but the 4595 // value will be replaced with "sensitive". 4596 func (s SetIdentityPoolConfigurationOutput) GoString() string { 4597 return s.String() 4598 } 4599 4600 // SetCognitoStreams sets the CognitoStreams field's value. 4601 func (s *SetIdentityPoolConfigurationOutput) SetCognitoStreams(v *CognitoStreams) *SetIdentityPoolConfigurationOutput { 4602 s.CognitoStreams = v 4603 return s 4604 } 4605 4606 // SetIdentityPoolId sets the IdentityPoolId field's value. 4607 func (s *SetIdentityPoolConfigurationOutput) SetIdentityPoolId(v string) *SetIdentityPoolConfigurationOutput { 4608 s.IdentityPoolId = &v 4609 return s 4610 } 4611 4612 // SetPushSync sets the PushSync field's value. 4613 func (s *SetIdentityPoolConfigurationOutput) SetPushSync(v *PushSync) *SetIdentityPoolConfigurationOutput { 4614 s.PushSync = v 4615 return s 4616 } 4617 4618 // A request to SubscribeToDatasetRequest. 4619 type SubscribeToDatasetInput struct { 4620 _ struct{} `type:"structure" nopayload:"true"` 4621 4622 // The name of the dataset to subcribe to. 4623 // 4624 // DatasetName is a required field 4625 DatasetName *string `location:"uri" locationName:"DatasetName" min:"1" type:"string" required:"true"` 4626 4627 // The unique ID generated for this device by Cognito. 4628 // 4629 // DeviceId is a required field 4630 DeviceId *string `location:"uri" locationName:"DeviceId" min:"1" type:"string" required:"true"` 4631 4632 // Unique ID for this identity. 4633 // 4634 // IdentityId is a required field 4635 IdentityId *string `location:"uri" locationName:"IdentityId" min:"1" type:"string" required:"true"` 4636 4637 // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) 4638 // created by Amazon Cognito. The ID of the pool to which the identity belongs. 4639 // 4640 // IdentityPoolId is a required field 4641 IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"` 4642 } 4643 4644 // String returns the string representation. 4645 // 4646 // API parameter values that are decorated as "sensitive" in the API will not 4647 // be included in the string output. The member name will be present, but the 4648 // value will be replaced with "sensitive". 4649 func (s SubscribeToDatasetInput) String() string { 4650 return awsutil.Prettify(s) 4651 } 4652 4653 // GoString returns the string representation. 4654 // 4655 // API parameter values that are decorated as "sensitive" in the API will not 4656 // be included in the string output. The member name will be present, but the 4657 // value will be replaced with "sensitive". 4658 func (s SubscribeToDatasetInput) GoString() string { 4659 return s.String() 4660 } 4661 4662 // Validate inspects the fields of the type to determine if they are valid. 4663 func (s *SubscribeToDatasetInput) Validate() error { 4664 invalidParams := request.ErrInvalidParams{Context: "SubscribeToDatasetInput"} 4665 if s.DatasetName == nil { 4666 invalidParams.Add(request.NewErrParamRequired("DatasetName")) 4667 } 4668 if s.DatasetName != nil && len(*s.DatasetName) < 1 { 4669 invalidParams.Add(request.NewErrParamMinLen("DatasetName", 1)) 4670 } 4671 if s.DeviceId == nil { 4672 invalidParams.Add(request.NewErrParamRequired("DeviceId")) 4673 } 4674 if s.DeviceId != nil && len(*s.DeviceId) < 1 { 4675 invalidParams.Add(request.NewErrParamMinLen("DeviceId", 1)) 4676 } 4677 if s.IdentityId == nil { 4678 invalidParams.Add(request.NewErrParamRequired("IdentityId")) 4679 } 4680 if s.IdentityId != nil && len(*s.IdentityId) < 1 { 4681 invalidParams.Add(request.NewErrParamMinLen("IdentityId", 1)) 4682 } 4683 if s.IdentityPoolId == nil { 4684 invalidParams.Add(request.NewErrParamRequired("IdentityPoolId")) 4685 } 4686 if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 { 4687 invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1)) 4688 } 4689 4690 if invalidParams.Len() > 0 { 4691 return invalidParams 4692 } 4693 return nil 4694 } 4695 4696 // SetDatasetName sets the DatasetName field's value. 4697 func (s *SubscribeToDatasetInput) SetDatasetName(v string) *SubscribeToDatasetInput { 4698 s.DatasetName = &v 4699 return s 4700 } 4701 4702 // SetDeviceId sets the DeviceId field's value. 4703 func (s *SubscribeToDatasetInput) SetDeviceId(v string) *SubscribeToDatasetInput { 4704 s.DeviceId = &v 4705 return s 4706 } 4707 4708 // SetIdentityId sets the IdentityId field's value. 4709 func (s *SubscribeToDatasetInput) SetIdentityId(v string) *SubscribeToDatasetInput { 4710 s.IdentityId = &v 4711 return s 4712 } 4713 4714 // SetIdentityPoolId sets the IdentityPoolId field's value. 4715 func (s *SubscribeToDatasetInput) SetIdentityPoolId(v string) *SubscribeToDatasetInput { 4716 s.IdentityPoolId = &v 4717 return s 4718 } 4719 4720 // Response to a SubscribeToDataset request. 4721 type SubscribeToDatasetOutput struct { 4722 _ struct{} `type:"structure" nopayload:"true"` 4723 } 4724 4725 // String returns the string representation. 4726 // 4727 // API parameter values that are decorated as "sensitive" in the API will not 4728 // be included in the string output. The member name will be present, but the 4729 // value will be replaced with "sensitive". 4730 func (s SubscribeToDatasetOutput) String() string { 4731 return awsutil.Prettify(s) 4732 } 4733 4734 // GoString returns the string representation. 4735 // 4736 // API parameter values that are decorated as "sensitive" in the API will not 4737 // be included in the string output. The member name will be present, but the 4738 // value will be replaced with "sensitive". 4739 func (s SubscribeToDatasetOutput) GoString() string { 4740 return s.String() 4741 } 4742 4743 // Thrown if the request is throttled. 4744 type TooManyRequestsException struct { 4745 _ struct{} `type:"structure"` 4746 RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` 4747 4748 // Message returned by a TooManyRequestsException. 4749 Message_ *string `locationName:"message" type:"string"` 4750 } 4751 4752 // String returns the string representation. 4753 // 4754 // API parameter values that are decorated as "sensitive" in the API will not 4755 // be included in the string output. The member name will be present, but the 4756 // value will be replaced with "sensitive". 4757 func (s TooManyRequestsException) String() string { 4758 return awsutil.Prettify(s) 4759 } 4760 4761 // GoString returns the string representation. 4762 // 4763 // API parameter values that are decorated as "sensitive" in the API will not 4764 // be included in the string output. The member name will be present, but the 4765 // value will be replaced with "sensitive". 4766 func (s TooManyRequestsException) GoString() string { 4767 return s.String() 4768 } 4769 4770 func newErrorTooManyRequestsException(v protocol.ResponseMetadata) error { 4771 return &TooManyRequestsException{ 4772 RespMetadata: v, 4773 } 4774 } 4775 4776 // Code returns the exception type name. 4777 func (s *TooManyRequestsException) Code() string { 4778 return "TooManyRequestsException" 4779 } 4780 4781 // Message returns the exception's message. 4782 func (s *TooManyRequestsException) Message() string { 4783 if s.Message_ != nil { 4784 return *s.Message_ 4785 } 4786 return "" 4787 } 4788 4789 // OrigErr always returns nil, satisfies awserr.Error interface. 4790 func (s *TooManyRequestsException) OrigErr() error { 4791 return nil 4792 } 4793 4794 func (s *TooManyRequestsException) Error() string { 4795 return fmt.Sprintf("%s: %s", s.Code(), s.Message()) 4796 } 4797 4798 // Status code returns the HTTP status code for the request's response error. 4799 func (s *TooManyRequestsException) StatusCode() int { 4800 return s.RespMetadata.StatusCode 4801 } 4802 4803 // RequestID returns the service's response RequestID for request. 4804 func (s *TooManyRequestsException) RequestID() string { 4805 return s.RespMetadata.RequestID 4806 } 4807 4808 // A request to UnsubscribeFromDataset. 4809 type UnsubscribeFromDatasetInput struct { 4810 _ struct{} `type:"structure" nopayload:"true"` 4811 4812 // The name of the dataset from which to unsubcribe. 4813 // 4814 // DatasetName is a required field 4815 DatasetName *string `location:"uri" locationName:"DatasetName" min:"1" type:"string" required:"true"` 4816 4817 // The unique ID generated for this device by Cognito. 4818 // 4819 // DeviceId is a required field 4820 DeviceId *string `location:"uri" locationName:"DeviceId" min:"1" type:"string" required:"true"` 4821 4822 // Unique ID for this identity. 4823 // 4824 // IdentityId is a required field 4825 IdentityId *string `location:"uri" locationName:"IdentityId" min:"1" type:"string" required:"true"` 4826 4827 // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) 4828 // created by Amazon Cognito. The ID of the pool to which this identity belongs. 4829 // 4830 // IdentityPoolId is a required field 4831 IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"` 4832 } 4833 4834 // String returns the string representation. 4835 // 4836 // API parameter values that are decorated as "sensitive" in the API will not 4837 // be included in the string output. The member name will be present, but the 4838 // value will be replaced with "sensitive". 4839 func (s UnsubscribeFromDatasetInput) String() string { 4840 return awsutil.Prettify(s) 4841 } 4842 4843 // GoString returns the string representation. 4844 // 4845 // API parameter values that are decorated as "sensitive" in the API will not 4846 // be included in the string output. The member name will be present, but the 4847 // value will be replaced with "sensitive". 4848 func (s UnsubscribeFromDatasetInput) GoString() string { 4849 return s.String() 4850 } 4851 4852 // Validate inspects the fields of the type to determine if they are valid. 4853 func (s *UnsubscribeFromDatasetInput) Validate() error { 4854 invalidParams := request.ErrInvalidParams{Context: "UnsubscribeFromDatasetInput"} 4855 if s.DatasetName == nil { 4856 invalidParams.Add(request.NewErrParamRequired("DatasetName")) 4857 } 4858 if s.DatasetName != nil && len(*s.DatasetName) < 1 { 4859 invalidParams.Add(request.NewErrParamMinLen("DatasetName", 1)) 4860 } 4861 if s.DeviceId == nil { 4862 invalidParams.Add(request.NewErrParamRequired("DeviceId")) 4863 } 4864 if s.DeviceId != nil && len(*s.DeviceId) < 1 { 4865 invalidParams.Add(request.NewErrParamMinLen("DeviceId", 1)) 4866 } 4867 if s.IdentityId == nil { 4868 invalidParams.Add(request.NewErrParamRequired("IdentityId")) 4869 } 4870 if s.IdentityId != nil && len(*s.IdentityId) < 1 { 4871 invalidParams.Add(request.NewErrParamMinLen("IdentityId", 1)) 4872 } 4873 if s.IdentityPoolId == nil { 4874 invalidParams.Add(request.NewErrParamRequired("IdentityPoolId")) 4875 } 4876 if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 { 4877 invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1)) 4878 } 4879 4880 if invalidParams.Len() > 0 { 4881 return invalidParams 4882 } 4883 return nil 4884 } 4885 4886 // SetDatasetName sets the DatasetName field's value. 4887 func (s *UnsubscribeFromDatasetInput) SetDatasetName(v string) *UnsubscribeFromDatasetInput { 4888 s.DatasetName = &v 4889 return s 4890 } 4891 4892 // SetDeviceId sets the DeviceId field's value. 4893 func (s *UnsubscribeFromDatasetInput) SetDeviceId(v string) *UnsubscribeFromDatasetInput { 4894 s.DeviceId = &v 4895 return s 4896 } 4897 4898 // SetIdentityId sets the IdentityId field's value. 4899 func (s *UnsubscribeFromDatasetInput) SetIdentityId(v string) *UnsubscribeFromDatasetInput { 4900 s.IdentityId = &v 4901 return s 4902 } 4903 4904 // SetIdentityPoolId sets the IdentityPoolId field's value. 4905 func (s *UnsubscribeFromDatasetInput) SetIdentityPoolId(v string) *UnsubscribeFromDatasetInput { 4906 s.IdentityPoolId = &v 4907 return s 4908 } 4909 4910 // Response to an UnsubscribeFromDataset request. 4911 type UnsubscribeFromDatasetOutput struct { 4912 _ struct{} `type:"structure" nopayload:"true"` 4913 } 4914 4915 // String returns the string representation. 4916 // 4917 // API parameter values that are decorated as "sensitive" in the API will not 4918 // be included in the string output. The member name will be present, but the 4919 // value will be replaced with "sensitive". 4920 func (s UnsubscribeFromDatasetOutput) String() string { 4921 return awsutil.Prettify(s) 4922 } 4923 4924 // GoString returns the string representation. 4925 // 4926 // API parameter values that are decorated as "sensitive" in the API will not 4927 // be included in the string output. The member name will be present, but the 4928 // value will be replaced with "sensitive". 4929 func (s UnsubscribeFromDatasetOutput) GoString() string { 4930 return s.String() 4931 } 4932 4933 // A request to post updates to records or add and delete records for a dataset 4934 // and user. 4935 type UpdateRecordsInput struct { 4936 _ struct{} `type:"structure"` 4937 4938 // Intended to supply a device ID that will populate the lastModifiedBy field 4939 // referenced in other methods. The ClientContext field is not yet implemented. 4940 ClientContext *string `location:"header" locationName:"x-amz-Client-Context" type:"string"` 4941 4942 // A string of up to 128 characters. Allowed characters are a-z, A-Z, 0-9, '_' 4943 // (underscore), '-' (dash), and '.' (dot). 4944 // 4945 // DatasetName is a required field 4946 DatasetName *string `location:"uri" locationName:"DatasetName" min:"1" type:"string" required:"true"` 4947 4948 // The unique ID generated for this device by Cognito. 4949 DeviceId *string `min:"1" type:"string"` 4950 4951 // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) 4952 // created by Amazon Cognito. GUID generation is unique within a region. 4953 // 4954 // IdentityId is a required field 4955 IdentityId *string `location:"uri" locationName:"IdentityId" min:"1" type:"string" required:"true"` 4956 4957 // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) 4958 // created by Amazon Cognito. GUID generation is unique within a region. 4959 // 4960 // IdentityPoolId is a required field 4961 IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"` 4962 4963 // A list of patch operations. 4964 RecordPatches []*RecordPatch `type:"list"` 4965 4966 // The SyncSessionToken returned by a previous call to ListRecords for this 4967 // dataset and identity. 4968 // 4969 // SyncSessionToken is a required field 4970 SyncSessionToken *string `type:"string" required:"true"` 4971 } 4972 4973 // String returns the string representation. 4974 // 4975 // API parameter values that are decorated as "sensitive" in the API will not 4976 // be included in the string output. The member name will be present, but the 4977 // value will be replaced with "sensitive". 4978 func (s UpdateRecordsInput) String() string { 4979 return awsutil.Prettify(s) 4980 } 4981 4982 // GoString returns the string representation. 4983 // 4984 // API parameter values that are decorated as "sensitive" in the API will not 4985 // be included in the string output. The member name will be present, but the 4986 // value will be replaced with "sensitive". 4987 func (s UpdateRecordsInput) GoString() string { 4988 return s.String() 4989 } 4990 4991 // Validate inspects the fields of the type to determine if they are valid. 4992 func (s *UpdateRecordsInput) Validate() error { 4993 invalidParams := request.ErrInvalidParams{Context: "UpdateRecordsInput"} 4994 if s.DatasetName == nil { 4995 invalidParams.Add(request.NewErrParamRequired("DatasetName")) 4996 } 4997 if s.DatasetName != nil && len(*s.DatasetName) < 1 { 4998 invalidParams.Add(request.NewErrParamMinLen("DatasetName", 1)) 4999 } 5000 if s.DeviceId != nil && len(*s.DeviceId) < 1 { 5001 invalidParams.Add(request.NewErrParamMinLen("DeviceId", 1)) 5002 } 5003 if s.IdentityId == nil { 5004 invalidParams.Add(request.NewErrParamRequired("IdentityId")) 5005 } 5006 if s.IdentityId != nil && len(*s.IdentityId) < 1 { 5007 invalidParams.Add(request.NewErrParamMinLen("IdentityId", 1)) 5008 } 5009 if s.IdentityPoolId == nil { 5010 invalidParams.Add(request.NewErrParamRequired("IdentityPoolId")) 5011 } 5012 if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 { 5013 invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1)) 5014 } 5015 if s.SyncSessionToken == nil { 5016 invalidParams.Add(request.NewErrParamRequired("SyncSessionToken")) 5017 } 5018 if s.RecordPatches != nil { 5019 for i, v := range s.RecordPatches { 5020 if v == nil { 5021 continue 5022 } 5023 if err := v.Validate(); err != nil { 5024 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RecordPatches", i), err.(request.ErrInvalidParams)) 5025 } 5026 } 5027 } 5028 5029 if invalidParams.Len() > 0 { 5030 return invalidParams 5031 } 5032 return nil 5033 } 5034 5035 // SetClientContext sets the ClientContext field's value. 5036 func (s *UpdateRecordsInput) SetClientContext(v string) *UpdateRecordsInput { 5037 s.ClientContext = &v 5038 return s 5039 } 5040 5041 // SetDatasetName sets the DatasetName field's value. 5042 func (s *UpdateRecordsInput) SetDatasetName(v string) *UpdateRecordsInput { 5043 s.DatasetName = &v 5044 return s 5045 } 5046 5047 // SetDeviceId sets the DeviceId field's value. 5048 func (s *UpdateRecordsInput) SetDeviceId(v string) *UpdateRecordsInput { 5049 s.DeviceId = &v 5050 return s 5051 } 5052 5053 // SetIdentityId sets the IdentityId field's value. 5054 func (s *UpdateRecordsInput) SetIdentityId(v string) *UpdateRecordsInput { 5055 s.IdentityId = &v 5056 return s 5057 } 5058 5059 // SetIdentityPoolId sets the IdentityPoolId field's value. 5060 func (s *UpdateRecordsInput) SetIdentityPoolId(v string) *UpdateRecordsInput { 5061 s.IdentityPoolId = &v 5062 return s 5063 } 5064 5065 // SetRecordPatches sets the RecordPatches field's value. 5066 func (s *UpdateRecordsInput) SetRecordPatches(v []*RecordPatch) *UpdateRecordsInput { 5067 s.RecordPatches = v 5068 return s 5069 } 5070 5071 // SetSyncSessionToken sets the SyncSessionToken field's value. 5072 func (s *UpdateRecordsInput) SetSyncSessionToken(v string) *UpdateRecordsInput { 5073 s.SyncSessionToken = &v 5074 return s 5075 } 5076 5077 // Returned for a successful UpdateRecordsRequest. 5078 type UpdateRecordsOutput struct { 5079 _ struct{} `type:"structure"` 5080 5081 // A list of records that have been updated. 5082 Records []*Record `type:"list"` 5083 } 5084 5085 // String returns the string representation. 5086 // 5087 // API parameter values that are decorated as "sensitive" in the API will not 5088 // be included in the string output. The member name will be present, but the 5089 // value will be replaced with "sensitive". 5090 func (s UpdateRecordsOutput) String() string { 5091 return awsutil.Prettify(s) 5092 } 5093 5094 // GoString returns the string representation. 5095 // 5096 // API parameter values that are decorated as "sensitive" in the API will not 5097 // be included in the string output. The member name will be present, but the 5098 // value will be replaced with "sensitive". 5099 func (s UpdateRecordsOutput) GoString() string { 5100 return s.String() 5101 } 5102 5103 // SetRecords sets the Records field's value. 5104 func (s *UpdateRecordsOutput) SetRecords(v []*Record) *UpdateRecordsOutput { 5105 s.Records = v 5106 return s 5107 } 5108 5109 const ( 5110 // BulkPublishStatusNotStarted is a BulkPublishStatus enum value 5111 BulkPublishStatusNotStarted = "NOT_STARTED" 5112 5113 // BulkPublishStatusInProgress is a BulkPublishStatus enum value 5114 BulkPublishStatusInProgress = "IN_PROGRESS" 5115 5116 // BulkPublishStatusFailed is a BulkPublishStatus enum value 5117 BulkPublishStatusFailed = "FAILED" 5118 5119 // BulkPublishStatusSucceeded is a BulkPublishStatus enum value 5120 BulkPublishStatusSucceeded = "SUCCEEDED" 5121 ) 5122 5123 // BulkPublishStatus_Values returns all elements of the BulkPublishStatus enum 5124 func BulkPublishStatus_Values() []string { 5125 return []string{ 5126 BulkPublishStatusNotStarted, 5127 BulkPublishStatusInProgress, 5128 BulkPublishStatusFailed, 5129 BulkPublishStatusSucceeded, 5130 } 5131 } 5132 5133 const ( 5134 // OperationReplace is a Operation enum value 5135 OperationReplace = "replace" 5136 5137 // OperationRemove is a Operation enum value 5138 OperationRemove = "remove" 5139 ) 5140 5141 // Operation_Values returns all elements of the Operation enum 5142 func Operation_Values() []string { 5143 return []string{ 5144 OperationReplace, 5145 OperationRemove, 5146 } 5147 } 5148 5149 const ( 5150 // PlatformApns is a Platform enum value 5151 PlatformApns = "APNS" 5152 5153 // PlatformApnsSandbox is a Platform enum value 5154 PlatformApnsSandbox = "APNS_SANDBOX" 5155 5156 // PlatformGcm is a Platform enum value 5157 PlatformGcm = "GCM" 5158 5159 // PlatformAdm is a Platform enum value 5160 PlatformAdm = "ADM" 5161 ) 5162 5163 // Platform_Values returns all elements of the Platform enum 5164 func Platform_Values() []string { 5165 return []string{ 5166 PlatformApns, 5167 PlatformApnsSandbox, 5168 PlatformGcm, 5169 PlatformAdm, 5170 } 5171 } 5172 5173 const ( 5174 // StreamingStatusEnabled is a StreamingStatus enum value 5175 StreamingStatusEnabled = "ENABLED" 5176 5177 // StreamingStatusDisabled is a StreamingStatus enum value 5178 StreamingStatusDisabled = "DISABLED" 5179 ) 5180 5181 // StreamingStatus_Values returns all elements of the StreamingStatus enum 5182 func StreamingStatus_Values() []string { 5183 return []string{ 5184 StreamingStatusEnabled, 5185 StreamingStatusDisabled, 5186 } 5187 }