-
Notifications
You must be signed in to change notification settings - Fork 597
/
api_op_DescribeForecastExportJob.go
163 lines (133 loc) · 5 KB
/
api_op_DescribeForecastExportJob.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT.
package forecast
import (
"context"
"time"
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/internal/awsutil"
)
// Please also see https://docs.aws.amazon.com/goto/WebAPI/forecast-2018-06-26/DescribeForecastExportJobRequest
type DescribeForecastExportJobInput struct {
_ struct{} `type:"structure"`
// The Amazon Resource Name (ARN) of the forecast export job.
//
// ForecastExportJobArn is a required field
ForecastExportJobArn *string `type:"string" required:"true"`
}
// String returns the string representation
func (s DescribeForecastExportJobInput) String() string {
return awsutil.Prettify(s)
}
// Validate inspects the fields of the type to determine if they are valid.
func (s *DescribeForecastExportJobInput) Validate() error {
invalidParams := aws.ErrInvalidParams{Context: "DescribeForecastExportJobInput"}
if s.ForecastExportJobArn == nil {
invalidParams.Add(aws.NewErrParamRequired("ForecastExportJobArn"))
}
if invalidParams.Len() > 0 {
return invalidParams
}
return nil
}
// Please also see https://docs.aws.amazon.com/goto/WebAPI/forecast-2018-06-26/DescribeForecastExportJobResponse
type DescribeForecastExportJobOutput struct {
_ struct{} `type:"structure"`
// When the forecast export job was created.
CreationTime *time.Time `type:"timestamp"`
// The path to the AWS S3 bucket where the forecast is exported.
Destination *DataDestination `type:"structure"`
// The Amazon Resource Name (ARN) of the exported forecast.
ForecastArn *string `type:"string"`
// The ARN of the forecast export job.
ForecastExportJobArn *string `type:"string"`
// The name of the forecast export job.
ForecastExportJobName *string `min:"1" type:"string"`
// When the last successful export job finished.
LastModificationTime *time.Time `type:"timestamp"`
// If an error occurred, an informational message about the error.
Message *string `type:"string"`
// The status of the forecast export job. One of the following states:
//
// * ACTIVE
//
// * CREATE_PENDING, CREATE_IN_PROGRESS, CREATE_FAILED
//
// * DELETE_PENDING, DELETE_IN_PROGRESS, DELETE_FAILED
//
// The Status of the forecast export job must be ACTIVE before you can access
// the forecast in your Amazon S3 bucket.
Status *string `type:"string"`
}
// String returns the string representation
func (s DescribeForecastExportJobOutput) String() string {
return awsutil.Prettify(s)
}
const opDescribeForecastExportJob = "DescribeForecastExportJob"
// DescribeForecastExportJobRequest returns a request value for making API operation for
// Amazon Forecast Service.
//
// Describes a forecast export job created using the CreateForecastExportJob
// operation.
//
// In addition to listing the properties provided by the user in the CreateForecastExportJob
// request, this operation includes the following properties:
//
// * CreationTime
//
// * LastModificationTime
//
// * Status
//
// * Message - If an error occurred, information about the error.
//
// // Example sending a request using DescribeForecastExportJobRequest.
// req := client.DescribeForecastExportJobRequest(params)
// resp, err := req.Send(context.TODO())
// if err == nil {
// fmt.Println(resp)
// }
//
// Please also see https://docs.aws.amazon.com/goto/WebAPI/forecast-2018-06-26/DescribeForecastExportJob
func (c *Client) DescribeForecastExportJobRequest(input *DescribeForecastExportJobInput) DescribeForecastExportJobRequest {
op := &aws.Operation{
Name: opDescribeForecastExportJob,
HTTPMethod: "POST",
HTTPPath: "/",
}
if input == nil {
input = &DescribeForecastExportJobInput{}
}
req := c.newRequest(op, input, &DescribeForecastExportJobOutput{})
return DescribeForecastExportJobRequest{Request: req, Input: input, Copy: c.DescribeForecastExportJobRequest}
}
// DescribeForecastExportJobRequest is the request type for the
// DescribeForecastExportJob API operation.
type DescribeForecastExportJobRequest struct {
*aws.Request
Input *DescribeForecastExportJobInput
Copy func(*DescribeForecastExportJobInput) DescribeForecastExportJobRequest
}
// Send marshals and sends the DescribeForecastExportJob API request.
func (r DescribeForecastExportJobRequest) Send(ctx context.Context) (*DescribeForecastExportJobResponse, error) {
r.Request.SetContext(ctx)
err := r.Request.Send()
if err != nil {
return nil, err
}
resp := &DescribeForecastExportJobResponse{
DescribeForecastExportJobOutput: r.Request.Data.(*DescribeForecastExportJobOutput),
response: &aws.Response{Request: r.Request},
}
return resp, nil
}
// DescribeForecastExportJobResponse is the response type for the
// DescribeForecastExportJob API operation.
type DescribeForecastExportJobResponse struct {
*DescribeForecastExportJobOutput
response *aws.Response
}
// SDKResponseMetdata returns the response metadata for the
// DescribeForecastExportJob request.
func (r *DescribeForecastExportJobResponse) SDKResponseMetdata() *aws.Response {
return r.response
}