1// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. 2 3package cognitosync 4 5import ( 6 "fmt" 7 "time" 8 9 "github.com/aws/aws-sdk-go/aws" 10 "github.com/aws/aws-sdk-go/aws/awsutil" 11 "github.com/aws/aws-sdk-go/aws/request" 12 "github.com/aws/aws-sdk-go/private/protocol" 13 "github.com/aws/aws-sdk-go/private/protocol/restjson" 14) 15 16const 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 complets 21// successfuly. 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// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/BulkPublish 42func (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 Codes: 76// * ErrCodeNotAuthorizedException "NotAuthorizedException" 77// Thrown when a user is not authorized to access the requested resource. 78// 79// * ErrCodeInvalidParameterException "InvalidParameterException" 80// Thrown when a request parameter does not comply with the associated constraints. 81// 82// * ErrCodeResourceNotFoundException "ResourceNotFoundException" 83// Thrown if the resource doesn't exist. 84// 85// * ErrCodeInternalErrorException "InternalErrorException" 86// Indicates an internal service error. 87// 88// * ErrCodeDuplicateRequestException "DuplicateRequestException" 89// An exception thrown when there is an IN_PROGRESS bulk publish operation for 90// the given identity pool. 91// 92// * ErrCodeAlreadyStreamedException "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// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/BulkPublish 97func (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. 111func (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 118const 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 complets 123// successfuly. 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// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/DeleteDataset 144func (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 Codes: 178// * ErrCodeNotAuthorizedException "NotAuthorizedException" 179// Thrown when a user is not authorized to access the requested resource. 180// 181// * ErrCodeInvalidParameterException "InvalidParameterException" 182// Thrown when a request parameter does not comply with the associated constraints. 183// 184// * ErrCodeResourceNotFoundException "ResourceNotFoundException" 185// Thrown if the resource doesn't exist. 186// 187// * ErrCodeInternalErrorException "InternalErrorException" 188// Indicates an internal service error. 189// 190// * ErrCodeTooManyRequestsException "TooManyRequestsException" 191// Thrown if the request is throttled. 192// 193// * ErrCodeResourceConflictException "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// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/DeleteDataset 198func (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. 212func (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 219const 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 complets 224// successfuly. 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// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/DescribeDataset 245func (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 Codes: 279// * ErrCodeNotAuthorizedException "NotAuthorizedException" 280// Thrown when a user is not authorized to access the requested resource. 281// 282// * ErrCodeInvalidParameterException "InvalidParameterException" 283// Thrown when a request parameter does not comply with the associated constraints. 284// 285// * ErrCodeResourceNotFoundException "ResourceNotFoundException" 286// Thrown if the resource doesn't exist. 287// 288// * ErrCodeInternalErrorException "InternalErrorException" 289// Indicates an internal service error. 290// 291// * ErrCodeTooManyRequestsException "TooManyRequestsException" 292// Thrown if the request is throttled. 293// 294// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/DescribeDataset 295func (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. 309func (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 316const 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 complets 321// successfuly. 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// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/DescribeIdentityPoolUsage 342func (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 Codes: 374// * ErrCodeNotAuthorizedException "NotAuthorizedException" 375// Thrown when a user is not authorized to access the requested resource. 376// 377// * ErrCodeInvalidParameterException "InvalidParameterException" 378// Thrown when a request parameter does not comply with the associated constraints. 379// 380// * ErrCodeResourceNotFoundException "ResourceNotFoundException" 381// Thrown if the resource doesn't exist. 382// 383// * ErrCodeInternalErrorException "InternalErrorException" 384// Indicates an internal service error. 385// 386// * ErrCodeTooManyRequestsException "TooManyRequestsException" 387// Thrown if the request is throttled. 388// 389// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/DescribeIdentityPoolUsage 390func (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. 404func (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 411const 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 complets 416// successfuly. 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// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/DescribeIdentityUsage 437func (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 Codes: 469// * ErrCodeNotAuthorizedException "NotAuthorizedException" 470// Thrown when a user is not authorized to access the requested resource. 471// 472// * ErrCodeInvalidParameterException "InvalidParameterException" 473// Thrown when a request parameter does not comply with the associated constraints. 474// 475// * ErrCodeResourceNotFoundException "ResourceNotFoundException" 476// Thrown if the resource doesn't exist. 477// 478// * ErrCodeInternalErrorException "InternalErrorException" 479// Indicates an internal service error. 480// 481// * ErrCodeTooManyRequestsException "TooManyRequestsException" 482// Thrown if the request is throttled. 483// 484// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/DescribeIdentityUsage 485func (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. 499func (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 506const 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 complets 511// successfuly. 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// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/GetBulkPublishDetails 532func (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 Codes: 563// * ErrCodeNotAuthorizedException "NotAuthorizedException" 564// Thrown when a user is not authorized to access the requested resource. 565// 566// * ErrCodeInvalidParameterException "InvalidParameterException" 567// Thrown when a request parameter does not comply with the associated constraints. 568// 569// * ErrCodeResourceNotFoundException "ResourceNotFoundException" 570// Thrown if the resource doesn't exist. 571// 572// * ErrCodeInternalErrorException "InternalErrorException" 573// Indicates an internal service error. 574// 575// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/GetBulkPublishDetails 576func (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. 590func (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 597const 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 complets 602// successfuly. 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// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/GetCognitoEvents 623func (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 Codes: 655// * ErrCodeInvalidParameterException "InvalidParameterException" 656// Thrown when a request parameter does not comply with the associated constraints. 657// 658// * ErrCodeResourceNotFoundException "ResourceNotFoundException" 659// Thrown if the resource doesn't exist. 660// 661// * ErrCodeNotAuthorizedException "NotAuthorizedException" 662// Thrown when a user is not authorized to access the requested resource. 663// 664// * ErrCodeInternalErrorException "InternalErrorException" 665// Indicates an internal service error. 666// 667// * ErrCodeTooManyRequestsException "TooManyRequestsException" 668// Thrown if the request is throttled. 669// 670// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/GetCognitoEvents 671func (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. 685func (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 692const 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 complets 697// successfuly. 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// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/GetIdentityPoolConfiguration 718func (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 Codes: 749// * ErrCodeNotAuthorizedException "NotAuthorizedException" 750// Thrown when a user is not authorized to access the requested resource. 751// 752// * ErrCodeInvalidParameterException "InvalidParameterException" 753// Thrown when a request parameter does not comply with the associated constraints. 754// 755// * ErrCodeResourceNotFoundException "ResourceNotFoundException" 756// Thrown if the resource doesn't exist. 757// 758// * ErrCodeInternalErrorException "InternalErrorException" 759// Indicates an internal service error. 760// 761// * ErrCodeTooManyRequestsException "TooManyRequestsException" 762// Thrown if the request is throttled. 763// 764// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/GetIdentityPoolConfiguration 765func (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. 779func (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 786const 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 complets 791// successfuly. 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// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/ListDatasets 812func (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 Codes: 846// * ErrCodeNotAuthorizedException "NotAuthorizedException" 847// Thrown when a user is not authorized to access the requested resource. 848// 849// * ErrCodeInvalidParameterException "InvalidParameterException" 850// Thrown when a request parameter does not comply with the associated constraints. 851// 852// * ErrCodeInternalErrorException "InternalErrorException" 853// Indicates an internal service error. 854// 855// * ErrCodeTooManyRequestsException "TooManyRequestsException" 856// Thrown if the request is throttled. 857// 858// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/ListDatasets 859func (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. 873func (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 880const 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 complets 885// successfuly. 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// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/ListIdentityPoolUsage 906func (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 Codes: 938// * ErrCodeNotAuthorizedException "NotAuthorizedException" 939// Thrown when a user is not authorized to access the requested resource. 940// 941// * ErrCodeInvalidParameterException "InvalidParameterException" 942// Thrown when a request parameter does not comply with the associated constraints. 943// 944// * ErrCodeInternalErrorException "InternalErrorException" 945// Indicates an internal service error. 946// 947// * ErrCodeTooManyRequestsException "TooManyRequestsException" 948// Thrown if the request is throttled. 949// 950// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/ListIdentityPoolUsage 951func (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. 965func (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 972const 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 complets 977// successfuly. 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// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/ListRecords 998func (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 Codes: 1033// * ErrCodeInvalidParameterException "InvalidParameterException" 1034// Thrown when a request parameter does not comply with the associated constraints. 1035// 1036// * ErrCodeNotAuthorizedException "NotAuthorizedException" 1037// Thrown when a user is not authorized to access the requested resource. 1038// 1039// * ErrCodeTooManyRequestsException "TooManyRequestsException" 1040// Thrown if the request is throttled. 1041// 1042// * ErrCodeInternalErrorException "InternalErrorException" 1043// Indicates an internal service error. 1044// 1045// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/ListRecords 1046func (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. 1060func (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 1067const 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 complets 1072// successfuly. 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// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/RegisterDevice 1093func (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 Codes: 1124// * ErrCodeNotAuthorizedException "NotAuthorizedException" 1125// Thrown when a user is not authorized to access the requested resource. 1126// 1127// * ErrCodeInvalidParameterException "InvalidParameterException" 1128// Thrown when a request parameter does not comply with the associated constraints. 1129// 1130// * ErrCodeResourceNotFoundException "ResourceNotFoundException" 1131// Thrown if the resource doesn't exist. 1132// 1133// * ErrCodeInternalErrorException "InternalErrorException" 1134// Indicates an internal service error. 1135// 1136// * ErrCodeInvalidConfigurationException "InvalidConfigurationException" 1137// 1138// * ErrCodeTooManyRequestsException "TooManyRequestsException" 1139// Thrown if the request is throttled. 1140// 1141// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/RegisterDevice 1142func (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. 1156func (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 1163const 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 complets 1168// successfuly. 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// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/SetCognitoEvents 1189func (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.Remove(restjson.UnmarshalHandler) 1203 req.Handlers.Unmarshal.PushBackNamed(protocol.UnmarshalDiscardBodyHandler) 1204 return 1205} 1206 1207// SetCognitoEvents API operation for Amazon Cognito Sync. 1208// 1209// Sets the AWS Lambda function for a given event type for an identity pool. 1210// This request only updates the key/value pair specified. Other key/values 1211// pairs are not updated. To remove a key value pair, pass a empty value for 1212// the particular key. 1213// 1214// This API can only be called with developer credentials. You cannot call this 1215// API with the temporary user credentials provided by Cognito Identity. 1216// 1217// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1218// with awserr.Error's Code and Message methods to get detailed information about 1219// the error. 1220// 1221// See the AWS API reference guide for Amazon Cognito Sync's 1222// API operation SetCognitoEvents for usage and error information. 1223// 1224// Returned Error Codes: 1225// * ErrCodeInvalidParameterException "InvalidParameterException" 1226// Thrown when a request parameter does not comply with the associated constraints. 1227// 1228// * ErrCodeResourceNotFoundException "ResourceNotFoundException" 1229// Thrown if the resource doesn't exist. 1230// 1231// * ErrCodeNotAuthorizedException "NotAuthorizedException" 1232// Thrown when a user is not authorized to access the requested resource. 1233// 1234// * ErrCodeInternalErrorException "InternalErrorException" 1235// Indicates an internal service error. 1236// 1237// * ErrCodeTooManyRequestsException "TooManyRequestsException" 1238// Thrown if the request is throttled. 1239// 1240// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/SetCognitoEvents 1241func (c *CognitoSync) SetCognitoEvents(input *SetCognitoEventsInput) (*SetCognitoEventsOutput, error) { 1242 req, out := c.SetCognitoEventsRequest(input) 1243 return out, req.Send() 1244} 1245 1246// SetCognitoEventsWithContext is the same as SetCognitoEvents with the addition of 1247// the ability to pass a context and additional request options. 1248// 1249// See SetCognitoEvents for details on how to use this API operation. 1250// 1251// The context must be non-nil and will be used for request cancellation. If 1252// the context is nil a panic will occur. In the future the SDK may create 1253// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1254// for more information on using Contexts. 1255func (c *CognitoSync) SetCognitoEventsWithContext(ctx aws.Context, input *SetCognitoEventsInput, opts ...request.Option) (*SetCognitoEventsOutput, error) { 1256 req, out := c.SetCognitoEventsRequest(input) 1257 req.SetContext(ctx) 1258 req.ApplyOptions(opts...) 1259 return out, req.Send() 1260} 1261 1262const opSetIdentityPoolConfiguration = "SetIdentityPoolConfiguration" 1263 1264// SetIdentityPoolConfigurationRequest generates a "aws/request.Request" representing the 1265// client's request for the SetIdentityPoolConfiguration operation. The "output" return 1266// value will be populated with the request's response once the request complets 1267// successfuly. 1268// 1269// Use "Send" method on the returned Request to send the API call to the service. 1270// the "output" return value is not valid until after Send returns without error. 1271// 1272// See SetIdentityPoolConfiguration for more information on using the SetIdentityPoolConfiguration 1273// API call, and error handling. 1274// 1275// This method is useful when you want to inject custom logic or configuration 1276// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1277// 1278// 1279// // Example sending a request using the SetIdentityPoolConfigurationRequest method. 1280// req, resp := client.SetIdentityPoolConfigurationRequest(params) 1281// 1282// err := req.Send() 1283// if err == nil { // resp is now filled 1284// fmt.Println(resp) 1285// } 1286// 1287// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/SetIdentityPoolConfiguration 1288func (c *CognitoSync) SetIdentityPoolConfigurationRequest(input *SetIdentityPoolConfigurationInput) (req *request.Request, output *SetIdentityPoolConfigurationOutput) { 1289 op := &request.Operation{ 1290 Name: opSetIdentityPoolConfiguration, 1291 HTTPMethod: "POST", 1292 HTTPPath: "/identitypools/{IdentityPoolId}/configuration", 1293 } 1294 1295 if input == nil { 1296 input = &SetIdentityPoolConfigurationInput{} 1297 } 1298 1299 output = &SetIdentityPoolConfigurationOutput{} 1300 req = c.newRequest(op, input, output) 1301 return 1302} 1303 1304// SetIdentityPoolConfiguration API operation for Amazon Cognito Sync. 1305// 1306// Sets the necessary configuration for push sync. 1307// 1308// This API can only be called with developer credentials. You cannot call this 1309// API with the temporary user credentials provided by Cognito Identity. 1310// 1311// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1312// with awserr.Error's Code and Message methods to get detailed information about 1313// the error. 1314// 1315// See the AWS API reference guide for Amazon Cognito Sync's 1316// API operation SetIdentityPoolConfiguration for usage and error information. 1317// 1318// Returned Error Codes: 1319// * ErrCodeNotAuthorizedException "NotAuthorizedException" 1320// Thrown when a user is not authorized to access the requested resource. 1321// 1322// * ErrCodeInvalidParameterException "InvalidParameterException" 1323// Thrown when a request parameter does not comply with the associated constraints. 1324// 1325// * ErrCodeResourceNotFoundException "ResourceNotFoundException" 1326// Thrown if the resource doesn't exist. 1327// 1328// * ErrCodeInternalErrorException "InternalErrorException" 1329// Indicates an internal service error. 1330// 1331// * ErrCodeTooManyRequestsException "TooManyRequestsException" 1332// Thrown if the request is throttled. 1333// 1334// * ErrCodeConcurrentModificationException "ConcurrentModificationException" 1335// Thrown if there are parallel requests to modify a resource. 1336// 1337// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/SetIdentityPoolConfiguration 1338func (c *CognitoSync) SetIdentityPoolConfiguration(input *SetIdentityPoolConfigurationInput) (*SetIdentityPoolConfigurationOutput, error) { 1339 req, out := c.SetIdentityPoolConfigurationRequest(input) 1340 return out, req.Send() 1341} 1342 1343// SetIdentityPoolConfigurationWithContext is the same as SetIdentityPoolConfiguration with the addition of 1344// the ability to pass a context and additional request options. 1345// 1346// See SetIdentityPoolConfiguration for details on how to use this API operation. 1347// 1348// The context must be non-nil and will be used for request cancellation. If 1349// the context is nil a panic will occur. In the future the SDK may create 1350// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1351// for more information on using Contexts. 1352func (c *CognitoSync) SetIdentityPoolConfigurationWithContext(ctx aws.Context, input *SetIdentityPoolConfigurationInput, opts ...request.Option) (*SetIdentityPoolConfigurationOutput, error) { 1353 req, out := c.SetIdentityPoolConfigurationRequest(input) 1354 req.SetContext(ctx) 1355 req.ApplyOptions(opts...) 1356 return out, req.Send() 1357} 1358 1359const opSubscribeToDataset = "SubscribeToDataset" 1360 1361// SubscribeToDatasetRequest generates a "aws/request.Request" representing the 1362// client's request for the SubscribeToDataset operation. The "output" return 1363// value will be populated with the request's response once the request complets 1364// successfuly. 1365// 1366// Use "Send" method on the returned Request to send the API call to the service. 1367// the "output" return value is not valid until after Send returns without error. 1368// 1369// See SubscribeToDataset for more information on using the SubscribeToDataset 1370// API call, and error handling. 1371// 1372// This method is useful when you want to inject custom logic or configuration 1373// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1374// 1375// 1376// // Example sending a request using the SubscribeToDatasetRequest method. 1377// req, resp := client.SubscribeToDatasetRequest(params) 1378// 1379// err := req.Send() 1380// if err == nil { // resp is now filled 1381// fmt.Println(resp) 1382// } 1383// 1384// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/SubscribeToDataset 1385func (c *CognitoSync) SubscribeToDatasetRequest(input *SubscribeToDatasetInput) (req *request.Request, output *SubscribeToDatasetOutput) { 1386 op := &request.Operation{ 1387 Name: opSubscribeToDataset, 1388 HTTPMethod: "POST", 1389 HTTPPath: "/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}/subscriptions/{DeviceId}", 1390 } 1391 1392 if input == nil { 1393 input = &SubscribeToDatasetInput{} 1394 } 1395 1396 output = &SubscribeToDatasetOutput{} 1397 req = c.newRequest(op, input, output) 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 Codes: 1417// * ErrCodeNotAuthorizedException "NotAuthorizedException" 1418// Thrown when a user is not authorized to access the requested resource. 1419// 1420// * ErrCodeInvalidParameterException "InvalidParameterException" 1421// Thrown when a request parameter does not comply with the associated constraints. 1422// 1423// * ErrCodeResourceNotFoundException "ResourceNotFoundException" 1424// Thrown if the resource doesn't exist. 1425// 1426// * ErrCodeInternalErrorException "InternalErrorException" 1427// Indicates an internal service error. 1428// 1429// * ErrCodeInvalidConfigurationException "InvalidConfigurationException" 1430// 1431// * ErrCodeTooManyRequestsException "TooManyRequestsException" 1432// Thrown if the request is throttled. 1433// 1434// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/SubscribeToDataset 1435func (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. 1449func (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 1456const 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 complets 1461// successfuly. 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// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/UnsubscribeFromDataset 1482func (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 return 1496} 1497 1498// UnsubscribeFromDataset API operation for Amazon Cognito Sync. 1499// 1500// Unsubscribes from receiving notifications when a dataset is modified by another 1501// device. 1502// 1503// This API can only be called with temporary credentials provided by Cognito 1504// Identity. You cannot call this API with developer credentials. 1505// 1506// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1507// with awserr.Error's Code and Message methods to get detailed information about 1508// the error. 1509// 1510// See the AWS API reference guide for Amazon Cognito Sync's 1511// API operation UnsubscribeFromDataset for usage and error information. 1512// 1513// Returned Error Codes: 1514// * ErrCodeNotAuthorizedException "NotAuthorizedException" 1515// Thrown when a user is not authorized to access the requested resource. 1516// 1517// * ErrCodeInvalidParameterException "InvalidParameterException" 1518// Thrown when a request parameter does not comply with the associated constraints. 1519// 1520// * ErrCodeResourceNotFoundException "ResourceNotFoundException" 1521// Thrown if the resource doesn't exist. 1522// 1523// * ErrCodeInternalErrorException "InternalErrorException" 1524// Indicates an internal service error. 1525// 1526// * ErrCodeInvalidConfigurationException "InvalidConfigurationException" 1527// 1528// * ErrCodeTooManyRequestsException "TooManyRequestsException" 1529// Thrown if the request is throttled. 1530// 1531// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/UnsubscribeFromDataset 1532func (c *CognitoSync) UnsubscribeFromDataset(input *UnsubscribeFromDatasetInput) (*UnsubscribeFromDatasetOutput, error) { 1533 req, out := c.UnsubscribeFromDatasetRequest(input) 1534 return out, req.Send() 1535} 1536 1537// UnsubscribeFromDatasetWithContext is the same as UnsubscribeFromDataset with the addition of 1538// the ability to pass a context and additional request options. 1539// 1540// See UnsubscribeFromDataset for details on how to use this API operation. 1541// 1542// The context must be non-nil and will be used for request cancellation. If 1543// the context is nil a panic will occur. In the future the SDK may create 1544// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1545// for more information on using Contexts. 1546func (c *CognitoSync) UnsubscribeFromDatasetWithContext(ctx aws.Context, input *UnsubscribeFromDatasetInput, opts ...request.Option) (*UnsubscribeFromDatasetOutput, error) { 1547 req, out := c.UnsubscribeFromDatasetRequest(input) 1548 req.SetContext(ctx) 1549 req.ApplyOptions(opts...) 1550 return out, req.Send() 1551} 1552 1553const opUpdateRecords = "UpdateRecords" 1554 1555// UpdateRecordsRequest generates a "aws/request.Request" representing the 1556// client's request for the UpdateRecords operation. The "output" return 1557// value will be populated with the request's response once the request complets 1558// successfuly. 1559// 1560// Use "Send" method on the returned Request to send the API call to the service. 1561// the "output" return value is not valid until after Send returns without error. 1562// 1563// See UpdateRecords for more information on using the UpdateRecords 1564// API call, and error handling. 1565// 1566// This method is useful when you want to inject custom logic or configuration 1567// into the SDK's request lifecycle. Such as custom headers, or retry logic. 1568// 1569// 1570// // Example sending a request using the UpdateRecordsRequest method. 1571// req, resp := client.UpdateRecordsRequest(params) 1572// 1573// err := req.Send() 1574// if err == nil { // resp is now filled 1575// fmt.Println(resp) 1576// } 1577// 1578// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/UpdateRecords 1579func (c *CognitoSync) UpdateRecordsRequest(input *UpdateRecordsInput) (req *request.Request, output *UpdateRecordsOutput) { 1580 op := &request.Operation{ 1581 Name: opUpdateRecords, 1582 HTTPMethod: "POST", 1583 HTTPPath: "/identitypools/{IdentityPoolId}/identities/{IdentityId}/datasets/{DatasetName}", 1584 } 1585 1586 if input == nil { 1587 input = &UpdateRecordsInput{} 1588 } 1589 1590 output = &UpdateRecordsOutput{} 1591 req = c.newRequest(op, input, output) 1592 return 1593} 1594 1595// UpdateRecords API operation for Amazon Cognito Sync. 1596// 1597// Posts updates to records and adds and deletes records for a dataset and user. 1598// 1599// The sync count in the record patch is your last known sync count for that 1600// record. The server will reject an UpdateRecords request with a ResourceConflictException 1601// if you try to patch a record with a new value but a stale sync count. 1602// 1603// For example, if the sync count on the server is 5 for a key called highScore 1604// and you try and submit a new highScore with sync count of 4, the request 1605// will be rejected. To obtain the current sync count for a record, call ListRecords. 1606// On a successful update of the record, the response returns the new sync count 1607// for that record. You should present that sync count the next time you try 1608// to update that same record. When the record does not exist, specify the sync 1609// count as 0. 1610// 1611// This API can be called with temporary user credentials provided by Cognito 1612// Identity or with developer credentials. 1613// 1614// Returns awserr.Error for service API and SDK errors. Use runtime type assertions 1615// with awserr.Error's Code and Message methods to get detailed information about 1616// the error. 1617// 1618// See the AWS API reference guide for Amazon Cognito Sync's 1619// API operation UpdateRecords for usage and error information. 1620// 1621// Returned Error Codes: 1622// * ErrCodeInvalidParameterException "InvalidParameterException" 1623// Thrown when a request parameter does not comply with the associated constraints. 1624// 1625// * ErrCodeLimitExceededException "LimitExceededException" 1626// Thrown when the limit on the number of objects or operations has been exceeded. 1627// 1628// * ErrCodeNotAuthorizedException "NotAuthorizedException" 1629// Thrown when a user is not authorized to access the requested resource. 1630// 1631// * ErrCodeResourceNotFoundException "ResourceNotFoundException" 1632// Thrown if the resource doesn't exist. 1633// 1634// * ErrCodeResourceConflictException "ResourceConflictException" 1635// Thrown if an update can't be applied because the resource was changed by 1636// another call and this would result in a conflict. 1637// 1638// * ErrCodeInvalidLambdaFunctionOutputException "InvalidLambdaFunctionOutputException" 1639// The AWS Lambda function returned invalid output or an exception. 1640// 1641// * ErrCodeLambdaThrottledException "LambdaThrottledException" 1642// AWS Lambda throttled your account, please contact AWS Support 1643// 1644// * ErrCodeTooManyRequestsException "TooManyRequestsException" 1645// Thrown if the request is throttled. 1646// 1647// * ErrCodeInternalErrorException "InternalErrorException" 1648// Indicates an internal service error. 1649// 1650// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/UpdateRecords 1651func (c *CognitoSync) UpdateRecords(input *UpdateRecordsInput) (*UpdateRecordsOutput, error) { 1652 req, out := c.UpdateRecordsRequest(input) 1653 return out, req.Send() 1654} 1655 1656// UpdateRecordsWithContext is the same as UpdateRecords with the addition of 1657// the ability to pass a context and additional request options. 1658// 1659// See UpdateRecords for details on how to use this API operation. 1660// 1661// The context must be non-nil and will be used for request cancellation. If 1662// the context is nil a panic will occur. In the future the SDK may create 1663// sub-contexts for http.Requests. See https://golang.org/pkg/context/ 1664// for more information on using Contexts. 1665func (c *CognitoSync) UpdateRecordsWithContext(ctx aws.Context, input *UpdateRecordsInput, opts ...request.Option) (*UpdateRecordsOutput, error) { 1666 req, out := c.UpdateRecordsRequest(input) 1667 req.SetContext(ctx) 1668 req.ApplyOptions(opts...) 1669 return out, req.Send() 1670} 1671 1672// The input for the BulkPublish operation. 1673// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/BulkPublishRequest 1674type BulkPublishInput struct { 1675 _ struct{} `type:"structure"` 1676 1677 // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) 1678 // created by Amazon Cognito. GUID generation is unique within a region. 1679 // 1680 // IdentityPoolId is a required field 1681 IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"` 1682} 1683 1684// String returns the string representation 1685func (s BulkPublishInput) String() string { 1686 return awsutil.Prettify(s) 1687} 1688 1689// GoString returns the string representation 1690func (s BulkPublishInput) GoString() string { 1691 return s.String() 1692} 1693 1694// Validate inspects the fields of the type to determine if they are valid. 1695func (s *BulkPublishInput) Validate() error { 1696 invalidParams := request.ErrInvalidParams{Context: "BulkPublishInput"} 1697 if s.IdentityPoolId == nil { 1698 invalidParams.Add(request.NewErrParamRequired("IdentityPoolId")) 1699 } 1700 if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 { 1701 invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1)) 1702 } 1703 1704 if invalidParams.Len() > 0 { 1705 return invalidParams 1706 } 1707 return nil 1708} 1709 1710// SetIdentityPoolId sets the IdentityPoolId field's value. 1711func (s *BulkPublishInput) SetIdentityPoolId(v string) *BulkPublishInput { 1712 s.IdentityPoolId = &v 1713 return s 1714} 1715 1716// The output for the BulkPublish operation. 1717// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/BulkPublishResponse 1718type BulkPublishOutput struct { 1719 _ struct{} `type:"structure"` 1720 1721 // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) 1722 // created by Amazon Cognito. GUID generation is unique within a region. 1723 IdentityPoolId *string `min:"1" type:"string"` 1724} 1725 1726// String returns the string representation 1727func (s BulkPublishOutput) String() string { 1728 return awsutil.Prettify(s) 1729} 1730 1731// GoString returns the string representation 1732func (s BulkPublishOutput) GoString() string { 1733 return s.String() 1734} 1735 1736// SetIdentityPoolId sets the IdentityPoolId field's value. 1737func (s *BulkPublishOutput) SetIdentityPoolId(v string) *BulkPublishOutput { 1738 s.IdentityPoolId = &v 1739 return s 1740} 1741 1742// Configuration options for configure Cognito streams. 1743// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/CognitoStreams 1744type CognitoStreams struct { 1745 _ struct{} `type:"structure"` 1746 1747 // The ARN of the role Amazon Cognito can assume in order to publish to the 1748 // stream. This role must grant access to Amazon Cognito (cognito-sync) to invoke 1749 // PutRecord on your Cognito stream. 1750 RoleArn *string `min:"20" type:"string"` 1751 1752 // The name of the Cognito stream to receive updates. This stream must be in 1753 // the developers account and in the same region as the identity pool. 1754 StreamName *string `min:"1" type:"string"` 1755 1756 // Status of the Cognito streams. Valid values are: ENABLED - Streaming of updates 1757 // to identity pool is enabled. 1758 // 1759 // DISABLED - Streaming of updates to identity pool is disabled. Bulk publish 1760 // will also fail if StreamingStatus is DISABLED. 1761 StreamingStatus *string `type:"string" enum:"StreamingStatus"` 1762} 1763 1764// String returns the string representation 1765func (s CognitoStreams) String() string { 1766 return awsutil.Prettify(s) 1767} 1768 1769// GoString returns the string representation 1770func (s CognitoStreams) GoString() string { 1771 return s.String() 1772} 1773 1774// Validate inspects the fields of the type to determine if they are valid. 1775func (s *CognitoStreams) Validate() error { 1776 invalidParams := request.ErrInvalidParams{Context: "CognitoStreams"} 1777 if s.RoleArn != nil && len(*s.RoleArn) < 20 { 1778 invalidParams.Add(request.NewErrParamMinLen("RoleArn", 20)) 1779 } 1780 if s.StreamName != nil && len(*s.StreamName) < 1 { 1781 invalidParams.Add(request.NewErrParamMinLen("StreamName", 1)) 1782 } 1783 1784 if invalidParams.Len() > 0 { 1785 return invalidParams 1786 } 1787 return nil 1788} 1789 1790// SetRoleArn sets the RoleArn field's value. 1791func (s *CognitoStreams) SetRoleArn(v string) *CognitoStreams { 1792 s.RoleArn = &v 1793 return s 1794} 1795 1796// SetStreamName sets the StreamName field's value. 1797func (s *CognitoStreams) SetStreamName(v string) *CognitoStreams { 1798 s.StreamName = &v 1799 return s 1800} 1801 1802// SetStreamingStatus sets the StreamingStatus field's value. 1803func (s *CognitoStreams) SetStreamingStatus(v string) *CognitoStreams { 1804 s.StreamingStatus = &v 1805 return s 1806} 1807 1808// A collection of data for an identity pool. An identity pool can have multiple 1809// datasets. A dataset is per identity and can be general or associated with 1810// a particular entity in an application (like a saved game). Datasets are automatically 1811// created if they don't exist. Data is synced by dataset, and a dataset can 1812// hold up to 1MB of key-value pairs. 1813// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/Dataset 1814type Dataset struct { 1815 _ struct{} `type:"structure"` 1816 1817 // Date on which the dataset was created. 1818 CreationDate *time.Time `type:"timestamp" timestampFormat:"unix"` 1819 1820 // Total size in bytes of the records in this dataset. 1821 DataStorage *int64 `type:"long"` 1822 1823 // A string of up to 128 characters. Allowed characters are a-z, A-Z, 0-9, '_' 1824 // (underscore), '-' (dash), and '.' (dot). 1825 DatasetName *string `min:"1" type:"string"` 1826 1827 // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) 1828 // created by Amazon Cognito. GUID generation is unique within a region. 1829 IdentityId *string `min:"1" type:"string"` 1830 1831 // The device that made the last change to this dataset. 1832 LastModifiedBy *string `type:"string"` 1833 1834 // Date when the dataset was last modified. 1835 LastModifiedDate *time.Time `type:"timestamp" timestampFormat:"unix"` 1836 1837 // Number of records in this dataset. 1838 NumRecords *int64 `type:"long"` 1839} 1840 1841// String returns the string representation 1842func (s Dataset) String() string { 1843 return awsutil.Prettify(s) 1844} 1845 1846// GoString returns the string representation 1847func (s Dataset) GoString() string { 1848 return s.String() 1849} 1850 1851// SetCreationDate sets the CreationDate field's value. 1852func (s *Dataset) SetCreationDate(v time.Time) *Dataset { 1853 s.CreationDate = &v 1854 return s 1855} 1856 1857// SetDataStorage sets the DataStorage field's value. 1858func (s *Dataset) SetDataStorage(v int64) *Dataset { 1859 s.DataStorage = &v 1860 return s 1861} 1862 1863// SetDatasetName sets the DatasetName field's value. 1864func (s *Dataset) SetDatasetName(v string) *Dataset { 1865 s.DatasetName = &v 1866 return s 1867} 1868 1869// SetIdentityId sets the IdentityId field's value. 1870func (s *Dataset) SetIdentityId(v string) *Dataset { 1871 s.IdentityId = &v 1872 return s 1873} 1874 1875// SetLastModifiedBy sets the LastModifiedBy field's value. 1876func (s *Dataset) SetLastModifiedBy(v string) *Dataset { 1877 s.LastModifiedBy = &v 1878 return s 1879} 1880 1881// SetLastModifiedDate sets the LastModifiedDate field's value. 1882func (s *Dataset) SetLastModifiedDate(v time.Time) *Dataset { 1883 s.LastModifiedDate = &v 1884 return s 1885} 1886 1887// SetNumRecords sets the NumRecords field's value. 1888func (s *Dataset) SetNumRecords(v int64) *Dataset { 1889 s.NumRecords = &v 1890 return s 1891} 1892 1893// A request to delete the specific dataset. 1894// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/DeleteDatasetRequest 1895type DeleteDatasetInput struct { 1896 _ struct{} `type:"structure"` 1897 1898 // A string of up to 128 characters. Allowed characters are a-z, A-Z, 0-9, '_' 1899 // (underscore), '-' (dash), and '.' (dot). 1900 // 1901 // DatasetName is a required field 1902 DatasetName *string `location:"uri" locationName:"DatasetName" min:"1" type:"string" required:"true"` 1903 1904 // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) 1905 // created by Amazon Cognito. GUID generation is unique within a region. 1906 // 1907 // IdentityId is a required field 1908 IdentityId *string `location:"uri" locationName:"IdentityId" min:"1" type:"string" required:"true"` 1909 1910 // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) 1911 // created by Amazon Cognito. GUID generation is unique within a region. 1912 // 1913 // IdentityPoolId is a required field 1914 IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"` 1915} 1916 1917// String returns the string representation 1918func (s DeleteDatasetInput) String() string { 1919 return awsutil.Prettify(s) 1920} 1921 1922// GoString returns the string representation 1923func (s DeleteDatasetInput) GoString() string { 1924 return s.String() 1925} 1926 1927// Validate inspects the fields of the type to determine if they are valid. 1928func (s *DeleteDatasetInput) Validate() error { 1929 invalidParams := request.ErrInvalidParams{Context: "DeleteDatasetInput"} 1930 if s.DatasetName == nil { 1931 invalidParams.Add(request.NewErrParamRequired("DatasetName")) 1932 } 1933 if s.DatasetName != nil && len(*s.DatasetName) < 1 { 1934 invalidParams.Add(request.NewErrParamMinLen("DatasetName", 1)) 1935 } 1936 if s.IdentityId == nil { 1937 invalidParams.Add(request.NewErrParamRequired("IdentityId")) 1938 } 1939 if s.IdentityId != nil && len(*s.IdentityId) < 1 { 1940 invalidParams.Add(request.NewErrParamMinLen("IdentityId", 1)) 1941 } 1942 if s.IdentityPoolId == nil { 1943 invalidParams.Add(request.NewErrParamRequired("IdentityPoolId")) 1944 } 1945 if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 { 1946 invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1)) 1947 } 1948 1949 if invalidParams.Len() > 0 { 1950 return invalidParams 1951 } 1952 return nil 1953} 1954 1955// SetDatasetName sets the DatasetName field's value. 1956func (s *DeleteDatasetInput) SetDatasetName(v string) *DeleteDatasetInput { 1957 s.DatasetName = &v 1958 return s 1959} 1960 1961// SetIdentityId sets the IdentityId field's value. 1962func (s *DeleteDatasetInput) SetIdentityId(v string) *DeleteDatasetInput { 1963 s.IdentityId = &v 1964 return s 1965} 1966 1967// SetIdentityPoolId sets the IdentityPoolId field's value. 1968func (s *DeleteDatasetInput) SetIdentityPoolId(v string) *DeleteDatasetInput { 1969 s.IdentityPoolId = &v 1970 return s 1971} 1972 1973// Response to a successful DeleteDataset request. 1974// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/DeleteDatasetResponse 1975type DeleteDatasetOutput struct { 1976 _ struct{} `type:"structure"` 1977 1978 // A collection of data for an identity pool. An identity pool can have multiple 1979 // datasets. A dataset is per identity and can be general or associated with 1980 // a particular entity in an application (like a saved game). Datasets are automatically 1981 // created if they don't exist. Data is synced by dataset, and a dataset can 1982 // hold up to 1MB of key-value pairs. 1983 Dataset *Dataset `type:"structure"` 1984} 1985 1986// String returns the string representation 1987func (s DeleteDatasetOutput) String() string { 1988 return awsutil.Prettify(s) 1989} 1990 1991// GoString returns the string representation 1992func (s DeleteDatasetOutput) GoString() string { 1993 return s.String() 1994} 1995 1996// SetDataset sets the Dataset field's value. 1997func (s *DeleteDatasetOutput) SetDataset(v *Dataset) *DeleteDatasetOutput { 1998 s.Dataset = v 1999 return s 2000} 2001 2002// A request for meta data about a dataset (creation date, number of records, 2003// size) by owner and dataset name. 2004// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/DescribeDatasetRequest 2005type DescribeDatasetInput struct { 2006 _ struct{} `type:"structure"` 2007 2008 // A string of up to 128 characters. Allowed characters are a-z, A-Z, 0-9, '_' 2009 // (underscore), '-' (dash), and '.' (dot). 2010 // 2011 // DatasetName is a required field 2012 DatasetName *string `location:"uri" locationName:"DatasetName" min:"1" type:"string" required:"true"` 2013 2014 // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) 2015 // created by Amazon Cognito. GUID generation is unique within a region. 2016 // 2017 // IdentityId is a required field 2018 IdentityId *string `location:"uri" locationName:"IdentityId" min:"1" type:"string" required:"true"` 2019 2020 // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) 2021 // created by Amazon Cognito. GUID generation is unique within a region. 2022 // 2023 // IdentityPoolId is a required field 2024 IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"` 2025} 2026 2027// String returns the string representation 2028func (s DescribeDatasetInput) String() string { 2029 return awsutil.Prettify(s) 2030} 2031 2032// GoString returns the string representation 2033func (s DescribeDatasetInput) GoString() string { 2034 return s.String() 2035} 2036 2037// Validate inspects the fields of the type to determine if they are valid. 2038func (s *DescribeDatasetInput) Validate() error { 2039 invalidParams := request.ErrInvalidParams{Context: "DescribeDatasetInput"} 2040 if s.DatasetName == nil { 2041 invalidParams.Add(request.NewErrParamRequired("DatasetName")) 2042 } 2043 if s.DatasetName != nil && len(*s.DatasetName) < 1 { 2044 invalidParams.Add(request.NewErrParamMinLen("DatasetName", 1)) 2045 } 2046 if s.IdentityId == nil { 2047 invalidParams.Add(request.NewErrParamRequired("IdentityId")) 2048 } 2049 if s.IdentityId != nil && len(*s.IdentityId) < 1 { 2050 invalidParams.Add(request.NewErrParamMinLen("IdentityId", 1)) 2051 } 2052 if s.IdentityPoolId == nil { 2053 invalidParams.Add(request.NewErrParamRequired("IdentityPoolId")) 2054 } 2055 if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 { 2056 invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1)) 2057 } 2058 2059 if invalidParams.Len() > 0 { 2060 return invalidParams 2061 } 2062 return nil 2063} 2064 2065// SetDatasetName sets the DatasetName field's value. 2066func (s *DescribeDatasetInput) SetDatasetName(v string) *DescribeDatasetInput { 2067 s.DatasetName = &v 2068 return s 2069} 2070 2071// SetIdentityId sets the IdentityId field's value. 2072func (s *DescribeDatasetInput) SetIdentityId(v string) *DescribeDatasetInput { 2073 s.IdentityId = &v 2074 return s 2075} 2076 2077// SetIdentityPoolId sets the IdentityPoolId field's value. 2078func (s *DescribeDatasetInput) SetIdentityPoolId(v string) *DescribeDatasetInput { 2079 s.IdentityPoolId = &v 2080 return s 2081} 2082 2083// Response to a successful DescribeDataset request. 2084// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/DescribeDatasetResponse 2085type DescribeDatasetOutput struct { 2086 _ struct{} `type:"structure"` 2087 2088 // Meta data for a collection of data for an identity. An identity can have 2089 // multiple datasets. A dataset can be general or associated with a particular 2090 // entity in an application (like a saved game). Datasets are automatically 2091 // created if they don't exist. Data is synced by dataset, and a dataset can 2092 // hold up to 1MB of key-value pairs. 2093 Dataset *Dataset `type:"structure"` 2094} 2095 2096// String returns the string representation 2097func (s DescribeDatasetOutput) String() string { 2098 return awsutil.Prettify(s) 2099} 2100 2101// GoString returns the string representation 2102func (s DescribeDatasetOutput) GoString() string { 2103 return s.String() 2104} 2105 2106// SetDataset sets the Dataset field's value. 2107func (s *DescribeDatasetOutput) SetDataset(v *Dataset) *DescribeDatasetOutput { 2108 s.Dataset = v 2109 return s 2110} 2111 2112// A request for usage information about the identity pool. 2113// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/DescribeIdentityPoolUsageRequest 2114type DescribeIdentityPoolUsageInput struct { 2115 _ struct{} `type:"structure"` 2116 2117 // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) 2118 // created by Amazon Cognito. GUID generation is unique within a region. 2119 // 2120 // IdentityPoolId is a required field 2121 IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"` 2122} 2123 2124// String returns the string representation 2125func (s DescribeIdentityPoolUsageInput) String() string { 2126 return awsutil.Prettify(s) 2127} 2128 2129// GoString returns the string representation 2130func (s DescribeIdentityPoolUsageInput) GoString() string { 2131 return s.String() 2132} 2133 2134// Validate inspects the fields of the type to determine if they are valid. 2135func (s *DescribeIdentityPoolUsageInput) Validate() error { 2136 invalidParams := request.ErrInvalidParams{Context: "DescribeIdentityPoolUsageInput"} 2137 if s.IdentityPoolId == nil { 2138 invalidParams.Add(request.NewErrParamRequired("IdentityPoolId")) 2139 } 2140 if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 { 2141 invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1)) 2142 } 2143 2144 if invalidParams.Len() > 0 { 2145 return invalidParams 2146 } 2147 return nil 2148} 2149 2150// SetIdentityPoolId sets the IdentityPoolId field's value. 2151func (s *DescribeIdentityPoolUsageInput) SetIdentityPoolId(v string) *DescribeIdentityPoolUsageInput { 2152 s.IdentityPoolId = &v 2153 return s 2154} 2155 2156// Response to a successful DescribeIdentityPoolUsage request. 2157// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/DescribeIdentityPoolUsageResponse 2158type DescribeIdentityPoolUsageOutput struct { 2159 _ struct{} `type:"structure"` 2160 2161 // Information about the usage of the identity pool. 2162 IdentityPoolUsage *IdentityPoolUsage `type:"structure"` 2163} 2164 2165// String returns the string representation 2166func (s DescribeIdentityPoolUsageOutput) String() string { 2167 return awsutil.Prettify(s) 2168} 2169 2170// GoString returns the string representation 2171func (s DescribeIdentityPoolUsageOutput) GoString() string { 2172 return s.String() 2173} 2174 2175// SetIdentityPoolUsage sets the IdentityPoolUsage field's value. 2176func (s *DescribeIdentityPoolUsageOutput) SetIdentityPoolUsage(v *IdentityPoolUsage) *DescribeIdentityPoolUsageOutput { 2177 s.IdentityPoolUsage = v 2178 return s 2179} 2180 2181// A request for information about the usage of an identity pool. 2182// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/DescribeIdentityUsageRequest 2183type DescribeIdentityUsageInput struct { 2184 _ struct{} `type:"structure"` 2185 2186 // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) 2187 // created by Amazon Cognito. GUID generation is unique within a region. 2188 // 2189 // IdentityId is a required field 2190 IdentityId *string `location:"uri" locationName:"IdentityId" min:"1" type:"string" required:"true"` 2191 2192 // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) 2193 // created by Amazon Cognito. GUID generation is unique within a region. 2194 // 2195 // IdentityPoolId is a required field 2196 IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"` 2197} 2198 2199// String returns the string representation 2200func (s DescribeIdentityUsageInput) String() string { 2201 return awsutil.Prettify(s) 2202} 2203 2204// GoString returns the string representation 2205func (s DescribeIdentityUsageInput) GoString() string { 2206 return s.String() 2207} 2208 2209// Validate inspects the fields of the type to determine if they are valid. 2210func (s *DescribeIdentityUsageInput) Validate() error { 2211 invalidParams := request.ErrInvalidParams{Context: "DescribeIdentityUsageInput"} 2212 if s.IdentityId == nil { 2213 invalidParams.Add(request.NewErrParamRequired("IdentityId")) 2214 } 2215 if s.IdentityId != nil && len(*s.IdentityId) < 1 { 2216 invalidParams.Add(request.NewErrParamMinLen("IdentityId", 1)) 2217 } 2218 if s.IdentityPoolId == nil { 2219 invalidParams.Add(request.NewErrParamRequired("IdentityPoolId")) 2220 } 2221 if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 { 2222 invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1)) 2223 } 2224 2225 if invalidParams.Len() > 0 { 2226 return invalidParams 2227 } 2228 return nil 2229} 2230 2231// SetIdentityId sets the IdentityId field's value. 2232func (s *DescribeIdentityUsageInput) SetIdentityId(v string) *DescribeIdentityUsageInput { 2233 s.IdentityId = &v 2234 return s 2235} 2236 2237// SetIdentityPoolId sets the IdentityPoolId field's value. 2238func (s *DescribeIdentityUsageInput) SetIdentityPoolId(v string) *DescribeIdentityUsageInput { 2239 s.IdentityPoolId = &v 2240 return s 2241} 2242 2243// The response to a successful DescribeIdentityUsage request. 2244// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/DescribeIdentityUsageResponse 2245type DescribeIdentityUsageOutput struct { 2246 _ struct{} `type:"structure"` 2247 2248 // Usage information for the identity. 2249 IdentityUsage *IdentityUsage `type:"structure"` 2250} 2251 2252// String returns the string representation 2253func (s DescribeIdentityUsageOutput) String() string { 2254 return awsutil.Prettify(s) 2255} 2256 2257// GoString returns the string representation 2258func (s DescribeIdentityUsageOutput) GoString() string { 2259 return s.String() 2260} 2261 2262// SetIdentityUsage sets the IdentityUsage field's value. 2263func (s *DescribeIdentityUsageOutput) SetIdentityUsage(v *IdentityUsage) *DescribeIdentityUsageOutput { 2264 s.IdentityUsage = v 2265 return s 2266} 2267 2268// The input for the GetBulkPublishDetails operation. 2269// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/GetBulkPublishDetailsRequest 2270type GetBulkPublishDetailsInput struct { 2271 _ struct{} `type:"structure"` 2272 2273 // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) 2274 // created by Amazon Cognito. GUID generation is unique within a region. 2275 // 2276 // IdentityPoolId is a required field 2277 IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"` 2278} 2279 2280// String returns the string representation 2281func (s GetBulkPublishDetailsInput) String() string { 2282 return awsutil.Prettify(s) 2283} 2284 2285// GoString returns the string representation 2286func (s GetBulkPublishDetailsInput) GoString() string { 2287 return s.String() 2288} 2289 2290// Validate inspects the fields of the type to determine if they are valid. 2291func (s *GetBulkPublishDetailsInput) Validate() error { 2292 invalidParams := request.ErrInvalidParams{Context: "GetBulkPublishDetailsInput"} 2293 if s.IdentityPoolId == nil { 2294 invalidParams.Add(request.NewErrParamRequired("IdentityPoolId")) 2295 } 2296 if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 { 2297 invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1)) 2298 } 2299 2300 if invalidParams.Len() > 0 { 2301 return invalidParams 2302 } 2303 return nil 2304} 2305 2306// SetIdentityPoolId sets the IdentityPoolId field's value. 2307func (s *GetBulkPublishDetailsInput) SetIdentityPoolId(v string) *GetBulkPublishDetailsInput { 2308 s.IdentityPoolId = &v 2309 return s 2310} 2311 2312// The output for the GetBulkPublishDetails operation. 2313// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/GetBulkPublishDetailsResponse 2314type GetBulkPublishDetailsOutput struct { 2315 _ struct{} `type:"structure"` 2316 2317 // If BulkPublishStatus is SUCCEEDED, the time the last bulk publish operation 2318 // completed. 2319 BulkPublishCompleteTime *time.Time `type:"timestamp" timestampFormat:"unix"` 2320 2321 // The date/time at which the last bulk publish was initiated. 2322 BulkPublishStartTime *time.Time `type:"timestamp" timestampFormat:"unix"` 2323 2324 // Status of the last bulk publish operation, valid values are: NOT_STARTED 2325 // - No bulk publish has been requested for this identity pool 2326 // 2327 // IN_PROGRESS - Data is being published to the configured stream 2328 // 2329 // SUCCEEDED - All data for the identity pool has been published to the configured 2330 // stream 2331 // 2332 // FAILED - Some portion of the data has failed to publish, check FailureMessage 2333 // for the cause. 2334 BulkPublishStatus *string `type:"string" enum:"BulkPublishStatus"` 2335 2336 // If BulkPublishStatus is FAILED this field will contain the error message 2337 // that caused the bulk publish to fail. 2338 FailureMessage *string `type:"string"` 2339 2340 // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) 2341 // created by Amazon Cognito. GUID generation is unique within a region. 2342 IdentityPoolId *string `min:"1" type:"string"` 2343} 2344 2345// String returns the string representation 2346func (s GetBulkPublishDetailsOutput) String() string { 2347 return awsutil.Prettify(s) 2348} 2349 2350// GoString returns the string representation 2351func (s GetBulkPublishDetailsOutput) GoString() string { 2352 return s.String() 2353} 2354 2355// SetBulkPublishCompleteTime sets the BulkPublishCompleteTime field's value. 2356func (s *GetBulkPublishDetailsOutput) SetBulkPublishCompleteTime(v time.Time) *GetBulkPublishDetailsOutput { 2357 s.BulkPublishCompleteTime = &v 2358 return s 2359} 2360 2361// SetBulkPublishStartTime sets the BulkPublishStartTime field's value. 2362func (s *GetBulkPublishDetailsOutput) SetBulkPublishStartTime(v time.Time) *GetBulkPublishDetailsOutput { 2363 s.BulkPublishStartTime = &v 2364 return s 2365} 2366 2367// SetBulkPublishStatus sets the BulkPublishStatus field's value. 2368func (s *GetBulkPublishDetailsOutput) SetBulkPublishStatus(v string) *GetBulkPublishDetailsOutput { 2369 s.BulkPublishStatus = &v 2370 return s 2371} 2372 2373// SetFailureMessage sets the FailureMessage field's value. 2374func (s *GetBulkPublishDetailsOutput) SetFailureMessage(v string) *GetBulkPublishDetailsOutput { 2375 s.FailureMessage = &v 2376 return s 2377} 2378 2379// SetIdentityPoolId sets the IdentityPoolId field's value. 2380func (s *GetBulkPublishDetailsOutput) SetIdentityPoolId(v string) *GetBulkPublishDetailsOutput { 2381 s.IdentityPoolId = &v 2382 return s 2383} 2384 2385// A request for a list of the configured Cognito Events 2386// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/GetCognitoEventsRequest 2387type GetCognitoEventsInput struct { 2388 _ struct{} `type:"structure"` 2389 2390 // The Cognito Identity Pool ID for the request 2391 // 2392 // IdentityPoolId is a required field 2393 IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"` 2394} 2395 2396// String returns the string representation 2397func (s GetCognitoEventsInput) String() string { 2398 return awsutil.Prettify(s) 2399} 2400 2401// GoString returns the string representation 2402func (s GetCognitoEventsInput) GoString() string { 2403 return s.String() 2404} 2405 2406// Validate inspects the fields of the type to determine if they are valid. 2407func (s *GetCognitoEventsInput) Validate() error { 2408 invalidParams := request.ErrInvalidParams{Context: "GetCognitoEventsInput"} 2409 if s.IdentityPoolId == nil { 2410 invalidParams.Add(request.NewErrParamRequired("IdentityPoolId")) 2411 } 2412 if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 { 2413 invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1)) 2414 } 2415 2416 if invalidParams.Len() > 0 { 2417 return invalidParams 2418 } 2419 return nil 2420} 2421 2422// SetIdentityPoolId sets the IdentityPoolId field's value. 2423func (s *GetCognitoEventsInput) SetIdentityPoolId(v string) *GetCognitoEventsInput { 2424 s.IdentityPoolId = &v 2425 return s 2426} 2427 2428// The response from the GetCognitoEvents request 2429// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/GetCognitoEventsResponse 2430type GetCognitoEventsOutput struct { 2431 _ struct{} `type:"structure"` 2432 2433 // The Cognito Events returned from the GetCognitoEvents request 2434 Events map[string]*string `type:"map"` 2435} 2436 2437// String returns the string representation 2438func (s GetCognitoEventsOutput) String() string { 2439 return awsutil.Prettify(s) 2440} 2441 2442// GoString returns the string representation 2443func (s GetCognitoEventsOutput) GoString() string { 2444 return s.String() 2445} 2446 2447// SetEvents sets the Events field's value. 2448func (s *GetCognitoEventsOutput) SetEvents(v map[string]*string) *GetCognitoEventsOutput { 2449 s.Events = v 2450 return s 2451} 2452 2453// The input for the GetIdentityPoolConfiguration operation. 2454// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/GetIdentityPoolConfigurationRequest 2455type GetIdentityPoolConfigurationInput struct { 2456 _ struct{} `type:"structure"` 2457 2458 // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) 2459 // created by Amazon Cognito. This is the ID of the pool for which to return 2460 // a configuration. 2461 // 2462 // IdentityPoolId is a required field 2463 IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"` 2464} 2465 2466// String returns the string representation 2467func (s GetIdentityPoolConfigurationInput) String() string { 2468 return awsutil.Prettify(s) 2469} 2470 2471// GoString returns the string representation 2472func (s GetIdentityPoolConfigurationInput) GoString() string { 2473 return s.String() 2474} 2475 2476// Validate inspects the fields of the type to determine if they are valid. 2477func (s *GetIdentityPoolConfigurationInput) Validate() error { 2478 invalidParams := request.ErrInvalidParams{Context: "GetIdentityPoolConfigurationInput"} 2479 if s.IdentityPoolId == nil { 2480 invalidParams.Add(request.NewErrParamRequired("IdentityPoolId")) 2481 } 2482 if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 { 2483 invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1)) 2484 } 2485 2486 if invalidParams.Len() > 0 { 2487 return invalidParams 2488 } 2489 return nil 2490} 2491 2492// SetIdentityPoolId sets the IdentityPoolId field's value. 2493func (s *GetIdentityPoolConfigurationInput) SetIdentityPoolId(v string) *GetIdentityPoolConfigurationInput { 2494 s.IdentityPoolId = &v 2495 return s 2496} 2497 2498// The output for the GetIdentityPoolConfiguration operation. 2499// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/GetIdentityPoolConfigurationResponse 2500type GetIdentityPoolConfigurationOutput struct { 2501 _ struct{} `type:"structure"` 2502 2503 // Options to apply to this identity pool for Amazon Cognito streams. 2504 CognitoStreams *CognitoStreams `type:"structure"` 2505 2506 // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) 2507 // created by Amazon Cognito. 2508 IdentityPoolId *string `min:"1" type:"string"` 2509 2510 // Options to apply to this identity pool for push synchronization. 2511 PushSync *PushSync `type:"structure"` 2512} 2513 2514// String returns the string representation 2515func (s GetIdentityPoolConfigurationOutput) String() string { 2516 return awsutil.Prettify(s) 2517} 2518 2519// GoString returns the string representation 2520func (s GetIdentityPoolConfigurationOutput) GoString() string { 2521 return s.String() 2522} 2523 2524// SetCognitoStreams sets the CognitoStreams field's value. 2525func (s *GetIdentityPoolConfigurationOutput) SetCognitoStreams(v *CognitoStreams) *GetIdentityPoolConfigurationOutput { 2526 s.CognitoStreams = v 2527 return s 2528} 2529 2530// SetIdentityPoolId sets the IdentityPoolId field's value. 2531func (s *GetIdentityPoolConfigurationOutput) SetIdentityPoolId(v string) *GetIdentityPoolConfigurationOutput { 2532 s.IdentityPoolId = &v 2533 return s 2534} 2535 2536// SetPushSync sets the PushSync field's value. 2537func (s *GetIdentityPoolConfigurationOutput) SetPushSync(v *PushSync) *GetIdentityPoolConfigurationOutput { 2538 s.PushSync = v 2539 return s 2540} 2541 2542// Usage information for the identity pool. 2543// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/IdentityPoolUsage 2544type IdentityPoolUsage struct { 2545 _ struct{} `type:"structure"` 2546 2547 // Data storage information for the identity pool. 2548 DataStorage *int64 `type:"long"` 2549 2550 // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) 2551 // created by Amazon Cognito. GUID generation is unique within a region. 2552 IdentityPoolId *string `min:"1" type:"string"` 2553 2554 // Date on which the identity pool was last modified. 2555 LastModifiedDate *time.Time `type:"timestamp" timestampFormat:"unix"` 2556 2557 // Number of sync sessions for the identity pool. 2558 SyncSessionsCount *int64 `type:"long"` 2559} 2560 2561// String returns the string representation 2562func (s IdentityPoolUsage) String() string { 2563 return awsutil.Prettify(s) 2564} 2565 2566// GoString returns the string representation 2567func (s IdentityPoolUsage) GoString() string { 2568 return s.String() 2569} 2570 2571// SetDataStorage sets the DataStorage field's value. 2572func (s *IdentityPoolUsage) SetDataStorage(v int64) *IdentityPoolUsage { 2573 s.DataStorage = &v 2574 return s 2575} 2576 2577// SetIdentityPoolId sets the IdentityPoolId field's value. 2578func (s *IdentityPoolUsage) SetIdentityPoolId(v string) *IdentityPoolUsage { 2579 s.IdentityPoolId = &v 2580 return s 2581} 2582 2583// SetLastModifiedDate sets the LastModifiedDate field's value. 2584func (s *IdentityPoolUsage) SetLastModifiedDate(v time.Time) *IdentityPoolUsage { 2585 s.LastModifiedDate = &v 2586 return s 2587} 2588 2589// SetSyncSessionsCount sets the SyncSessionsCount field's value. 2590func (s *IdentityPoolUsage) SetSyncSessionsCount(v int64) *IdentityPoolUsage { 2591 s.SyncSessionsCount = &v 2592 return s 2593} 2594 2595// Usage information for the identity. 2596// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/IdentityUsage 2597type IdentityUsage struct { 2598 _ struct{} `type:"structure"` 2599 2600 // Total data storage for this identity. 2601 DataStorage *int64 `type:"long"` 2602 2603 // Number of datasets for the identity. 2604 DatasetCount *int64 `type:"integer"` 2605 2606 // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) 2607 // created by Amazon Cognito. GUID generation is unique within a region. 2608 IdentityId *string `min:"1" type:"string"` 2609 2610 // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) 2611 // created by Amazon Cognito. GUID generation is unique within a region. 2612 IdentityPoolId *string `min:"1" type:"string"` 2613 2614 // Date on which the identity was last modified. 2615 LastModifiedDate *time.Time `type:"timestamp" timestampFormat:"unix"` 2616} 2617 2618// String returns the string representation 2619func (s IdentityUsage) String() string { 2620 return awsutil.Prettify(s) 2621} 2622 2623// GoString returns the string representation 2624func (s IdentityUsage) GoString() string { 2625 return s.String() 2626} 2627 2628// SetDataStorage sets the DataStorage field's value. 2629func (s *IdentityUsage) SetDataStorage(v int64) *IdentityUsage { 2630 s.DataStorage = &v 2631 return s 2632} 2633 2634// SetDatasetCount sets the DatasetCount field's value. 2635func (s *IdentityUsage) SetDatasetCount(v int64) *IdentityUsage { 2636 s.DatasetCount = &v 2637 return s 2638} 2639 2640// SetIdentityId sets the IdentityId field's value. 2641func (s *IdentityUsage) SetIdentityId(v string) *IdentityUsage { 2642 s.IdentityId = &v 2643 return s 2644} 2645 2646// SetIdentityPoolId sets the IdentityPoolId field's value. 2647func (s *IdentityUsage) SetIdentityPoolId(v string) *IdentityUsage { 2648 s.IdentityPoolId = &v 2649 return s 2650} 2651 2652// SetLastModifiedDate sets the LastModifiedDate field's value. 2653func (s *IdentityUsage) SetLastModifiedDate(v time.Time) *IdentityUsage { 2654 s.LastModifiedDate = &v 2655 return s 2656} 2657 2658// Request for a list of datasets for an identity. 2659// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/ListDatasetsRequest 2660type ListDatasetsInput struct { 2661 _ struct{} `type:"structure"` 2662 2663 // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) 2664 // created by Amazon Cognito. GUID generation is unique within a region. 2665 // 2666 // IdentityId is a required field 2667 IdentityId *string `location:"uri" locationName:"IdentityId" min:"1" type:"string" required:"true"` 2668 2669 // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) 2670 // created by Amazon Cognito. GUID generation is unique within a region. 2671 // 2672 // IdentityPoolId is a required field 2673 IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"` 2674 2675 // The maximum number of results to be returned. 2676 MaxResults *int64 `location:"querystring" locationName:"maxResults" type:"integer"` 2677 2678 // A pagination token for obtaining the next page of results. 2679 NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` 2680} 2681 2682// String returns the string representation 2683func (s ListDatasetsInput) String() string { 2684 return awsutil.Prettify(s) 2685} 2686 2687// GoString returns the string representation 2688func (s ListDatasetsInput) GoString() string { 2689 return s.String() 2690} 2691 2692// Validate inspects the fields of the type to determine if they are valid. 2693func (s *ListDatasetsInput) Validate() error { 2694 invalidParams := request.ErrInvalidParams{Context: "ListDatasetsInput"} 2695 if s.IdentityId == nil { 2696 invalidParams.Add(request.NewErrParamRequired("IdentityId")) 2697 } 2698 if s.IdentityId != nil && len(*s.IdentityId) < 1 { 2699 invalidParams.Add(request.NewErrParamMinLen("IdentityId", 1)) 2700 } 2701 if s.IdentityPoolId == nil { 2702 invalidParams.Add(request.NewErrParamRequired("IdentityPoolId")) 2703 } 2704 if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 { 2705 invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1)) 2706 } 2707 2708 if invalidParams.Len() > 0 { 2709 return invalidParams 2710 } 2711 return nil 2712} 2713 2714// SetIdentityId sets the IdentityId field's value. 2715func (s *ListDatasetsInput) SetIdentityId(v string) *ListDatasetsInput { 2716 s.IdentityId = &v 2717 return s 2718} 2719 2720// SetIdentityPoolId sets the IdentityPoolId field's value. 2721func (s *ListDatasetsInput) SetIdentityPoolId(v string) *ListDatasetsInput { 2722 s.IdentityPoolId = &v 2723 return s 2724} 2725 2726// SetMaxResults sets the MaxResults field's value. 2727func (s *ListDatasetsInput) SetMaxResults(v int64) *ListDatasetsInput { 2728 s.MaxResults = &v 2729 return s 2730} 2731 2732// SetNextToken sets the NextToken field's value. 2733func (s *ListDatasetsInput) SetNextToken(v string) *ListDatasetsInput { 2734 s.NextToken = &v 2735 return s 2736} 2737 2738// Returned for a successful ListDatasets request. 2739// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/ListDatasetsResponse 2740type ListDatasetsOutput struct { 2741 _ struct{} `type:"structure"` 2742 2743 // Number of datasets returned. 2744 Count *int64 `type:"integer"` 2745 2746 // A set of datasets. 2747 Datasets []*Dataset `type:"list"` 2748 2749 // A pagination token for obtaining the next page of results. 2750 NextToken *string `type:"string"` 2751} 2752 2753// String returns the string representation 2754func (s ListDatasetsOutput) String() string { 2755 return awsutil.Prettify(s) 2756} 2757 2758// GoString returns the string representation 2759func (s ListDatasetsOutput) GoString() string { 2760 return s.String() 2761} 2762 2763// SetCount sets the Count field's value. 2764func (s *ListDatasetsOutput) SetCount(v int64) *ListDatasetsOutput { 2765 s.Count = &v 2766 return s 2767} 2768 2769// SetDatasets sets the Datasets field's value. 2770func (s *ListDatasetsOutput) SetDatasets(v []*Dataset) *ListDatasetsOutput { 2771 s.Datasets = v 2772 return s 2773} 2774 2775// SetNextToken sets the NextToken field's value. 2776func (s *ListDatasetsOutput) SetNextToken(v string) *ListDatasetsOutput { 2777 s.NextToken = &v 2778 return s 2779} 2780 2781// A request for usage information on an identity pool. 2782// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/ListIdentityPoolUsageRequest 2783type ListIdentityPoolUsageInput struct { 2784 _ struct{} `type:"structure"` 2785 2786 // The maximum number of results to be returned. 2787 MaxResults *int64 `location:"querystring" locationName:"maxResults" type:"integer"` 2788 2789 // A pagination token for obtaining the next page of results. 2790 NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` 2791} 2792 2793// String returns the string representation 2794func (s ListIdentityPoolUsageInput) String() string { 2795 return awsutil.Prettify(s) 2796} 2797 2798// GoString returns the string representation 2799func (s ListIdentityPoolUsageInput) GoString() string { 2800 return s.String() 2801} 2802 2803// SetMaxResults sets the MaxResults field's value. 2804func (s *ListIdentityPoolUsageInput) SetMaxResults(v int64) *ListIdentityPoolUsageInput { 2805 s.MaxResults = &v 2806 return s 2807} 2808 2809// SetNextToken sets the NextToken field's value. 2810func (s *ListIdentityPoolUsageInput) SetNextToken(v string) *ListIdentityPoolUsageInput { 2811 s.NextToken = &v 2812 return s 2813} 2814 2815// Returned for a successful ListIdentityPoolUsage request. 2816// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/ListIdentityPoolUsageResponse 2817type ListIdentityPoolUsageOutput struct { 2818 _ struct{} `type:"structure"` 2819 2820 // Total number of identities for the identity pool. 2821 Count *int64 `type:"integer"` 2822 2823 // Usage information for the identity pools. 2824 IdentityPoolUsages []*IdentityPoolUsage `type:"list"` 2825 2826 // The maximum number of results to be returned. 2827 MaxResults *int64 `type:"integer"` 2828 2829 // A pagination token for obtaining the next page of results. 2830 NextToken *string `type:"string"` 2831} 2832 2833// String returns the string representation 2834func (s ListIdentityPoolUsageOutput) String() string { 2835 return awsutil.Prettify(s) 2836} 2837 2838// GoString returns the string representation 2839func (s ListIdentityPoolUsageOutput) GoString() string { 2840 return s.String() 2841} 2842 2843// SetCount sets the Count field's value. 2844func (s *ListIdentityPoolUsageOutput) SetCount(v int64) *ListIdentityPoolUsageOutput { 2845 s.Count = &v 2846 return s 2847} 2848 2849// SetIdentityPoolUsages sets the IdentityPoolUsages field's value. 2850func (s *ListIdentityPoolUsageOutput) SetIdentityPoolUsages(v []*IdentityPoolUsage) *ListIdentityPoolUsageOutput { 2851 s.IdentityPoolUsages = v 2852 return s 2853} 2854 2855// SetMaxResults sets the MaxResults field's value. 2856func (s *ListIdentityPoolUsageOutput) SetMaxResults(v int64) *ListIdentityPoolUsageOutput { 2857 s.MaxResults = &v 2858 return s 2859} 2860 2861// SetNextToken sets the NextToken field's value. 2862func (s *ListIdentityPoolUsageOutput) SetNextToken(v string) *ListIdentityPoolUsageOutput { 2863 s.NextToken = &v 2864 return s 2865} 2866 2867// A request for a list of records. 2868// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/ListRecordsRequest 2869type ListRecordsInput struct { 2870 _ struct{} `type:"structure"` 2871 2872 // A string of up to 128 characters. Allowed characters are a-z, A-Z, 0-9, '_' 2873 // (underscore), '-' (dash), and '.' (dot). 2874 // 2875 // DatasetName is a required field 2876 DatasetName *string `location:"uri" locationName:"DatasetName" min:"1" type:"string" required:"true"` 2877 2878 // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) 2879 // created by Amazon Cognito. GUID generation is unique within a region. 2880 // 2881 // IdentityId is a required field 2882 IdentityId *string `location:"uri" locationName:"IdentityId" min:"1" type:"string" required:"true"` 2883 2884 // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) 2885 // created by Amazon Cognito. GUID generation is unique within a region. 2886 // 2887 // IdentityPoolId is a required field 2888 IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"` 2889 2890 // The last server sync count for this record. 2891 LastSyncCount *int64 `location:"querystring" locationName:"lastSyncCount" type:"long"` 2892 2893 // The maximum number of results to be returned. 2894 MaxResults *int64 `location:"querystring" locationName:"maxResults" type:"integer"` 2895 2896 // A pagination token for obtaining the next page of results. 2897 NextToken *string `location:"querystring" locationName:"nextToken" type:"string"` 2898 2899 // A token containing a session ID, identity ID, and expiration. 2900 SyncSessionToken *string `location:"querystring" locationName:"syncSessionToken" type:"string"` 2901} 2902 2903// String returns the string representation 2904func (s ListRecordsInput) String() string { 2905 return awsutil.Prettify(s) 2906} 2907 2908// GoString returns the string representation 2909func (s ListRecordsInput) GoString() string { 2910 return s.String() 2911} 2912 2913// Validate inspects the fields of the type to determine if they are valid. 2914func (s *ListRecordsInput) Validate() error { 2915 invalidParams := request.ErrInvalidParams{Context: "ListRecordsInput"} 2916 if s.DatasetName == nil { 2917 invalidParams.Add(request.NewErrParamRequired("DatasetName")) 2918 } 2919 if s.DatasetName != nil && len(*s.DatasetName) < 1 { 2920 invalidParams.Add(request.NewErrParamMinLen("DatasetName", 1)) 2921 } 2922 if s.IdentityId == nil { 2923 invalidParams.Add(request.NewErrParamRequired("IdentityId")) 2924 } 2925 if s.IdentityId != nil && len(*s.IdentityId) < 1 { 2926 invalidParams.Add(request.NewErrParamMinLen("IdentityId", 1)) 2927 } 2928 if s.IdentityPoolId == nil { 2929 invalidParams.Add(request.NewErrParamRequired("IdentityPoolId")) 2930 } 2931 if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 { 2932 invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1)) 2933 } 2934 2935 if invalidParams.Len() > 0 { 2936 return invalidParams 2937 } 2938 return nil 2939} 2940 2941// SetDatasetName sets the DatasetName field's value. 2942func (s *ListRecordsInput) SetDatasetName(v string) *ListRecordsInput { 2943 s.DatasetName = &v 2944 return s 2945} 2946 2947// SetIdentityId sets the IdentityId field's value. 2948func (s *ListRecordsInput) SetIdentityId(v string) *ListRecordsInput { 2949 s.IdentityId = &v 2950 return s 2951} 2952 2953// SetIdentityPoolId sets the IdentityPoolId field's value. 2954func (s *ListRecordsInput) SetIdentityPoolId(v string) *ListRecordsInput { 2955 s.IdentityPoolId = &v 2956 return s 2957} 2958 2959// SetLastSyncCount sets the LastSyncCount field's value. 2960func (s *ListRecordsInput) SetLastSyncCount(v int64) *ListRecordsInput { 2961 s.LastSyncCount = &v 2962 return s 2963} 2964 2965// SetMaxResults sets the MaxResults field's value. 2966func (s *ListRecordsInput) SetMaxResults(v int64) *ListRecordsInput { 2967 s.MaxResults = &v 2968 return s 2969} 2970 2971// SetNextToken sets the NextToken field's value. 2972func (s *ListRecordsInput) SetNextToken(v string) *ListRecordsInput { 2973 s.NextToken = &v 2974 return s 2975} 2976 2977// SetSyncSessionToken sets the SyncSessionToken field's value. 2978func (s *ListRecordsInput) SetSyncSessionToken(v string) *ListRecordsInput { 2979 s.SyncSessionToken = &v 2980 return s 2981} 2982 2983// Returned for a successful ListRecordsRequest. 2984// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/ListRecordsResponse 2985type ListRecordsOutput struct { 2986 _ struct{} `type:"structure"` 2987 2988 // Total number of records. 2989 Count *int64 `type:"integer"` 2990 2991 // A boolean value specifying whether to delete the dataset locally. 2992 DatasetDeletedAfterRequestedSyncCount *bool `type:"boolean"` 2993 2994 // Indicates whether the dataset exists. 2995 DatasetExists *bool `type:"boolean"` 2996 2997 // Server sync count for this dataset. 2998 DatasetSyncCount *int64 `type:"long"` 2999 3000 // The user/device that made the last change to this record. 3001 LastModifiedBy *string `type:"string"` 3002 3003 // Names of merged datasets. 3004 MergedDatasetNames []*string `type:"list"` 3005 3006 // A pagination token for obtaining the next page of results. 3007 NextToken *string `type:"string"` 3008 3009 // A list of all records. 3010 Records []*Record `type:"list"` 3011 3012 // A token containing a session ID, identity ID, and expiration. 3013 SyncSessionToken *string `type:"string"` 3014} 3015 3016// String returns the string representation 3017func (s ListRecordsOutput) String() string { 3018 return awsutil.Prettify(s) 3019} 3020 3021// GoString returns the string representation 3022func (s ListRecordsOutput) GoString() string { 3023 return s.String() 3024} 3025 3026// SetCount sets the Count field's value. 3027func (s *ListRecordsOutput) SetCount(v int64) *ListRecordsOutput { 3028 s.Count = &v 3029 return s 3030} 3031 3032// SetDatasetDeletedAfterRequestedSyncCount sets the DatasetDeletedAfterRequestedSyncCount field's value. 3033func (s *ListRecordsOutput) SetDatasetDeletedAfterRequestedSyncCount(v bool) *ListRecordsOutput { 3034 s.DatasetDeletedAfterRequestedSyncCount = &v 3035 return s 3036} 3037 3038// SetDatasetExists sets the DatasetExists field's value. 3039func (s *ListRecordsOutput) SetDatasetExists(v bool) *ListRecordsOutput { 3040 s.DatasetExists = &v 3041 return s 3042} 3043 3044// SetDatasetSyncCount sets the DatasetSyncCount field's value. 3045func (s *ListRecordsOutput) SetDatasetSyncCount(v int64) *ListRecordsOutput { 3046 s.DatasetSyncCount = &v 3047 return s 3048} 3049 3050// SetLastModifiedBy sets the LastModifiedBy field's value. 3051func (s *ListRecordsOutput) SetLastModifiedBy(v string) *ListRecordsOutput { 3052 s.LastModifiedBy = &v 3053 return s 3054} 3055 3056// SetMergedDatasetNames sets the MergedDatasetNames field's value. 3057func (s *ListRecordsOutput) SetMergedDatasetNames(v []*string) *ListRecordsOutput { 3058 s.MergedDatasetNames = v 3059 return s 3060} 3061 3062// SetNextToken sets the NextToken field's value. 3063func (s *ListRecordsOutput) SetNextToken(v string) *ListRecordsOutput { 3064 s.NextToken = &v 3065 return s 3066} 3067 3068// SetRecords sets the Records field's value. 3069func (s *ListRecordsOutput) SetRecords(v []*Record) *ListRecordsOutput { 3070 s.Records = v 3071 return s 3072} 3073 3074// SetSyncSessionToken sets the SyncSessionToken field's value. 3075func (s *ListRecordsOutput) SetSyncSessionToken(v string) *ListRecordsOutput { 3076 s.SyncSessionToken = &v 3077 return s 3078} 3079 3080// Configuration options to be applied to the identity pool. 3081// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/PushSync 3082type PushSync struct { 3083 _ struct{} `type:"structure"` 3084 3085 // List of SNS platform application ARNs that could be used by clients. 3086 ApplicationArns []*string `type:"list"` 3087 3088 // A role configured to allow Cognito to call SNS on behalf of the developer. 3089 RoleArn *string `min:"20" type:"string"` 3090} 3091 3092// String returns the string representation 3093func (s PushSync) String() string { 3094 return awsutil.Prettify(s) 3095} 3096 3097// GoString returns the string representation 3098func (s PushSync) GoString() string { 3099 return s.String() 3100} 3101 3102// Validate inspects the fields of the type to determine if they are valid. 3103func (s *PushSync) Validate() error { 3104 invalidParams := request.ErrInvalidParams{Context: "PushSync"} 3105 if s.RoleArn != nil && len(*s.RoleArn) < 20 { 3106 invalidParams.Add(request.NewErrParamMinLen("RoleArn", 20)) 3107 } 3108 3109 if invalidParams.Len() > 0 { 3110 return invalidParams 3111 } 3112 return nil 3113} 3114 3115// SetApplicationArns sets the ApplicationArns field's value. 3116func (s *PushSync) SetApplicationArns(v []*string) *PushSync { 3117 s.ApplicationArns = v 3118 return s 3119} 3120 3121// SetRoleArn sets the RoleArn field's value. 3122func (s *PushSync) SetRoleArn(v string) *PushSync { 3123 s.RoleArn = &v 3124 return s 3125} 3126 3127// The basic data structure of a dataset. 3128// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/Record 3129type Record struct { 3130 _ struct{} `type:"structure"` 3131 3132 // The last modified date of the client device. 3133 DeviceLastModifiedDate *time.Time `type:"timestamp" timestampFormat:"unix"` 3134 3135 // The key for the record. 3136 Key *string `min:"1" type:"string"` 3137 3138 // The user/device that made the last change to this record. 3139 LastModifiedBy *string `type:"string"` 3140 3141 // The date on which the record was last modified. 3142 LastModifiedDate *time.Time `type:"timestamp" timestampFormat:"unix"` 3143 3144 // The server sync count for this record. 3145 SyncCount *int64 `type:"long"` 3146 3147 // The value for the record. 3148 Value *string `type:"string"` 3149} 3150 3151// String returns the string representation 3152func (s Record) String() string { 3153 return awsutil.Prettify(s) 3154} 3155 3156// GoString returns the string representation 3157func (s Record) GoString() string { 3158 return s.String() 3159} 3160 3161// SetDeviceLastModifiedDate sets the DeviceLastModifiedDate field's value. 3162func (s *Record) SetDeviceLastModifiedDate(v time.Time) *Record { 3163 s.DeviceLastModifiedDate = &v 3164 return s 3165} 3166 3167// SetKey sets the Key field's value. 3168func (s *Record) SetKey(v string) *Record { 3169 s.Key = &v 3170 return s 3171} 3172 3173// SetLastModifiedBy sets the LastModifiedBy field's value. 3174func (s *Record) SetLastModifiedBy(v string) *Record { 3175 s.LastModifiedBy = &v 3176 return s 3177} 3178 3179// SetLastModifiedDate sets the LastModifiedDate field's value. 3180func (s *Record) SetLastModifiedDate(v time.Time) *Record { 3181 s.LastModifiedDate = &v 3182 return s 3183} 3184 3185// SetSyncCount sets the SyncCount field's value. 3186func (s *Record) SetSyncCount(v int64) *Record { 3187 s.SyncCount = &v 3188 return s 3189} 3190 3191// SetValue sets the Value field's value. 3192func (s *Record) SetValue(v string) *Record { 3193 s.Value = &v 3194 return s 3195} 3196 3197// An update operation for a record. 3198// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/RecordPatch 3199type RecordPatch struct { 3200 _ struct{} `type:"structure"` 3201 3202 // The last modified date of the client device. 3203 DeviceLastModifiedDate *time.Time `type:"timestamp" timestampFormat:"unix"` 3204 3205 // The key associated with the record patch. 3206 // 3207 // Key is a required field 3208 Key *string `min:"1" type:"string" required:"true"` 3209 3210 // An operation, either replace or remove. 3211 // 3212 // Op is a required field 3213 Op *string `type:"string" required:"true" enum:"Operation"` 3214 3215 // Last known server sync count for this record. Set to 0 if unknown. 3216 // 3217 // SyncCount is a required field 3218 SyncCount *int64 `type:"long" required:"true"` 3219 3220 // The value associated with the record patch. 3221 Value *string `type:"string"` 3222} 3223 3224// String returns the string representation 3225func (s RecordPatch) String() string { 3226 return awsutil.Prettify(s) 3227} 3228 3229// GoString returns the string representation 3230func (s RecordPatch) GoString() string { 3231 return s.String() 3232} 3233 3234// Validate inspects the fields of the type to determine if they are valid. 3235func (s *RecordPatch) Validate() error { 3236 invalidParams := request.ErrInvalidParams{Context: "RecordPatch"} 3237 if s.Key == nil { 3238 invalidParams.Add(request.NewErrParamRequired("Key")) 3239 } 3240 if s.Key != nil && len(*s.Key) < 1 { 3241 invalidParams.Add(request.NewErrParamMinLen("Key", 1)) 3242 } 3243 if s.Op == nil { 3244 invalidParams.Add(request.NewErrParamRequired("Op")) 3245 } 3246 if s.SyncCount == nil { 3247 invalidParams.Add(request.NewErrParamRequired("SyncCount")) 3248 } 3249 3250 if invalidParams.Len() > 0 { 3251 return invalidParams 3252 } 3253 return nil 3254} 3255 3256// SetDeviceLastModifiedDate sets the DeviceLastModifiedDate field's value. 3257func (s *RecordPatch) SetDeviceLastModifiedDate(v time.Time) *RecordPatch { 3258 s.DeviceLastModifiedDate = &v 3259 return s 3260} 3261 3262// SetKey sets the Key field's value. 3263func (s *RecordPatch) SetKey(v string) *RecordPatch { 3264 s.Key = &v 3265 return s 3266} 3267 3268// SetOp sets the Op field's value. 3269func (s *RecordPatch) SetOp(v string) *RecordPatch { 3270 s.Op = &v 3271 return s 3272} 3273 3274// SetSyncCount sets the SyncCount field's value. 3275func (s *RecordPatch) SetSyncCount(v int64) *RecordPatch { 3276 s.SyncCount = &v 3277 return s 3278} 3279 3280// SetValue sets the Value field's value. 3281func (s *RecordPatch) SetValue(v string) *RecordPatch { 3282 s.Value = &v 3283 return s 3284} 3285 3286// A request to RegisterDevice. 3287// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/RegisterDeviceRequest 3288type RegisterDeviceInput struct { 3289 _ struct{} `type:"structure"` 3290 3291 // The unique ID for this identity. 3292 // 3293 // IdentityId is a required field 3294 IdentityId *string `location:"uri" locationName:"IdentityId" min:"1" type:"string" required:"true"` 3295 3296 // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) 3297 // created by Amazon Cognito. Here, the ID of the pool that the identity belongs 3298 // to. 3299 // 3300 // IdentityPoolId is a required field 3301 IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"` 3302 3303 // The SNS platform type (e.g. GCM, SDM, APNS, APNS_SANDBOX). 3304 // 3305 // Platform is a required field 3306 Platform *string `type:"string" required:"true" enum:"Platform"` 3307 3308 // The push token. 3309 // 3310 // Token is a required field 3311 Token *string `type:"string" required:"true"` 3312} 3313 3314// String returns the string representation 3315func (s RegisterDeviceInput) String() string { 3316 return awsutil.Prettify(s) 3317} 3318 3319// GoString returns the string representation 3320func (s RegisterDeviceInput) GoString() string { 3321 return s.String() 3322} 3323 3324// Validate inspects the fields of the type to determine if they are valid. 3325func (s *RegisterDeviceInput) Validate() error { 3326 invalidParams := request.ErrInvalidParams{Context: "RegisterDeviceInput"} 3327 if s.IdentityId == nil { 3328 invalidParams.Add(request.NewErrParamRequired("IdentityId")) 3329 } 3330 if s.IdentityId != nil && len(*s.IdentityId) < 1 { 3331 invalidParams.Add(request.NewErrParamMinLen("IdentityId", 1)) 3332 } 3333 if s.IdentityPoolId == nil { 3334 invalidParams.Add(request.NewErrParamRequired("IdentityPoolId")) 3335 } 3336 if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 { 3337 invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1)) 3338 } 3339 if s.Platform == nil { 3340 invalidParams.Add(request.NewErrParamRequired("Platform")) 3341 } 3342 if s.Token == nil { 3343 invalidParams.Add(request.NewErrParamRequired("Token")) 3344 } 3345 3346 if invalidParams.Len() > 0 { 3347 return invalidParams 3348 } 3349 return nil 3350} 3351 3352// SetIdentityId sets the IdentityId field's value. 3353func (s *RegisterDeviceInput) SetIdentityId(v string) *RegisterDeviceInput { 3354 s.IdentityId = &v 3355 return s 3356} 3357 3358// SetIdentityPoolId sets the IdentityPoolId field's value. 3359func (s *RegisterDeviceInput) SetIdentityPoolId(v string) *RegisterDeviceInput { 3360 s.IdentityPoolId = &v 3361 return s 3362} 3363 3364// SetPlatform sets the Platform field's value. 3365func (s *RegisterDeviceInput) SetPlatform(v string) *RegisterDeviceInput { 3366 s.Platform = &v 3367 return s 3368} 3369 3370// SetToken sets the Token field's value. 3371func (s *RegisterDeviceInput) SetToken(v string) *RegisterDeviceInput { 3372 s.Token = &v 3373 return s 3374} 3375 3376// Response to a RegisterDevice request. 3377// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/RegisterDeviceResponse 3378type RegisterDeviceOutput struct { 3379 _ struct{} `type:"structure"` 3380 3381 // The unique ID generated for this device by Cognito. 3382 DeviceId *string `min:"1" type:"string"` 3383} 3384 3385// String returns the string representation 3386func (s RegisterDeviceOutput) String() string { 3387 return awsutil.Prettify(s) 3388} 3389 3390// GoString returns the string representation 3391func (s RegisterDeviceOutput) GoString() string { 3392 return s.String() 3393} 3394 3395// SetDeviceId sets the DeviceId field's value. 3396func (s *RegisterDeviceOutput) SetDeviceId(v string) *RegisterDeviceOutput { 3397 s.DeviceId = &v 3398 return s 3399} 3400 3401// A request to configure Cognito Events" 3402// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/SetCognitoEventsRequest 3403type SetCognitoEventsInput struct { 3404 _ struct{} `type:"structure"` 3405 3406 // The events to configure 3407 // 3408 // Events is a required field 3409 Events map[string]*string `type:"map" required:"true"` 3410 3411 // The Cognito Identity Pool to use when configuring Cognito Events 3412 // 3413 // IdentityPoolId is a required field 3414 IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"` 3415} 3416 3417// String returns the string representation 3418func (s SetCognitoEventsInput) String() string { 3419 return awsutil.Prettify(s) 3420} 3421 3422// GoString returns the string representation 3423func (s SetCognitoEventsInput) GoString() string { 3424 return s.String() 3425} 3426 3427// Validate inspects the fields of the type to determine if they are valid. 3428func (s *SetCognitoEventsInput) Validate() error { 3429 invalidParams := request.ErrInvalidParams{Context: "SetCognitoEventsInput"} 3430 if s.Events == nil { 3431 invalidParams.Add(request.NewErrParamRequired("Events")) 3432 } 3433 if s.IdentityPoolId == nil { 3434 invalidParams.Add(request.NewErrParamRequired("IdentityPoolId")) 3435 } 3436 if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 { 3437 invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1)) 3438 } 3439 3440 if invalidParams.Len() > 0 { 3441 return invalidParams 3442 } 3443 return nil 3444} 3445 3446// SetEvents sets the Events field's value. 3447func (s *SetCognitoEventsInput) SetEvents(v map[string]*string) *SetCognitoEventsInput { 3448 s.Events = v 3449 return s 3450} 3451 3452// SetIdentityPoolId sets the IdentityPoolId field's value. 3453func (s *SetCognitoEventsInput) SetIdentityPoolId(v string) *SetCognitoEventsInput { 3454 s.IdentityPoolId = &v 3455 return s 3456} 3457 3458// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/SetCognitoEventsOutput 3459type SetCognitoEventsOutput struct { 3460 _ struct{} `type:"structure"` 3461} 3462 3463// String returns the string representation 3464func (s SetCognitoEventsOutput) String() string { 3465 return awsutil.Prettify(s) 3466} 3467 3468// GoString returns the string representation 3469func (s SetCognitoEventsOutput) GoString() string { 3470 return s.String() 3471} 3472 3473// The input for the SetIdentityPoolConfiguration operation. 3474// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/SetIdentityPoolConfigurationRequest 3475type SetIdentityPoolConfigurationInput struct { 3476 _ struct{} `type:"structure"` 3477 3478 // Options to apply to this identity pool for Amazon Cognito streams. 3479 CognitoStreams *CognitoStreams `type:"structure"` 3480 3481 // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) 3482 // created by Amazon Cognito. This is the ID of the pool to modify. 3483 // 3484 // IdentityPoolId is a required field 3485 IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"` 3486 3487 // Options to apply to this identity pool for push synchronization. 3488 PushSync *PushSync `type:"structure"` 3489} 3490 3491// String returns the string representation 3492func (s SetIdentityPoolConfigurationInput) String() string { 3493 return awsutil.Prettify(s) 3494} 3495 3496// GoString returns the string representation 3497func (s SetIdentityPoolConfigurationInput) GoString() string { 3498 return s.String() 3499} 3500 3501// Validate inspects the fields of the type to determine if they are valid. 3502func (s *SetIdentityPoolConfigurationInput) Validate() error { 3503 invalidParams := request.ErrInvalidParams{Context: "SetIdentityPoolConfigurationInput"} 3504 if s.IdentityPoolId == nil { 3505 invalidParams.Add(request.NewErrParamRequired("IdentityPoolId")) 3506 } 3507 if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 { 3508 invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1)) 3509 } 3510 if s.CognitoStreams != nil { 3511 if err := s.CognitoStreams.Validate(); err != nil { 3512 invalidParams.AddNested("CognitoStreams", err.(request.ErrInvalidParams)) 3513 } 3514 } 3515 if s.PushSync != nil { 3516 if err := s.PushSync.Validate(); err != nil { 3517 invalidParams.AddNested("PushSync", err.(request.ErrInvalidParams)) 3518 } 3519 } 3520 3521 if invalidParams.Len() > 0 { 3522 return invalidParams 3523 } 3524 return nil 3525} 3526 3527// SetCognitoStreams sets the CognitoStreams field's value. 3528func (s *SetIdentityPoolConfigurationInput) SetCognitoStreams(v *CognitoStreams) *SetIdentityPoolConfigurationInput { 3529 s.CognitoStreams = v 3530 return s 3531} 3532 3533// SetIdentityPoolId sets the IdentityPoolId field's value. 3534func (s *SetIdentityPoolConfigurationInput) SetIdentityPoolId(v string) *SetIdentityPoolConfigurationInput { 3535 s.IdentityPoolId = &v 3536 return s 3537} 3538 3539// SetPushSync sets the PushSync field's value. 3540func (s *SetIdentityPoolConfigurationInput) SetPushSync(v *PushSync) *SetIdentityPoolConfigurationInput { 3541 s.PushSync = v 3542 return s 3543} 3544 3545// The output for the SetIdentityPoolConfiguration operation 3546// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/SetIdentityPoolConfigurationResponse 3547type SetIdentityPoolConfigurationOutput struct { 3548 _ struct{} `type:"structure"` 3549 3550 // Options to apply to this identity pool for Amazon Cognito streams. 3551 CognitoStreams *CognitoStreams `type:"structure"` 3552 3553 // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) 3554 // created by Amazon Cognito. 3555 IdentityPoolId *string `min:"1" type:"string"` 3556 3557 // Options to apply to this identity pool for push synchronization. 3558 PushSync *PushSync `type:"structure"` 3559} 3560 3561// String returns the string representation 3562func (s SetIdentityPoolConfigurationOutput) String() string { 3563 return awsutil.Prettify(s) 3564} 3565 3566// GoString returns the string representation 3567func (s SetIdentityPoolConfigurationOutput) GoString() string { 3568 return s.String() 3569} 3570 3571// SetCognitoStreams sets the CognitoStreams field's value. 3572func (s *SetIdentityPoolConfigurationOutput) SetCognitoStreams(v *CognitoStreams) *SetIdentityPoolConfigurationOutput { 3573 s.CognitoStreams = v 3574 return s 3575} 3576 3577// SetIdentityPoolId sets the IdentityPoolId field's value. 3578func (s *SetIdentityPoolConfigurationOutput) SetIdentityPoolId(v string) *SetIdentityPoolConfigurationOutput { 3579 s.IdentityPoolId = &v 3580 return s 3581} 3582 3583// SetPushSync sets the PushSync field's value. 3584func (s *SetIdentityPoolConfigurationOutput) SetPushSync(v *PushSync) *SetIdentityPoolConfigurationOutput { 3585 s.PushSync = v 3586 return s 3587} 3588 3589// A request to SubscribeToDatasetRequest. 3590// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/SubscribeToDatasetRequest 3591type SubscribeToDatasetInput struct { 3592 _ struct{} `type:"structure"` 3593 3594 // The name of the dataset to subcribe to. 3595 // 3596 // DatasetName is a required field 3597 DatasetName *string `location:"uri" locationName:"DatasetName" min:"1" type:"string" required:"true"` 3598 3599 // The unique ID generated for this device by Cognito. 3600 // 3601 // DeviceId is a required field 3602 DeviceId *string `location:"uri" locationName:"DeviceId" min:"1" type:"string" required:"true"` 3603 3604 // Unique ID for this identity. 3605 // 3606 // IdentityId is a required field 3607 IdentityId *string `location:"uri" locationName:"IdentityId" min:"1" type:"string" required:"true"` 3608 3609 // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) 3610 // created by Amazon Cognito. The ID of the pool to which the identity belongs. 3611 // 3612 // IdentityPoolId is a required field 3613 IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"` 3614} 3615 3616// String returns the string representation 3617func (s SubscribeToDatasetInput) String() string { 3618 return awsutil.Prettify(s) 3619} 3620 3621// GoString returns the string representation 3622func (s SubscribeToDatasetInput) GoString() string { 3623 return s.String() 3624} 3625 3626// Validate inspects the fields of the type to determine if they are valid. 3627func (s *SubscribeToDatasetInput) Validate() error { 3628 invalidParams := request.ErrInvalidParams{Context: "SubscribeToDatasetInput"} 3629 if s.DatasetName == nil { 3630 invalidParams.Add(request.NewErrParamRequired("DatasetName")) 3631 } 3632 if s.DatasetName != nil && len(*s.DatasetName) < 1 { 3633 invalidParams.Add(request.NewErrParamMinLen("DatasetName", 1)) 3634 } 3635 if s.DeviceId == nil { 3636 invalidParams.Add(request.NewErrParamRequired("DeviceId")) 3637 } 3638 if s.DeviceId != nil && len(*s.DeviceId) < 1 { 3639 invalidParams.Add(request.NewErrParamMinLen("DeviceId", 1)) 3640 } 3641 if s.IdentityId == nil { 3642 invalidParams.Add(request.NewErrParamRequired("IdentityId")) 3643 } 3644 if s.IdentityId != nil && len(*s.IdentityId) < 1 { 3645 invalidParams.Add(request.NewErrParamMinLen("IdentityId", 1)) 3646 } 3647 if s.IdentityPoolId == nil { 3648 invalidParams.Add(request.NewErrParamRequired("IdentityPoolId")) 3649 } 3650 if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 { 3651 invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1)) 3652 } 3653 3654 if invalidParams.Len() > 0 { 3655 return invalidParams 3656 } 3657 return nil 3658} 3659 3660// SetDatasetName sets the DatasetName field's value. 3661func (s *SubscribeToDatasetInput) SetDatasetName(v string) *SubscribeToDatasetInput { 3662 s.DatasetName = &v 3663 return s 3664} 3665 3666// SetDeviceId sets the DeviceId field's value. 3667func (s *SubscribeToDatasetInput) SetDeviceId(v string) *SubscribeToDatasetInput { 3668 s.DeviceId = &v 3669 return s 3670} 3671 3672// SetIdentityId sets the IdentityId field's value. 3673func (s *SubscribeToDatasetInput) SetIdentityId(v string) *SubscribeToDatasetInput { 3674 s.IdentityId = &v 3675 return s 3676} 3677 3678// SetIdentityPoolId sets the IdentityPoolId field's value. 3679func (s *SubscribeToDatasetInput) SetIdentityPoolId(v string) *SubscribeToDatasetInput { 3680 s.IdentityPoolId = &v 3681 return s 3682} 3683 3684// Response to a SubscribeToDataset request. 3685// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/SubscribeToDatasetResponse 3686type SubscribeToDatasetOutput struct { 3687 _ struct{} `type:"structure"` 3688} 3689 3690// String returns the string representation 3691func (s SubscribeToDatasetOutput) String() string { 3692 return awsutil.Prettify(s) 3693} 3694 3695// GoString returns the string representation 3696func (s SubscribeToDatasetOutput) GoString() string { 3697 return s.String() 3698} 3699 3700// A request to UnsubscribeFromDataset. 3701// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/UnsubscribeFromDatasetRequest 3702type UnsubscribeFromDatasetInput struct { 3703 _ struct{} `type:"structure"` 3704 3705 // The name of the dataset from which to unsubcribe. 3706 // 3707 // DatasetName is a required field 3708 DatasetName *string `location:"uri" locationName:"DatasetName" min:"1" type:"string" required:"true"` 3709 3710 // The unique ID generated for this device by Cognito. 3711 // 3712 // DeviceId is a required field 3713 DeviceId *string `location:"uri" locationName:"DeviceId" min:"1" type:"string" required:"true"` 3714 3715 // Unique ID for this identity. 3716 // 3717 // IdentityId is a required field 3718 IdentityId *string `location:"uri" locationName:"IdentityId" min:"1" type:"string" required:"true"` 3719 3720 // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) 3721 // created by Amazon Cognito. The ID of the pool to which this identity belongs. 3722 // 3723 // IdentityPoolId is a required field 3724 IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"` 3725} 3726 3727// String returns the string representation 3728func (s UnsubscribeFromDatasetInput) String() string { 3729 return awsutil.Prettify(s) 3730} 3731 3732// GoString returns the string representation 3733func (s UnsubscribeFromDatasetInput) GoString() string { 3734 return s.String() 3735} 3736 3737// Validate inspects the fields of the type to determine if they are valid. 3738func (s *UnsubscribeFromDatasetInput) Validate() error { 3739 invalidParams := request.ErrInvalidParams{Context: "UnsubscribeFromDatasetInput"} 3740 if s.DatasetName == nil { 3741 invalidParams.Add(request.NewErrParamRequired("DatasetName")) 3742 } 3743 if s.DatasetName != nil && len(*s.DatasetName) < 1 { 3744 invalidParams.Add(request.NewErrParamMinLen("DatasetName", 1)) 3745 } 3746 if s.DeviceId == nil { 3747 invalidParams.Add(request.NewErrParamRequired("DeviceId")) 3748 } 3749 if s.DeviceId != nil && len(*s.DeviceId) < 1 { 3750 invalidParams.Add(request.NewErrParamMinLen("DeviceId", 1)) 3751 } 3752 if s.IdentityId == nil { 3753 invalidParams.Add(request.NewErrParamRequired("IdentityId")) 3754 } 3755 if s.IdentityId != nil && len(*s.IdentityId) < 1 { 3756 invalidParams.Add(request.NewErrParamMinLen("IdentityId", 1)) 3757 } 3758 if s.IdentityPoolId == nil { 3759 invalidParams.Add(request.NewErrParamRequired("IdentityPoolId")) 3760 } 3761 if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 { 3762 invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1)) 3763 } 3764 3765 if invalidParams.Len() > 0 { 3766 return invalidParams 3767 } 3768 return nil 3769} 3770 3771// SetDatasetName sets the DatasetName field's value. 3772func (s *UnsubscribeFromDatasetInput) SetDatasetName(v string) *UnsubscribeFromDatasetInput { 3773 s.DatasetName = &v 3774 return s 3775} 3776 3777// SetDeviceId sets the DeviceId field's value. 3778func (s *UnsubscribeFromDatasetInput) SetDeviceId(v string) *UnsubscribeFromDatasetInput { 3779 s.DeviceId = &v 3780 return s 3781} 3782 3783// SetIdentityId sets the IdentityId field's value. 3784func (s *UnsubscribeFromDatasetInput) SetIdentityId(v string) *UnsubscribeFromDatasetInput { 3785 s.IdentityId = &v 3786 return s 3787} 3788 3789// SetIdentityPoolId sets the IdentityPoolId field's value. 3790func (s *UnsubscribeFromDatasetInput) SetIdentityPoolId(v string) *UnsubscribeFromDatasetInput { 3791 s.IdentityPoolId = &v 3792 return s 3793} 3794 3795// Response to an UnsubscribeFromDataset request. 3796// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/UnsubscribeFromDatasetResponse 3797type UnsubscribeFromDatasetOutput struct { 3798 _ struct{} `type:"structure"` 3799} 3800 3801// String returns the string representation 3802func (s UnsubscribeFromDatasetOutput) String() string { 3803 return awsutil.Prettify(s) 3804} 3805 3806// GoString returns the string representation 3807func (s UnsubscribeFromDatasetOutput) GoString() string { 3808 return s.String() 3809} 3810 3811// A request to post updates to records or add and delete records for a dataset 3812// and user. 3813// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/UpdateRecordsRequest 3814type UpdateRecordsInput struct { 3815 _ struct{} `type:"structure"` 3816 3817 // Intended to supply a device ID that will populate the lastModifiedBy field 3818 // referenced in other methods. The ClientContext field is not yet implemented. 3819 ClientContext *string `location:"header" locationName:"x-amz-Client-Context" type:"string"` 3820 3821 // A string of up to 128 characters. Allowed characters are a-z, A-Z, 0-9, '_' 3822 // (underscore), '-' (dash), and '.' (dot). 3823 // 3824 // DatasetName is a required field 3825 DatasetName *string `location:"uri" locationName:"DatasetName" min:"1" type:"string" required:"true"` 3826 3827 // The unique ID generated for this device by Cognito. 3828 DeviceId *string `min:"1" type:"string"` 3829 3830 // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) 3831 // created by Amazon Cognito. GUID generation is unique within a region. 3832 // 3833 // IdentityId is a required field 3834 IdentityId *string `location:"uri" locationName:"IdentityId" min:"1" type:"string" required:"true"` 3835 3836 // A name-spaced GUID (for example, us-east-1:23EC4050-6AEA-7089-A2DD-08002EXAMPLE) 3837 // created by Amazon Cognito. GUID generation is unique within a region. 3838 // 3839 // IdentityPoolId is a required field 3840 IdentityPoolId *string `location:"uri" locationName:"IdentityPoolId" min:"1" type:"string" required:"true"` 3841 3842 // A list of patch operations. 3843 RecordPatches []*RecordPatch `type:"list"` 3844 3845 // The SyncSessionToken returned by a previous call to ListRecords for this 3846 // dataset and identity. 3847 // 3848 // SyncSessionToken is a required field 3849 SyncSessionToken *string `type:"string" required:"true"` 3850} 3851 3852// String returns the string representation 3853func (s UpdateRecordsInput) String() string { 3854 return awsutil.Prettify(s) 3855} 3856 3857// GoString returns the string representation 3858func (s UpdateRecordsInput) GoString() string { 3859 return s.String() 3860} 3861 3862// Validate inspects the fields of the type to determine if they are valid. 3863func (s *UpdateRecordsInput) Validate() error { 3864 invalidParams := request.ErrInvalidParams{Context: "UpdateRecordsInput"} 3865 if s.DatasetName == nil { 3866 invalidParams.Add(request.NewErrParamRequired("DatasetName")) 3867 } 3868 if s.DatasetName != nil && len(*s.DatasetName) < 1 { 3869 invalidParams.Add(request.NewErrParamMinLen("DatasetName", 1)) 3870 } 3871 if s.DeviceId != nil && len(*s.DeviceId) < 1 { 3872 invalidParams.Add(request.NewErrParamMinLen("DeviceId", 1)) 3873 } 3874 if s.IdentityId == nil { 3875 invalidParams.Add(request.NewErrParamRequired("IdentityId")) 3876 } 3877 if s.IdentityId != nil && len(*s.IdentityId) < 1 { 3878 invalidParams.Add(request.NewErrParamMinLen("IdentityId", 1)) 3879 } 3880 if s.IdentityPoolId == nil { 3881 invalidParams.Add(request.NewErrParamRequired("IdentityPoolId")) 3882 } 3883 if s.IdentityPoolId != nil && len(*s.IdentityPoolId) < 1 { 3884 invalidParams.Add(request.NewErrParamMinLen("IdentityPoolId", 1)) 3885 } 3886 if s.SyncSessionToken == nil { 3887 invalidParams.Add(request.NewErrParamRequired("SyncSessionToken")) 3888 } 3889 if s.RecordPatches != nil { 3890 for i, v := range s.RecordPatches { 3891 if v == nil { 3892 continue 3893 } 3894 if err := v.Validate(); err != nil { 3895 invalidParams.AddNested(fmt.Sprintf("%s[%v]", "RecordPatches", i), err.(request.ErrInvalidParams)) 3896 } 3897 } 3898 } 3899 3900 if invalidParams.Len() > 0 { 3901 return invalidParams 3902 } 3903 return nil 3904} 3905 3906// SetClientContext sets the ClientContext field's value. 3907func (s *UpdateRecordsInput) SetClientContext(v string) *UpdateRecordsInput { 3908 s.ClientContext = &v 3909 return s 3910} 3911 3912// SetDatasetName sets the DatasetName field's value. 3913func (s *UpdateRecordsInput) SetDatasetName(v string) *UpdateRecordsInput { 3914 s.DatasetName = &v 3915 return s 3916} 3917 3918// SetDeviceId sets the DeviceId field's value. 3919func (s *UpdateRecordsInput) SetDeviceId(v string) *UpdateRecordsInput { 3920 s.DeviceId = &v 3921 return s 3922} 3923 3924// SetIdentityId sets the IdentityId field's value. 3925func (s *UpdateRecordsInput) SetIdentityId(v string) *UpdateRecordsInput { 3926 s.IdentityId = &v 3927 return s 3928} 3929 3930// SetIdentityPoolId sets the IdentityPoolId field's value. 3931func (s *UpdateRecordsInput) SetIdentityPoolId(v string) *UpdateRecordsInput { 3932 s.IdentityPoolId = &v 3933 return s 3934} 3935 3936// SetRecordPatches sets the RecordPatches field's value. 3937func (s *UpdateRecordsInput) SetRecordPatches(v []*RecordPatch) *UpdateRecordsInput { 3938 s.RecordPatches = v 3939 return s 3940} 3941 3942// SetSyncSessionToken sets the SyncSessionToken field's value. 3943func (s *UpdateRecordsInput) SetSyncSessionToken(v string) *UpdateRecordsInput { 3944 s.SyncSessionToken = &v 3945 return s 3946} 3947 3948// Returned for a successful UpdateRecordsRequest. 3949// Please also see https://docs.aws.amazon.com/goto/WebAPI/cognito-sync-2014-06-30/UpdateRecordsResponse 3950type UpdateRecordsOutput struct { 3951 _ struct{} `type:"structure"` 3952 3953 // A list of records that have been updated. 3954 Records []*Record `type:"list"` 3955} 3956 3957// String returns the string representation 3958func (s UpdateRecordsOutput) String() string { 3959 return awsutil.Prettify(s) 3960} 3961 3962// GoString returns the string representation 3963func (s UpdateRecordsOutput) GoString() string { 3964 return s.String() 3965} 3966 3967// SetRecords sets the Records field's value. 3968func (s *UpdateRecordsOutput) SetRecords(v []*Record) *UpdateRecordsOutput { 3969 s.Records = v 3970 return s 3971} 3972 3973const ( 3974 // BulkPublishStatusNotStarted is a BulkPublishStatus enum value 3975 BulkPublishStatusNotStarted = "NOT_STARTED" 3976 3977 // BulkPublishStatusInProgress is a BulkPublishStatus enum value 3978 BulkPublishStatusInProgress = "IN_PROGRESS" 3979 3980 // BulkPublishStatusFailed is a BulkPublishStatus enum value 3981 BulkPublishStatusFailed = "FAILED" 3982 3983 // BulkPublishStatusSucceeded is a BulkPublishStatus enum value 3984 BulkPublishStatusSucceeded = "SUCCEEDED" 3985) 3986 3987const ( 3988 // OperationReplace is a Operation enum value 3989 OperationReplace = "replace" 3990 3991 // OperationRemove is a Operation enum value 3992 OperationRemove = "remove" 3993) 3994 3995const ( 3996 // PlatformApns is a Platform enum value 3997 PlatformApns = "APNS" 3998 3999 // PlatformApnsSandbox is a Platform enum value 4000 PlatformApnsSandbox = "APNS_SANDBOX" 4001 4002 // PlatformGcm is a Platform enum value 4003 PlatformGcm = "GCM" 4004 4005 // PlatformAdm is a Platform enum value 4006 PlatformAdm = "ADM" 4007) 4008 4009const ( 4010 // StreamingStatusEnabled is a StreamingStatus enum value 4011 StreamingStatusEnabled = "ENABLED" 4012 4013 // StreamingStatusDisabled is a StreamingStatus enum value 4014 StreamingStatusDisabled = "DISABLED" 4015) 4016