// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package applicationinsights import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/internal/awsutil" ) type DeleteApplicationInput struct { _ struct{} `type:"structure"` // The name of the resource group. // // ResourceGroupName is a required field ResourceGroupName *string `min:"1" type:"string" required:"true"` } // String returns the string representation func (s DeleteApplicationInput) String() string { return awsutil.Prettify(s) } // Validate inspects the fields of the type to determine if they are valid. func (s *DeleteApplicationInput) Validate() error { invalidParams := aws.ErrInvalidParams{Context: "DeleteApplicationInput"} if s.ResourceGroupName == nil { invalidParams.Add(aws.NewErrParamRequired("ResourceGroupName")) } if s.ResourceGroupName != nil && len(*s.ResourceGroupName) < 1 { invalidParams.Add(aws.NewErrParamMinLen("ResourceGroupName", 1)) } if invalidParams.Len() > 0 { return invalidParams } return nil } type DeleteApplicationOutput struct { _ struct{} `type:"structure"` } // String returns the string representation func (s DeleteApplicationOutput) String() string { return awsutil.Prettify(s) } const opDeleteApplication = "DeleteApplication" // DeleteApplicationRequest returns a request value for making API operation for // Amazon CloudWatch Application Insights. // // Removes the specified application from monitoring. Does not delete the application. // // // Example sending a request using DeleteApplicationRequest. // req := client.DeleteApplicationRequest(params) // resp, err := req.Send(context.TODO()) // if err == nil { // fmt.Println(resp) // } // // Please also see https://docs.aws.amazon.com/goto/WebAPI/application-insights-2018-11-25/DeleteApplication func (c *Client) DeleteApplicationRequest(input *DeleteApplicationInput) DeleteApplicationRequest { op := &aws.Operation{ Name: opDeleteApplication, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DeleteApplicationInput{} } req := c.newRequest(op, input, &DeleteApplicationOutput{}) return DeleteApplicationRequest{Request: req, Input: input, Copy: c.DeleteApplicationRequest} } // DeleteApplicationRequest is the request type for the // DeleteApplication API operation. type DeleteApplicationRequest struct { *aws.Request Input *DeleteApplicationInput Copy func(*DeleteApplicationInput) DeleteApplicationRequest } // Send marshals and sends the DeleteApplication API request. func (r DeleteApplicationRequest) Send(ctx context.Context) (*DeleteApplicationResponse, error) { r.Request.SetContext(ctx) err := r.Request.Send() if err != nil { return nil, err } resp := &DeleteApplicationResponse{ DeleteApplicationOutput: r.Request.Data.(*DeleteApplicationOutput), response: &aws.Response{Request: r.Request}, } return resp, nil } // DeleteApplicationResponse is the response type for the // DeleteApplication API operation. type DeleteApplicationResponse struct { *DeleteApplicationOutput response *aws.Response } // SDKResponseMetdata returns the response metadata for the // DeleteApplication request. func (r *DeleteApplicationResponse) SDKResponseMetdata() *aws.Response { return r.response }