// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. package snowball import ( "context" "github.com/aws/aws-sdk-go-v2/aws" "github.com/aws/aws-sdk-go-v2/internal/awsutil" ) type DescribeJobInput struct { _ struct{} `type:"structure"` // The automatically generated ID for a job, for example JID123e4567-e89b-12d3-a456-426655440000. // // JobId is a required field JobId *string `min:"39" type:"string" required:"true"` } // String returns the string representation func (s DescribeJobInput) String() string { return awsutil.Prettify(s) } // Validate inspects the fields of the type to determine if they are valid. func (s *DescribeJobInput) Validate() error { invalidParams := aws.ErrInvalidParams{Context: "DescribeJobInput"} if s.JobId == nil { invalidParams.Add(aws.NewErrParamRequired("JobId")) } if s.JobId != nil && len(*s.JobId) < 39 { invalidParams.Add(aws.NewErrParamMinLen("JobId", 39)) } if invalidParams.Len() > 0 { return invalidParams } return nil } type DescribeJobOutput struct { _ struct{} `type:"structure"` // Information about a specific job, including shipping information, job status, // and other important metadata. JobMetadata *JobMetadata `type:"structure"` // Information about a specific job part (in the case of an export job), including // shipping information, job status, and other important metadata. SubJobMetadata []JobMetadata `type:"list"` } // String returns the string representation func (s DescribeJobOutput) String() string { return awsutil.Prettify(s) } const opDescribeJob = "DescribeJob" // DescribeJobRequest returns a request value for making API operation for // Amazon Import/Export Snowball. // // Returns information about a specific job including shipping information, // job status, and other important metadata. // // // Example sending a request using DescribeJobRequest. // req := client.DescribeJobRequest(params) // resp, err := req.Send(context.TODO()) // if err == nil { // fmt.Println(resp) // } // // Please also see https://docs.aws.amazon.com/goto/WebAPI/snowball-2016-06-30/DescribeJob func (c *Client) DescribeJobRequest(input *DescribeJobInput) DescribeJobRequest { op := &aws.Operation{ Name: opDescribeJob, HTTPMethod: "POST", HTTPPath: "/", } if input == nil { input = &DescribeJobInput{} } req := c.newRequest(op, input, &DescribeJobOutput{}) return DescribeJobRequest{Request: req, Input: input, Copy: c.DescribeJobRequest} } // DescribeJobRequest is the request type for the // DescribeJob API operation. type DescribeJobRequest struct { *aws.Request Input *DescribeJobInput Copy func(*DescribeJobInput) DescribeJobRequest } // Send marshals and sends the DescribeJob API request. func (r DescribeJobRequest) Send(ctx context.Context) (*DescribeJobResponse, error) { r.Request.SetContext(ctx) err := r.Request.Send() if err != nil { return nil, err } resp := &DescribeJobResponse{ DescribeJobOutput: r.Request.Data.(*DescribeJobOutput), response: &aws.Response{Request: r.Request}, } return resp, nil } // DescribeJobResponse is the response type for the // DescribeJob API operation. type DescribeJobResponse struct { *DescribeJobOutput response *aws.Response } // SDKResponseMetdata returns the response metadata for the // DescribeJob request. func (r *DescribeJobResponse) SDKResponseMetdata() *aws.Response { return r.response }