// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package kinesisanalyticsv2 import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/internal/awsutil" ) type ListApplicationsInput struct { _ struct{} `type:"structure"` // The maximum number of applications to list. Limit *int64 `min:"1" type:"integer"` // If a previous command returned a pagination token, pass it into this value // to retrieve the next set of results. For more information about pagination, // see Using the AWS Command Line Interface's Pagination Options (https://docs.aws.amazon.com/cli/latest/userguide/pagination.html). NextToken *string `min:"1" type:"string"` } // String returns the string representation func (s ListApplicationsInput) String() string { return awsutil.Prettify(s) } // Validate inspects the fields of the type to determine if they are valid. func (s *ListApplicationsInput) Validate() error { invalidParams := aws.ErrInvalidParams{Context: "ListApplicationsInput"} if s.Limit != nil && *s.Limit < 1 { invalidParams.Add(aws.NewErrParamMinValue("Limit", 1)) } if s.NextToken != nil && len(*s.NextToken) < 1 { invalidParams.Add(aws.NewErrParamMinLen("NextToken", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } type ListApplicationsOutput struct { _ struct{} `type:"structure"` // A list of ApplicationSummary objects. // // ApplicationSummaries is a required field ApplicationSummaries []ApplicationSummary `type:"list" required:"true"` // The pagination token for the next set of results, or null if there are no // additional results. Pass this token into a subsequent command to retrieve // the next set of items For more information about pagination, see Using the // AWS Command Line Interface's Pagination Options (https://docs.aws.amazon.com/cli/latest/userguide/pagination.html). NextToken *string `min:"1" type:"string"` } // String returns the string representation func (s ListApplicationsOutput) String() string { return awsutil.Prettify(s) } const opListApplications = "ListApplications" // ListApplicationsRequest returns a request value for making API operation for // Amazon Kinesis Analytics. // // Returns a list of Amazon Kinesis Data Analytics applications in your account. // For each application, the response includes the application name, Amazon // Resource Name (ARN), and status. // // If you want detailed information about a specific application, use DescribeApplication. // // // Example sending a request using ListApplicationsRequest. // req := client.ListApplicationsRequest(params) // resp, err := req.Send(context.TODO()) // if err == nil { // fmt.Println(resp) // } // // Please also see https://docs.aws.amazon.com/goto/WebAPI/kinesisanalyticsv2-2018-05-23/ListApplications func (c *Client) ListApplicationsRequest(input *ListApplicationsInput) ListApplicationsRequest { op := &aws.Operation{ Name: opListApplications, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &ListApplicationsInput{} } req := c.newRequest(op, input, &ListApplicationsOutput{}) return ListApplicationsRequest{Request: req, Input: input, Copy: c.ListApplicationsRequest} } // ListApplicationsRequest is the request type for the // ListApplications API operation. type ListApplicationsRequest struct { *aws.Request Input *ListApplicationsInput Copy func(*ListApplicationsInput) ListApplicationsRequest } // Send marshals and sends the ListApplications API request. func (r ListApplicationsRequest) Send(ctx context.Context) (*ListApplicationsResponse, error) { r.Request.SetContext(ctx) err := r.Request.Send() if err != nil { return nil, err } resp := &ListApplicationsResponse{ ListApplicationsOutput: r.Request.Data.(*ListApplicationsOutput), response: &aws.Response{Request: r.Request}, } return resp, nil } // ListApplicationsResponse is the response type for the // ListApplications API operation. type ListApplicationsResponse struct { *ListApplicationsOutput response *aws.Response } // SDKResponseMetdata returns the response metadata for the // ListApplications request. func (r *ListApplicationsResponse) SDKResponseMetdata() *aws.Response { return r.response }