| 1 |
// Code generated by private/model/cli/gen-api/main.go. DO NOT EDIT. |
| 2 |
|
| 3 |
package kinesisvideoarchivedmedia |
| 4 |
|
| 5 |
import ( |
| 6 |
"fmt" |
| 7 |
"io" |
| 8 |
"time" |
| 9 |
|
| 10 |
"github.com/aws/aws-sdk-go/aws" |
| 11 |
"github.com/aws/aws-sdk-go/aws/awsutil" |
| 12 |
"github.com/aws/aws-sdk-go/aws/request" |
| 13 |
"github.com/aws/aws-sdk-go/private/protocol" |
| 14 |
) |
| 15 |
|
| 16 |
const opGetClip = "GetClip" |
| 17 |
|
| 18 |
// GetClipRequest generates a "aws/request.Request" representing the |
| 19 |
// client's request for the GetClip operation. The "output" return |
| 20 |
// value will be populated with the request's response once the request completes |
| 21 |
// successfully. |
| 22 |
// |
| 23 |
// Use "Send" method on the returned Request to send the API call to the service. |
| 24 |
// the "output" return value is not valid until after Send returns without error. |
| 25 |
// |
| 26 |
// See GetClip for more information on using the GetClip |
| 27 |
// API call, and error handling. |
| 28 |
// |
| 29 |
// This method is useful when you want to inject custom logic or configuration |
| 30 |
// into the SDK's request lifecycle. Such as custom headers, or retry logic. |
| 31 |
// |
| 32 |
// // Example sending a request using the GetClipRequest method. |
| 33 |
// req, resp := client.GetClipRequest(params) |
| 34 |
// |
| 35 |
// err := req.Send() |
| 36 |
// if err == nil { // resp is now filled |
| 37 |
// fmt.Println(resp) |
| 38 |
// } |
| 39 |
// |
| 40 |
// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-video-archived-media-2017-09-30/GetClip |
| 41 |
func (c *KinesisVideoArchivedMedia) GetClipRequest(input *GetClipInput) (req *request.Request, output *GetClipOutput) { |
| 42 |
op := &request.Operation{ |
| 43 |
Name: opGetClip, |
| 44 |
HTTPMethod: "POST", |
| 45 |
HTTPPath: "/getClip", |
| 46 |
} |
| 47 |
|
| 48 |
if input == nil { |
| 49 |
input = &GetClipInput{} |
| 50 |
} |
| 51 |
|
| 52 |
output = &GetClipOutput{} |
| 53 |
req = c.newRequest(op, input, output) |
| 54 |
return |
| 55 |
} |
| 56 |
|
| 57 |
// GetClip API operation for Amazon Kinesis Video Streams Archived Media. |
| 58 |
// |
| 59 |
// Downloads an MP4 file (clip) containing the archived, on-demand media from |
| 60 |
// the specified video stream over the specified time range. |
| 61 |
// |
| 62 |
// Both the StreamName and the StreamARN parameters are optional, but you must |
| 63 |
// specify either the StreamName or the StreamARN when invoking this API operation. |
| 64 |
// |
| 65 |
// As a prerequisite to using GetCLip API, you must obtain an endpoint using |
| 66 |
// GetDataEndpoint, specifying GET_CLIP for the APIName parameter. |
| 67 |
// |
| 68 |
// An Amazon Kinesis video stream has the following requirements for providing |
| 69 |
// data through MP4: |
| 70 |
// |
| 71 |
// - The media must contain h.264 or h.265 encoded video and, optionally, |
| 72 |
// AAC or G.711 encoded audio. Specifically, the codec ID of track 1 should |
| 73 |
// be V_MPEG/ISO/AVC (for h.264) or V_MPEGH/ISO/HEVC (for H.265). Optionally, |
| 74 |
// the codec ID of track 2 should be A_AAC (for AAC) or A_MS/ACM (for G.711). |
| 75 |
// |
| 76 |
// - Data retention must be greater than 0. |
| 77 |
// |
| 78 |
// - The video track of each fragment must contain codec private data in |
| 79 |
// the Advanced Video Coding (AVC) for H.264 format and HEVC for H.265 format. |
| 80 |
// For more information, see MPEG-4 specification ISO/IEC 14496-15 (https://www.iso.org/standard/55980.html). |
| 81 |
// For information about adapting stream data to a given format, see NAL |
| 82 |
// Adaptation Flags (http://docs.aws.amazon.com/kinesisvideostreams/latest/dg/producer-reference-nal.html). |
| 83 |
// |
| 84 |
// - The audio track (if present) of each fragment must contain codec private |
| 85 |
// data in the AAC format (AAC specification ISO/IEC 13818-7 (https://www.iso.org/standard/43345.html)) |
| 86 |
// or the MS Wave format (http://www-mmsp.ece.mcgill.ca/Documents/AudioFormats/WAVE/WAVE.html). |
| 87 |
// |
| 88 |
// You can monitor the amount of outgoing data by monitoring the GetClip.OutgoingBytes |
| 89 |
// Amazon CloudWatch metric. For information about using CloudWatch to monitor |
| 90 |
// Kinesis Video Streams, see Monitoring Kinesis Video Streams (http://docs.aws.amazon.com/kinesisvideostreams/latest/dg/monitoring.html). |
| 91 |
// For pricing information, see Amazon Kinesis Video Streams Pricing (https://aws.amazon.com/kinesis/video-streams/pricing/) |
| 92 |
// and Amazon Web Services Pricing (https://aws.amazon.com/pricing/). Charges |
| 93 |
// for outgoing Amazon Web Services data apply. |
| 94 |
// |
| 95 |
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions |
| 96 |
// with awserr.Error's Code and Message methods to get detailed information about |
| 97 |
// the error. |
| 98 |
// |
| 99 |
// See the AWS API reference guide for Amazon Kinesis Video Streams Archived Media's |
| 100 |
// API operation GetClip for usage and error information. |
| 101 |
// |
| 102 |
// Returned Error Types: |
| 103 |
// |
| 104 |
// - ResourceNotFoundException |
| 105 |
// GetImages will throw this error when Kinesis Video Streams can't find the |
| 106 |
// stream that you specified. |
| 107 |
// |
| 108 |
// GetHLSStreamingSessionURL and GetDASHStreamingSessionURL throw this error |
| 109 |
// if a session with a PlaybackMode of ON_DEMAND or LIVE_REPLAYis requested |
| 110 |
// for a stream that has no fragments within the requested time range, or if |
| 111 |
// a session with a PlaybackMode of LIVE is requested for a stream that has |
| 112 |
// no fragments within the last 30 seconds. |
| 113 |
// |
| 114 |
// - InvalidArgumentException |
| 115 |
// A specified parameter exceeds its restrictions, is not supported, or can't |
| 116 |
// be used. |
| 117 |
// |
| 118 |
// - ClientLimitExceededException |
| 119 |
// Kinesis Video Streams has throttled the request because you have exceeded |
| 120 |
// a limit. Try making the call later. For information about limits, see Kinesis |
| 121 |
// Video Streams Limits (http://docs.aws.amazon.com/kinesisvideostreams/latest/dg/limits.html). |
| 122 |
// |
| 123 |
// - NotAuthorizedException |
| 124 |
// Status Code: 403, The caller is not authorized to perform an operation on |
| 125 |
// the given stream, or the token has expired. |
| 126 |
// |
| 127 |
// - UnsupportedStreamMediaTypeException |
| 128 |
// The type of the media (for example, h.264 or h.265 video or ACC or G.711 |
| 129 |
// audio) could not be determined from the codec IDs of the tracks in the first |
| 130 |
// fragment for a playback session. The codec ID for track 1 should be V_MPEG/ISO/AVC |
| 131 |
// and, optionally, the codec ID for track 2 should be A_AAC. |
| 132 |
// |
| 133 |
// - MissingCodecPrivateDataException |
| 134 |
// No codec private data was found in at least one of tracks of the video stream. |
| 135 |
// |
| 136 |
// - InvalidCodecPrivateDataException |
| 137 |
// The codec private data in at least one of the tracks of the video stream |
| 138 |
// is not valid for this operation. |
| 139 |
// |
| 140 |
// - InvalidMediaFrameException |
| 141 |
// One or more frames in the requested clip could not be parsed based on the |
| 142 |
// specified codec. |
| 143 |
// |
| 144 |
// - NoDataRetentionException |
| 145 |
// A streaming session was requested for a stream that does not retain data |
| 146 |
// (that is, has a DataRetentionInHours of 0). |
| 147 |
// |
| 148 |
// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-video-archived-media-2017-09-30/GetClip |
| 149 |
func (c *KinesisVideoArchivedMedia) GetClip(input *GetClipInput) (*GetClipOutput, error) { |
| 150 |
req, out := c.GetClipRequest(input) |
| 151 |
return out, req.Send() |
| 152 |
} |
| 153 |
|
| 154 |
// GetClipWithContext is the same as GetClip with the addition of |
| 155 |
// the ability to pass a context and additional request options. |
| 156 |
// |
| 157 |
// See GetClip for details on how to use this API operation. |
| 158 |
// |
| 159 |
// The context must be non-nil and will be used for request cancellation. If |
| 160 |
// the context is nil a panic will occur. In the future the SDK may create |
| 161 |
// sub-contexts for http.Requests. See https://golang.org/pkg/context/ |
| 162 |
// for more information on using Contexts. |
| 163 |
func (c *KinesisVideoArchivedMedia) GetClipWithContext(ctx aws.Context, input *GetClipInput, opts ...request.Option) (*GetClipOutput, error) { |
| 164 |
req, out := c.GetClipRequest(input) |
| 165 |
req.SetContext(ctx) |
| 166 |
req.ApplyOptions(opts...) |
| 167 |
return out, req.Send() |
| 168 |
} |
| 169 |
|
| 170 |
const opGetDASHStreamingSessionURL = "GetDASHStreamingSessionURL" |
| 171 |
|
| 172 |
// GetDASHStreamingSessionURLRequest generates a "aws/request.Request" representing the |
| 173 |
// client's request for the GetDASHStreamingSessionURL operation. The "output" return |
| 174 |
// value will be populated with the request's response once the request completes |
| 175 |
// successfully. |
| 176 |
// |
| 177 |
// Use "Send" method on the returned Request to send the API call to the service. |
| 178 |
// the "output" return value is not valid until after Send returns without error. |
| 179 |
// |
| 180 |
// See GetDASHStreamingSessionURL for more information on using the GetDASHStreamingSessionURL |
| 181 |
// API call, and error handling. |
| 182 |
// |
| 183 |
// This method is useful when you want to inject custom logic or configuration |
| 184 |
// into the SDK's request lifecycle. Such as custom headers, or retry logic. |
| 185 |
// |
| 186 |
// // Example sending a request using the GetDASHStreamingSessionURLRequest method. |
| 187 |
// req, resp := client.GetDASHStreamingSessionURLRequest(params) |
| 188 |
// |
| 189 |
// err := req.Send() |
| 190 |
// if err == nil { // resp is now filled |
| 191 |
// fmt.Println(resp) |
| 192 |
// } |
| 193 |
// |
| 194 |
// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-video-archived-media-2017-09-30/GetDASHStreamingSessionURL |
| 195 |
func (c *KinesisVideoArchivedMedia) GetDASHStreamingSessionURLRequest(input *GetDASHStreamingSessionURLInput) (req *request.Request, output *GetDASHStreamingSessionURLOutput) { |
| 196 |
op := &request.Operation{ |
| 197 |
Name: opGetDASHStreamingSessionURL, |
| 198 |
HTTPMethod: "POST", |
| 199 |
HTTPPath: "/getDASHStreamingSessionURL", |
| 200 |
} |
| 201 |
|
| 202 |
if input == nil { |
| 203 |
input = &GetDASHStreamingSessionURLInput{} |
| 204 |
} |
| 205 |
|
| 206 |
output = &GetDASHStreamingSessionURLOutput{} |
| 207 |
req = c.newRequest(op, input, output) |
| 208 |
return |
| 209 |
} |
| 210 |
|
| 211 |
// GetDASHStreamingSessionURL API operation for Amazon Kinesis Video Streams Archived Media. |
| 212 |
// |
| 213 |
// Retrieves an MPEG Dynamic Adaptive Streaming over HTTP (DASH) URL for the |
| 214 |
// stream. You can then open the URL in a media player to view the stream contents. |
| 215 |
// |
| 216 |
// Both the StreamName and the StreamARN parameters are optional, but you must |
| 217 |
// specify either the StreamName or the StreamARN when invoking this API operation. |
| 218 |
// |
| 219 |
// An Amazon Kinesis video stream has the following requirements for providing |
| 220 |
// data through MPEG-DASH: |
| 221 |
// |
| 222 |
// - The media must contain h.264 or h.265 encoded video and, optionally, |
| 223 |
// AAC or G.711 encoded audio. Specifically, the codec ID of track 1 should |
| 224 |
// be V_MPEG/ISO/AVC (for h.264) or V_MPEGH/ISO/HEVC (for H.265). Optionally, |
| 225 |
// the codec ID of track 2 should be A_AAC (for AAC) or A_MS/ACM (for G.711). |
| 226 |
// |
| 227 |
// - Data retention must be greater than 0. |
| 228 |
// |
| 229 |
// - The video track of each fragment must contain codec private data in |
| 230 |
// the Advanced Video Coding (AVC) for H.264 format and HEVC for H.265 format. |
| 231 |
// For more information, see MPEG-4 specification ISO/IEC 14496-15 (https://www.iso.org/standard/55980.html). |
| 232 |
// For information about adapting stream data to a given format, see NAL |
| 233 |
// Adaptation Flags (http://docs.aws.amazon.com/kinesisvideostreams/latest/dg/producer-reference-nal.html). |
| 234 |
// |
| 235 |
// - The audio track (if present) of each fragment must contain codec private |
| 236 |
// data in the AAC format (AAC specification ISO/IEC 13818-7 (https://www.iso.org/standard/43345.html)) |
| 237 |
// or the MS Wave format (http://www-mmsp.ece.mcgill.ca/Documents/AudioFormats/WAVE/WAVE.html). |
| 238 |
// |
| 239 |
// The following procedure shows how to use MPEG-DASH with Kinesis Video Streams: |
| 240 |
// |
| 241 |
// Get an endpoint using GetDataEndpoint (http://docs.aws.amazon.com/kinesisvideostreams/latest/dg/API_GetDataEndpoint.html), |
| 242 |
// specifying GET_DASH_STREAMING_SESSION_URL for the APIName parameter. |
| 243 |
// |
| 244 |
// Retrieve the MPEG-DASH URL using GetDASHStreamingSessionURL. Kinesis Video |
| 245 |
// Streams creates an MPEG-DASH streaming session to be used for accessing content |
| 246 |
// in a stream using the MPEG-DASH protocol. GetDASHStreamingSessionURL returns |
| 247 |
// an authenticated URL (that includes an encrypted session token) for the session's |
| 248 |
// MPEG-DASH manifest (the root resource needed for streaming with MPEG-DASH). |
| 249 |
// |
| 250 |
// Don't share or store this token where an unauthorized entity can access it. |
| 251 |
// The token provides access to the content of the stream. Safeguard the token |
| 252 |
// with the same measures that you use with your Amazon Web Services credentials. |
| 253 |
// |
| 254 |
// The media that is made available through the manifest consists only of the |
| 255 |
// requested stream, time range, and format. No other media data (such as frames |
| 256 |
// outside the requested window or alternate bitrates) is made available. |
| 257 |
// |
| 258 |
// Provide the URL (containing the encrypted session token) for the MPEG-DASH |
| 259 |
// manifest to a media player that supports the MPEG-DASH protocol. Kinesis |
| 260 |
// Video Streams makes the initialization fragment and media fragments available |
| 261 |
// through the manifest URL. The initialization fragment contains the codec |
| 262 |
// private data for the stream, and other data needed to set up the video or |
| 263 |
// audio decoder and renderer. The media fragments contain encoded video frames |
| 264 |
// or encoded audio samples. |
| 265 |
// |
| 266 |
// The media player receives the authenticated URL and requests stream metadata |
| 267 |
// and media data normally. When the media player requests data, it calls the |
| 268 |
// following actions: |
| 269 |
// |
| 270 |
// - GetDASHManifest: Retrieves an MPEG DASH manifest, which contains the |
| 271 |
// metadata for the media that you want to playback. |
| 272 |
// |
| 273 |
// - GetMP4InitFragment: Retrieves the MP4 initialization fragment. The media |
| 274 |
// player typically loads the initialization fragment before loading any |
| 275 |
// media fragments. This fragment contains the "fytp" and "moov" MP4 atoms, |
| 276 |
// and the child atoms that are needed to initialize the media player decoder. |
| 277 |
// The initialization fragment does not correspond to a fragment in a Kinesis |
| 278 |
// video stream. It contains only the codec private data for the stream and |
| 279 |
// respective track, which the media player needs to decode the media frames. |
| 280 |
// |
| 281 |
// - GetMP4MediaFragment: Retrieves MP4 media fragments. These fragments |
| 282 |
// contain the "moof" and "mdat" MP4 atoms and their child atoms, containing |
| 283 |
// the encoded fragment's media frames and their timestamps. After the first |
| 284 |
// media fragment is made available in a streaming session, any fragments |
| 285 |
// that don't contain the same codec private data cause an error to be returned |
| 286 |
// when those different media fragments are loaded. Therefore, the codec |
| 287 |
// private data should not change between fragments in a session. This also |
| 288 |
// means that the session fails if the fragments in a stream change from |
| 289 |
// having only video to having both audio and video. Data retrieved with |
| 290 |
// this action is billable. See Pricing (https://aws.amazon.com/kinesis/video-streams/pricing/) |
| 291 |
// for details. |
| 292 |
// |
| 293 |
// For restrictions that apply to MPEG-DASH sessions, see Kinesis Video Streams |
| 294 |
// Limits (http://docs.aws.amazon.com/kinesisvideostreams/latest/dg/limits.html). |
| 295 |
// |
| 296 |
// You can monitor the amount of data that the media player consumes by monitoring |
| 297 |
// the GetMP4MediaFragment.OutgoingBytes Amazon CloudWatch metric. For information |
| 298 |
// about using CloudWatch to monitor Kinesis Video Streams, see Monitoring Kinesis |
| 299 |
// Video Streams (http://docs.aws.amazon.com/kinesisvideostreams/latest/dg/monitoring.html). |
| 300 |
// For pricing information, see Amazon Kinesis Video Streams Pricing (https://aws.amazon.com/kinesis/video-streams/pricing/) |
| 301 |
// and Amazon Web Services Pricing (https://aws.amazon.com/pricing/). Charges |
| 302 |
// for both HLS sessions and outgoing Amazon Web Services data apply. |
| 303 |
// |
| 304 |
// For more information about HLS, see HTTP Live Streaming (https://developer.apple.com/streaming/) |
| 305 |
// on the Apple Developer site (https://developer.apple.com). |
| 306 |
// |
| 307 |
// If an error is thrown after invoking a Kinesis Video Streams archived media |
| 308 |
// API, in addition to the HTTP status code and the response body, it includes |
| 309 |
// the following pieces of information: |
| 310 |
// |
| 311 |
// - x-amz-ErrorType HTTP header – contains a more specific error type |
| 312 |
// in addition to what the HTTP status code provides. |
| 313 |
// |
| 314 |
// - x-amz-RequestId HTTP header – if you want to report an issue to Amazon |
| 315 |
// Web Services the support team can better diagnose the problem if given |
| 316 |
// the Request Id. |
| 317 |
// |
| 318 |
// Both the HTTP status code and the ErrorType header can be utilized to make |
| 319 |
// programmatic decisions about whether errors are retry-able and under what |
| 320 |
// conditions, as well as provide information on what actions the client programmer |
| 321 |
// might need to take in order to successfully try again. |
| 322 |
// |
| 323 |
// For more information, see the Errors section at the bottom of this topic, |
| 324 |
// as well as Common Errors (https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/CommonErrors.html). |
| 325 |
// |
| 326 |
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions |
| 327 |
// with awserr.Error's Code and Message methods to get detailed information about |
| 328 |
// the error. |
| 329 |
// |
| 330 |
// See the AWS API reference guide for Amazon Kinesis Video Streams Archived Media's |
| 331 |
// API operation GetDASHStreamingSessionURL for usage and error information. |
| 332 |
// |
| 333 |
// Returned Error Types: |
| 334 |
// |
| 335 |
// - ResourceNotFoundException |
| 336 |
// GetImages will throw this error when Kinesis Video Streams can't find the |
| 337 |
// stream that you specified. |
| 338 |
// |
| 339 |
// GetHLSStreamingSessionURL and GetDASHStreamingSessionURL throw this error |
| 340 |
// if a session with a PlaybackMode of ON_DEMAND or LIVE_REPLAYis requested |
| 341 |
// for a stream that has no fragments within the requested time range, or if |
| 342 |
// a session with a PlaybackMode of LIVE is requested for a stream that has |
| 343 |
// no fragments within the last 30 seconds. |
| 344 |
// |
| 345 |
// - InvalidArgumentException |
| 346 |
// A specified parameter exceeds its restrictions, is not supported, or can't |
| 347 |
// be used. |
| 348 |
// |
| 349 |
// - ClientLimitExceededException |
| 350 |
// Kinesis Video Streams has throttled the request because you have exceeded |
| 351 |
// a limit. Try making the call later. For information about limits, see Kinesis |
| 352 |
// Video Streams Limits (http://docs.aws.amazon.com/kinesisvideostreams/latest/dg/limits.html). |
| 353 |
// |
| 354 |
// - NotAuthorizedException |
| 355 |
// Status Code: 403, The caller is not authorized to perform an operation on |
| 356 |
// the given stream, or the token has expired. |
| 357 |
// |
| 358 |
// - UnsupportedStreamMediaTypeException |
| 359 |
// The type of the media (for example, h.264 or h.265 video or ACC or G.711 |
| 360 |
// audio) could not be determined from the codec IDs of the tracks in the first |
| 361 |
// fragment for a playback session. The codec ID for track 1 should be V_MPEG/ISO/AVC |
| 362 |
// and, optionally, the codec ID for track 2 should be A_AAC. |
| 363 |
// |
| 364 |
// - NoDataRetentionException |
| 365 |
// A streaming session was requested for a stream that does not retain data |
| 366 |
// (that is, has a DataRetentionInHours of 0). |
| 367 |
// |
| 368 |
// - MissingCodecPrivateDataException |
| 369 |
// No codec private data was found in at least one of tracks of the video stream. |
| 370 |
// |
| 371 |
// - InvalidCodecPrivateDataException |
| 372 |
// The codec private data in at least one of the tracks of the video stream |
| 373 |
// is not valid for this operation. |
| 374 |
// |
| 375 |
// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-video-archived-media-2017-09-30/GetDASHStreamingSessionURL |
| 376 |
func (c *KinesisVideoArchivedMedia) GetDASHStreamingSessionURL(input *GetDASHStreamingSessionURLInput) (*GetDASHStreamingSessionURLOutput, error) { |
| 377 |
req, out := c.GetDASHStreamingSessionURLRequest(input) |
| 378 |
return out, req.Send() |
| 379 |
} |
| 380 |
|
| 381 |
// GetDASHStreamingSessionURLWithContext is the same as GetDASHStreamingSessionURL with the addition of |
| 382 |
// the ability to pass a context and additional request options. |
| 383 |
// |
| 384 |
// See GetDASHStreamingSessionURL for details on how to use this API operation. |
| 385 |
// |
| 386 |
// The context must be non-nil and will be used for request cancellation. If |
| 387 |
// the context is nil a panic will occur. In the future the SDK may create |
| 388 |
// sub-contexts for http.Requests. See https://golang.org/pkg/context/ |
| 389 |
// for more information on using Contexts. |
| 390 |
func (c *KinesisVideoArchivedMedia) GetDASHStreamingSessionURLWithContext(ctx aws.Context, input *GetDASHStreamingSessionURLInput, opts ...request.Option) (*GetDASHStreamingSessionURLOutput, error) { |
| 391 |
req, out := c.GetDASHStreamingSessionURLRequest(input) |
| 392 |
req.SetContext(ctx) |
| 393 |
req.ApplyOptions(opts...) |
| 394 |
return out, req.Send() |
| 395 |
} |
| 396 |
|
| 397 |
const opGetHLSStreamingSessionURL = "GetHLSStreamingSessionURL" |
| 398 |
|
| 399 |
// GetHLSStreamingSessionURLRequest generates a "aws/request.Request" representing the |
| 400 |
// client's request for the GetHLSStreamingSessionURL operation. The "output" return |
| 401 |
// value will be populated with the request's response once the request completes |
| 402 |
// successfully. |
| 403 |
// |
| 404 |
// Use "Send" method on the returned Request to send the API call to the service. |
| 405 |
// the "output" return value is not valid until after Send returns without error. |
| 406 |
// |
| 407 |
// See GetHLSStreamingSessionURL for more information on using the GetHLSStreamingSessionURL |
| 408 |
// API call, and error handling. |
| 409 |
// |
| 410 |
// This method is useful when you want to inject custom logic or configuration |
| 411 |
// into the SDK's request lifecycle. Such as custom headers, or retry logic. |
| 412 |
// |
| 413 |
// // Example sending a request using the GetHLSStreamingSessionURLRequest method. |
| 414 |
// req, resp := client.GetHLSStreamingSessionURLRequest(params) |
| 415 |
// |
| 416 |
// err := req.Send() |
| 417 |
// if err == nil { // resp is now filled |
| 418 |
// fmt.Println(resp) |
| 419 |
// } |
| 420 |
// |
| 421 |
// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-video-archived-media-2017-09-30/GetHLSStreamingSessionURL |
| 422 |
func (c *KinesisVideoArchivedMedia) GetHLSStreamingSessionURLRequest(input *GetHLSStreamingSessionURLInput) (req *request.Request, output *GetHLSStreamingSessionURLOutput) { |
| 423 |
op := &request.Operation{ |
| 424 |
Name: opGetHLSStreamingSessionURL, |
| 425 |
HTTPMethod: "POST", |
| 426 |
HTTPPath: "/getHLSStreamingSessionURL", |
| 427 |
} |
| 428 |
|
| 429 |
if input == nil { |
| 430 |
input = &GetHLSStreamingSessionURLInput{} |
| 431 |
} |
| 432 |
|
| 433 |
output = &GetHLSStreamingSessionURLOutput{} |
| 434 |
req = c.newRequest(op, input, output) |
| 435 |
return |
| 436 |
} |
| 437 |
|
| 438 |
// GetHLSStreamingSessionURL API operation for Amazon Kinesis Video Streams Archived Media. |
| 439 |
// |
| 440 |
// Retrieves an HTTP Live Streaming (HLS) URL for the stream. You can then open |
| 441 |
// the URL in a browser or media player to view the stream contents. |
| 442 |
// |
| 443 |
// Both the StreamName and the StreamARN parameters are optional, but you must |
| 444 |
// specify either the StreamName or the StreamARN when invoking this API operation. |
| 445 |
// |
| 446 |
// An Amazon Kinesis video stream has the following requirements for providing |
| 447 |
// data through HLS: |
| 448 |
// |
| 449 |
// - For streaming video, the media must contain H.264 or H.265 encoded video |
| 450 |
// and, optionally, AAC encoded audio. Specifically, the codec ID of track |
| 451 |
// 1 should be V_MPEG/ISO/AVC (for H.264) or V_MPEG/ISO/HEVC (for H.265). |
| 452 |
// Optionally, the codec ID of track 2 should be A_AAC. For audio only streaming, |
| 453 |
// the codec ID of track 1 should be A_AAC. |
| 454 |
// |
| 455 |
// - Data retention must be greater than 0. |
| 456 |
// |
| 457 |
// - The video track of each fragment must contain codec private data in |
| 458 |
// the Advanced Video Coding (AVC) for H.264 format or HEVC for H.265 format |
| 459 |
// (MPEG-4 specification ISO/IEC 14496-15 (https://www.iso.org/standard/55980.html)). |
| 460 |
// For information about adapting stream data to a given format, see NAL |
| 461 |
// Adaptation Flags (http://docs.aws.amazon.com/kinesisvideostreams/latest/dg/producer-reference-nal.html). |
| 462 |
// |
| 463 |
// - The audio track (if present) of each fragment must contain codec private |
| 464 |
// data in the AAC format (AAC specification ISO/IEC 13818-7 (https://www.iso.org/standard/43345.html)). |
| 465 |
// |
| 466 |
// Kinesis Video Streams HLS sessions contain fragments in the fragmented MPEG-4 |
| 467 |
// form (also called fMP4 or CMAF) or the MPEG-2 form (also called TS chunks, |
| 468 |
// which the HLS specification also supports). For more information about HLS |
| 469 |
// fragment types, see the HLS specification (https://tools.ietf.org/html/draft-pantos-http-live-streaming-23). |
| 470 |
// |
| 471 |
// The following procedure shows how to use HLS with Kinesis Video Streams: |
| 472 |
// |
| 473 |
// Get an endpoint using GetDataEndpoint (http://docs.aws.amazon.com/kinesisvideostreams/latest/dg/API_GetDataEndpoint.html), |
| 474 |
// specifying GET_HLS_STREAMING_SESSION_URL for the APIName parameter. |
| 475 |
// |
| 476 |
// Retrieve the HLS URL using GetHLSStreamingSessionURL. Kinesis Video Streams |
| 477 |
// creates an HLS streaming session to be used for accessing content in a stream |
| 478 |
// using the HLS protocol. GetHLSStreamingSessionURL returns an authenticated |
| 479 |
// URL (that includes an encrypted session token) for the session's HLS master |
| 480 |
// playlist (the root resource needed for streaming with HLS). |
| 481 |
// |
| 482 |
// Don't share or store this token where an unauthorized entity could access |
| 483 |
// it. The token provides access to the content of the stream. Safeguard the |
| 484 |
// token with the same measures that you would use with your Amazon Web Services |
| 485 |
// credentials. |
| 486 |
// |
| 487 |
// The media that is made available through the playlist consists only of the |
| 488 |
// requested stream, time range, and format. No other media data (such as frames |
| 489 |
// outside the requested window or alternate bitrates) is made available. |
| 490 |
// |
| 491 |
// Provide the URL (containing the encrypted session token) for the HLS master |
| 492 |
// playlist to a media player that supports the HLS protocol. Kinesis Video |
| 493 |
// Streams makes the HLS media playlist, initialization fragment, and media |
| 494 |
// fragments available through the master playlist URL. The initialization fragment |
| 495 |
// contains the codec private data for the stream, and other data needed to |
| 496 |
// set up the video or audio decoder and renderer. The media fragments contain |
| 497 |
// H.264-encoded video frames or AAC-encoded audio samples. |
| 498 |
// |
| 499 |
// The media player receives the authenticated URL and requests stream metadata |
| 500 |
// and media data normally. When the media player requests data, it calls the |
| 501 |
// following actions: |
| 502 |
// |
| 503 |
// - GetHLSMasterPlaylist: Retrieves an HLS master playlist, which contains |
| 504 |
// a URL for the GetHLSMediaPlaylist action for each track, and additional |
| 505 |
// metadata for the media player, including estimated bitrate and resolution. |
| 506 |
// |
| 507 |
// - GetHLSMediaPlaylist: Retrieves an HLS media playlist, which contains |
| 508 |
// a URL to access the MP4 initialization fragment with the GetMP4InitFragment |
| 509 |
// action, and URLs to access the MP4 media fragments with the GetMP4MediaFragment |
| 510 |
// actions. The HLS media playlist also contains metadata about the stream |
| 511 |
// that the player needs to play it, such as whether the PlaybackMode is |
| 512 |
// LIVE or ON_DEMAND. The HLS media playlist is typically static for sessions |
| 513 |
// with a PlaybackType of ON_DEMAND. The HLS media playlist is continually |
| 514 |
// updated with new fragments for sessions with a PlaybackType of LIVE. There |
| 515 |
// is a distinct HLS media playlist for the video track and the audio track |
| 516 |
// (if applicable) that contains MP4 media URLs for the specific track. |
| 517 |
// |
| 518 |
// - GetMP4InitFragment: Retrieves the MP4 initialization fragment. The media |
| 519 |
// player typically loads the initialization fragment before loading any |
| 520 |
// media fragments. This fragment contains the "fytp" and "moov" MP4 atoms, |
| 521 |
// and the child atoms that are needed to initialize the media player decoder. |
| 522 |
// The initialization fragment does not correspond to a fragment in a Kinesis |
| 523 |
// video stream. It contains only the codec private data for the stream and |
| 524 |
// respective track, which the media player needs to decode the media frames. |
| 525 |
// |
| 526 |
// - GetMP4MediaFragment: Retrieves MP4 media fragments. These fragments |
| 527 |
// contain the "moof" and "mdat" MP4 atoms and their child atoms, containing |
| 528 |
// the encoded fragment's media frames and their timestamps. For the HLS |
| 529 |
// streaming session, in-track codec private data (CPD) changes are supported. |
| 530 |
// After the first media fragment is made available in a streaming session, |
| 531 |
// fragments can contain CPD changes for each track. Therefore, the fragments |
| 532 |
// in a session can have a different resolution, bit rate, or other information |
| 533 |
// in the CPD without interrupting playback. However, any change made in |
| 534 |
// the track number or track codec format can return an error when those |
| 535 |
// different media fragments are loaded. For example, streaming will fail |
| 536 |
// if the fragments in the stream change from having only video to having |
| 537 |
// both audio and video, or if an AAC audio track is changed to an ALAW audio |
| 538 |
// track. For each streaming session, only 500 CPD changes are allowed. Data |
| 539 |
// retrieved with this action is billable. For information, see Pricing (https://aws.amazon.com/kinesis/video-streams/pricing/). |
| 540 |
// |
| 541 |
// - GetTSFragment: Retrieves MPEG TS fragments containing both initialization |
| 542 |
// and media data for all tracks in the stream. If the ContainerFormat is |
| 543 |
// MPEG_TS, this API is used instead of GetMP4InitFragment and GetMP4MediaFragment |
| 544 |
// to retrieve stream media. Data retrieved with this action is billable. |
| 545 |
// For more information, see Kinesis Video Streams pricing (https://aws.amazon.com/kinesis/video-streams/pricing/). |
| 546 |
// |
| 547 |
// A streaming session URL must not be shared between players. The service might |
| 548 |
// throttle a session if multiple media players are sharing it. For connection |
| 549 |
// limits, see Kinesis Video Streams Limits (http://docs.aws.amazon.com/kinesisvideostreams/latest/dg/limits.html). |
| 550 |
// |
| 551 |
// You can monitor the amount of data that the media player consumes by monitoring |
| 552 |
// the GetMP4MediaFragment.OutgoingBytes Amazon CloudWatch metric. For information |
| 553 |
// about using CloudWatch to monitor Kinesis Video Streams, see Monitoring Kinesis |
| 554 |
// Video Streams (http://docs.aws.amazon.com/kinesisvideostreams/latest/dg/monitoring.html). |
| 555 |
// For pricing information, see Amazon Kinesis Video Streams Pricing (https://aws.amazon.com/kinesis/video-streams/pricing/) |
| 556 |
// and Amazon Web Services Pricing (https://aws.amazon.com/pricing/). Charges |
| 557 |
// for both HLS sessions and outgoing Amazon Web Services data apply. |
| 558 |
// |
| 559 |
// For more information about HLS, see HTTP Live Streaming (https://developer.apple.com/streaming/) |
| 560 |
// on the Apple Developer site (https://developer.apple.com). |
| 561 |
// |
| 562 |
// If an error is thrown after invoking a Kinesis Video Streams archived media |
| 563 |
// API, in addition to the HTTP status code and the response body, it includes |
| 564 |
// the following pieces of information: |
| 565 |
// |
| 566 |
// - x-amz-ErrorType HTTP header – contains a more specific error type |
| 567 |
// in addition to what the HTTP status code provides. |
| 568 |
// |
| 569 |
// - x-amz-RequestId HTTP header – if you want to report an issue to Amazon |
| 570 |
// Web Services, the support team can better diagnose the problem if given |
| 571 |
// the Request Id. |
| 572 |
// |
| 573 |
// Both the HTTP status code and the ErrorType header can be utilized to make |
| 574 |
// programmatic decisions about whether errors are retry-able and under what |
| 575 |
// conditions, as well as provide information on what actions the client programmer |
| 576 |
// might need to take in order to successfully try again. |
| 577 |
// |
| 578 |
// For more information, see the Errors section at the bottom of this topic, |
| 579 |
// as well as Common Errors (https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/CommonErrors.html). |
| 580 |
// |
| 581 |
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions |
| 582 |
// with awserr.Error's Code and Message methods to get detailed information about |
| 583 |
// the error. |
| 584 |
// |
| 585 |
// See the AWS API reference guide for Amazon Kinesis Video Streams Archived Media's |
| 586 |
// API operation GetHLSStreamingSessionURL for usage and error information. |
| 587 |
// |
| 588 |
// Returned Error Types: |
| 589 |
// |
| 590 |
// - ResourceNotFoundException |
| 591 |
// GetImages will throw this error when Kinesis Video Streams can't find the |
| 592 |
// stream that you specified. |
| 593 |
// |
| 594 |
// GetHLSStreamingSessionURL and GetDASHStreamingSessionURL throw this error |
| 595 |
// if a session with a PlaybackMode of ON_DEMAND or LIVE_REPLAYis requested |
| 596 |
// for a stream that has no fragments within the requested time range, or if |
| 597 |
// a session with a PlaybackMode of LIVE is requested for a stream that has |
| 598 |
// no fragments within the last 30 seconds. |
| 599 |
// |
| 600 |
// - InvalidArgumentException |
| 601 |
// A specified parameter exceeds its restrictions, is not supported, or can't |
| 602 |
// be used. |
| 603 |
// |
| 604 |
// - ClientLimitExceededException |
| 605 |
// Kinesis Video Streams has throttled the request because you have exceeded |
| 606 |
// a limit. Try making the call later. For information about limits, see Kinesis |
| 607 |
// Video Streams Limits (http://docs.aws.amazon.com/kinesisvideostreams/latest/dg/limits.html). |
| 608 |
// |
| 609 |
// - NotAuthorizedException |
| 610 |
// Status Code: 403, The caller is not authorized to perform an operation on |
| 611 |
// the given stream, or the token has expired. |
| 612 |
// |
| 613 |
// - UnsupportedStreamMediaTypeException |
| 614 |
// The type of the media (for example, h.264 or h.265 video or ACC or G.711 |
| 615 |
// audio) could not be determined from the codec IDs of the tracks in the first |
| 616 |
// fragment for a playback session. The codec ID for track 1 should be V_MPEG/ISO/AVC |
| 617 |
// and, optionally, the codec ID for track 2 should be A_AAC. |
| 618 |
// |
| 619 |
// - NoDataRetentionException |
| 620 |
// A streaming session was requested for a stream that does not retain data |
| 621 |
// (that is, has a DataRetentionInHours of 0). |
| 622 |
// |
| 623 |
// - MissingCodecPrivateDataException |
| 624 |
// No codec private data was found in at least one of tracks of the video stream. |
| 625 |
// |
| 626 |
// - InvalidCodecPrivateDataException |
| 627 |
// The codec private data in at least one of the tracks of the video stream |
| 628 |
// is not valid for this operation. |
| 629 |
// |
| 630 |
// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-video-archived-media-2017-09-30/GetHLSStreamingSessionURL |
| 631 |
func (c *KinesisVideoArchivedMedia) GetHLSStreamingSessionURL(input *GetHLSStreamingSessionURLInput) (*GetHLSStreamingSessionURLOutput, error) { |
| 632 |
req, out := c.GetHLSStreamingSessionURLRequest(input) |
| 633 |
return out, req.Send() |
| 634 |
} |
| 635 |
|
| 636 |
// GetHLSStreamingSessionURLWithContext is the same as GetHLSStreamingSessionURL with the addition of |
| 637 |
// the ability to pass a context and additional request options. |
| 638 |
// |
| 639 |
// See GetHLSStreamingSessionURL for details on how to use this API operation. |
| 640 |
// |
| 641 |
// The context must be non-nil and will be used for request cancellation. If |
| 642 |
// the context is nil a panic will occur. In the future the SDK may create |
| 643 |
// sub-contexts for http.Requests. See https://golang.org/pkg/context/ |
| 644 |
// for more information on using Contexts. |
| 645 |
func (c *KinesisVideoArchivedMedia) GetHLSStreamingSessionURLWithContext(ctx aws.Context, input *GetHLSStreamingSessionURLInput, opts ...request.Option) (*GetHLSStreamingSessionURLOutput, error) { |
| 646 |
req, out := c.GetHLSStreamingSessionURLRequest(input) |
| 647 |
req.SetContext(ctx) |
| 648 |
req.ApplyOptions(opts...) |
| 649 |
return out, req.Send() |
| 650 |
} |
| 651 |
|
| 652 |
const opGetImages = "GetImages" |
| 653 |
|
| 654 |
// GetImagesRequest generates a "aws/request.Request" representing the |
| 655 |
// client's request for the GetImages operation. The "output" return |
| 656 |
// value will be populated with the request's response once the request completes |
| 657 |
// successfully. |
| 658 |
// |
| 659 |
// Use "Send" method on the returned Request to send the API call to the service. |
| 660 |
// the "output" return value is not valid until after Send returns without error. |
| 661 |
// |
| 662 |
// See GetImages for more information on using the GetImages |
| 663 |
// API call, and error handling. |
| 664 |
// |
| 665 |
// This method is useful when you want to inject custom logic or configuration |
| 666 |
// into the SDK's request lifecycle. Such as custom headers, or retry logic. |
| 667 |
// |
| 668 |
// // Example sending a request using the GetImagesRequest method. |
| 669 |
// req, resp := client.GetImagesRequest(params) |
| 670 |
// |
| 671 |
// err := req.Send() |
| 672 |
// if err == nil { // resp is now filled |
| 673 |
// fmt.Println(resp) |
| 674 |
// } |
| 675 |
// |
| 676 |
// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-video-archived-media-2017-09-30/GetImages |
| 677 |
func (c *KinesisVideoArchivedMedia) GetImagesRequest(input *GetImagesInput) (req *request.Request, output *GetImagesOutput) { |
| 678 |
op := &request.Operation{ |
| 679 |
Name: opGetImages, |
| 680 |
HTTPMethod: "POST", |
| 681 |
HTTPPath: "/getImages", |
| 682 |
Paginator: &request.Paginator{ |
| 683 |
InputTokens: []string{"NextToken"}, |
| 684 |
OutputTokens: []string{"NextToken"}, |
| 685 |
LimitToken: "MaxResults", |
| 686 |
TruncationToken: "", |
| 687 |
}, |
| 688 |
} |
| 689 |
|
| 690 |
if input == nil { |
| 691 |
input = &GetImagesInput{} |
| 692 |
} |
| 693 |
|
| 694 |
output = &GetImagesOutput{} |
| 695 |
req = c.newRequest(op, input, output) |
| 696 |
return |
| 697 |
} |
| 698 |
|
| 699 |
// GetImages API operation for Amazon Kinesis Video Streams Archived Media. |
| 700 |
// |
| 701 |
// Retrieves a list of Images corresponding to each timestamp for a given time |
| 702 |
// range, sampling interval, and image format configuration. |
| 703 |
// |
| 704 |
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions |
| 705 |
// with awserr.Error's Code and Message methods to get detailed information about |
| 706 |
// the error. |
| 707 |
// |
| 708 |
// See the AWS API reference guide for Amazon Kinesis Video Streams Archived Media's |
| 709 |
// API operation GetImages for usage and error information. |
| 710 |
// |
| 711 |
// Returned Error Types: |
| 712 |
// |
| 713 |
// - ResourceNotFoundException |
| 714 |
// GetImages will throw this error when Kinesis Video Streams can't find the |
| 715 |
// stream that you specified. |
| 716 |
// |
| 717 |
// GetHLSStreamingSessionURL and GetDASHStreamingSessionURL throw this error |
| 718 |
// if a session with a PlaybackMode of ON_DEMAND or LIVE_REPLAYis requested |
| 719 |
// for a stream that has no fragments within the requested time range, or if |
| 720 |
// a session with a PlaybackMode of LIVE is requested for a stream that has |
| 721 |
// no fragments within the last 30 seconds. |
| 722 |
// |
| 723 |
// - InvalidArgumentException |
| 724 |
// A specified parameter exceeds its restrictions, is not supported, or can't |
| 725 |
// be used. |
| 726 |
// |
| 727 |
// - ClientLimitExceededException |
| 728 |
// Kinesis Video Streams has throttled the request because you have exceeded |
| 729 |
// a limit. Try making the call later. For information about limits, see Kinesis |
| 730 |
// Video Streams Limits (http://docs.aws.amazon.com/kinesisvideostreams/latest/dg/limits.html). |
| 731 |
// |
| 732 |
// - NotAuthorizedException |
| 733 |
// Status Code: 403, The caller is not authorized to perform an operation on |
| 734 |
// the given stream, or the token has expired. |
| 735 |
// |
| 736 |
// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-video-archived-media-2017-09-30/GetImages |
| 737 |
func (c *KinesisVideoArchivedMedia) GetImages(input *GetImagesInput) (*GetImagesOutput, error) { |
| 738 |
req, out := c.GetImagesRequest(input) |
| 739 |
return out, req.Send() |
| 740 |
} |
| 741 |
|
| 742 |
// GetImagesWithContext is the same as GetImages with the addition of |
| 743 |
// the ability to pass a context and additional request options. |
| 744 |
// |
| 745 |
// See GetImages for details on how to use this API operation. |
| 746 |
// |
| 747 |
// The context must be non-nil and will be used for request cancellation. If |
| 748 |
// the context is nil a panic will occur. In the future the SDK may create |
| 749 |
// sub-contexts for http.Requests. See https://golang.org/pkg/context/ |
| 750 |
// for more information on using Contexts. |
| 751 |
func (c *KinesisVideoArchivedMedia) GetImagesWithContext(ctx aws.Context, input *GetImagesInput, opts ...request.Option) (*GetImagesOutput, error) { |
| 752 |
req, out := c.GetImagesRequest(input) |
| 753 |
req.SetContext(ctx) |
| 754 |
req.ApplyOptions(opts...) |
| 755 |
return out, req.Send() |
| 756 |
} |
| 757 |
|
| 758 |
// GetImagesPages iterates over the pages of a GetImages operation, |
| 759 |
// calling the "fn" function with the response data for each page. To stop |
| 760 |
// iterating, return false from the fn function. |
| 761 |
// |
| 762 |
// See GetImages method for more information on how to use this operation. |
| 763 |
// |
| 764 |
// Note: This operation can generate multiple requests to a service. |
| 765 |
// |
| 766 |
// // Example iterating over at most 3 pages of a GetImages operation. |
| 767 |
// pageNum := 0 |
| 768 |
// err := client.GetImagesPages(params, |
| 769 |
// func(page *kinesisvideoarchivedmedia.GetImagesOutput, lastPage bool) bool { |
| 770 |
// pageNum++ |
| 771 |
// fmt.Println(page) |
| 772 |
// return pageNum <= 3 |
| 773 |
// }) |
| 774 |
func (c *KinesisVideoArchivedMedia) GetImagesPages(input *GetImagesInput, fn func(*GetImagesOutput, bool) bool) error { |
| 775 |
return c.GetImagesPagesWithContext(aws.BackgroundContext(), input, fn) |
| 776 |
} |
| 777 |
|
| 778 |
// GetImagesPagesWithContext same as GetImagesPages except |
| 779 |
// it takes a Context and allows setting request options on the pages. |
| 780 |
// |
| 781 |
// The context must be non-nil and will be used for request cancellation. If |
| 782 |
// the context is nil a panic will occur. In the future the SDK may create |
| 783 |
// sub-contexts for http.Requests. See https://golang.org/pkg/context/ |
| 784 |
// for more information on using Contexts. |
| 785 |
func (c *KinesisVideoArchivedMedia) GetImagesPagesWithContext(ctx aws.Context, input *GetImagesInput, fn func(*GetImagesOutput, bool) bool, opts ...request.Option) error { |
| 786 |
p := request.Pagination{ |
| 787 |
NewRequest: func() (*request.Request, error) { |
| 788 |
var inCpy *GetImagesInput |
| 789 |
if input != nil { |
| 790 |
tmp := *input |
| 791 |
inCpy = &tmp |
| 792 |
} |
| 793 |
req, _ := c.GetImagesRequest(inCpy) |
| 794 |
req.SetContext(ctx) |
| 795 |
req.ApplyOptions(opts...) |
| 796 |
return req, nil |
| 797 |
}, |
| 798 |
} |
| 799 |
|
| 800 |
for p.Next() { |
| 801 |
if !fn(p.Page().(*GetImagesOutput), !p.HasNextPage()) { |
| 802 |
break |
| 803 |
} |
| 804 |
} |
| 805 |
|
| 806 |
return p.Err() |
| 807 |
} |
| 808 |
|
| 809 |
const opGetMediaForFragmentList = "GetMediaForFragmentList" |
| 810 |
|
| 811 |
// GetMediaForFragmentListRequest generates a "aws/request.Request" representing the |
| 812 |
// client's request for the GetMediaForFragmentList operation. The "output" return |
| 813 |
// value will be populated with the request's response once the request completes |
| 814 |
// successfully. |
| 815 |
// |
| 816 |
// Use "Send" method on the returned Request to send the API call to the service. |
| 817 |
// the "output" return value is not valid until after Send returns without error. |
| 818 |
// |
| 819 |
// See GetMediaForFragmentList for more information on using the GetMediaForFragmentList |
| 820 |
// API call, and error handling. |
| 821 |
// |
| 822 |
// This method is useful when you want to inject custom logic or configuration |
| 823 |
// into the SDK's request lifecycle. Such as custom headers, or retry logic. |
| 824 |
// |
| 825 |
// // Example sending a request using the GetMediaForFragmentListRequest method. |
| 826 |
// req, resp := client.GetMediaForFragmentListRequest(params) |
| 827 |
// |
| 828 |
// err := req.Send() |
| 829 |
// if err == nil { // resp is now filled |
| 830 |
// fmt.Println(resp) |
| 831 |
// } |
| 832 |
// |
| 833 |
// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-video-archived-media-2017-09-30/GetMediaForFragmentList |
| 834 |
func (c *KinesisVideoArchivedMedia) GetMediaForFragmentListRequest(input *GetMediaForFragmentListInput) (req *request.Request, output *GetMediaForFragmentListOutput) { |
| 835 |
op := &request.Operation{ |
| 836 |
Name: opGetMediaForFragmentList, |
| 837 |
HTTPMethod: "POST", |
| 838 |
HTTPPath: "/getMediaForFragmentList", |
| 839 |
} |
| 840 |
|
| 841 |
if input == nil { |
| 842 |
input = &GetMediaForFragmentListInput{} |
| 843 |
} |
| 844 |
|
| 845 |
output = &GetMediaForFragmentListOutput{} |
| 846 |
req = c.newRequest(op, input, output) |
| 847 |
return |
| 848 |
} |
| 849 |
|
| 850 |
// GetMediaForFragmentList API operation for Amazon Kinesis Video Streams Archived Media. |
| 851 |
// |
| 852 |
// Gets media for a list of fragments (specified by fragment number) from the |
| 853 |
// archived data in an Amazon Kinesis video stream. |
| 854 |
// |
| 855 |
// You must first call the GetDataEndpoint API to get an endpoint. Then send |
| 856 |
// the GetMediaForFragmentList requests to this endpoint using the --endpoint-url |
| 857 |
// parameter (https://docs.aws.amazon.com/cli/latest/reference/). |
| 858 |
// |
| 859 |
// For limits, see Kinesis Video Streams Limits (http://docs.aws.amazon.com/kinesisvideostreams/latest/dg/limits.html). |
| 860 |
// |
| 861 |
// If an error is thrown after invoking a Kinesis Video Streams archived media |
| 862 |
// API, in addition to the HTTP status code and the response body, it includes |
| 863 |
// the following pieces of information: |
| 864 |
// |
| 865 |
// - x-amz-ErrorType HTTP header – contains a more specific error type |
| 866 |
// in addition to what the HTTP status code provides. |
| 867 |
// |
| 868 |
// - x-amz-RequestId HTTP header – if you want to report an issue to Amazon |
| 869 |
// Web Services, the support team can better diagnose the problem if given |
| 870 |
// the Request Id. |
| 871 |
// |
| 872 |
// Both the HTTP status code and the ErrorType header can be utilized to make |
| 873 |
// programmatic decisions about whether errors are retry-able and under what |
| 874 |
// conditions, as well as provide information on what actions the client programmer |
| 875 |
// might need to take in order to successfully try again. |
| 876 |
// |
| 877 |
// For more information, see the Errors section at the bottom of this topic, |
| 878 |
// as well as Common Errors (https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/CommonErrors.html). |
| 879 |
// |
| 880 |
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions |
| 881 |
// with awserr.Error's Code and Message methods to get detailed information about |
| 882 |
// the error. |
| 883 |
// |
| 884 |
// See the AWS API reference guide for Amazon Kinesis Video Streams Archived Media's |
| 885 |
// API operation GetMediaForFragmentList for usage and error information. |
| 886 |
// |
| 887 |
// Returned Error Types: |
| 888 |
// |
| 889 |
// - ResourceNotFoundException |
| 890 |
// GetImages will throw this error when Kinesis Video Streams can't find the |
| 891 |
// stream that you specified. |
| 892 |
// |
| 893 |
// GetHLSStreamingSessionURL and GetDASHStreamingSessionURL throw this error |
| 894 |
// if a session with a PlaybackMode of ON_DEMAND or LIVE_REPLAYis requested |
| 895 |
// for a stream that has no fragments within the requested time range, or if |
| 896 |
// a session with a PlaybackMode of LIVE is requested for a stream that has |
| 897 |
// no fragments within the last 30 seconds. |
| 898 |
// |
| 899 |
// - InvalidArgumentException |
| 900 |
// A specified parameter exceeds its restrictions, is not supported, or can't |
| 901 |
// be used. |
| 902 |
// |
| 903 |
// - ClientLimitExceededException |
| 904 |
// Kinesis Video Streams has throttled the request because you have exceeded |
| 905 |
// a limit. Try making the call later. For information about limits, see Kinesis |
| 906 |
// Video Streams Limits (http://docs.aws.amazon.com/kinesisvideostreams/latest/dg/limits.html). |
| 907 |
// |
| 908 |
// - NotAuthorizedException |
| 909 |
// Status Code: 403, The caller is not authorized to perform an operation on |
| 910 |
// the given stream, or the token has expired. |
| 911 |
// |
| 912 |
// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-video-archived-media-2017-09-30/GetMediaForFragmentList |
| 913 |
func (c *KinesisVideoArchivedMedia) GetMediaForFragmentList(input *GetMediaForFragmentListInput) (*GetMediaForFragmentListOutput, error) { |
| 914 |
req, out := c.GetMediaForFragmentListRequest(input) |
| 915 |
return out, req.Send() |
| 916 |
} |
| 917 |
|
| 918 |
// GetMediaForFragmentListWithContext is the same as GetMediaForFragmentList with the addition of |
| 919 |
// the ability to pass a context and additional request options. |
| 920 |
// |
| 921 |
// See GetMediaForFragmentList for details on how to use this API operation. |
| 922 |
// |
| 923 |
// The context must be non-nil and will be used for request cancellation. If |
| 924 |
// the context is nil a panic will occur. In the future the SDK may create |
| 925 |
// sub-contexts for http.Requests. See https://golang.org/pkg/context/ |
| 926 |
// for more information on using Contexts. |
| 927 |
func (c *KinesisVideoArchivedMedia) GetMediaForFragmentListWithContext(ctx aws.Context, input *GetMediaForFragmentListInput, opts ...request.Option) (*GetMediaForFragmentListOutput, error) { |
| 928 |
req, out := c.GetMediaForFragmentListRequest(input) |
| 929 |
req.SetContext(ctx) |
| 930 |
req.ApplyOptions(opts...) |
| 931 |
return out, req.Send() |
| 932 |
} |
| 933 |
|
| 934 |
const opListFragments = "ListFragments" |
| 935 |
|
| 936 |
// ListFragmentsRequest generates a "aws/request.Request" representing the |
| 937 |
// client's request for the ListFragments operation. The "output" return |
| 938 |
// value will be populated with the request's response once the request completes |
| 939 |
// successfully. |
| 940 |
// |
| 941 |
// Use "Send" method on the returned Request to send the API call to the service. |
| 942 |
// the "output" return value is not valid until after Send returns without error. |
| 943 |
// |
| 944 |
// See ListFragments for more information on using the ListFragments |
| 945 |
// API call, and error handling. |
| 946 |
// |
| 947 |
// This method is useful when you want to inject custom logic or configuration |
| 948 |
// into the SDK's request lifecycle. Such as custom headers, or retry logic. |
| 949 |
// |
| 950 |
// // Example sending a request using the ListFragmentsRequest method. |
| 951 |
// req, resp := client.ListFragmentsRequest(params) |
| 952 |
// |
| 953 |
// err := req.Send() |
| 954 |
// if err == nil { // resp is now filled |
| 955 |
// fmt.Println(resp) |
| 956 |
// } |
| 957 |
// |
| 958 |
// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-video-archived-media-2017-09-30/ListFragments |
| 959 |
func (c *KinesisVideoArchivedMedia) ListFragmentsRequest(input *ListFragmentsInput) (req *request.Request, output *ListFragmentsOutput) { |
| 960 |
op := &request.Operation{ |
| 961 |
Name: opListFragments, |
| 962 |
HTTPMethod: "POST", |
| 963 |
HTTPPath: "/listFragments", |
| 964 |
Paginator: &request.Paginator{ |
| 965 |
InputTokens: []string{"NextToken"}, |
| 966 |
OutputTokens: []string{"NextToken"}, |
| 967 |
LimitToken: "MaxResults", |
| 968 |
TruncationToken: "", |
| 969 |
}, |
| 970 |
} |
| 971 |
|
| 972 |
if input == nil { |
| 973 |
input = &ListFragmentsInput{} |
| 974 |
} |
| 975 |
|
| 976 |
output = &ListFragmentsOutput{} |
| 977 |
req = c.newRequest(op, input, output) |
| 978 |
return |
| 979 |
} |
| 980 |
|
| 981 |
// ListFragments API operation for Amazon Kinesis Video Streams Archived Media. |
| 982 |
// |
| 983 |
// Returns a list of Fragment objects from the specified stream and timestamp |
| 984 |
// range within the archived data. |
| 985 |
// |
| 986 |
// Listing fragments is eventually consistent. This means that even if the producer |
| 987 |
// receives an acknowledgment that a fragment is persisted, the result might |
| 988 |
// not be returned immediately from a request to ListFragments. However, results |
| 989 |
// are typically available in less than one second. |
| 990 |
// |
| 991 |
// You must first call the GetDataEndpoint API to get an endpoint. Then send |
| 992 |
// the ListFragments requests to this endpoint using the --endpoint-url parameter |
| 993 |
// (https://docs.aws.amazon.com/cli/latest/reference/). |
| 994 |
// |
| 995 |
// If an error is thrown after invoking a Kinesis Video Streams archived media |
| 996 |
// API, in addition to the HTTP status code and the response body, it includes |
| 997 |
// the following pieces of information: |
| 998 |
// |
| 999 |
// - x-amz-ErrorType HTTP header – contains a more specific error type |
| 1000 |
// in addition to what the HTTP status code provides. |
| 1001 |
// |
| 1002 |
// - x-amz-RequestId HTTP header – if you want to report an issue to Amazon |
| 1003 |
// Web Services, the support team can better diagnose the problem if given |
| 1004 |
// the Request Id. |
| 1005 |
// |
| 1006 |
// Both the HTTP status code and the ErrorType header can be utilized to make |
| 1007 |
// programmatic decisions about whether errors are retry-able and under what |
| 1008 |
// conditions, as well as provide information on what actions the client programmer |
| 1009 |
// might need to take in order to successfully try again. |
| 1010 |
// |
| 1011 |
// For more information, see the Errors section at the bottom of this topic, |
| 1012 |
// as well as Common Errors (https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/CommonErrors.html). |
| 1013 |
// |
| 1014 |
// Returns awserr.Error for service API and SDK errors. Use runtime type assertions |
| 1015 |
// with awserr.Error's Code and Message methods to get detailed information about |
| 1016 |
// the error. |
| 1017 |
// |
| 1018 |
// See the AWS API reference guide for Amazon Kinesis Video Streams Archived Media's |
| 1019 |
// API operation ListFragments for usage and error information. |
| 1020 |
// |
| 1021 |
// Returned Error Types: |
| 1022 |
// |
| 1023 |
// - ResourceNotFoundException |
| 1024 |
// GetImages will throw this error when Kinesis Video Streams can't find the |
| 1025 |
// stream that you specified. |
| 1026 |
// |
| 1027 |
// GetHLSStreamingSessionURL and GetDASHStreamingSessionURL throw this error |
| 1028 |
// if a session with a PlaybackMode of ON_DEMAND or LIVE_REPLAYis requested |
| 1029 |
// for a stream that has no fragments within the requested time range, or if |
| 1030 |
// a session with a PlaybackMode of LIVE is requested for a stream that has |
| 1031 |
// no fragments within the last 30 seconds. |
| 1032 |
// |
| 1033 |
// - InvalidArgumentException |
| 1034 |
// A specified parameter exceeds its restrictions, is not supported, or can't |
| 1035 |
// be used. |
| 1036 |
// |
| 1037 |
// - ClientLimitExceededException |
| 1038 |
// Kinesis Video Streams has throttled the request because you have exceeded |
| 1039 |
// a limit. Try making the call later. For information about limits, see Kinesis |
| 1040 |
// Video Streams Limits (http://docs.aws.amazon.com/kinesisvideostreams/latest/dg/limits.html). |
| 1041 |
// |
| 1042 |
// - NotAuthorizedException |
| 1043 |
// Status Code: 403, The caller is not authorized to perform an operation on |
| 1044 |
// the given stream, or the token has expired. |
| 1045 |
// |
| 1046 |
// See also, https://docs.aws.amazon.com/goto/WebAPI/kinesis-video-archived-media-2017-09-30/ListFragments |
| 1047 |
func (c *KinesisVideoArchivedMedia) ListFragments(input *ListFragmentsInput) (*ListFragmentsOutput, error) { |
| 1048 |
req, out := c.ListFragmentsRequest(input) |
| 1049 |
return out, req.Send() |
| 1050 |
} |
| 1051 |
|
| 1052 |
// ListFragmentsWithContext is the same as ListFragments with the addition of |
| 1053 |
// the ability to pass a context and additional request options. |
| 1054 |
// |
| 1055 |
// See ListFragments for details on how to use this API operation. |
| 1056 |
// |
| 1057 |
// The context must be non-nil and will be used for request cancellation. If |
| 1058 |
// the context is nil a panic will occur. In the future the SDK may create |
| 1059 |
// sub-contexts for http.Requests. See https://golang.org/pkg/context/ |
| 1060 |
// for more information on using Contexts. |
| 1061 |
func (c *KinesisVideoArchivedMedia) ListFragmentsWithContext(ctx aws.Context, input *ListFragmentsInput, opts ...request.Option) (*ListFragmentsOutput, error) { |
| 1062 |
req, out := c.ListFragmentsRequest(input) |
| 1063 |
req.SetContext(ctx) |
| 1064 |
req.ApplyOptions(opts...) |
| 1065 |
return out, req.Send() |
| 1066 |
} |
| 1067 |
|
| 1068 |
// ListFragmentsPages iterates over the pages of a ListFragments operation, |
| 1069 |
// calling the "fn" function with the response data for each page. To stop |
| 1070 |
// iterating, return false from the fn function. |
| 1071 |
// |
| 1072 |
// See ListFragments method for more information on how to use this operation. |
| 1073 |
// |
| 1074 |
// Note: This operation can generate multiple requests to a service. |
| 1075 |
// |
| 1076 |
// // Example iterating over at most 3 pages of a ListFragments operation. |
| 1077 |
// pageNum := 0 |
| 1078 |
// err := client.ListFragmentsPages(params, |
| 1079 |
// func(page *kinesisvideoarchivedmedia.ListFragmentsOutput, lastPage bool) bool { |
| 1080 |
// pageNum++ |
| 1081 |
// fmt.Println(page) |
| 1082 |
// return pageNum <= 3 |
| 1083 |
// }) |
| 1084 |
func (c *KinesisVideoArchivedMedia) ListFragmentsPages(input *ListFragmentsInput, fn func(*ListFragmentsOutput, bool) bool) error { |
| 1085 |
return c.ListFragmentsPagesWithContext(aws.BackgroundContext(), input, fn) |
| 1086 |
} |
| 1087 |
|
| 1088 |
// ListFragmentsPagesWithContext same as ListFragmentsPages except |
| 1089 |
// it takes a Context and allows setting request options on the pages. |
| 1090 |
// |
| 1091 |
// The context must be non-nil and will be used for request cancellation. If |
| 1092 |
// the context is nil a panic will occur. In the future the SDK may create |
| 1093 |
// sub-contexts for http.Requests. See https://golang.org/pkg/context/ |
| 1094 |
// for more information on using Contexts. |
| 1095 |
func (c *KinesisVideoArchivedMedia) ListFragmentsPagesWithContext(ctx aws.Context, input *ListFragmentsInput, fn func(*ListFragmentsOutput, bool) bool, opts ...request.Option) error { |
| 1096 |
p := request.Pagination{ |
| 1097 |
NewRequest: func() (*request.Request, error) { |
| 1098 |
var inCpy *ListFragmentsInput |
| 1099 |
if input != nil { |
| 1100 |
tmp := *input |
| 1101 |
inCpy = &tmp |
| 1102 |
} |
| 1103 |
req, _ := c.ListFragmentsRequest(inCpy) |
| 1104 |
req.SetContext(ctx) |
| 1105 |
req.ApplyOptions(opts...) |
| 1106 |
return req, nil |
| 1107 |
}, |
| 1108 |
} |
| 1109 |
|
| 1110 |
for p.Next() { |
| 1111 |
if !fn(p.Page().(*ListFragmentsOutput), !p.HasNextPage()) { |
| 1112 |
break |
| 1113 |
} |
| 1114 |
} |
| 1115 |
|
| 1116 |
return p.Err() |
| 1117 |
} |
| 1118 |
|
| 1119 |
// Kinesis Video Streams has throttled the request because you have exceeded |
| 1120 |
// a limit. Try making the call later. For information about limits, see Kinesis |
| 1121 |
// Video Streams Limits (http://docs.aws.amazon.com/kinesisvideostreams/latest/dg/limits.html). |
| 1122 |
type ClientLimitExceededException struct { |
| 1123 |
_ struct{} `type:"structure"` |
| 1124 |
RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` |
| 1125 |
|
| 1126 |
Message_ *string `locationName:"Message" type:"string"` |
| 1127 |
} |
| 1128 |
|
| 1129 |
// String returns the string representation. |
| 1130 |
// |
| 1131 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 1132 |
// be included in the string output. The member name will be present, but the |
| 1133 |
// value will be replaced with "sensitive". |
| 1134 |
func (s ClientLimitExceededException) String() string { |
| 1135 |
return awsutil.Prettify(s) |
| 1136 |
} |
| 1137 |
|
| 1138 |
// GoString returns the string representation. |
| 1139 |
// |
| 1140 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 1141 |
// be included in the string output. The member name will be present, but the |
| 1142 |
// value will be replaced with "sensitive". |
| 1143 |
func (s ClientLimitExceededException) GoString() string { |
| 1144 |
return s.String() |
| 1145 |
} |
| 1146 |
|
| 1147 |
func newErrorClientLimitExceededException(v protocol.ResponseMetadata) error { |
| 1148 |
return &ClientLimitExceededException{ |
| 1149 |
RespMetadata: v, |
| 1150 |
} |
| 1151 |
} |
| 1152 |
|
| 1153 |
// Code returns the exception type name. |
| 1154 |
func (s *ClientLimitExceededException) Code() string { |
| 1155 |
return "ClientLimitExceededException" |
| 1156 |
} |
| 1157 |
|
| 1158 |
// Message returns the exception's message. |
| 1159 |
func (s *ClientLimitExceededException) Message() string { |
| 1160 |
if s.Message_ != nil { |
| 1161 |
return *s.Message_ |
| 1162 |
} |
| 1163 |
return "" |
| 1164 |
} |
| 1165 |
|
| 1166 |
// OrigErr always returns nil, satisfies awserr.Error interface. |
| 1167 |
func (s *ClientLimitExceededException) OrigErr() error { |
| 1168 |
return nil |
| 1169 |
} |
| 1170 |
|
| 1171 |
func (s *ClientLimitExceededException) Error() string { |
| 1172 |
return fmt.Sprintf("%s: %s", s.Code(), s.Message()) |
| 1173 |
} |
| 1174 |
|
| 1175 |
// Status code returns the HTTP status code for the request's response error. |
| 1176 |
func (s *ClientLimitExceededException) StatusCode() int { |
| 1177 |
return s.RespMetadata.StatusCode |
| 1178 |
} |
| 1179 |
|
| 1180 |
// RequestID returns the service's response RequestID for request. |
| 1181 |
func (s *ClientLimitExceededException) RequestID() string { |
| 1182 |
return s.RespMetadata.RequestID |
| 1183 |
} |
| 1184 |
|
| 1185 |
// Describes the timestamp range and timestamp origin of a range of fragments. |
| 1186 |
// |
| 1187 |
// Fragments that have duplicate producer timestamps are deduplicated. This |
| 1188 |
// means that if producers are producing a stream of fragments with producer |
| 1189 |
// timestamps that are approximately equal to the true clock time, the clip |
| 1190 |
// will contain all of the fragments within the requested timestamp range. If |
| 1191 |
// some fragments are ingested within the same time range and very different |
| 1192 |
// points in time, only the oldest ingested collection of fragments are returned. |
| 1193 |
type ClipFragmentSelector struct { |
| 1194 |
_ struct{} `type:"structure"` |
| 1195 |
|
| 1196 |
// The origin of the timestamps to use (Server or Producer). |
| 1197 |
// |
| 1198 |
// FragmentSelectorType is a required field |
| 1199 |
FragmentSelectorType *string `type:"string" required:"true" enum:"ClipFragmentSelectorType"` |
| 1200 |
|
| 1201 |
// The range of timestamps to return. |
| 1202 |
// |
| 1203 |
// TimestampRange is a required field |
| 1204 |
TimestampRange *ClipTimestampRange `type:"structure" required:"true"` |
| 1205 |
} |
| 1206 |
|
| 1207 |
// String returns the string representation. |
| 1208 |
// |
| 1209 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 1210 |
// be included in the string output. The member name will be present, but the |
| 1211 |
// value will be replaced with "sensitive". |
| 1212 |
func (s ClipFragmentSelector) String() string { |
| 1213 |
return awsutil.Prettify(s) |
| 1214 |
} |
| 1215 |
|
| 1216 |
// GoString returns the string representation. |
| 1217 |
// |
| 1218 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 1219 |
// be included in the string output. The member name will be present, but the |
| 1220 |
// value will be replaced with "sensitive". |
| 1221 |
func (s ClipFragmentSelector) GoString() string { |
| 1222 |
return s.String() |
| 1223 |
} |
| 1224 |
|
| 1225 |
// Validate inspects the fields of the type to determine if they are valid. |
| 1226 |
func (s *ClipFragmentSelector) Validate() error { |
| 1227 |
invalidParams := request.ErrInvalidParams{Context: "ClipFragmentSelector"} |
| 1228 |
if s.FragmentSelectorType == nil { |
| 1229 |
invalidParams.Add(request.NewErrParamRequired("FragmentSelectorType")) |
| 1230 |
} |
| 1231 |
if s.TimestampRange == nil { |
| 1232 |
invalidParams.Add(request.NewErrParamRequired("TimestampRange")) |
| 1233 |
} |
| 1234 |
if s.TimestampRange != nil { |
| 1235 |
if err := s.TimestampRange.Validate(); err != nil { |
| 1236 |
invalidParams.AddNested("TimestampRange", err.(request.ErrInvalidParams)) |
| 1237 |
} |
| 1238 |
} |
| 1239 |
|
| 1240 |
if invalidParams.Len() > 0 { |
| 1241 |
return invalidParams |
| 1242 |
} |
| 1243 |
return nil |
| 1244 |
} |
| 1245 |
|
| 1246 |
// SetFragmentSelectorType sets the FragmentSelectorType field's value. |
| 1247 |
func (s *ClipFragmentSelector) SetFragmentSelectorType(v string) *ClipFragmentSelector { |
| 1248 |
s.FragmentSelectorType = &v |
| 1249 |
return s |
| 1250 |
} |
| 1251 |
|
| 1252 |
// SetTimestampRange sets the TimestampRange field's value. |
| 1253 |
func (s *ClipFragmentSelector) SetTimestampRange(v *ClipTimestampRange) *ClipFragmentSelector { |
| 1254 |
s.TimestampRange = v |
| 1255 |
return s |
| 1256 |
} |
| 1257 |
|
| 1258 |
// The range of timestamps for which to return fragments. |
| 1259 |
type ClipTimestampRange struct { |
| 1260 |
_ struct{} `type:"structure"` |
| 1261 |
|
| 1262 |
// The end of the timestamp range for the requested media. |
| 1263 |
// |
| 1264 |
// This value must be within 24 hours of the specified StartTimestamp, and it |
| 1265 |
// must be later than the StartTimestamp value. If FragmentSelectorType for |
| 1266 |
// the request is SERVER_TIMESTAMP, this value must be in the past. |
| 1267 |
// |
| 1268 |
// This value is inclusive. The EndTimestamp is compared to the (starting) timestamp |
| 1269 |
// of the fragment. Fragments that start before the EndTimestamp value and continue |
| 1270 |
// past it are included in the session. |
| 1271 |
// |
| 1272 |
// EndTimestamp is a required field |
| 1273 |
EndTimestamp *time.Time `type:"timestamp" required:"true"` |
| 1274 |
|
| 1275 |
// The starting timestamp in the range of timestamps for which to return fragments. |
| 1276 |
// |
| 1277 |
// Only fragments that start exactly at or after StartTimestamp are included |
| 1278 |
// in the session. Fragments that start before StartTimestamp and continue past |
| 1279 |
// it aren't included in the session. If FragmentSelectorType is SERVER_TIMESTAMP, |
| 1280 |
// the StartTimestamp must be later than the stream head. |
| 1281 |
// |
| 1282 |
// StartTimestamp is a required field |
| 1283 |
StartTimestamp *time.Time `type:"timestamp" required:"true"` |
| 1284 |
} |
| 1285 |
|
| 1286 |
// String returns the string representation. |
| 1287 |
// |
| 1288 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 1289 |
// be included in the string output. The member name will be present, but the |
| 1290 |
// value will be replaced with "sensitive". |
| 1291 |
func (s ClipTimestampRange) String() string { |
| 1292 |
return awsutil.Prettify(s) |
| 1293 |
} |
| 1294 |
|
| 1295 |
// GoString returns the string representation. |
| 1296 |
// |
| 1297 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 1298 |
// be included in the string output. The member name will be present, but the |
| 1299 |
// value will be replaced with "sensitive". |
| 1300 |
func (s ClipTimestampRange) GoString() string { |
| 1301 |
return s.String() |
| 1302 |
} |
| 1303 |
|
| 1304 |
// Validate inspects the fields of the type to determine if they are valid. |
| 1305 |
func (s *ClipTimestampRange) Validate() error { |
| 1306 |
invalidParams := request.ErrInvalidParams{Context: "ClipTimestampRange"} |
| 1307 |
if s.EndTimestamp == nil { |
| 1308 |
invalidParams.Add(request.NewErrParamRequired("EndTimestamp")) |
| 1309 |
} |
| 1310 |
if s.StartTimestamp == nil { |
| 1311 |
invalidParams.Add(request.NewErrParamRequired("StartTimestamp")) |
| 1312 |
} |
| 1313 |
|
| 1314 |
if invalidParams.Len() > 0 { |
| 1315 |
return invalidParams |
| 1316 |
} |
| 1317 |
return nil |
| 1318 |
} |
| 1319 |
|
| 1320 |
// SetEndTimestamp sets the EndTimestamp field's value. |
| 1321 |
func (s *ClipTimestampRange) SetEndTimestamp(v time.Time) *ClipTimestampRange { |
| 1322 |
s.EndTimestamp = &v |
| 1323 |
return s |
| 1324 |
} |
| 1325 |
|
| 1326 |
// SetStartTimestamp sets the StartTimestamp field's value. |
| 1327 |
func (s *ClipTimestampRange) SetStartTimestamp(v time.Time) *ClipTimestampRange { |
| 1328 |
s.StartTimestamp = &v |
| 1329 |
return s |
| 1330 |
} |
| 1331 |
|
| 1332 |
// Contains the range of timestamps for the requested media, and the source |
| 1333 |
// of the timestamps. |
| 1334 |
type DASHFragmentSelector struct { |
| 1335 |
_ struct{} `type:"structure"` |
| 1336 |
|
| 1337 |
// The source of the timestamps for the requested media. |
| 1338 |
// |
| 1339 |
// When FragmentSelectorType is set to PRODUCER_TIMESTAMP and GetDASHStreamingSessionURLInput$PlaybackMode |
| 1340 |
// is ON_DEMAND or LIVE_REPLAY, the first fragment ingested with a producer |
| 1341 |
// timestamp within the specified FragmentSelector$TimestampRange is included |
| 1342 |
// in the media playlist. In addition, the fragments with producer timestamps |
| 1343 |
// within the TimestampRange ingested immediately following the first fragment |
| 1344 |
// (up to the GetDASHStreamingSessionURLInput$MaxManifestFragmentResults value) |
| 1345 |
// are included. |
| 1346 |
// |
| 1347 |
// Fragments that have duplicate producer timestamps are deduplicated. This |
| 1348 |
// means that if producers are producing a stream of fragments with producer |
| 1349 |
// timestamps that are approximately equal to the true clock time, the MPEG-DASH |
| 1350 |
// manifest will contain all of the fragments within the requested timestamp |
| 1351 |
// range. If some fragments are ingested within the same time range and very |
| 1352 |
// different points in time, only the oldest ingested collection of fragments |
| 1353 |
// are returned. |
| 1354 |
// |
| 1355 |
// When FragmentSelectorType is set to PRODUCER_TIMESTAMP and GetDASHStreamingSessionURLInput$PlaybackMode |
| 1356 |
// is LIVE, the producer timestamps are used in the MP4 fragments and for deduplication. |
| 1357 |
// But the most recently ingested fragments based on server timestamps are included |
| 1358 |
// in the MPEG-DASH manifest. This means that even if fragments ingested in |
| 1359 |
// the past have producer timestamps with values now, they are not included |
| 1360 |
// in the HLS media playlist. |
| 1361 |
// |
| 1362 |
// The default is SERVER_TIMESTAMP. |
| 1363 |
FragmentSelectorType *string `type:"string" enum:"DASHFragmentSelectorType"` |
| 1364 |
|
| 1365 |
// The start and end of the timestamp range for the requested media. |
| 1366 |
// |
| 1367 |
// This value should not be present if PlaybackType is LIVE. |
| 1368 |
TimestampRange *DASHTimestampRange `type:"structure"` |
| 1369 |
} |
| 1370 |
|
| 1371 |
// String returns the string representation. |
| 1372 |
// |
| 1373 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 1374 |
// be included in the string output. The member name will be present, but the |
| 1375 |
// value will be replaced with "sensitive". |
| 1376 |
func (s DASHFragmentSelector) String() string { |
| 1377 |
return awsutil.Prettify(s) |
| 1378 |
} |
| 1379 |
|
| 1380 |
// GoString returns the string representation. |
| 1381 |
// |
| 1382 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 1383 |
// be included in the string output. The member name will be present, but the |
| 1384 |
// value will be replaced with "sensitive". |
| 1385 |
func (s DASHFragmentSelector) GoString() string { |
| 1386 |
return s.String() |
| 1387 |
} |
| 1388 |
|
| 1389 |
// SetFragmentSelectorType sets the FragmentSelectorType field's value. |
| 1390 |
func (s *DASHFragmentSelector) SetFragmentSelectorType(v string) *DASHFragmentSelector { |
| 1391 |
s.FragmentSelectorType = &v |
| 1392 |
return s |
| 1393 |
} |
| 1394 |
|
| 1395 |
// SetTimestampRange sets the TimestampRange field's value. |
| 1396 |
func (s *DASHFragmentSelector) SetTimestampRange(v *DASHTimestampRange) *DASHFragmentSelector { |
| 1397 |
s.TimestampRange = v |
| 1398 |
return s |
| 1399 |
} |
| 1400 |
|
| 1401 |
// The start and end of the timestamp range for the requested media. |
| 1402 |
// |
| 1403 |
// This value should not be present if PlaybackType is LIVE. |
| 1404 |
// |
| 1405 |
// The values in DASHimestampRange are inclusive. Fragments that start exactly |
| 1406 |
// at or after the start time are included in the session. Fragments that start |
| 1407 |
// before the start time and continue past it are not included in the session. |
| 1408 |
type DASHTimestampRange struct { |
| 1409 |
_ struct{} `type:"structure"` |
| 1410 |
|
| 1411 |
// The end of the timestamp range for the requested media. This value must be |
| 1412 |
// within 24 hours of the specified StartTimestamp, and it must be later than |
| 1413 |
// the StartTimestamp value. |
| 1414 |
// |
| 1415 |
// If FragmentSelectorType for the request is SERVER_TIMESTAMP, this value must |
| 1416 |
// be in the past. |
| 1417 |
// |
| 1418 |
// The EndTimestamp value is required for ON_DEMAND mode, but optional for LIVE_REPLAY |
| 1419 |
// mode. If the EndTimestamp is not set for LIVE_REPLAY mode then the session |
| 1420 |
// will continue to include newly ingested fragments until the session expires. |
| 1421 |
// |
| 1422 |
// This value is inclusive. The EndTimestamp is compared to the (starting) timestamp |
| 1423 |
// of the fragment. Fragments that start before the EndTimestamp value and continue |
| 1424 |
// past it are included in the session. |
| 1425 |
EndTimestamp *time.Time `type:"timestamp"` |
| 1426 |
|
| 1427 |
// The start of the timestamp range for the requested media. |
| 1428 |
// |
| 1429 |
// If the DASHTimestampRange value is specified, the StartTimestamp value is |
| 1430 |
// required. |
| 1431 |
// |
| 1432 |
// Only fragments that start exactly at or after StartTimestamp are included |
| 1433 |
// in the session. Fragments that start before StartTimestamp and continue past |
| 1434 |
// it aren't included in the session. If FragmentSelectorType is SERVER_TIMESTAMP, |
| 1435 |
// the StartTimestamp must be later than the stream head. |
| 1436 |
StartTimestamp *time.Time `type:"timestamp"` |
| 1437 |
} |
| 1438 |
|
| 1439 |
// String returns the string representation. |
| 1440 |
// |
| 1441 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 1442 |
// be included in the string output. The member name will be present, but the |
| 1443 |
// value will be replaced with "sensitive". |
| 1444 |
func (s DASHTimestampRange) String() string { |
| 1445 |
return awsutil.Prettify(s) |
| 1446 |
} |
| 1447 |
|
| 1448 |
// GoString returns the string representation. |
| 1449 |
// |
| 1450 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 1451 |
// be included in the string output. The member name will be present, but the |
| 1452 |
// value will be replaced with "sensitive". |
| 1453 |
func (s DASHTimestampRange) GoString() string { |
| 1454 |
return s.String() |
| 1455 |
} |
| 1456 |
|
| 1457 |
// SetEndTimestamp sets the EndTimestamp field's value. |
| 1458 |
func (s *DASHTimestampRange) SetEndTimestamp(v time.Time) *DASHTimestampRange { |
| 1459 |
s.EndTimestamp = &v |
| 1460 |
return s |
| 1461 |
} |
| 1462 |
|
| 1463 |
// SetStartTimestamp sets the StartTimestamp field's value. |
| 1464 |
func (s *DASHTimestampRange) SetStartTimestamp(v time.Time) *DASHTimestampRange { |
| 1465 |
s.StartTimestamp = &v |
| 1466 |
return s |
| 1467 |
} |
| 1468 |
|
| 1469 |
// Represents a segment of video or other time-delimited data. |
| 1470 |
type Fragment struct { |
| 1471 |
_ struct{} `type:"structure"` |
| 1472 |
|
| 1473 |
// The playback duration or other time value associated with the fragment. |
| 1474 |
FragmentLengthInMilliseconds *int64 `type:"long"` |
| 1475 |
|
| 1476 |
// The unique identifier of the fragment. This value monotonically increases |
| 1477 |
// based on the ingestion order. |
| 1478 |
FragmentNumber *string `min:"1" type:"string"` |
| 1479 |
|
| 1480 |
// The total fragment size, including information about the fragment and contained |
| 1481 |
// media data. |
| 1482 |
FragmentSizeInBytes *int64 `type:"long"` |
| 1483 |
|
| 1484 |
// The timestamp from the producer corresponding to the fragment. |
| 1485 |
ProducerTimestamp *time.Time `type:"timestamp"` |
| 1486 |
|
| 1487 |
// The timestamp from the Amazon Web Services server corresponding to the fragment. |
| 1488 |
ServerTimestamp *time.Time `type:"timestamp"` |
| 1489 |
} |
| 1490 |
|
| 1491 |
// String returns the string representation. |
| 1492 |
// |
| 1493 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 1494 |
// be included in the string output. The member name will be present, but the |
| 1495 |
// value will be replaced with "sensitive". |
| 1496 |
func (s Fragment) String() string { |
| 1497 |
return awsutil.Prettify(s) |
| 1498 |
} |
| 1499 |
|
| 1500 |
// GoString returns the string representation. |
| 1501 |
// |
| 1502 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 1503 |
// be included in the string output. The member name will be present, but the |
| 1504 |
// value will be replaced with "sensitive". |
| 1505 |
func (s Fragment) GoString() string { |
| 1506 |
return s.String() |
| 1507 |
} |
| 1508 |
|
| 1509 |
// SetFragmentLengthInMilliseconds sets the FragmentLengthInMilliseconds field's value. |
| 1510 |
func (s *Fragment) SetFragmentLengthInMilliseconds(v int64) *Fragment { |
| 1511 |
s.FragmentLengthInMilliseconds = &v |
| 1512 |
return s |
| 1513 |
} |
| 1514 |
|
| 1515 |
// SetFragmentNumber sets the FragmentNumber field's value. |
| 1516 |
func (s *Fragment) SetFragmentNumber(v string) *Fragment { |
| 1517 |
s.FragmentNumber = &v |
| 1518 |
return s |
| 1519 |
} |
| 1520 |
|
| 1521 |
// SetFragmentSizeInBytes sets the FragmentSizeInBytes field's value. |
| 1522 |
func (s *Fragment) SetFragmentSizeInBytes(v int64) *Fragment { |
| 1523 |
s.FragmentSizeInBytes = &v |
| 1524 |
return s |
| 1525 |
} |
| 1526 |
|
| 1527 |
// SetProducerTimestamp sets the ProducerTimestamp field's value. |
| 1528 |
func (s *Fragment) SetProducerTimestamp(v time.Time) *Fragment { |
| 1529 |
s.ProducerTimestamp = &v |
| 1530 |
return s |
| 1531 |
} |
| 1532 |
|
| 1533 |
// SetServerTimestamp sets the ServerTimestamp field's value. |
| 1534 |
func (s *Fragment) SetServerTimestamp(v time.Time) *Fragment { |
| 1535 |
s.ServerTimestamp = &v |
| 1536 |
return s |
| 1537 |
} |
| 1538 |
|
| 1539 |
// Describes the timestamp range and timestamp origin of a range of fragments. |
| 1540 |
// |
| 1541 |
// Only fragments with a start timestamp greater than or equal to the given |
| 1542 |
// start time and less than or equal to the end time are returned. For example, |
| 1543 |
// if a stream contains fragments with the following start timestamps: |
| 1544 |
// |
| 1545 |
// - 00:00:00 |
| 1546 |
// |
| 1547 |
// - 00:00:02 |
| 1548 |
// |
| 1549 |
// - 00:00:04 |
| 1550 |
// |
| 1551 |
// - 00:00:06 |
| 1552 |
// |
| 1553 |
// A fragment selector range with a start time of 00:00:01 and end time of 00:00:04 |
| 1554 |
// would return the fragments with start times of 00:00:02 and 00:00:04. |
| 1555 |
type FragmentSelector struct { |
| 1556 |
_ struct{} `type:"structure"` |
| 1557 |
|
| 1558 |
// The origin of the timestamps to use (Server or Producer). |
| 1559 |
// |
| 1560 |
// FragmentSelectorType is a required field |
| 1561 |
FragmentSelectorType *string `type:"string" required:"true" enum:"FragmentSelectorType"` |
| 1562 |
|
| 1563 |
// The range of timestamps to return. |
| 1564 |
// |
| 1565 |
// TimestampRange is a required field |
| 1566 |
TimestampRange *TimestampRange `type:"structure" required:"true"` |
| 1567 |
} |
| 1568 |
|
| 1569 |
// String returns the string representation. |
| 1570 |
// |
| 1571 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 1572 |
// be included in the string output. The member name will be present, but the |
| 1573 |
// value will be replaced with "sensitive". |
| 1574 |
func (s FragmentSelector) String() string { |
| 1575 |
return awsutil.Prettify(s) |
| 1576 |
} |
| 1577 |
|
| 1578 |
// GoString returns the string representation. |
| 1579 |
// |
| 1580 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 1581 |
// be included in the string output. The member name will be present, but the |
| 1582 |
// value will be replaced with "sensitive". |
| 1583 |
func (s FragmentSelector) GoString() string { |
| 1584 |
return s.String() |
| 1585 |
} |
| 1586 |
|
| 1587 |
// Validate inspects the fields of the type to determine if they are valid. |
| 1588 |
func (s *FragmentSelector) Validate() error { |
| 1589 |
invalidParams := request.ErrInvalidParams{Context: "FragmentSelector"} |
| 1590 |
if s.FragmentSelectorType == nil { |
| 1591 |
invalidParams.Add(request.NewErrParamRequired("FragmentSelectorType")) |
| 1592 |
} |
| 1593 |
if s.TimestampRange == nil { |
| 1594 |
invalidParams.Add(request.NewErrParamRequired("TimestampRange")) |
| 1595 |
} |
| 1596 |
if s.TimestampRange != nil { |
| 1597 |
if err := s.TimestampRange.Validate(); err != nil { |
| 1598 |
invalidParams.AddNested("TimestampRange", err.(request.ErrInvalidParams)) |
| 1599 |
} |
| 1600 |
} |
| 1601 |
|
| 1602 |
if invalidParams.Len() > 0 { |
| 1603 |
return invalidParams |
| 1604 |
} |
| 1605 |
return nil |
| 1606 |
} |
| 1607 |
|
| 1608 |
// SetFragmentSelectorType sets the FragmentSelectorType field's value. |
| 1609 |
func (s *FragmentSelector) SetFragmentSelectorType(v string) *FragmentSelector { |
| 1610 |
s.FragmentSelectorType = &v |
| 1611 |
return s |
| 1612 |
} |
| 1613 |
|
| 1614 |
// SetTimestampRange sets the TimestampRange field's value. |
| 1615 |
func (s *FragmentSelector) SetTimestampRange(v *TimestampRange) *FragmentSelector { |
| 1616 |
s.TimestampRange = v |
| 1617 |
return s |
| 1618 |
} |
| 1619 |
|
| 1620 |
type GetClipInput struct { |
| 1621 |
_ struct{} `type:"structure"` |
| 1622 |
|
| 1623 |
// The time range of the requested clip and the source of the timestamps. |
| 1624 |
// |
| 1625 |
// ClipFragmentSelector is a required field |
| 1626 |
ClipFragmentSelector *ClipFragmentSelector `type:"structure" required:"true"` |
| 1627 |
|
| 1628 |
// The Amazon Resource Name (ARN) of the stream for which to retrieve the media |
| 1629 |
// clip. |
| 1630 |
// |
| 1631 |
// You must specify either the StreamName or the StreamARN. |
| 1632 |
StreamARN *string `min:"1" type:"string"` |
| 1633 |
|
| 1634 |
// The name of the stream for which to retrieve the media clip. |
| 1635 |
// |
| 1636 |
// You must specify either the StreamName or the StreamARN. |
| 1637 |
StreamName *string `min:"1" type:"string"` |
| 1638 |
} |
| 1639 |
|
| 1640 |
// String returns the string representation. |
| 1641 |
// |
| 1642 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 1643 |
// be included in the string output. The member name will be present, but the |
| 1644 |
// value will be replaced with "sensitive". |
| 1645 |
func (s GetClipInput) String() string { |
| 1646 |
return awsutil.Prettify(s) |
| 1647 |
} |
| 1648 |
|
| 1649 |
// GoString returns the string representation. |
| 1650 |
// |
| 1651 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 1652 |
// be included in the string output. The member name will be present, but the |
| 1653 |
// value will be replaced with "sensitive". |
| 1654 |
func (s GetClipInput) GoString() string { |
| 1655 |
return s.String() |
| 1656 |
} |
| 1657 |
|
| 1658 |
// Validate inspects the fields of the type to determine if they are valid. |
| 1659 |
func (s *GetClipInput) Validate() error { |
| 1660 |
invalidParams := request.ErrInvalidParams{Context: "GetClipInput"} |
| 1661 |
if s.ClipFragmentSelector == nil { |
| 1662 |
invalidParams.Add(request.NewErrParamRequired("ClipFragmentSelector")) |
| 1663 |
} |
| 1664 |
if s.StreamARN != nil && len(*s.StreamARN) < 1 { |
| 1665 |
invalidParams.Add(request.NewErrParamMinLen("StreamARN", 1)) |
| 1666 |
} |
| 1667 |
if s.StreamName != nil && len(*s.StreamName) < 1 { |
| 1668 |
invalidParams.Add(request.NewErrParamMinLen("StreamName", 1)) |
| 1669 |
} |
| 1670 |
if s.ClipFragmentSelector != nil { |
| 1671 |
if err := s.ClipFragmentSelector.Validate(); err != nil { |
| 1672 |
invalidParams.AddNested("ClipFragmentSelector", err.(request.ErrInvalidParams)) |
| 1673 |
} |
| 1674 |
} |
| 1675 |
|
| 1676 |
if invalidParams.Len() > 0 { |
| 1677 |
return invalidParams |
| 1678 |
} |
| 1679 |
return nil |
| 1680 |
} |
| 1681 |
|
| 1682 |
// SetClipFragmentSelector sets the ClipFragmentSelector field's value. |
| 1683 |
func (s *GetClipInput) SetClipFragmentSelector(v *ClipFragmentSelector) *GetClipInput { |
| 1684 |
s.ClipFragmentSelector = v |
| 1685 |
return s |
| 1686 |
} |
| 1687 |
|
| 1688 |
// SetStreamARN sets the StreamARN field's value. |
| 1689 |
func (s *GetClipInput) SetStreamARN(v string) *GetClipInput { |
| 1690 |
s.StreamARN = &v |
| 1691 |
return s |
| 1692 |
} |
| 1693 |
|
| 1694 |
// SetStreamName sets the StreamName field's value. |
| 1695 |
func (s *GetClipInput) SetStreamName(v string) *GetClipInput { |
| 1696 |
s.StreamName = &v |
| 1697 |
return s |
| 1698 |
} |
| 1699 |
|
| 1700 |
type GetClipOutput struct { |
| 1701 |
_ struct{} `type:"structure" payload:"Payload"` |
| 1702 |
|
| 1703 |
// The content type of the media in the requested clip. |
| 1704 |
ContentType *string `location:"header" locationName:"Content-Type" min:"1" type:"string"` |
| 1705 |
|
| 1706 |
// Traditional MP4 file that contains the media clip from the specified video |
| 1707 |
// stream. The output will contain the first 100 MB or the first 200 fragments |
| 1708 |
// from the specified start timestamp. For more information, see Kinesis Video |
| 1709 |
// Streams Limits (https://docs.aws.amazon.com/kinesisvideostreams/latest/dg/limits.html). |
| 1710 |
Payload io.ReadCloser `type:"blob"` |
| 1711 |
} |
| 1712 |
|
| 1713 |
// String returns the string representation. |
| 1714 |
// |
| 1715 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 1716 |
// be included in the string output. The member name will be present, but the |
| 1717 |
// value will be replaced with "sensitive". |
| 1718 |
func (s GetClipOutput) String() string { |
| 1719 |
return awsutil.Prettify(s) |
| 1720 |
} |
| 1721 |
|
| 1722 |
// GoString returns the string representation. |
| 1723 |
// |
| 1724 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 1725 |
// be included in the string output. The member name will be present, but the |
| 1726 |
// value will be replaced with "sensitive". |
| 1727 |
func (s GetClipOutput) GoString() string { |
| 1728 |
return s.String() |
| 1729 |
} |
| 1730 |
|
| 1731 |
// SetContentType sets the ContentType field's value. |
| 1732 |
func (s *GetClipOutput) SetContentType(v string) *GetClipOutput { |
| 1733 |
s.ContentType = &v |
| 1734 |
return s |
| 1735 |
} |
| 1736 |
|
| 1737 |
// SetPayload sets the Payload field's value. |
| 1738 |
func (s *GetClipOutput) SetPayload(v io.ReadCloser) *GetClipOutput { |
| 1739 |
s.Payload = v |
| 1740 |
return s |
| 1741 |
} |
| 1742 |
|
| 1743 |
type GetDASHStreamingSessionURLInput struct { |
| 1744 |
_ struct{} `type:"structure"` |
| 1745 |
|
| 1746 |
// The time range of the requested fragment and the source of the timestamps. |
| 1747 |
// |
| 1748 |
// This parameter is required if PlaybackMode is ON_DEMAND or LIVE_REPLAY. This |
| 1749 |
// parameter is optional if PlaybackMode is LIVE. If PlaybackMode is LIVE, the |
| 1750 |
// FragmentSelectorType can be set, but the TimestampRange should not be set. |
| 1751 |
// If PlaybackMode is ON_DEMAND or LIVE_REPLAY, both FragmentSelectorType and |
| 1752 |
// TimestampRange must be set. |
| 1753 |
DASHFragmentSelector *DASHFragmentSelector `type:"structure"` |
| 1754 |
|
| 1755 |
// Fragments are identified in the manifest file based on their sequence number |
| 1756 |
// in the session. If DisplayFragmentNumber is set to ALWAYS, the Kinesis Video |
| 1757 |
// Streams fragment number is added to each S element in the manifest file with |
| 1758 |
// the attribute name “kvs:fn”. These fragment numbers can be used for logging |
| 1759 |
// or for use with other APIs (e.g. GetMedia and GetMediaForFragmentList). A |
| 1760 |
// custom MPEG-DASH media player is necessary to leverage these this custom |
| 1761 |
// attribute. |
| 1762 |
// |
| 1763 |
// The default value is NEVER. |
| 1764 |
DisplayFragmentNumber *string `type:"string" enum:"DASHDisplayFragmentNumber"` |
| 1765 |
|
| 1766 |
// Per the MPEG-DASH specification, the wall-clock time of fragments in the |
| 1767 |
// manifest file can be derived using attributes in the manifest itself. However, |
| 1768 |
// typically, MPEG-DASH compatible media players do not properly handle gaps |
| 1769 |
// in the media timeline. Kinesis Video Streams adjusts the media timeline in |
| 1770 |
// the manifest file to enable playback of media with discontinuities. Therefore, |
| 1771 |
// the wall-clock time derived from the manifest file may be inaccurate. If |
| 1772 |
// DisplayFragmentTimestamp is set to ALWAYS, the accurate fragment timestamp |
| 1773 |
// is added to each S element in the manifest file with the attribute name “kvs:ts”. |
| 1774 |
// A custom MPEG-DASH media player is necessary to leverage this custom attribute. |
| 1775 |
// |
| 1776 |
// The default value is NEVER. When DASHFragmentSelector is SERVER_TIMESTAMP, |
| 1777 |
// the timestamps will be the server start timestamps. Similarly, when DASHFragmentSelector |
| 1778 |
// is PRODUCER_TIMESTAMP, the timestamps will be the producer start timestamps. |
| 1779 |
DisplayFragmentTimestamp *string `type:"string" enum:"DASHDisplayFragmentTimestamp"` |
| 1780 |
|
| 1781 |
// The time in seconds until the requested session expires. This value can be |
| 1782 |
// between 300 (5 minutes) and 43200 (12 hours). |
| 1783 |
// |
| 1784 |
// When a session expires, no new calls to GetDashManifest, GetMP4InitFragment, |
| 1785 |
// or GetMP4MediaFragment can be made for that session. |
| 1786 |
// |
| 1787 |
// The default is 300 (5 minutes). |
| 1788 |
Expires *int64 `min:"300" type:"integer"` |
| 1789 |
|
| 1790 |
// The maximum number of fragments that are returned in the MPEG-DASH manifest. |
| 1791 |
// |
| 1792 |
// When the PlaybackMode is LIVE, the most recent fragments are returned up |
| 1793 |
// to this value. When the PlaybackMode is ON_DEMAND, the oldest fragments are |
| 1794 |
// returned, up to this maximum number. |
| 1795 |
// |
| 1796 |
// When there are a higher number of fragments available in a live MPEG-DASH |
| 1797 |
// manifest, video players often buffer content before starting playback. Increasing |
| 1798 |
// the buffer size increases the playback latency, but it decreases the likelihood |
| 1799 |
// that rebuffering will occur during playback. We recommend that a live MPEG-DASH |
| 1800 |
// manifest have a minimum of 3 fragments and a maximum of 10 fragments. |
| 1801 |
// |
| 1802 |
// The default is 5 fragments if PlaybackMode is LIVE or LIVE_REPLAY, and 1,000 |
| 1803 |
// if PlaybackMode is ON_DEMAND. |
| 1804 |
// |
| 1805 |
// The maximum value of 1,000 fragments corresponds to more than 16 minutes |
| 1806 |
// of video on streams with 1-second fragments, and more than 2 1/2 hours of |
| 1807 |
// video on streams with 10-second fragments. |
| 1808 |
MaxManifestFragmentResults *int64 `min:"1" type:"long"` |
| 1809 |
|
| 1810 |
// Whether to retrieve live, live replay, or archived, on-demand data. |
| 1811 |
// |
| 1812 |
// Features of the three types of sessions include the following: |
| 1813 |
// |
| 1814 |
// * LIVE : For sessions of this type, the MPEG-DASH manifest is continually |
| 1815 |
// updated with the latest fragments as they become available. We recommend |
| 1816 |
// that the media player retrieve a new manifest on a one-second interval. |
| 1817 |
// When this type of session is played in a media player, the user interface |
| 1818 |
// typically displays a "live" notification, with no scrubber control for |
| 1819 |
// choosing the position in the playback window to display. In LIVE mode, |
| 1820 |
// the newest available fragments are included in an MPEG-DASH manifest, |
| 1821 |
// even if there is a gap between fragments (that is, if a fragment is missing). |
| 1822 |
// A gap like this might cause a media player to halt or cause a jump in |
| 1823 |
// playback. In this mode, fragments are not added to the MPEG-DASH manifest |
| 1824 |
// if they are older than the newest fragment in the playlist. If the missing |
| 1825 |
// fragment becomes available after a subsequent fragment is added to the |
| 1826 |
// manifest, the older fragment is not added, and the gap is not filled. |
| 1827 |
// |
| 1828 |
// * LIVE_REPLAY : For sessions of this type, the MPEG-DASH manifest is updated |
| 1829 |
// similarly to how it is updated for LIVE mode except that it starts by |
| 1830 |
// including fragments from a given start time. Instead of fragments being |
| 1831 |
// added as they are ingested, fragments are added as the duration of the |
| 1832 |
// next fragment elapses. For example, if the fragments in the session are |
| 1833 |
// two seconds long, then a new fragment is added to the manifest every two |
| 1834 |
// seconds. This mode is useful to be able to start playback from when an |
| 1835 |
// event is detected and continue live streaming media that has not yet been |
| 1836 |
// ingested as of the time of the session creation. This mode is also useful |
| 1837 |
// to stream previously archived media without being limited by the 1,000 |
| 1838 |
// fragment limit in the ON_DEMAND mode. |
| 1839 |
// |
| 1840 |
// * ON_DEMAND : For sessions of this type, the MPEG-DASH manifest contains |
| 1841 |
// all the fragments for the session, up to the number that is specified |
| 1842 |
// in MaxManifestFragmentResults. The manifest must be retrieved only once |
| 1843 |
// for each session. When this type of session is played in a media player, |
| 1844 |
// the user interface typically displays a scrubber control for choosing |
| 1845 |
// the position in the playback window to display. |
| 1846 |
// |
| 1847 |
// In all playback modes, if FragmentSelectorType is PRODUCER_TIMESTAMP, and |
| 1848 |
// if there are multiple fragments with the same start timestamp, the fragment |
| 1849 |
// that has the larger fragment number (that is, the newer fragment) is included |
| 1850 |
// in the MPEG-DASH manifest. The other fragments are not included. Fragments |
| 1851 |
// that have different timestamps but have overlapping durations are still included |
| 1852 |
// in the MPEG-DASH manifest. This can lead to unexpected behavior in the media |
| 1853 |
// player. |
| 1854 |
// |
| 1855 |
// The default is LIVE. |
| 1856 |
PlaybackMode *string `type:"string" enum:"DASHPlaybackMode"` |
| 1857 |
|
| 1858 |
// The Amazon Resource Name (ARN) of the stream for which to retrieve the MPEG-DASH |
| 1859 |
// manifest URL. |
| 1860 |
// |
| 1861 |
// You must specify either the StreamName or the StreamARN. |
| 1862 |
StreamARN *string `min:"1" type:"string"` |
| 1863 |
|
| 1864 |
// The name of the stream for which to retrieve the MPEG-DASH manifest URL. |
| 1865 |
// |
| 1866 |
// You must specify either the StreamName or the StreamARN. |
| 1867 |
StreamName *string `min:"1" type:"string"` |
| 1868 |
} |
| 1869 |
|
| 1870 |
// String returns the string representation. |
| 1871 |
// |
| 1872 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 1873 |
// be included in the string output. The member name will be present, but the |
| 1874 |
// value will be replaced with "sensitive". |
| 1875 |
func (s GetDASHStreamingSessionURLInput) String() string { |
| 1876 |
return awsutil.Prettify(s) |
| 1877 |
} |
| 1878 |
|
| 1879 |
// GoString returns the string representation. |
| 1880 |
// |
| 1881 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 1882 |
// be included in the string output. The member name will be present, but the |
| 1883 |
// value will be replaced with "sensitive". |
| 1884 |
func (s GetDASHStreamingSessionURLInput) GoString() string { |
| 1885 |
return s.String() |
| 1886 |
} |
| 1887 |
|
| 1888 |
// Validate inspects the fields of the type to determine if they are valid. |
| 1889 |
func (s *GetDASHStreamingSessionURLInput) Validate() error { |
| 1890 |
invalidParams := request.ErrInvalidParams{Context: "GetDASHStreamingSessionURLInput"} |
| 1891 |
if s.Expires != nil && *s.Expires < 300 { |
| 1892 |
invalidParams.Add(request.NewErrParamMinValue("Expires", 300)) |
| 1893 |
} |
| 1894 |
if s.MaxManifestFragmentResults != nil && *s.MaxManifestFragmentResults < 1 { |
| 1895 |
invalidParams.Add(request.NewErrParamMinValue("MaxManifestFragmentResults", 1)) |
| 1896 |
} |
| 1897 |
if s.StreamARN != nil && len(*s.StreamARN) < 1 { |
| 1898 |
invalidParams.Add(request.NewErrParamMinLen("StreamARN", 1)) |
| 1899 |
} |
| 1900 |
if s.StreamName != nil && len(*s.StreamName) < 1 { |
| 1901 |
invalidParams.Add(request.NewErrParamMinLen("StreamName", 1)) |
| 1902 |
} |
| 1903 |
|
| 1904 |
if invalidParams.Len() > 0 { |
| 1905 |
return invalidParams |
| 1906 |
} |
| 1907 |
return nil |
| 1908 |
} |
| 1909 |
|
| 1910 |
// SetDASHFragmentSelector sets the DASHFragmentSelector field's value. |
| 1911 |
func (s *GetDASHStreamingSessionURLInput) SetDASHFragmentSelector(v *DASHFragmentSelector) *GetDASHStreamingSessionURLInput { |
| 1912 |
s.DASHFragmentSelector = v |
| 1913 |
return s |
| 1914 |
} |
| 1915 |
|
| 1916 |
// SetDisplayFragmentNumber sets the DisplayFragmentNumber field's value. |
| 1917 |
func (s *GetDASHStreamingSessionURLInput) SetDisplayFragmentNumber(v string) *GetDASHStreamingSessionURLInput { |
| 1918 |
s.DisplayFragmentNumber = &v |
| 1919 |
return s |
| 1920 |
} |
| 1921 |
|
| 1922 |
// SetDisplayFragmentTimestamp sets the DisplayFragmentTimestamp field's value. |
| 1923 |
func (s *GetDASHStreamingSessionURLInput) SetDisplayFragmentTimestamp(v string) *GetDASHStreamingSessionURLInput { |
| 1924 |
s.DisplayFragmentTimestamp = &v |
| 1925 |
return s |
| 1926 |
} |
| 1927 |
|
| 1928 |
// SetExpires sets the Expires field's value. |
| 1929 |
func (s *GetDASHStreamingSessionURLInput) SetExpires(v int64) *GetDASHStreamingSessionURLInput { |
| 1930 |
s.Expires = &v |
| 1931 |
return s |
| 1932 |
} |
| 1933 |
|
| 1934 |
// SetMaxManifestFragmentResults sets the MaxManifestFragmentResults field's value. |
| 1935 |
func (s *GetDASHStreamingSessionURLInput) SetMaxManifestFragmentResults(v int64) *GetDASHStreamingSessionURLInput { |
| 1936 |
s.MaxManifestFragmentResults = &v |
| 1937 |
return s |
| 1938 |
} |
| 1939 |
|
| 1940 |
// SetPlaybackMode sets the PlaybackMode field's value. |
| 1941 |
func (s *GetDASHStreamingSessionURLInput) SetPlaybackMode(v string) *GetDASHStreamingSessionURLInput { |
| 1942 |
s.PlaybackMode = &v |
| 1943 |
return s |
| 1944 |
} |
| 1945 |
|
| 1946 |
// SetStreamARN sets the StreamARN field's value. |
| 1947 |
func (s *GetDASHStreamingSessionURLInput) SetStreamARN(v string) *GetDASHStreamingSessionURLInput { |
| 1948 |
s.StreamARN = &v |
| 1949 |
return s |
| 1950 |
} |
| 1951 |
|
| 1952 |
// SetStreamName sets the StreamName field's value. |
| 1953 |
func (s *GetDASHStreamingSessionURLInput) SetStreamName(v string) *GetDASHStreamingSessionURLInput { |
| 1954 |
s.StreamName = &v |
| 1955 |
return s |
| 1956 |
} |
| 1957 |
|
| 1958 |
type GetDASHStreamingSessionURLOutput struct { |
| 1959 |
_ struct{} `type:"structure"` |
| 1960 |
|
| 1961 |
// The URL (containing the session token) that a media player can use to retrieve |
| 1962 |
// the MPEG-DASH manifest. |
| 1963 |
DASHStreamingSessionURL *string `type:"string"` |
| 1964 |
} |
| 1965 |
|
| 1966 |
// String returns the string representation. |
| 1967 |
// |
| 1968 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 1969 |
// be included in the string output. The member name will be present, but the |
| 1970 |
// value will be replaced with "sensitive". |
| 1971 |
func (s GetDASHStreamingSessionURLOutput) String() string { |
| 1972 |
return awsutil.Prettify(s) |
| 1973 |
} |
| 1974 |
|
| 1975 |
// GoString returns the string representation. |
| 1976 |
// |
| 1977 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 1978 |
// be included in the string output. The member name will be present, but the |
| 1979 |
// value will be replaced with "sensitive". |
| 1980 |
func (s GetDASHStreamingSessionURLOutput) GoString() string { |
| 1981 |
return s.String() |
| 1982 |
} |
| 1983 |
|
| 1984 |
// SetDASHStreamingSessionURL sets the DASHStreamingSessionURL field's value. |
| 1985 |
func (s *GetDASHStreamingSessionURLOutput) SetDASHStreamingSessionURL(v string) *GetDASHStreamingSessionURLOutput { |
| 1986 |
s.DASHStreamingSessionURL = &v |
| 1987 |
return s |
| 1988 |
} |
| 1989 |
|
| 1990 |
type GetHLSStreamingSessionURLInput struct { |
| 1991 |
_ struct{} `type:"structure"` |
| 1992 |
|
| 1993 |
// Specifies which format should be used for packaging the media. Specifying |
| 1994 |
// the FRAGMENTED_MP4 container format packages the media into MP4 fragments |
| 1995 |
// (fMP4 or CMAF). This is the recommended packaging because there is minimal |
| 1996 |
// packaging overhead. The other container format option is MPEG_TS. HLS has |
| 1997 |
// supported MPEG TS chunks since it was released and is sometimes the only |
| 1998 |
// supported packaging on older HLS players. MPEG TS typically has a 5-25 percent |
| 1999 |
// packaging overhead. This means MPEG TS typically requires 5-25 percent more |
| 2000 |
// bandwidth and cost than fMP4. |
| 2001 |
// |
| 2002 |
// The default is FRAGMENTED_MP4. |
| 2003 |
ContainerFormat *string `type:"string" enum:"ContainerFormat"` |
| 2004 |
|
| 2005 |
// Specifies when flags marking discontinuities between fragments are added |
| 2006 |
// to the media playlists. |
| 2007 |
// |
| 2008 |
// Media players typically build a timeline of media content to play, based |
| 2009 |
// on the timestamps of each fragment. This means that if there is any overlap |
| 2010 |
// or gap between fragments (as is typical if HLSFragmentSelector is set to |
| 2011 |
// SERVER_TIMESTAMP), the media player timeline will also have small gaps between |
| 2012 |
// fragments in some places, and will overwrite frames in other places. Gaps |
| 2013 |
// in the media player timeline can cause playback to stall and overlaps can |
| 2014 |
// cause playback to be jittery. When there are discontinuity flags between |
| 2015 |
// fragments, the media player is expected to reset the timeline, resulting |
| 2016 |
// in the next fragment being played immediately after the previous fragment. |
| 2017 |
// |
| 2018 |
// The following modes are supported: |
| 2019 |
// |
| 2020 |
// * ALWAYS: a discontinuity marker is placed between every fragment in the |
| 2021 |
// HLS media playlist. It is recommended to use a value of ALWAYS if the |
| 2022 |
// fragment timestamps are not accurate. |
| 2023 |
// |
| 2024 |
// * NEVER: no discontinuity markers are placed anywhere. It is recommended |
| 2025 |
// to use a value of NEVER to ensure the media player timeline most accurately |
| 2026 |
// maps to the producer timestamps. |
| 2027 |
// |
| 2028 |
// * ON_DISCONTINUITY: a discontinuity marker is placed between fragments |
| 2029 |
// that have a gap or overlap of more than 50 milliseconds. For most playback |
| 2030 |
// scenarios, it is recommended to use a value of ON_DISCONTINUITY so that |
| 2031 |
// the media player timeline is only reset when there is a significant issue |
| 2032 |
// with the media timeline (e.g. a missing fragment). |
| 2033 |
// |
| 2034 |
// The default is ALWAYS when HLSFragmentSelector is set to SERVER_TIMESTAMP, |
| 2035 |
// and NEVER when it is set to PRODUCER_TIMESTAMP. |
| 2036 |
DiscontinuityMode *string `type:"string" enum:"HLSDiscontinuityMode"` |
| 2037 |
|
| 2038 |
// Specifies when the fragment start timestamps should be included in the HLS |
| 2039 |
// media playlist. Typically, media players report the playhead position as |
| 2040 |
// a time relative to the start of the first fragment in the playback session. |
| 2041 |
// However, when the start timestamps are included in the HLS media playlist, |
| 2042 |
// some media players might report the current playhead as an absolute time |
| 2043 |
// based on the fragment timestamps. This can be useful for creating a playback |
| 2044 |
// experience that shows viewers the wall-clock time of the media. |
| 2045 |
// |
| 2046 |
// The default is NEVER. When HLSFragmentSelector is SERVER_TIMESTAMP, the timestamps |
| 2047 |
// will be the server start timestamps. Similarly, when HLSFragmentSelector |
| 2048 |
// is PRODUCER_TIMESTAMP, the timestamps will be the producer start timestamps. |
| 2049 |
DisplayFragmentTimestamp *string `type:"string" enum:"HLSDisplayFragmentTimestamp"` |
| 2050 |
|
| 2051 |
// The time in seconds until the requested session expires. This value can be |
| 2052 |
// between 300 (5 minutes) and 43200 (12 hours). |
| 2053 |
// |
| 2054 |
// When a session expires, no new calls to GetHLSMasterPlaylist, GetHLSMediaPlaylist, |
| 2055 |
// GetMP4InitFragment, GetMP4MediaFragment, or GetTSFragment can be made for |
| 2056 |
// that session. |
| 2057 |
// |
| 2058 |
// The default is 300 (5 minutes). |
| 2059 |
Expires *int64 `min:"300" type:"integer"` |
| 2060 |
|
| 2061 |
// The time range of the requested fragment and the source of the timestamps. |
| 2062 |
// |
| 2063 |
// This parameter is required if PlaybackMode is ON_DEMAND or LIVE_REPLAY. This |
| 2064 |
// parameter is optional if PlaybackMode is LIVE. If PlaybackMode is LIVE, the |
| 2065 |
// FragmentSelectorType can be set, but the TimestampRange should not be set. |
| 2066 |
// If PlaybackMode is ON_DEMAND or LIVE_REPLAY, both FragmentSelectorType and |
| 2067 |
// TimestampRange must be set. |
| 2068 |
HLSFragmentSelector *HLSFragmentSelector `type:"structure"` |
| 2069 |
|
| 2070 |
// The maximum number of fragments that are returned in the HLS media playlists. |
| 2071 |
// |
| 2072 |
// When the PlaybackMode is LIVE, the most recent fragments are returned up |
| 2073 |
// to this value. When the PlaybackMode is ON_DEMAND, the oldest fragments are |
| 2074 |
// returned, up to this maximum number. |
| 2075 |
// |
| 2076 |
// When there are a higher number of fragments available in a live HLS media |
| 2077 |
// playlist, video players often buffer content before starting playback. Increasing |
| 2078 |
// the buffer size increases the playback latency, but it decreases the likelihood |
| 2079 |
// that rebuffering will occur during playback. We recommend that a live HLS |
| 2080 |
// media playlist have a minimum of 3 fragments and a maximum of 10 fragments. |
| 2081 |
// |
| 2082 |
// The default is 5 fragments if PlaybackMode is LIVE or LIVE_REPLAY, and 1,000 |
| 2083 |
// if PlaybackMode is ON_DEMAND. |
| 2084 |
// |
| 2085 |
// The maximum value of 5,000 fragments corresponds to more than 80 minutes |
| 2086 |
// of video on streams with 1-second fragments, and more than 13 hours of video |
| 2087 |
// on streams with 10-second fragments. |
| 2088 |
MaxMediaPlaylistFragmentResults *int64 `min:"1" type:"long"` |
| 2089 |
|
| 2090 |
// Whether to retrieve live, live replay, or archived, on-demand data. |
| 2091 |
// |
| 2092 |
// Features of the three types of sessions include the following: |
| 2093 |
// |
| 2094 |
// * LIVE : For sessions of this type, the HLS media playlist is continually |
| 2095 |
// updated with the latest fragments as they become available. We recommend |
| 2096 |
// that the media player retrieve a new playlist on a one-second interval. |
| 2097 |
// When this type of session is played in a media player, the user interface |
| 2098 |
// typically displays a "live" notification, with no scrubber control for |
| 2099 |
// choosing the position in the playback window to display. In LIVE mode, |
| 2100 |
// the newest available fragments are included in an HLS media playlist, |
| 2101 |
// even if there is a gap between fragments (that is, if a fragment is missing). |
| 2102 |
// A gap like this might cause a media player to halt or cause a jump in |
| 2103 |
// playback. In this mode, fragments are not added to the HLS media playlist |
| 2104 |
// if they are older than the newest fragment in the playlist. If the missing |
| 2105 |
// fragment becomes available after a subsequent fragment is added to the |
| 2106 |
// playlist, the older fragment is not added, and the gap is not filled. |
| 2107 |
// |
| 2108 |
// * LIVE_REPLAY : For sessions of this type, the HLS media playlist is updated |
| 2109 |
// similarly to how it is updated for LIVE mode except that it starts by |
| 2110 |
// including fragments from a given start time. Instead of fragments being |
| 2111 |
// added as they are ingested, fragments are added as the duration of the |
| 2112 |
// next fragment elapses. For example, if the fragments in the session are |
| 2113 |
// two seconds long, then a new fragment is added to the media playlist every |
| 2114 |
// two seconds. This mode is useful to be able to start playback from when |
| 2115 |
// an event is detected and continue live streaming media that has not yet |
| 2116 |
// been ingested as of the time of the session creation. This mode is also |
| 2117 |
// useful to stream previously archived media without being limited by the |
| 2118 |
// 1,000 fragment limit in the ON_DEMAND mode. |
| 2119 |
// |
| 2120 |
// * ON_DEMAND : For sessions of this type, the HLS media playlist contains |
| 2121 |
// all the fragments for the session, up to the number that is specified |
| 2122 |
// in MaxMediaPlaylistFragmentResults. The playlist must be retrieved only |
| 2123 |
// once for each session. When this type of session is played in a media |
| 2124 |
// player, the user interface typically displays a scrubber control for choosing |
| 2125 |
// the position in the playback window to display. |
| 2126 |
// |
| 2127 |
// In all playback modes, if FragmentSelectorType is PRODUCER_TIMESTAMP, and |
| 2128 |
// if there are multiple fragments with the same start timestamp, the fragment |
| 2129 |
// that has the largest fragment number (that is, the newest fragment) is included |
| 2130 |
// in the HLS media playlist. The other fragments are not included. Fragments |
| 2131 |
// that have different timestamps but have overlapping durations are still included |
| 2132 |
// in the HLS media playlist. This can lead to unexpected behavior in the media |
| 2133 |
// player. |
| 2134 |
// |
| 2135 |
// The default is LIVE. |
| 2136 |
PlaybackMode *string `type:"string" enum:"HLSPlaybackMode"` |
| 2137 |
|
| 2138 |
// The Amazon Resource Name (ARN) of the stream for which to retrieve the HLS |
| 2139 |
// master playlist URL. |
| 2140 |
// |
| 2141 |
// You must specify either the StreamName or the StreamARN. |
| 2142 |
StreamARN *string `min:"1" type:"string"` |
| 2143 |
|
| 2144 |
// The name of the stream for which to retrieve the HLS master playlist URL. |
| 2145 |
// |
| 2146 |
// You must specify either the StreamName or the StreamARN. |
| 2147 |
StreamName *string `min:"1" type:"string"` |
| 2148 |
} |
| 2149 |
|
| 2150 |
// String returns the string representation. |
| 2151 |
// |
| 2152 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 2153 |
// be included in the string output. The member name will be present, but the |
| 2154 |
// value will be replaced with "sensitive". |
| 2155 |
func (s GetHLSStreamingSessionURLInput) String() string { |
| 2156 |
return awsutil.Prettify(s) |
| 2157 |
} |
| 2158 |
|
| 2159 |
// GoString returns the string representation. |
| 2160 |
// |
| 2161 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 2162 |
// be included in the string output. The member name will be present, but the |
| 2163 |
// value will be replaced with "sensitive". |
| 2164 |
func (s GetHLSStreamingSessionURLInput) GoString() string { |
| 2165 |
return s.String() |
| 2166 |
} |
| 2167 |
|
| 2168 |
// Validate inspects the fields of the type to determine if they are valid. |
| 2169 |
func (s *GetHLSStreamingSessionURLInput) Validate() error { |
| 2170 |
invalidParams := request.ErrInvalidParams{Context: "GetHLSStreamingSessionURLInput"} |
| 2171 |
if s.Expires != nil && *s.Expires < 300 { |
| 2172 |
invalidParams.Add(request.NewErrParamMinValue("Expires", 300)) |
| 2173 |
} |
| 2174 |
if s.MaxMediaPlaylistFragmentResults != nil && *s.MaxMediaPlaylistFragmentResults < 1 { |
| 2175 |
invalidParams.Add(request.NewErrParamMinValue("MaxMediaPlaylistFragmentResults", 1)) |
| 2176 |
} |
| 2177 |
if s.StreamARN != nil && len(*s.StreamARN) < 1 { |
| 2178 |
invalidParams.Add(request.NewErrParamMinLen("StreamARN", 1)) |
| 2179 |
} |
| 2180 |
if s.StreamName != nil && len(*s.StreamName) < 1 { |
| 2181 |
invalidParams.Add(request.NewErrParamMinLen("StreamName", 1)) |
| 2182 |
} |
| 2183 |
|
| 2184 |
if invalidParams.Len() > 0 { |
| 2185 |
return invalidParams |
| 2186 |
} |
| 2187 |
return nil |
| 2188 |
} |
| 2189 |
|
| 2190 |
// SetContainerFormat sets the ContainerFormat field's value. |
| 2191 |
func (s *GetHLSStreamingSessionURLInput) SetContainerFormat(v string) *GetHLSStreamingSessionURLInput { |
| 2192 |
s.ContainerFormat = &v |
| 2193 |
return s |
| 2194 |
} |
| 2195 |
|
| 2196 |
// SetDiscontinuityMode sets the DiscontinuityMode field's value. |
| 2197 |
func (s *GetHLSStreamingSessionURLInput) SetDiscontinuityMode(v string) *GetHLSStreamingSessionURLInput { |
| 2198 |
s.DiscontinuityMode = &v |
| 2199 |
return s |
| 2200 |
} |
| 2201 |
|
| 2202 |
// SetDisplayFragmentTimestamp sets the DisplayFragmentTimestamp field's value. |
| 2203 |
func (s *GetHLSStreamingSessionURLInput) SetDisplayFragmentTimestamp(v string) *GetHLSStreamingSessionURLInput { |
| 2204 |
s.DisplayFragmentTimestamp = &v |
| 2205 |
return s |
| 2206 |
} |
| 2207 |
|
| 2208 |
// SetExpires sets the Expires field's value. |
| 2209 |
func (s *GetHLSStreamingSessionURLInput) SetExpires(v int64) *GetHLSStreamingSessionURLInput { |
| 2210 |
s.Expires = &v |
| 2211 |
return s |
| 2212 |
} |
| 2213 |
|
| 2214 |
// SetHLSFragmentSelector sets the HLSFragmentSelector field's value. |
| 2215 |
func (s *GetHLSStreamingSessionURLInput) SetHLSFragmentSelector(v *HLSFragmentSelector) *GetHLSStreamingSessionURLInput { |
| 2216 |
s.HLSFragmentSelector = v |
| 2217 |
return s |
| 2218 |
} |
| 2219 |
|
| 2220 |
// SetMaxMediaPlaylistFragmentResults sets the MaxMediaPlaylistFragmentResults field's value. |
| 2221 |
func (s *GetHLSStreamingSessionURLInput) SetMaxMediaPlaylistFragmentResults(v int64) *GetHLSStreamingSessionURLInput { |
| 2222 |
s.MaxMediaPlaylistFragmentResults = &v |
| 2223 |
return s |
| 2224 |
} |
| 2225 |
|
| 2226 |
// SetPlaybackMode sets the PlaybackMode field's value. |
| 2227 |
func (s *GetHLSStreamingSessionURLInput) SetPlaybackMode(v string) *GetHLSStreamingSessionURLInput { |
| 2228 |
s.PlaybackMode = &v |
| 2229 |
return s |
| 2230 |
} |
| 2231 |
|
| 2232 |
// SetStreamARN sets the StreamARN field's value. |
| 2233 |
func (s *GetHLSStreamingSessionURLInput) SetStreamARN(v string) *GetHLSStreamingSessionURLInput { |
| 2234 |
s.StreamARN = &v |
| 2235 |
return s |
| 2236 |
} |
| 2237 |
|
| 2238 |
// SetStreamName sets the StreamName field's value. |
| 2239 |
func (s *GetHLSStreamingSessionURLInput) SetStreamName(v string) *GetHLSStreamingSessionURLInput { |
| 2240 |
s.StreamName = &v |
| 2241 |
return s |
| 2242 |
} |
| 2243 |
|
| 2244 |
type GetHLSStreamingSessionURLOutput struct { |
| 2245 |
_ struct{} `type:"structure"` |
| 2246 |
|
| 2247 |
// The URL (containing the session token) that a media player can use to retrieve |
| 2248 |
// the HLS master playlist. |
| 2249 |
HLSStreamingSessionURL *string `type:"string"` |
| 2250 |
} |
| 2251 |
|
| 2252 |
// String returns the string representation. |
| 2253 |
// |
| 2254 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 2255 |
// be included in the string output. The member name will be present, but the |
| 2256 |
// value will be replaced with "sensitive". |
| 2257 |
func (s GetHLSStreamingSessionURLOutput) String() string { |
| 2258 |
return awsutil.Prettify(s) |
| 2259 |
} |
| 2260 |
|
| 2261 |
// GoString returns the string representation. |
| 2262 |
// |
| 2263 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 2264 |
// be included in the string output. The member name will be present, but the |
| 2265 |
// value will be replaced with "sensitive". |
| 2266 |
func (s GetHLSStreamingSessionURLOutput) GoString() string { |
| 2267 |
return s.String() |
| 2268 |
} |
| 2269 |
|
| 2270 |
// SetHLSStreamingSessionURL sets the HLSStreamingSessionURL field's value. |
| 2271 |
func (s *GetHLSStreamingSessionURLOutput) SetHLSStreamingSessionURL(v string) *GetHLSStreamingSessionURLOutput { |
| 2272 |
s.HLSStreamingSessionURL = &v |
| 2273 |
return s |
| 2274 |
} |
| 2275 |
|
| 2276 |
type GetImagesInput struct { |
| 2277 |
_ struct{} `type:"structure"` |
| 2278 |
|
| 2279 |
// The end timestamp for the range of images to be generated. If the time range |
| 2280 |
// between StartTimestamp and EndTimestamp is more than 300 seconds above StartTimestamp, |
| 2281 |
// you will receive an IllegalArgumentException. |
| 2282 |
// |
| 2283 |
// EndTimestamp is a required field |
| 2284 |
EndTimestamp *time.Time `type:"timestamp" required:"true"` |
| 2285 |
|
| 2286 |
// The format that will be used to encode the image. |
| 2287 |
// |
| 2288 |
// Format is a required field |
| 2289 |
Format *string `type:"string" required:"true" enum:"Format"` |
| 2290 |
|
| 2291 |
// The list of a key-value pair structure that contains extra parameters that |
| 2292 |
// can be applied when the image is generated. The FormatConfig key is the JPEGQuality, |
| 2293 |
// which indicates the JPEG quality key to be used to generate the image. The |
| 2294 |
// FormatConfig value accepts ints from 1 to 100. If the value is 1, the image |
| 2295 |
// will be generated with less quality and the best compression. If the value |
| 2296 |
// is 100, the image will be generated with the best quality and less compression. |
| 2297 |
// If no value is provided, the default value of the JPEGQuality key will be |
| 2298 |
// set to 80. |
| 2299 |
FormatConfig map[string]*string `min:"1" type:"map"` |
| 2300 |
|
| 2301 |
// The height of the output image that is used in conjunction with the WidthPixels |
| 2302 |
// parameter. When both HeightPixels and WidthPixels parameters are provided, |
| 2303 |
// the image will be stretched to fit the specified aspect ratio. If only the |
| 2304 |
// HeightPixels parameter is provided, its original aspect ratio will be used |
| 2305 |
// to calculate the WidthPixels ratio. If neither parameter is provided, the |
| 2306 |
// original image size will be returned. |
| 2307 |
HeightPixels *int64 `min:"1" type:"integer"` |
| 2308 |
|
| 2309 |
// The origin of the Server or Producer timestamps to use to generate the images. |
| 2310 |
// |
| 2311 |
// ImageSelectorType is a required field |
| 2312 |
ImageSelectorType *string `type:"string" required:"true" enum:"ImageSelectorType"` |
| 2313 |
|
| 2314 |
// The maximum number of images to be returned by the API. |
| 2315 |
// |
| 2316 |
// The default limit is 25 images per API response. Providing a MaxResults greater |
| 2317 |
// than this value will result in a page size of 25. Any additional results |
| 2318 |
// will be paginated. |
| 2319 |
MaxResults *int64 `min:"1" type:"long"` |
| 2320 |
|
| 2321 |
// A token that specifies where to start paginating the next set of Images. |
| 2322 |
// This is the GetImages:NextToken from a previously truncated response. |
| 2323 |
NextToken *string `min:"1" type:"string"` |
| 2324 |
|
| 2325 |
// The time interval in milliseconds (ms) at which the images need to be generated |
| 2326 |
// from the stream, with a default of 3000 ms. The minimum value that can be |
| 2327 |
// provided is 200 ms. If the timestamp range is less than the sampling interval, |
| 2328 |
// the Image from the startTimestamp will be returned if available. |
| 2329 |
// |
| 2330 |
// The minimum value of 200 ms is a hard limit. |
| 2331 |
SamplingInterval *int64 `type:"integer"` |
| 2332 |
|
| 2333 |
// The starting point from which the images should be generated. This StartTimestamp |
| 2334 |
// must be within an inclusive range of timestamps for an image to be returned. |
| 2335 |
// |
| 2336 |
// StartTimestamp is a required field |
| 2337 |
StartTimestamp *time.Time `type:"timestamp" required:"true"` |
| 2338 |
|
| 2339 |
// The Amazon Resource Name (ARN) of the stream from which to retrieve the images. |
| 2340 |
// You must specify either the StreamName or the StreamARN. |
| 2341 |
StreamARN *string `min:"1" type:"string"` |
| 2342 |
|
| 2343 |
// The name of the stream from which to retrieve the images. You must specify |
| 2344 |
// either the StreamName or the StreamARN. |
| 2345 |
StreamName *string `min:"1" type:"string"` |
| 2346 |
|
| 2347 |
// The width of the output image that is used in conjunction with the HeightPixels |
| 2348 |
// parameter. When both WidthPixels and HeightPixels parameters are provided, |
| 2349 |
// the image will be stretched to fit the specified aspect ratio. If only the |
| 2350 |
// WidthPixels parameter is provided or if only the HeightPixels is provided, |
| 2351 |
// a ValidationException will be thrown. If neither parameter is provided, the |
| 2352 |
// original image size from the stream will be returned. |
| 2353 |
WidthPixels *int64 `min:"1" type:"integer"` |
| 2354 |
} |
| 2355 |
|
| 2356 |
// String returns the string representation. |
| 2357 |
// |
| 2358 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 2359 |
// be included in the string output. The member name will be present, but the |
| 2360 |
// value will be replaced with "sensitive". |
| 2361 |
func (s GetImagesInput) String() string { |
| 2362 |
return awsutil.Prettify(s) |
| 2363 |
} |
| 2364 |
|
| 2365 |
// GoString returns the string representation. |
| 2366 |
// |
| 2367 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 2368 |
// be included in the string output. The member name will be present, but the |
| 2369 |
// value will be replaced with "sensitive". |
| 2370 |
func (s GetImagesInput) GoString() string { |
| 2371 |
return s.String() |
| 2372 |
} |
| 2373 |
|
| 2374 |
// Validate inspects the fields of the type to determine if they are valid. |
| 2375 |
func (s *GetImagesInput) Validate() error { |
| 2376 |
invalidParams := request.ErrInvalidParams{Context: "GetImagesInput"} |
| 2377 |
if s.EndTimestamp == nil { |
| 2378 |
invalidParams.Add(request.NewErrParamRequired("EndTimestamp")) |
| 2379 |
} |
| 2380 |
if s.Format == nil { |
| 2381 |
invalidParams.Add(request.NewErrParamRequired("Format")) |
| 2382 |
} |
| 2383 |
if s.FormatConfig != nil && len(s.FormatConfig) < 1 { |
| 2384 |
invalidParams.Add(request.NewErrParamMinLen("FormatConfig", 1)) |
| 2385 |
} |
| 2386 |
if s.HeightPixels != nil && *s.HeightPixels < 1 { |
| 2387 |
invalidParams.Add(request.NewErrParamMinValue("HeightPixels", 1)) |
| 2388 |
} |
| 2389 |
if s.ImageSelectorType == nil { |
| 2390 |
invalidParams.Add(request.NewErrParamRequired("ImageSelectorType")) |
| 2391 |
} |
| 2392 |
if s.MaxResults != nil && *s.MaxResults < 1 { |
| 2393 |
invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) |
| 2394 |
} |
| 2395 |
if s.NextToken != nil && len(*s.NextToken) < 1 { |
| 2396 |
invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) |
| 2397 |
} |
| 2398 |
if s.StartTimestamp == nil { |
| 2399 |
invalidParams.Add(request.NewErrParamRequired("StartTimestamp")) |
| 2400 |
} |
| 2401 |
if s.StreamARN != nil && len(*s.StreamARN) < 1 { |
| 2402 |
invalidParams.Add(request.NewErrParamMinLen("StreamARN", 1)) |
| 2403 |
} |
| 2404 |
if s.StreamName != nil && len(*s.StreamName) < 1 { |
| 2405 |
invalidParams.Add(request.NewErrParamMinLen("StreamName", 1)) |
| 2406 |
} |
| 2407 |
if s.WidthPixels != nil && *s.WidthPixels < 1 { |
| 2408 |
invalidParams.Add(request.NewErrParamMinValue("WidthPixels", 1)) |
| 2409 |
} |
| 2410 |
|
| 2411 |
if invalidParams.Len() > 0 { |
| 2412 |
return invalidParams |
| 2413 |
} |
| 2414 |
return nil |
| 2415 |
} |
| 2416 |
|
| 2417 |
// SetEndTimestamp sets the EndTimestamp field's value. |
| 2418 |
func (s *GetImagesInput) SetEndTimestamp(v time.Time) *GetImagesInput { |
| 2419 |
s.EndTimestamp = &v |
| 2420 |
return s |
| 2421 |
} |
| 2422 |
|
| 2423 |
// SetFormat sets the Format field's value. |
| 2424 |
func (s *GetImagesInput) SetFormat(v string) *GetImagesInput { |
| 2425 |
s.Format = &v |
| 2426 |
return s |
| 2427 |
} |
| 2428 |
|
| 2429 |
// SetFormatConfig sets the FormatConfig field's value. |
| 2430 |
func (s *GetImagesInput) SetFormatConfig(v map[string]*string) *GetImagesInput { |
| 2431 |
s.FormatConfig = v |
| 2432 |
return s |
| 2433 |
} |
| 2434 |
|
| 2435 |
// SetHeightPixels sets the HeightPixels field's value. |
| 2436 |
func (s *GetImagesInput) SetHeightPixels(v int64) *GetImagesInput { |
| 2437 |
s.HeightPixels = &v |
| 2438 |
return s |
| 2439 |
} |
| 2440 |
|
| 2441 |
// SetImageSelectorType sets the ImageSelectorType field's value. |
| 2442 |
func (s *GetImagesInput) SetImageSelectorType(v string) *GetImagesInput { |
| 2443 |
s.ImageSelectorType = &v |
| 2444 |
return s |
| 2445 |
} |
| 2446 |
|
| 2447 |
// SetMaxResults sets the MaxResults field's value. |
| 2448 |
func (s *GetImagesInput) SetMaxResults(v int64) *GetImagesInput { |
| 2449 |
s.MaxResults = &v |
| 2450 |
return s |
| 2451 |
} |
| 2452 |
|
| 2453 |
// SetNextToken sets the NextToken field's value. |
| 2454 |
func (s *GetImagesInput) SetNextToken(v string) *GetImagesInput { |
| 2455 |
s.NextToken = &v |
| 2456 |
return s |
| 2457 |
} |
| 2458 |
|
| 2459 |
// SetSamplingInterval sets the SamplingInterval field's value. |
| 2460 |
func (s *GetImagesInput) SetSamplingInterval(v int64) *GetImagesInput { |
| 2461 |
s.SamplingInterval = &v |
| 2462 |
return s |
| 2463 |
} |
| 2464 |
|
| 2465 |
// SetStartTimestamp sets the StartTimestamp field's value. |
| 2466 |
func (s *GetImagesInput) SetStartTimestamp(v time.Time) *GetImagesInput { |
| 2467 |
s.StartTimestamp = &v |
| 2468 |
return s |
| 2469 |
} |
| 2470 |
|
| 2471 |
// SetStreamARN sets the StreamARN field's value. |
| 2472 |
func (s *GetImagesInput) SetStreamARN(v string) *GetImagesInput { |
| 2473 |
s.StreamARN = &v |
| 2474 |
return s |
| 2475 |
} |
| 2476 |
|
| 2477 |
// SetStreamName sets the StreamName field's value. |
| 2478 |
func (s *GetImagesInput) SetStreamName(v string) *GetImagesInput { |
| 2479 |
s.StreamName = &v |
| 2480 |
return s |
| 2481 |
} |
| 2482 |
|
| 2483 |
// SetWidthPixels sets the WidthPixels field's value. |
| 2484 |
func (s *GetImagesInput) SetWidthPixels(v int64) *GetImagesInput { |
| 2485 |
s.WidthPixels = &v |
| 2486 |
return s |
| 2487 |
} |
| 2488 |
|
| 2489 |
type GetImagesOutput struct { |
| 2490 |
_ struct{} `type:"structure"` |
| 2491 |
|
| 2492 |
// The list of images generated from the video stream. If there is no media |
| 2493 |
// available for the given timestamp, the NO_MEDIA error will be listed in the |
| 2494 |
// output. If an error occurs while the image is being generated, the MEDIA_ERROR |
| 2495 |
// will be listed in the output as the cause of the missing image. |
| 2496 |
Images []*Image `type:"list"` |
| 2497 |
|
| 2498 |
// The encrypted token that was used in the request to get more images. |
| 2499 |
NextToken *string `min:"1" type:"string"` |
| 2500 |
} |
| 2501 |
|
| 2502 |
// String returns the string representation. |
| 2503 |
// |
| 2504 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 2505 |
// be included in the string output. The member name will be present, but the |
| 2506 |
// value will be replaced with "sensitive". |
| 2507 |
func (s GetImagesOutput) String() string { |
| 2508 |
return awsutil.Prettify(s) |
| 2509 |
} |
| 2510 |
|
| 2511 |
// GoString returns the string representation. |
| 2512 |
// |
| 2513 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 2514 |
// be included in the string output. The member name will be present, but the |
| 2515 |
// value will be replaced with "sensitive". |
| 2516 |
func (s GetImagesOutput) GoString() string { |
| 2517 |
return s.String() |
| 2518 |
} |
| 2519 |
|
| 2520 |
// SetImages sets the Images field's value. |
| 2521 |
func (s *GetImagesOutput) SetImages(v []*Image) *GetImagesOutput { |
| 2522 |
s.Images = v |
| 2523 |
return s |
| 2524 |
} |
| 2525 |
|
| 2526 |
// SetNextToken sets the NextToken field's value. |
| 2527 |
func (s *GetImagesOutput) SetNextToken(v string) *GetImagesOutput { |
| 2528 |
s.NextToken = &v |
| 2529 |
return s |
| 2530 |
} |
| 2531 |
|
| 2532 |
type GetMediaForFragmentListInput struct { |
| 2533 |
_ struct{} `type:"structure"` |
| 2534 |
|
| 2535 |
// A list of the numbers of fragments for which to retrieve media. You retrieve |
| 2536 |
// these values with ListFragments. |
| 2537 |
// |
| 2538 |
// Fragments is a required field |
| 2539 |
Fragments []*string `min:"1" type:"list" required:"true"` |
| 2540 |
|
| 2541 |
// The Amazon Resource Name (ARN) of the stream from which to retrieve fragment |
| 2542 |
// media. Specify either this parameter or the StreamName parameter. |
| 2543 |
StreamARN *string `min:"1" type:"string"` |
| 2544 |
|
| 2545 |
// The name of the stream from which to retrieve fragment media. Specify either |
| 2546 |
// this parameter or the StreamARN parameter. |
| 2547 |
StreamName *string `min:"1" type:"string"` |
| 2548 |
} |
| 2549 |
|
| 2550 |
// String returns the string representation. |
| 2551 |
// |
| 2552 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 2553 |
// be included in the string output. The member name will be present, but the |
| 2554 |
// value will be replaced with "sensitive". |
| 2555 |
func (s GetMediaForFragmentListInput) String() string { |
| 2556 |
return awsutil.Prettify(s) |
| 2557 |
} |
| 2558 |
|
| 2559 |
// GoString returns the string representation. |
| 2560 |
// |
| 2561 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 2562 |
// be included in the string output. The member name will be present, but the |
| 2563 |
// value will be replaced with "sensitive". |
| 2564 |
func (s GetMediaForFragmentListInput) GoString() string { |
| 2565 |
return s.String() |
| 2566 |
} |
| 2567 |
|
| 2568 |
// Validate inspects the fields of the type to determine if they are valid. |
| 2569 |
func (s *GetMediaForFragmentListInput) Validate() error { |
| 2570 |
invalidParams := request.ErrInvalidParams{Context: "GetMediaForFragmentListInput"} |
| 2571 |
if s.Fragments == nil { |
| 2572 |
invalidParams.Add(request.NewErrParamRequired("Fragments")) |
| 2573 |
} |
| 2574 |
if s.Fragments != nil && len(s.Fragments) < 1 { |
| 2575 |
invalidParams.Add(request.NewErrParamMinLen("Fragments", 1)) |
| 2576 |
} |
| 2577 |
if s.StreamARN != nil && len(*s.StreamARN) < 1 { |
| 2578 |
invalidParams.Add(request.NewErrParamMinLen("StreamARN", 1)) |
| 2579 |
} |
| 2580 |
if s.StreamName != nil && len(*s.StreamName) < 1 { |
| 2581 |
invalidParams.Add(request.NewErrParamMinLen("StreamName", 1)) |
| 2582 |
} |
| 2583 |
|
| 2584 |
if invalidParams.Len() > 0 { |
| 2585 |
return invalidParams |
| 2586 |
} |
| 2587 |
return nil |
| 2588 |
} |
| 2589 |
|
| 2590 |
// SetFragments sets the Fragments field's value. |
| 2591 |
func (s *GetMediaForFragmentListInput) SetFragments(v []*string) *GetMediaForFragmentListInput { |
| 2592 |
s.Fragments = v |
| 2593 |
return s |
| 2594 |
} |
| 2595 |
|
| 2596 |
// SetStreamARN sets the StreamARN field's value. |
| 2597 |
func (s *GetMediaForFragmentListInput) SetStreamARN(v string) *GetMediaForFragmentListInput { |
| 2598 |
s.StreamARN = &v |
| 2599 |
return s |
| 2600 |
} |
| 2601 |
|
| 2602 |
// SetStreamName sets the StreamName field's value. |
| 2603 |
func (s *GetMediaForFragmentListInput) SetStreamName(v string) *GetMediaForFragmentListInput { |
| 2604 |
s.StreamName = &v |
| 2605 |
return s |
| 2606 |
} |
| 2607 |
|
| 2608 |
type GetMediaForFragmentListOutput struct { |
| 2609 |
_ struct{} `type:"structure" payload:"Payload"` |
| 2610 |
|
| 2611 |
// The content type of the requested media. |
| 2612 |
ContentType *string `location:"header" locationName:"Content-Type" min:"1" type:"string"` |
| 2613 |
|
| 2614 |
// The payload that Kinesis Video Streams returns is a sequence of chunks from |
| 2615 |
// the specified stream. For information about the chunks, see PutMedia (http://docs.aws.amazon.com/kinesisvideostreams/latest/dg/API_dataplane_PutMedia.html). |
| 2616 |
// The chunks that Kinesis Video Streams returns in the GetMediaForFragmentList |
| 2617 |
// call also include the following additional Matroska (MKV) tags: |
| 2618 |
// |
| 2619 |
// * AWS_KINESISVIDEO_FRAGMENT_NUMBER - Fragment number returned in the chunk. |
| 2620 |
// |
| 2621 |
// * AWS_KINESISVIDEO_SERVER_SIDE_TIMESTAMP - Server-side timestamp of the |
| 2622 |
// fragment. |
| 2623 |
// |
| 2624 |
// * AWS_KINESISVIDEO_PRODUCER_SIDE_TIMESTAMP - Producer-side timestamp of |
| 2625 |
// the fragment. |
| 2626 |
// |
| 2627 |
// The following tags will be included if an exception occurs: |
| 2628 |
// |
| 2629 |
// * AWS_KINESISVIDEO_FRAGMENT_NUMBER - The number of the fragment that threw |
| 2630 |
// the exception |
| 2631 |
// |
| 2632 |
// * AWS_KINESISVIDEO_EXCEPTION_ERROR_CODE - The integer code of the |
| 2633 |
// |
| 2634 |
// * AWS_KINESISVIDEO_EXCEPTION_MESSAGE - A text description of the exception |
| 2635 |
Payload io.ReadCloser `type:"blob"` |
| 2636 |
} |
| 2637 |
|
| 2638 |
// String returns the string representation. |
| 2639 |
// |
| 2640 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 2641 |
// be included in the string output. The member name will be present, but the |
| 2642 |
// value will be replaced with "sensitive". |
| 2643 |
func (s GetMediaForFragmentListOutput) String() string { |
| 2644 |
return awsutil.Prettify(s) |
| 2645 |
} |
| 2646 |
|
| 2647 |
// GoString returns the string representation. |
| 2648 |
// |
| 2649 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 2650 |
// be included in the string output. The member name will be present, but the |
| 2651 |
// value will be replaced with "sensitive". |
| 2652 |
func (s GetMediaForFragmentListOutput) GoString() string { |
| 2653 |
return s.String() |
| 2654 |
} |
| 2655 |
|
| 2656 |
// SetContentType sets the ContentType field's value. |
| 2657 |
func (s *GetMediaForFragmentListOutput) SetContentType(v string) *GetMediaForFragmentListOutput { |
| 2658 |
s.ContentType = &v |
| 2659 |
return s |
| 2660 |
} |
| 2661 |
|
| 2662 |
// SetPayload sets the Payload field's value. |
| 2663 |
func (s *GetMediaForFragmentListOutput) SetPayload(v io.ReadCloser) *GetMediaForFragmentListOutput { |
| 2664 |
s.Payload = v |
| 2665 |
return s |
| 2666 |
} |
| 2667 |
|
| 2668 |
// Contains the range of timestamps for the requested media, and the source |
| 2669 |
// of the timestamps. |
| 2670 |
type HLSFragmentSelector struct { |
| 2671 |
_ struct{} `type:"structure"` |
| 2672 |
|
| 2673 |
// The source of the timestamps for the requested media. |
| 2674 |
// |
| 2675 |
// When FragmentSelectorType is set to PRODUCER_TIMESTAMP and GetHLSStreamingSessionURLInput$PlaybackMode |
| 2676 |
// is ON_DEMAND or LIVE_REPLAY, the first fragment ingested with a producer |
| 2677 |
// timestamp within the specified FragmentSelector$TimestampRange is included |
| 2678 |
// in the media playlist. In addition, the fragments with producer timestamps |
| 2679 |
// within the TimestampRange ingested immediately following the first fragment |
| 2680 |
// (up to the GetHLSStreamingSessionURLInput$MaxMediaPlaylistFragmentResults |
| 2681 |
// value) are included. |
| 2682 |
// |
| 2683 |
// Fragments that have duplicate producer timestamps are deduplicated. This |
| 2684 |
// means that if producers are producing a stream of fragments with producer |
| 2685 |
// timestamps that are approximately equal to the true clock time, the HLS media |
| 2686 |
// playlists will contain all of the fragments within the requested timestamp |
| 2687 |
// range. If some fragments are ingested within the same time range and very |
| 2688 |
// different points in time, only the oldest ingested collection of fragments |
| 2689 |
// are returned. |
| 2690 |
// |
| 2691 |
// When FragmentSelectorType is set to PRODUCER_TIMESTAMP and GetHLSStreamingSessionURLInput$PlaybackMode |
| 2692 |
// is LIVE, the producer timestamps are used in the MP4 fragments and for deduplication. |
| 2693 |
// But the most recently ingested fragments based on server timestamps are included |
| 2694 |
// in the HLS media playlist. This means that even if fragments ingested in |
| 2695 |
// the past have producer timestamps with values now, they are not included |
| 2696 |
// in the HLS media playlist. |
| 2697 |
// |
| 2698 |
// The default is SERVER_TIMESTAMP. |
| 2699 |
FragmentSelectorType *string `type:"string" enum:"HLSFragmentSelectorType"` |
| 2700 |
|
| 2701 |
// The start and end of the timestamp range for the requested media. |
| 2702 |
// |
| 2703 |
// This value should not be present if PlaybackType is LIVE. |
| 2704 |
TimestampRange *HLSTimestampRange `type:"structure"` |
| 2705 |
} |
| 2706 |
|
| 2707 |
// String returns the string representation. |
| 2708 |
// |
| 2709 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 2710 |
// be included in the string output. The member name will be present, but the |
| 2711 |
// value will be replaced with "sensitive". |
| 2712 |
func (s HLSFragmentSelector) String() string { |
| 2713 |
return awsutil.Prettify(s) |
| 2714 |
} |
| 2715 |
|
| 2716 |
// GoString returns the string representation. |
| 2717 |
// |
| 2718 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 2719 |
// be included in the string output. The member name will be present, but the |
| 2720 |
// value will be replaced with "sensitive". |
| 2721 |
func (s HLSFragmentSelector) GoString() string { |
| 2722 |
return s.String() |
| 2723 |
} |
| 2724 |
|
| 2725 |
// SetFragmentSelectorType sets the FragmentSelectorType field's value. |
| 2726 |
func (s *HLSFragmentSelector) SetFragmentSelectorType(v string) *HLSFragmentSelector { |
| 2727 |
s.FragmentSelectorType = &v |
| 2728 |
return s |
| 2729 |
} |
| 2730 |
|
| 2731 |
// SetTimestampRange sets the TimestampRange field's value. |
| 2732 |
func (s *HLSFragmentSelector) SetTimestampRange(v *HLSTimestampRange) *HLSFragmentSelector { |
| 2733 |
s.TimestampRange = v |
| 2734 |
return s |
| 2735 |
} |
| 2736 |
|
| 2737 |
// The start and end of the timestamp range for the requested media. |
| 2738 |
// |
| 2739 |
// This value should not be present if PlaybackType is LIVE. |
| 2740 |
type HLSTimestampRange struct { |
| 2741 |
_ struct{} `type:"structure"` |
| 2742 |
|
| 2743 |
// The end of the timestamp range for the requested media. This value must be |
| 2744 |
// within 24 hours of the specified StartTimestamp, and it must be later than |
| 2745 |
// the StartTimestamp value. |
| 2746 |
// |
| 2747 |
// If FragmentSelectorType for the request is SERVER_TIMESTAMP, this value must |
| 2748 |
// be in the past. |
| 2749 |
// |
| 2750 |
// The EndTimestamp value is required for ON_DEMAND mode, but optional for LIVE_REPLAY |
| 2751 |
// mode. If the EndTimestamp is not set for LIVE_REPLAY mode then the session |
| 2752 |
// will continue to include newly ingested fragments until the session expires. |
| 2753 |
// |
| 2754 |
// This value is inclusive. The EndTimestamp is compared to the (starting) timestamp |
| 2755 |
// of the fragment. Fragments that start before the EndTimestamp value and continue |
| 2756 |
// past it are included in the session. |
| 2757 |
EndTimestamp *time.Time `type:"timestamp"` |
| 2758 |
|
| 2759 |
// The start of the timestamp range for the requested media. |
| 2760 |
// |
| 2761 |
// If the HLSTimestampRange value is specified, the StartTimestamp value is |
| 2762 |
// required. |
| 2763 |
// |
| 2764 |
// Only fragments that start exactly at or after StartTimestamp are included |
| 2765 |
// in the session. Fragments that start before StartTimestamp and continue past |
| 2766 |
// it aren't included in the session. If FragmentSelectorType is SERVER_TIMESTAMP, |
| 2767 |
// the StartTimestamp must be later than the stream head. |
| 2768 |
StartTimestamp *time.Time `type:"timestamp"` |
| 2769 |
} |
| 2770 |
|
| 2771 |
// String returns the string representation. |
| 2772 |
// |
| 2773 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 2774 |
// be included in the string output. The member name will be present, but the |
| 2775 |
// value will be replaced with "sensitive". |
| 2776 |
func (s HLSTimestampRange) String() string { |
| 2777 |
return awsutil.Prettify(s) |
| 2778 |
} |
| 2779 |
|
| 2780 |
// GoString returns the string representation. |
| 2781 |
// |
| 2782 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 2783 |
// be included in the string output. The member name will be present, but the |
| 2784 |
// value will be replaced with "sensitive". |
| 2785 |
func (s HLSTimestampRange) GoString() string { |
| 2786 |
return s.String() |
| 2787 |
} |
| 2788 |
|
| 2789 |
// SetEndTimestamp sets the EndTimestamp field's value. |
| 2790 |
func (s *HLSTimestampRange) SetEndTimestamp(v time.Time) *HLSTimestampRange { |
| 2791 |
s.EndTimestamp = &v |
| 2792 |
return s |
| 2793 |
} |
| 2794 |
|
| 2795 |
// SetStartTimestamp sets the StartTimestamp field's value. |
| 2796 |
func (s *HLSTimestampRange) SetStartTimestamp(v time.Time) *HLSTimestampRange { |
| 2797 |
s.StartTimestamp = &v |
| 2798 |
return s |
| 2799 |
} |
| 2800 |
|
| 2801 |
// A structure that contains the Timestamp, Error, and ImageContent. |
| 2802 |
type Image struct { |
| 2803 |
_ struct{} `type:"structure"` |
| 2804 |
|
| 2805 |
// The error message shown when the image for the provided timestamp was not |
| 2806 |
// extracted due to a non-tryable error. An error will be returned if: |
| 2807 |
// |
| 2808 |
// * There is no media that exists for the specified Timestamp. |
| 2809 |
// |
| 2810 |
// * The media for the specified time does not allow an image to be extracted. |
| 2811 |
// In this case the media is audio only, or the incorrect media has been |
| 2812 |
// ingested. |
| 2813 |
Error *string `type:"string" enum:"ImageError"` |
| 2814 |
|
| 2815 |
// An attribute of the Image object that is Base64 encoded. |
| 2816 |
ImageContent *string `min:"1" type:"string"` |
| 2817 |
|
| 2818 |
// An attribute of the Image object that is used to extract an image from the |
| 2819 |
// video stream. This field is used to manage gaps on images or to better understand |
| 2820 |
// the pagination window. |
| 2821 |
TimeStamp *time.Time `type:"timestamp"` |
| 2822 |
} |
| 2823 |
|
| 2824 |
// String returns the string representation. |
| 2825 |
// |
| 2826 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 2827 |
// be included in the string output. The member name will be present, but the |
| 2828 |
// value will be replaced with "sensitive". |
| 2829 |
func (s Image) String() string { |
| 2830 |
return awsutil.Prettify(s) |
| 2831 |
} |
| 2832 |
|
| 2833 |
// GoString returns the string representation. |
| 2834 |
// |
| 2835 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 2836 |
// be included in the string output. The member name will be present, but the |
| 2837 |
// value will be replaced with "sensitive". |
| 2838 |
func (s Image) GoString() string { |
| 2839 |
return s.String() |
| 2840 |
} |
| 2841 |
|
| 2842 |
// SetError sets the Error field's value. |
| 2843 |
func (s *Image) SetError(v string) *Image { |
| 2844 |
s.Error = &v |
| 2845 |
return s |
| 2846 |
} |
| 2847 |
|
| 2848 |
// SetImageContent sets the ImageContent field's value. |
| 2849 |
func (s *Image) SetImageContent(v string) *Image { |
| 2850 |
s.ImageContent = &v |
| 2851 |
return s |
| 2852 |
} |
| 2853 |
|
| 2854 |
// SetTimeStamp sets the TimeStamp field's value. |
| 2855 |
func (s *Image) SetTimeStamp(v time.Time) *Image { |
| 2856 |
s.TimeStamp = &v |
| 2857 |
return s |
| 2858 |
} |
| 2859 |
|
| 2860 |
// A specified parameter exceeds its restrictions, is not supported, or can't |
| 2861 |
// be used. |
| 2862 |
type InvalidArgumentException struct { |
| 2863 |
_ struct{} `type:"structure"` |
| 2864 |
RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` |
| 2865 |
|
| 2866 |
Message_ *string `locationName:"Message" type:"string"` |
| 2867 |
} |
| 2868 |
|
| 2869 |
// String returns the string representation. |
| 2870 |
// |
| 2871 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 2872 |
// be included in the string output. The member name will be present, but the |
| 2873 |
// value will be replaced with "sensitive". |
| 2874 |
func (s InvalidArgumentException) String() string { |
| 2875 |
return awsutil.Prettify(s) |
| 2876 |
} |
| 2877 |
|
| 2878 |
// GoString returns the string representation. |
| 2879 |
// |
| 2880 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 2881 |
// be included in the string output. The member name will be present, but the |
| 2882 |
// value will be replaced with "sensitive". |
| 2883 |
func (s InvalidArgumentException) GoString() string { |
| 2884 |
return s.String() |
| 2885 |
} |
| 2886 |
|
| 2887 |
func newErrorInvalidArgumentException(v protocol.ResponseMetadata) error { |
| 2888 |
return &InvalidArgumentException{ |
| 2889 |
RespMetadata: v, |
| 2890 |
} |
| 2891 |
} |
| 2892 |
|
| 2893 |
// Code returns the exception type name. |
| 2894 |
func (s *InvalidArgumentException) Code() string { |
| 2895 |
return "InvalidArgumentException" |
| 2896 |
} |
| 2897 |
|
| 2898 |
// Message returns the exception's message. |
| 2899 |
func (s *InvalidArgumentException) Message() string { |
| 2900 |
if s.Message_ != nil { |
| 2901 |
return *s.Message_ |
| 2902 |
} |
| 2903 |
return "" |
| 2904 |
} |
| 2905 |
|
| 2906 |
// OrigErr always returns nil, satisfies awserr.Error interface. |
| 2907 |
func (s *InvalidArgumentException) OrigErr() error { |
| 2908 |
return nil |
| 2909 |
} |
| 2910 |
|
| 2911 |
func (s *InvalidArgumentException) Error() string { |
| 2912 |
return fmt.Sprintf("%s: %s", s.Code(), s.Message()) |
| 2913 |
} |
| 2914 |
|
| 2915 |
// Status code returns the HTTP status code for the request's response error. |
| 2916 |
func (s *InvalidArgumentException) StatusCode() int { |
| 2917 |
return s.RespMetadata.StatusCode |
| 2918 |
} |
| 2919 |
|
| 2920 |
// RequestID returns the service's response RequestID for request. |
| 2921 |
func (s *InvalidArgumentException) RequestID() string { |
| 2922 |
return s.RespMetadata.RequestID |
| 2923 |
} |
| 2924 |
|
| 2925 |
// The codec private data in at least one of the tracks of the video stream |
| 2926 |
// is not valid for this operation. |
| 2927 |
type InvalidCodecPrivateDataException struct { |
| 2928 |
_ struct{} `type:"structure"` |
| 2929 |
RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` |
| 2930 |
|
| 2931 |
Message_ *string `locationName:"Message" type:"string"` |
| 2932 |
} |
| 2933 |
|
| 2934 |
// String returns the string representation. |
| 2935 |
// |
| 2936 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 2937 |
// be included in the string output. The member name will be present, but the |
| 2938 |
// value will be replaced with "sensitive". |
| 2939 |
func (s InvalidCodecPrivateDataException) String() string { |
| 2940 |
return awsutil.Prettify(s) |
| 2941 |
} |
| 2942 |
|
| 2943 |
// GoString returns the string representation. |
| 2944 |
// |
| 2945 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 2946 |
// be included in the string output. The member name will be present, but the |
| 2947 |
// value will be replaced with "sensitive". |
| 2948 |
func (s InvalidCodecPrivateDataException) GoString() string { |
| 2949 |
return s.String() |
| 2950 |
} |
| 2951 |
|
| 2952 |
func newErrorInvalidCodecPrivateDataException(v protocol.ResponseMetadata) error { |
| 2953 |
return &InvalidCodecPrivateDataException{ |
| 2954 |
RespMetadata: v, |
| 2955 |
} |
| 2956 |
} |
| 2957 |
|
| 2958 |
// Code returns the exception type name. |
| 2959 |
func (s *InvalidCodecPrivateDataException) Code() string { |
| 2960 |
return "InvalidCodecPrivateDataException" |
| 2961 |
} |
| 2962 |
|
| 2963 |
// Message returns the exception's message. |
| 2964 |
func (s *InvalidCodecPrivateDataException) Message() string { |
| 2965 |
if s.Message_ != nil { |
| 2966 |
return *s.Message_ |
| 2967 |
} |
| 2968 |
return "" |
| 2969 |
} |
| 2970 |
|
| 2971 |
// OrigErr always returns nil, satisfies awserr.Error interface. |
| 2972 |
func (s *InvalidCodecPrivateDataException) OrigErr() error { |
| 2973 |
return nil |
| 2974 |
} |
| 2975 |
|
| 2976 |
func (s *InvalidCodecPrivateDataException) Error() string { |
| 2977 |
return fmt.Sprintf("%s: %s", s.Code(), s.Message()) |
| 2978 |
} |
| 2979 |
|
| 2980 |
// Status code returns the HTTP status code for the request's response error. |
| 2981 |
func (s *InvalidCodecPrivateDataException) StatusCode() int { |
| 2982 |
return s.RespMetadata.StatusCode |
| 2983 |
} |
| 2984 |
|
| 2985 |
// RequestID returns the service's response RequestID for request. |
| 2986 |
func (s *InvalidCodecPrivateDataException) RequestID() string { |
| 2987 |
return s.RespMetadata.RequestID |
| 2988 |
} |
| 2989 |
|
| 2990 |
// One or more frames in the requested clip could not be parsed based on the |
| 2991 |
// specified codec. |
| 2992 |
type InvalidMediaFrameException struct { |
| 2993 |
_ struct{} `type:"structure"` |
| 2994 |
RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` |
| 2995 |
|
| 2996 |
Message_ *string `locationName:"Message" type:"string"` |
| 2997 |
} |
| 2998 |
|
| 2999 |
// String returns the string representation. |
| 3000 |
// |
| 3001 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 3002 |
// be included in the string output. The member name will be present, but the |
| 3003 |
// value will be replaced with "sensitive". |
| 3004 |
func (s InvalidMediaFrameException) String() string { |
| 3005 |
return awsutil.Prettify(s) |
| 3006 |
} |
| 3007 |
|
| 3008 |
// GoString returns the string representation. |
| 3009 |
// |
| 3010 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 3011 |
// be included in the string output. The member name will be present, but the |
| 3012 |
// value will be replaced with "sensitive". |
| 3013 |
func (s InvalidMediaFrameException) GoString() string { |
| 3014 |
return s.String() |
| 3015 |
} |
| 3016 |
|
| 3017 |
func newErrorInvalidMediaFrameException(v protocol.ResponseMetadata) error { |
| 3018 |
return &InvalidMediaFrameException{ |
| 3019 |
RespMetadata: v, |
| 3020 |
} |
| 3021 |
} |
| 3022 |
|
| 3023 |
// Code returns the exception type name. |
| 3024 |
func (s *InvalidMediaFrameException) Code() string { |
| 3025 |
return "InvalidMediaFrameException" |
| 3026 |
} |
| 3027 |
|
| 3028 |
// Message returns the exception's message. |
| 3029 |
func (s *InvalidMediaFrameException) Message() string { |
| 3030 |
if s.Message_ != nil { |
| 3031 |
return *s.Message_ |
| 3032 |
} |
| 3033 |
return "" |
| 3034 |
} |
| 3035 |
|
| 3036 |
// OrigErr always returns nil, satisfies awserr.Error interface. |
| 3037 |
func (s *InvalidMediaFrameException) OrigErr() error { |
| 3038 |
return nil |
| 3039 |
} |
| 3040 |
|
| 3041 |
func (s *InvalidMediaFrameException) Error() string { |
| 3042 |
return fmt.Sprintf("%s: %s", s.Code(), s.Message()) |
| 3043 |
} |
| 3044 |
|
| 3045 |
// Status code returns the HTTP status code for the request's response error. |
| 3046 |
func (s *InvalidMediaFrameException) StatusCode() int { |
| 3047 |
return s.RespMetadata.StatusCode |
| 3048 |
} |
| 3049 |
|
| 3050 |
// RequestID returns the service's response RequestID for request. |
| 3051 |
func (s *InvalidMediaFrameException) RequestID() string { |
| 3052 |
return s.RespMetadata.RequestID |
| 3053 |
} |
| 3054 |
|
| 3055 |
type ListFragmentsInput struct { |
| 3056 |
_ struct{} `type:"structure"` |
| 3057 |
|
| 3058 |
// Describes the timestamp range and timestamp origin for the range of fragments |
| 3059 |
// to return. |
| 3060 |
FragmentSelector *FragmentSelector `type:"structure"` |
| 3061 |
|
| 3062 |
// The total number of fragments to return. If the total number of fragments |
| 3063 |
// available is more than the value specified in max-results, then a ListFragmentsOutput$NextToken |
| 3064 |
// is provided in the output that you can use to resume pagination. |
| 3065 |
MaxResults *int64 `min:"1" type:"long"` |
| 3066 |
|
| 3067 |
// A token to specify where to start paginating. This is the ListFragmentsOutput$NextToken |
| 3068 |
// from a previously truncated response. |
| 3069 |
NextToken *string `min:"1" type:"string"` |
| 3070 |
|
| 3071 |
// The Amazon Resource Name (ARN) of the stream from which to retrieve a fragment |
| 3072 |
// list. Specify either this parameter or the StreamName parameter. |
| 3073 |
StreamARN *string `min:"1" type:"string"` |
| 3074 |
|
| 3075 |
// The name of the stream from which to retrieve a fragment list. Specify either |
| 3076 |
// this parameter or the StreamARN parameter. |
| 3077 |
StreamName *string `min:"1" type:"string"` |
| 3078 |
} |
| 3079 |
|
| 3080 |
// String returns the string representation. |
| 3081 |
// |
| 3082 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 3083 |
// be included in the string output. The member name will be present, but the |
| 3084 |
// value will be replaced with "sensitive". |
| 3085 |
func (s ListFragmentsInput) String() string { |
| 3086 |
return awsutil.Prettify(s) |
| 3087 |
} |
| 3088 |
|
| 3089 |
// GoString returns the string representation. |
| 3090 |
// |
| 3091 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 3092 |
// be included in the string output. The member name will be present, but the |
| 3093 |
// value will be replaced with "sensitive". |
| 3094 |
func (s ListFragmentsInput) GoString() string { |
| 3095 |
return s.String() |
| 3096 |
} |
| 3097 |
|
| 3098 |
// Validate inspects the fields of the type to determine if they are valid. |
| 3099 |
func (s *ListFragmentsInput) Validate() error { |
| 3100 |
invalidParams := request.ErrInvalidParams{Context: "ListFragmentsInput"} |
| 3101 |
if s.MaxResults != nil && *s.MaxResults < 1 { |
| 3102 |
invalidParams.Add(request.NewErrParamMinValue("MaxResults", 1)) |
| 3103 |
} |
| 3104 |
if s.NextToken != nil && len(*s.NextToken) < 1 { |
| 3105 |
invalidParams.Add(request.NewErrParamMinLen("NextToken", 1)) |
| 3106 |
} |
| 3107 |
if s.StreamARN != nil && len(*s.StreamARN) < 1 { |
| 3108 |
invalidParams.Add(request.NewErrParamMinLen("StreamARN", 1)) |
| 3109 |
} |
| 3110 |
if s.StreamName != nil && len(*s.StreamName) < 1 { |
| 3111 |
invalidParams.Add(request.NewErrParamMinLen("StreamName", 1)) |
| 3112 |
} |
| 3113 |
if s.FragmentSelector != nil { |
| 3114 |
if err := s.FragmentSelector.Validate(); err != nil { |
| 3115 |
invalidParams.AddNested("FragmentSelector", err.(request.ErrInvalidParams)) |
| 3116 |
} |
| 3117 |
} |
| 3118 |
|
| 3119 |
if invalidParams.Len() > 0 { |
| 3120 |
return invalidParams |
| 3121 |
} |
| 3122 |
return nil |
| 3123 |
} |
| 3124 |
|
| 3125 |
// SetFragmentSelector sets the FragmentSelector field's value. |
| 3126 |
func (s *ListFragmentsInput) SetFragmentSelector(v *FragmentSelector) *ListFragmentsInput { |
| 3127 |
s.FragmentSelector = v |
| 3128 |
return s |
| 3129 |
} |
| 3130 |
|
| 3131 |
// SetMaxResults sets the MaxResults field's value. |
| 3132 |
func (s *ListFragmentsInput) SetMaxResults(v int64) *ListFragmentsInput { |
| 3133 |
s.MaxResults = &v |
| 3134 |
return s |
| 3135 |
} |
| 3136 |
|
| 3137 |
// SetNextToken sets the NextToken field's value. |
| 3138 |
func (s *ListFragmentsInput) SetNextToken(v string) *ListFragmentsInput { |
| 3139 |
s.NextToken = &v |
| 3140 |
return s |
| 3141 |
} |
| 3142 |
|
| 3143 |
// SetStreamARN sets the StreamARN field's value. |
| 3144 |
func (s *ListFragmentsInput) SetStreamARN(v string) *ListFragmentsInput { |
| 3145 |
s.StreamARN = &v |
| 3146 |
return s |
| 3147 |
} |
| 3148 |
|
| 3149 |
// SetStreamName sets the StreamName field's value. |
| 3150 |
func (s *ListFragmentsInput) SetStreamName(v string) *ListFragmentsInput { |
| 3151 |
s.StreamName = &v |
| 3152 |
return s |
| 3153 |
} |
| 3154 |
|
| 3155 |
type ListFragmentsOutput struct { |
| 3156 |
_ struct{} `type:"structure"` |
| 3157 |
|
| 3158 |
// A list of archived Fragment objects from the stream that meet the selector |
| 3159 |
// criteria. Results are in no specific order, even across pages. |
| 3160 |
Fragments []*Fragment `type:"list"` |
| 3161 |
|
| 3162 |
// If the returned list is truncated, the operation returns this token to use |
| 3163 |
// to retrieve the next page of results. This value is null when there are no |
| 3164 |
// more results to return. |
| 3165 |
NextToken *string `min:"1" type:"string"` |
| 3166 |
} |
| 3167 |
|
| 3168 |
// String returns the string representation. |
| 3169 |
// |
| 3170 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 3171 |
// be included in the string output. The member name will be present, but the |
| 3172 |
// value will be replaced with "sensitive". |
| 3173 |
func (s ListFragmentsOutput) String() string { |
| 3174 |
return awsutil.Prettify(s) |
| 3175 |
} |
| 3176 |
|
| 3177 |
// GoString returns the string representation. |
| 3178 |
// |
| 3179 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 3180 |
// be included in the string output. The member name will be present, but the |
| 3181 |
// value will be replaced with "sensitive". |
| 3182 |
func (s ListFragmentsOutput) GoString() string { |
| 3183 |
return s.String() |
| 3184 |
} |
| 3185 |
|
| 3186 |
// SetFragments sets the Fragments field's value. |
| 3187 |
func (s *ListFragmentsOutput) SetFragments(v []*Fragment) *ListFragmentsOutput { |
| 3188 |
s.Fragments = v |
| 3189 |
return s |
| 3190 |
} |
| 3191 |
|
| 3192 |
// SetNextToken sets the NextToken field's value. |
| 3193 |
func (s *ListFragmentsOutput) SetNextToken(v string) *ListFragmentsOutput { |
| 3194 |
s.NextToken = &v |
| 3195 |
return s |
| 3196 |
} |
| 3197 |
|
| 3198 |
// No codec private data was found in at least one of tracks of the video stream. |
| 3199 |
type MissingCodecPrivateDataException struct { |
| 3200 |
_ struct{} `type:"structure"` |
| 3201 |
RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` |
| 3202 |
|
| 3203 |
Message_ *string `locationName:"Message" type:"string"` |
| 3204 |
} |
| 3205 |
|
| 3206 |
// String returns the string representation. |
| 3207 |
// |
| 3208 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 3209 |
// be included in the string output. The member name will be present, but the |
| 3210 |
// value will be replaced with "sensitive". |
| 3211 |
func (s MissingCodecPrivateDataException) String() string { |
| 3212 |
return awsutil.Prettify(s) |
| 3213 |
} |
| 3214 |
|
| 3215 |
// GoString returns the string representation. |
| 3216 |
// |
| 3217 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 3218 |
// be included in the string output. The member name will be present, but the |
| 3219 |
// value will be replaced with "sensitive". |
| 3220 |
func (s MissingCodecPrivateDataException) GoString() string { |
| 3221 |
return s.String() |
| 3222 |
} |
| 3223 |
|
| 3224 |
func newErrorMissingCodecPrivateDataException(v protocol.ResponseMetadata) error { |
| 3225 |
return &MissingCodecPrivateDataException{ |
| 3226 |
RespMetadata: v, |
| 3227 |
} |
| 3228 |
} |
| 3229 |
|
| 3230 |
// Code returns the exception type name. |
| 3231 |
func (s *MissingCodecPrivateDataException) Code() string { |
| 3232 |
return "MissingCodecPrivateDataException" |
| 3233 |
} |
| 3234 |
|
| 3235 |
// Message returns the exception's message. |
| 3236 |
func (s *MissingCodecPrivateDataException) Message() string { |
| 3237 |
if s.Message_ != nil { |
| 3238 |
return *s.Message_ |
| 3239 |
} |
| 3240 |
return "" |
| 3241 |
} |
| 3242 |
|
| 3243 |
// OrigErr always returns nil, satisfies awserr.Error interface. |
| 3244 |
func (s *MissingCodecPrivateDataException) OrigErr() error { |
| 3245 |
return nil |
| 3246 |
} |
| 3247 |
|
| 3248 |
func (s *MissingCodecPrivateDataException) Error() string { |
| 3249 |
return fmt.Sprintf("%s: %s", s.Code(), s.Message()) |
| 3250 |
} |
| 3251 |
|
| 3252 |
// Status code returns the HTTP status code for the request's response error. |
| 3253 |
func (s *MissingCodecPrivateDataException) StatusCode() int { |
| 3254 |
return s.RespMetadata.StatusCode |
| 3255 |
} |
| 3256 |
|
| 3257 |
// RequestID returns the service's response RequestID for request. |
| 3258 |
func (s *MissingCodecPrivateDataException) RequestID() string { |
| 3259 |
return s.RespMetadata.RequestID |
| 3260 |
} |
| 3261 |
|
| 3262 |
// A streaming session was requested for a stream that does not retain data |
| 3263 |
// (that is, has a DataRetentionInHours of 0). |
| 3264 |
type NoDataRetentionException struct { |
| 3265 |
_ struct{} `type:"structure"` |
| 3266 |
RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` |
| 3267 |
|
| 3268 |
Message_ *string `locationName:"Message" type:"string"` |
| 3269 |
} |
| 3270 |
|
| 3271 |
// String returns the string representation. |
| 3272 |
// |
| 3273 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 3274 |
// be included in the string output. The member name will be present, but the |
| 3275 |
// value will be replaced with "sensitive". |
| 3276 |
func (s NoDataRetentionException) String() string { |
| 3277 |
return awsutil.Prettify(s) |
| 3278 |
} |
| 3279 |
|
| 3280 |
// GoString returns the string representation. |
| 3281 |
// |
| 3282 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 3283 |
// be included in the string output. The member name will be present, but the |
| 3284 |
// value will be replaced with "sensitive". |
| 3285 |
func (s NoDataRetentionException) GoString() string { |
| 3286 |
return s.String() |
| 3287 |
} |
| 3288 |
|
| 3289 |
func newErrorNoDataRetentionException(v protocol.ResponseMetadata) error { |
| 3290 |
return &NoDataRetentionException{ |
| 3291 |
RespMetadata: v, |
| 3292 |
} |
| 3293 |
} |
| 3294 |
|
| 3295 |
// Code returns the exception type name. |
| 3296 |
func (s *NoDataRetentionException) Code() string { |
| 3297 |
return "NoDataRetentionException" |
| 3298 |
} |
| 3299 |
|
| 3300 |
// Message returns the exception's message. |
| 3301 |
func (s *NoDataRetentionException) Message() string { |
| 3302 |
if s.Message_ != nil { |
| 3303 |
return *s.Message_ |
| 3304 |
} |
| 3305 |
return "" |
| 3306 |
} |
| 3307 |
|
| 3308 |
// OrigErr always returns nil, satisfies awserr.Error interface. |
| 3309 |
func (s *NoDataRetentionException) OrigErr() error { |
| 3310 |
return nil |
| 3311 |
} |
| 3312 |
|
| 3313 |
func (s *NoDataRetentionException) Error() string { |
| 3314 |
return fmt.Sprintf("%s: %s", s.Code(), s.Message()) |
| 3315 |
} |
| 3316 |
|
| 3317 |
// Status code returns the HTTP status code for the request's response error. |
| 3318 |
func (s *NoDataRetentionException) StatusCode() int { |
| 3319 |
return s.RespMetadata.StatusCode |
| 3320 |
} |
| 3321 |
|
| 3322 |
// RequestID returns the service's response RequestID for request. |
| 3323 |
func (s *NoDataRetentionException) RequestID() string { |
| 3324 |
return s.RespMetadata.RequestID |
| 3325 |
} |
| 3326 |
|
| 3327 |
// Status Code: 403, The caller is not authorized to perform an operation on |
| 3328 |
// the given stream, or the token has expired. |
| 3329 |
type NotAuthorizedException struct { |
| 3330 |
_ struct{} `type:"structure"` |
| 3331 |
RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` |
| 3332 |
|
| 3333 |
Message_ *string `locationName:"Message" type:"string"` |
| 3334 |
} |
| 3335 |
|
| 3336 |
// String returns the string representation. |
| 3337 |
// |
| 3338 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 3339 |
// be included in the string output. The member name will be present, but the |
| 3340 |
// value will be replaced with "sensitive". |
| 3341 |
func (s NotAuthorizedException) String() string { |
| 3342 |
return awsutil.Prettify(s) |
| 3343 |
} |
| 3344 |
|
| 3345 |
// GoString returns the string representation. |
| 3346 |
// |
| 3347 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 3348 |
// be included in the string output. The member name will be present, but the |
| 3349 |
// value will be replaced with "sensitive". |
| 3350 |
func (s NotAuthorizedException) GoString() string { |
| 3351 |
return s.String() |
| 3352 |
} |
| 3353 |
|
| 3354 |
func newErrorNotAuthorizedException(v protocol.ResponseMetadata) error { |
| 3355 |
return &NotAuthorizedException{ |
| 3356 |
RespMetadata: v, |
| 3357 |
} |
| 3358 |
} |
| 3359 |
|
| 3360 |
// Code returns the exception type name. |
| 3361 |
func (s *NotAuthorizedException) Code() string { |
| 3362 |
return "NotAuthorizedException" |
| 3363 |
} |
| 3364 |
|
| 3365 |
// Message returns the exception's message. |
| 3366 |
func (s *NotAuthorizedException) Message() string { |
| 3367 |
if s.Message_ != nil { |
| 3368 |
return *s.Message_ |
| 3369 |
} |
| 3370 |
return "" |
| 3371 |
} |
| 3372 |
|
| 3373 |
// OrigErr always returns nil, satisfies awserr.Error interface. |
| 3374 |
func (s *NotAuthorizedException) OrigErr() error { |
| 3375 |
return nil |
| 3376 |
} |
| 3377 |
|
| 3378 |
func (s *NotAuthorizedException) Error() string { |
| 3379 |
return fmt.Sprintf("%s: %s", s.Code(), s.Message()) |
| 3380 |
} |
| 3381 |
|
| 3382 |
// Status code returns the HTTP status code for the request's response error. |
| 3383 |
func (s *NotAuthorizedException) StatusCode() int { |
| 3384 |
return s.RespMetadata.StatusCode |
| 3385 |
} |
| 3386 |
|
| 3387 |
// RequestID returns the service's response RequestID for request. |
| 3388 |
func (s *NotAuthorizedException) RequestID() string { |
| 3389 |
return s.RespMetadata.RequestID |
| 3390 |
} |
| 3391 |
|
| 3392 |
// GetImages will throw this error when Kinesis Video Streams can't find the |
| 3393 |
// stream that you specified. |
| 3394 |
// |
| 3395 |
// GetHLSStreamingSessionURL and GetDASHStreamingSessionURL throw this error |
| 3396 |
// if a session with a PlaybackMode of ON_DEMAND or LIVE_REPLAYis requested |
| 3397 |
// for a stream that has no fragments within the requested time range, or if |
| 3398 |
// a session with a PlaybackMode of LIVE is requested for a stream that has |
| 3399 |
// no fragments within the last 30 seconds. |
| 3400 |
type ResourceNotFoundException struct { |
| 3401 |
_ struct{} `type:"structure"` |
| 3402 |
RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` |
| 3403 |
|
| 3404 |
Message_ *string `locationName:"Message" type:"string"` |
| 3405 |
} |
| 3406 |
|
| 3407 |
// String returns the string representation. |
| 3408 |
// |
| 3409 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 3410 |
// be included in the string output. The member name will be present, but the |
| 3411 |
// value will be replaced with "sensitive". |
| 3412 |
func (s ResourceNotFoundException) String() string { |
| 3413 |
return awsutil.Prettify(s) |
| 3414 |
} |
| 3415 |
|
| 3416 |
// GoString returns the string representation. |
| 3417 |
// |
| 3418 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 3419 |
// be included in the string output. The member name will be present, but the |
| 3420 |
// value will be replaced with "sensitive". |
| 3421 |
func (s ResourceNotFoundException) GoString() string { |
| 3422 |
return s.String() |
| 3423 |
} |
| 3424 |
|
| 3425 |
func newErrorResourceNotFoundException(v protocol.ResponseMetadata) error { |
| 3426 |
return &ResourceNotFoundException{ |
| 3427 |
RespMetadata: v, |
| 3428 |
} |
| 3429 |
} |
| 3430 |
|
| 3431 |
// Code returns the exception type name. |
| 3432 |
func (s *ResourceNotFoundException) Code() string { |
| 3433 |
return "ResourceNotFoundException" |
| 3434 |
} |
| 3435 |
|
| 3436 |
// Message returns the exception's message. |
| 3437 |
func (s *ResourceNotFoundException) Message() string { |
| 3438 |
if s.Message_ != nil { |
| 3439 |
return *s.Message_ |
| 3440 |
} |
| 3441 |
return "" |
| 3442 |
} |
| 3443 |
|
| 3444 |
// OrigErr always returns nil, satisfies awserr.Error interface. |
| 3445 |
func (s *ResourceNotFoundException) OrigErr() error { |
| 3446 |
return nil |
| 3447 |
} |
| 3448 |
|
| 3449 |
func (s *ResourceNotFoundException) Error() string { |
| 3450 |
return fmt.Sprintf("%s: %s", s.Code(), s.Message()) |
| 3451 |
} |
| 3452 |
|
| 3453 |
// Status code returns the HTTP status code for the request's response error. |
| 3454 |
func (s *ResourceNotFoundException) StatusCode() int { |
| 3455 |
return s.RespMetadata.StatusCode |
| 3456 |
} |
| 3457 |
|
| 3458 |
// RequestID returns the service's response RequestID for request. |
| 3459 |
func (s *ResourceNotFoundException) RequestID() string { |
| 3460 |
return s.RespMetadata.RequestID |
| 3461 |
} |
| 3462 |
|
| 3463 |
// The range of timestamps for which to return fragments. |
| 3464 |
type TimestampRange struct { |
| 3465 |
_ struct{} `type:"structure"` |
| 3466 |
|
| 3467 |
// The ending timestamp in the range of timestamps for which to return fragments. |
| 3468 |
// |
| 3469 |
// EndTimestamp is a required field |
| 3470 |
EndTimestamp *time.Time `type:"timestamp" required:"true"` |
| 3471 |
|
| 3472 |
// The starting timestamp in the range of timestamps for which to return fragments. |
| 3473 |
// |
| 3474 |
// StartTimestamp is a required field |
| 3475 |
StartTimestamp *time.Time `type:"timestamp" required:"true"` |
| 3476 |
} |
| 3477 |
|
| 3478 |
// String returns the string representation. |
| 3479 |
// |
| 3480 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 3481 |
// be included in the string output. The member name will be present, but the |
| 3482 |
// value will be replaced with "sensitive". |
| 3483 |
func (s TimestampRange) String() string { |
| 3484 |
return awsutil.Prettify(s) |
| 3485 |
} |
| 3486 |
|
| 3487 |
// GoString returns the string representation. |
| 3488 |
// |
| 3489 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 3490 |
// be included in the string output. The member name will be present, but the |
| 3491 |
// value will be replaced with "sensitive". |
| 3492 |
func (s TimestampRange) GoString() string { |
| 3493 |
return s.String() |
| 3494 |
} |
| 3495 |
|
| 3496 |
// Validate inspects the fields of the type to determine if they are valid. |
| 3497 |
func (s *TimestampRange) Validate() error { |
| 3498 |
invalidParams := request.ErrInvalidParams{Context: "TimestampRange"} |
| 3499 |
if s.EndTimestamp == nil { |
| 3500 |
invalidParams.Add(request.NewErrParamRequired("EndTimestamp")) |
| 3501 |
} |
| 3502 |
if s.StartTimestamp == nil { |
| 3503 |
invalidParams.Add(request.NewErrParamRequired("StartTimestamp")) |
| 3504 |
} |
| 3505 |
|
| 3506 |
if invalidParams.Len() > 0 { |
| 3507 |
return invalidParams |
| 3508 |
} |
| 3509 |
return nil |
| 3510 |
} |
| 3511 |
|
| 3512 |
// SetEndTimestamp sets the EndTimestamp field's value. |
| 3513 |
func (s *TimestampRange) SetEndTimestamp(v time.Time) *TimestampRange { |
| 3514 |
s.EndTimestamp = &v |
| 3515 |
return s |
| 3516 |
} |
| 3517 |
|
| 3518 |
// SetStartTimestamp sets the StartTimestamp field's value. |
| 3519 |
func (s *TimestampRange) SetStartTimestamp(v time.Time) *TimestampRange { |
| 3520 |
s.StartTimestamp = &v |
| 3521 |
return s |
| 3522 |
} |
| 3523 |
|
| 3524 |
// The type of the media (for example, h.264 or h.265 video or ACC or G.711 |
| 3525 |
// audio) could not be determined from the codec IDs of the tracks in the first |
| 3526 |
// fragment for a playback session. The codec ID for track 1 should be V_MPEG/ISO/AVC |
| 3527 |
// and, optionally, the codec ID for track 2 should be A_AAC. |
| 3528 |
type UnsupportedStreamMediaTypeException struct { |
| 3529 |
_ struct{} `type:"structure"` |
| 3530 |
RespMetadata protocol.ResponseMetadata `json:"-" xml:"-"` |
| 3531 |
|
| 3532 |
Message_ *string `locationName:"Message" type:"string"` |
| 3533 |
} |
| 3534 |
|
| 3535 |
// String returns the string representation. |
| 3536 |
// |
| 3537 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 3538 |
// be included in the string output. The member name will be present, but the |
| 3539 |
// value will be replaced with "sensitive". |
| 3540 |
func (s UnsupportedStreamMediaTypeException) String() string { |
| 3541 |
return awsutil.Prettify(s) |
| 3542 |
} |
| 3543 |
|
| 3544 |
// GoString returns the string representation. |
| 3545 |
// |
| 3546 |
// API parameter values that are decorated as "sensitive" in the API will not |
| 3547 |
// be included in the string output. The member name will be present, but the |
| 3548 |
// value will be replaced with "sensitive". |
| 3549 |
func (s UnsupportedStreamMediaTypeException) GoString() string { |
| 3550 |
return s.String() |
| 3551 |
} |
| 3552 |
|
| 3553 |
func newErrorUnsupportedStreamMediaTypeException(v protocol.ResponseMetadata) error { |
| 3554 |
return &UnsupportedStreamMediaTypeException{ |
| 3555 |
RespMetadata: v, |
| 3556 |
} |
| 3557 |
} |
| 3558 |
|
| 3559 |
// Code returns the exception type name. |
| 3560 |
func (s *UnsupportedStreamMediaTypeException) Code() string { |
| 3561 |
return "UnsupportedStreamMediaTypeException" |
| 3562 |
} |
| 3563 |
|
| 3564 |
// Message returns the exception's message. |
| 3565 |
func (s *UnsupportedStreamMediaTypeException) Message() string { |
| 3566 |
if s.Message_ != nil { |
| 3567 |
return *s.Message_ |
| 3568 |
} |
| 3569 |
return "" |
| 3570 |
} |
| 3571 |
|
| 3572 |
// OrigErr always returns nil, satisfies awserr.Error interface. |
| 3573 |
func (s *UnsupportedStreamMediaTypeException) OrigErr() error { |
| 3574 |
return nil |
| 3575 |
} |
| 3576 |
|
| 3577 |
func (s *UnsupportedStreamMediaTypeException) Error() string { |
| 3578 |
return fmt.Sprintf("%s: %s", s.Code(), s.Message()) |
| 3579 |
} |
| 3580 |
|
| 3581 |
// Status code returns the HTTP status code for the request's response error. |
| 3582 |
func (s *UnsupportedStreamMediaTypeException) StatusCode() int { |
| 3583 |
return s.RespMetadata.StatusCode |
| 3584 |
} |
| 3585 |
|
| 3586 |
// RequestID returns the service's response RequestID for request. |
| 3587 |
func (s *UnsupportedStreamMediaTypeException) RequestID() string { |
| 3588 |
return s.RespMetadata.RequestID |
| 3589 |
} |
| 3590 |
|
| 3591 |
const ( |
| 3592 |
// ClipFragmentSelectorTypeProducerTimestamp is a ClipFragmentSelectorType enum value |
| 3593 |
ClipFragmentSelectorTypeProducerTimestamp = "PRODUCER_TIMESTAMP" |
| 3594 |
|
| 3595 |
// ClipFragmentSelectorTypeServerTimestamp is a ClipFragmentSelectorType enum value |
| 3596 |
ClipFragmentSelectorTypeServerTimestamp = "SERVER_TIMESTAMP" |
| 3597 |
) |
| 3598 |
|
| 3599 |
// ClipFragmentSelectorType_Values returns all elements of the ClipFragmentSelectorType enum |
| 3600 |
func ClipFragmentSelectorType_Values() []string { |
| 3601 |
return []string{ |
| 3602 |
ClipFragmentSelectorTypeProducerTimestamp, |
| 3603 |
ClipFragmentSelectorTypeServerTimestamp, |
| 3604 |
} |
| 3605 |
} |
| 3606 |
|
| 3607 |
const ( |
| 3608 |
// ContainerFormatFragmentedMp4 is a ContainerFormat enum value |
| 3609 |
ContainerFormatFragmentedMp4 = "FRAGMENTED_MP4" |
| 3610 |
|
| 3611 |
// ContainerFormatMpegTs is a ContainerFormat enum value |
| 3612 |
ContainerFormatMpegTs = "MPEG_TS" |
| 3613 |
) |
| 3614 |
|
| 3615 |
// ContainerFormat_Values returns all elements of the ContainerFormat enum |
| 3616 |
func ContainerFormat_Values() []string { |
| 3617 |
return []string{ |
| 3618 |
ContainerFormatFragmentedMp4, |
| 3619 |
ContainerFormatMpegTs, |
| 3620 |
} |
| 3621 |
} |
| 3622 |
|
| 3623 |
const ( |
| 3624 |
// DASHDisplayFragmentNumberAlways is a DASHDisplayFragmentNumber enum value |
| 3625 |
DASHDisplayFragmentNumberAlways = "ALWAYS" |
| 3626 |
|
| 3627 |
// DASHDisplayFragmentNumberNever is a DASHDisplayFragmentNumber enum value |
| 3628 |
DASHDisplayFragmentNumberNever = "NEVER" |
| 3629 |
) |
| 3630 |
|
| 3631 |
// DASHDisplayFragmentNumber_Values returns all elements of the DASHDisplayFragmentNumber enum |
| 3632 |
func DASHDisplayFragmentNumber_Values() []string { |
| 3633 |
return []string{ |
| 3634 |
DASHDisplayFragmentNumberAlways, |
| 3635 |
DASHDisplayFragmentNumberNever, |
| 3636 |
} |
| 3637 |
} |
| 3638 |
|
| 3639 |
const ( |
| 3640 |
// DASHDisplayFragmentTimestampAlways is a DASHDisplayFragmentTimestamp enum value |
| 3641 |
DASHDisplayFragmentTimestampAlways = "ALWAYS" |
| 3642 |
|
| 3643 |
// DASHDisplayFragmentTimestampNever is a DASHDisplayFragmentTimestamp enum value |
| 3644 |
DASHDisplayFragmentTimestampNever = "NEVER" |
| 3645 |
) |
| 3646 |
|
| 3647 |
// DASHDisplayFragmentTimestamp_Values returns all elements of the DASHDisplayFragmentTimestamp enum |
| 3648 |
func DASHDisplayFragmentTimestamp_Values() []string { |
| 3649 |
return []string{ |
| 3650 |
DASHDisplayFragmentTimestampAlways, |
| 3651 |
DASHDisplayFragmentTimestampNever, |
| 3652 |
} |
| 3653 |
} |
| 3654 |
|
| 3655 |
const ( |
| 3656 |
// DASHFragmentSelectorTypeProducerTimestamp is a DASHFragmentSelectorType enum value |
| 3657 |
DASHFragmentSelectorTypeProducerTimestamp = "PRODUCER_TIMESTAMP" |
| 3658 |
|
| 3659 |
// DASHFragmentSelectorTypeServerTimestamp is a DASHFragmentSelectorType enum value |
| 3660 |
DASHFragmentSelectorTypeServerTimestamp = "SERVER_TIMESTAMP" |
| 3661 |
) |
| 3662 |
|
| 3663 |
// DASHFragmentSelectorType_Values returns all elements of the DASHFragmentSelectorType enum |
| 3664 |
func DASHFragmentSelectorType_Values() []string { |
| 3665 |
return []string{ |
| 3666 |
DASHFragmentSelectorTypeProducerTimestamp, |
| 3667 |
DASHFragmentSelectorTypeServerTimestamp, |
| 3668 |
} |
| 3669 |
} |
| 3670 |
|
| 3671 |
const ( |
| 3672 |
// DASHPlaybackModeLive is a DASHPlaybackMode enum value |
| 3673 |
DASHPlaybackModeLive = "LIVE" |
| 3674 |
|
| 3675 |
// DASHPlaybackModeLiveReplay is a DASHPlaybackMode enum value |
| 3676 |
DASHPlaybackModeLiveReplay = "LIVE_REPLAY" |
| 3677 |
|
| 3678 |
// DASHPlaybackModeOnDemand is a DASHPlaybackMode enum value |
| 3679 |
DASHPlaybackModeOnDemand = "ON_DEMAND" |
| 3680 |
) |
| 3681 |
|
| 3682 |
// DASHPlaybackMode_Values returns all elements of the DASHPlaybackMode enum |
| 3683 |
func DASHPlaybackMode_Values() []string { |
| 3684 |
return []string{ |
| 3685 |
DASHPlaybackModeLive, |
| 3686 |
DASHPlaybackModeLiveReplay, |
| 3687 |
DASHPlaybackModeOnDemand, |
| 3688 |
} |
| 3689 |
} |
| 3690 |
|
| 3691 |
const ( |
| 3692 |
// FormatJpeg is a Format enum value |
| 3693 |
FormatJpeg = "JPEG" |
| 3694 |
|
| 3695 |
// FormatPng is a Format enum value |
| 3696 |
FormatPng = "PNG" |
| 3697 |
) |
| 3698 |
|
| 3699 |
// Format_Values returns all elements of the Format enum |
| 3700 |
func Format_Values() []string { |
| 3701 |
return []string{ |
| 3702 |
FormatJpeg, |
| 3703 |
FormatPng, |
| 3704 |
} |
| 3705 |
} |
| 3706 |
|
| 3707 |
const ( |
| 3708 |
// FormatConfigKeyJpegquality is a FormatConfigKey enum value |
| 3709 |
FormatConfigKeyJpegquality = "JPEGQuality" |
| 3710 |
) |
| 3711 |
|
| 3712 |
// FormatConfigKey_Values returns all elements of the FormatConfigKey enum |
| 3713 |
func FormatConfigKey_Values() []string { |
| 3714 |
return []string{ |
| 3715 |
FormatConfigKeyJpegquality, |
| 3716 |
} |
| 3717 |
} |
| 3718 |
|
| 3719 |
const ( |
| 3720 |
// FragmentSelectorTypeProducerTimestamp is a FragmentSelectorType enum value |
| 3721 |
FragmentSelectorTypeProducerTimestamp = "PRODUCER_TIMESTAMP" |
| 3722 |
|
| 3723 |
// FragmentSelectorTypeServerTimestamp is a FragmentSelectorType enum value |
| 3724 |
FragmentSelectorTypeServerTimestamp = "SERVER_TIMESTAMP" |
| 3725 |
) |
| 3726 |
|
| 3727 |
// FragmentSelectorType_Values returns all elements of the FragmentSelectorType enum |
| 3728 |
func FragmentSelectorType_Values() []string { |
| 3729 |
return []string{ |
| 3730 |
FragmentSelectorTypeProducerTimestamp, |
| 3731 |
FragmentSelectorTypeServerTimestamp, |
| 3732 |
} |
| 3733 |
} |
| 3734 |
|
| 3735 |
const ( |
| 3736 |
// HLSDiscontinuityModeAlways is a HLSDiscontinuityMode enum value |
| 3737 |
HLSDiscontinuityModeAlways = "ALWAYS" |
| 3738 |
|
| 3739 |
// HLSDiscontinuityModeNever is a HLSDiscontinuityMode enum value |
| 3740 |
HLSDiscontinuityModeNever = "NEVER" |
| 3741 |
|
| 3742 |
// HLSDiscontinuityModeOnDiscontinuity is a HLSDiscontinuityMode enum value |
| 3743 |
HLSDiscontinuityModeOnDiscontinuity = "ON_DISCONTINUITY" |
| 3744 |
) |
| 3745 |
|
| 3746 |
// HLSDiscontinuityMode_Values returns all elements of the HLSDiscontinuityMode enum |
| 3747 |
func HLSDiscontinuityMode_Values() []string { |
| 3748 |
return []string{ |
| 3749 |
HLSDiscontinuityModeAlways, |
| 3750 |
HLSDiscontinuityModeNever, |
| 3751 |
HLSDiscontinuityModeOnDiscontinuity, |
| 3752 |
} |
| 3753 |
} |
| 3754 |
|
| 3755 |
const ( |
| 3756 |
// HLSDisplayFragmentTimestampAlways is a HLSDisplayFragmentTimestamp enum value |
| 3757 |
HLSDisplayFragmentTimestampAlways = "ALWAYS" |
| 3758 |
|
| 3759 |
// HLSDisplayFragmentTimestampNever is a HLSDisplayFragmentTimestamp enum value |
| 3760 |
HLSDisplayFragmentTimestampNever = "NEVER" |
| 3761 |
) |
| 3762 |
|
| 3763 |
// HLSDisplayFragmentTimestamp_Values returns all elements of the HLSDisplayFragmentTimestamp enum |
| 3764 |
func HLSDisplayFragmentTimestamp_Values() []string { |
| 3765 |
return []string{ |
| 3766 |
HLSDisplayFragmentTimestampAlways, |
| 3767 |
HLSDisplayFragmentTimestampNever, |
| 3768 |
} |
| 3769 |
} |
| 3770 |
|
| 3771 |
const ( |
| 3772 |
// HLSFragmentSelectorTypeProducerTimestamp is a HLSFragmentSelectorType enum value |
| 3773 |
HLSFragmentSelectorTypeProducerTimestamp = "PRODUCER_TIMESTAMP" |
| 3774 |
|
| 3775 |
// HLSFragmentSelectorTypeServerTimestamp is a HLSFragmentSelectorType enum value |
| 3776 |
HLSFragmentSelectorTypeServerTimestamp = "SERVER_TIMESTAMP" |
| 3777 |
) |
| 3778 |
|
| 3779 |
// HLSFragmentSelectorType_Values returns all elements of the HLSFragmentSelectorType enum |
| 3780 |
func HLSFragmentSelectorType_Values() []string { |
| 3781 |
return []string{ |
| 3782 |
HLSFragmentSelectorTypeProducerTimestamp, |
| 3783 |
HLSFragmentSelectorTypeServerTimestamp, |
| 3784 |
} |
| 3785 |
} |
| 3786 |
|
| 3787 |
const ( |
| 3788 |
// HLSPlaybackModeLive is a HLSPlaybackMode enum value |
| 3789 |
HLSPlaybackModeLive = "LIVE" |
| 3790 |
|
| 3791 |
// HLSPlaybackModeLiveReplay is a HLSPlaybackMode enum value |
| 3792 |
HLSPlaybackModeLiveReplay = "LIVE_REPLAY" |
| 3793 |
|
| 3794 |
// HLSPlaybackModeOnDemand is a HLSPlaybackMode enum value |
| 3795 |
HLSPlaybackModeOnDemand = "ON_DEMAND" |
| 3796 |
) |
| 3797 |
|
| 3798 |
// HLSPlaybackMode_Values returns all elements of the HLSPlaybackMode enum |
| 3799 |
func HLSPlaybackMode_Values() []string { |
| 3800 |
return []string{ |
| 3801 |
HLSPlaybackModeLive, |
| 3802 |
HLSPlaybackModeLiveReplay, |
| 3803 |
HLSPlaybackModeOnDemand, |
| 3804 |
} |
| 3805 |
} |
| 3806 |
|
| 3807 |
const ( |
| 3808 |
// ImageErrorNoMedia is a ImageError enum value |
| 3809 |
ImageErrorNoMedia = "NO_MEDIA" |
| 3810 |
|
| 3811 |
// ImageErrorMediaError is a ImageError enum value |
| 3812 |
ImageErrorMediaError = "MEDIA_ERROR" |
| 3813 |
) |
| 3814 |
|
| 3815 |
// ImageError_Values returns all elements of the ImageError enum |
| 3816 |
func ImageError_Values() []string { |
| 3817 |
return []string{ |
| 3818 |
ImageErrorNoMedia, |
| 3819 |
ImageErrorMediaError, |
| 3820 |
} |
| 3821 |
} |
| 3822 |
|
| 3823 |
const ( |
| 3824 |
// ImageSelectorTypeProducerTimestamp is a ImageSelectorType enum value |
| 3825 |
ImageSelectorTypeProducerTimestamp = "PRODUCER_TIMESTAMP" |
| 3826 |
|
| 3827 |
// ImageSelectorTypeServerTimestamp is a ImageSelectorType enum value |
| 3828 |
ImageSelectorTypeServerTimestamp = "SERVER_TIMESTAMP" |
| 3829 |
) |
| 3830 |
|
| 3831 |
// ImageSelectorType_Values returns all elements of the ImageSelectorType enum |
| 3832 |
func ImageSelectorType_Values() []string { |
| 3833 |
return []string{ |
| 3834 |
ImageSelectorTypeProducerTimestamp, |
| 3835 |
ImageSelectorTypeServerTimestamp, |
| 3836 |
} |
| 3837 |
} |