// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package support import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/internal/awsutil" ) type DescribeAttachmentInput struct { _ struct{} `type:"structure"` // The ID of the attachment to return. Attachment IDs are returned by the DescribeCommunications // operation. // // AttachmentId is a required field AttachmentId *string `locationName:"attachmentId" type:"string" required:"true"` } // String returns the string representation func (s DescribeAttachmentInput) String() string { return awsutil.Prettify(s) } // Validate inspects the fields of the type to determine if they are valid. func (s *DescribeAttachmentInput) Validate() error { invalidParams := aws.ErrInvalidParams{Context: "DescribeAttachmentInput"} if s.AttachmentId == nil { invalidParams.Add(aws.NewErrParamRequired("AttachmentId")) } if invalidParams.Len() > 0 { return invalidParams } return nil } // The content and file name of the attachment returned by the DescribeAttachment // operation. type DescribeAttachmentOutput struct { _ struct{} `type:"structure"` // This object includes the attachment content and file name. // // In the previous response syntax, the value for the data parameter appears // as blob, which is represented as a base64-encoded string. The value for fileName // is the name of the attachment, such as troubleshoot-screenshot.png. Attachment *Attachment `locationName:"attachment" type:"structure"` } // String returns the string representation func (s DescribeAttachmentOutput) String() string { return awsutil.Prettify(s) } const opDescribeAttachment = "DescribeAttachment" // DescribeAttachmentRequest returns a request value for making API operation for // AWS Support. // // Returns the attachment that has the specified ID. Attachments can include // screenshots, error logs, or other files that describe your issue. Attachment // IDs are generated by the case management system when you add an attachment // to a case or case communication. Attachment IDs are returned in the AttachmentDetails // objects that are returned by the DescribeCommunications operation. // // * You must have a Business or Enterprise support plan to use the AWS Support // API. // // * If you call the AWS Support API from an account that does not have a // Business or Enterprise support plan, the SubscriptionRequiredException // error message appears. For information about changing your support plan, // see AWS Support (http://aws.amazon.com/premiumsupport/). // // // Example sending a request using DescribeAttachmentRequest. // req := client.DescribeAttachmentRequest(params) // resp, err := req.Send(context.TODO()) // if err == nil { // fmt.Println(resp) // } // // Please also see https://docs.aws.amazon.com/goto/WebAPI/support-2013-04-15/DescribeAttachment func (c *Client) DescribeAttachmentRequest(input *DescribeAttachmentInput) DescribeAttachmentRequest { op := &aws.Operation{ Name: opDescribeAttachment, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DescribeAttachmentInput{} } req := c.newRequest(op, input, &DescribeAttachmentOutput{}) return DescribeAttachmentRequest{Request: req, Input: input, Copy: c.DescribeAttachmentRequest} } // DescribeAttachmentRequest is the request type for the // DescribeAttachment API operation. type DescribeAttachmentRequest struct { *aws.Request Input *DescribeAttachmentInput Copy func(*DescribeAttachmentInput) DescribeAttachmentRequest } // Send marshals and sends the DescribeAttachment API request. func (r DescribeAttachmentRequest) Send(ctx context.Context) (*DescribeAttachmentResponse, error) { r.Request.SetContext(ctx) err := r.Request.Send() if err != nil { return nil, err } resp := &DescribeAttachmentResponse{ DescribeAttachmentOutput: r.Request.Data.(*DescribeAttachmentOutput), response: &aws.Response{Request: r.Request}, } return resp, nil } // DescribeAttachmentResponse is the response type for the // DescribeAttachment API operation. type DescribeAttachmentResponse struct { *DescribeAttachmentOutput response *aws.Response } // SDKResponseMetdata returns the response metadata for the // DescribeAttachment request. func (r *DescribeAttachmentResponse) SDKResponseMetdata() *aws.Response { return r.response }