uploads

package
v0.3.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 14, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

Client for uploads API

func (*Client) CreateUploadDestinationForResource

func (a *Client) CreateUploadDestinationForResource(params *CreateUploadDestinationForResourceParams, opts ...ClientOption) (*CreateUploadDestinationForResourceCreated, error)
CreateUploadDestinationForResource Creates an upload destination, returning the information required to upload a file to the destination and to programmatically access the file.

**Usage Plan:**

| Rate (requests per second) | Burst | | ---- | ---- | | 10 | 10 |

The `x-amzn-RateLimit-Limit` response header returns the usage plan rate limits that were applied to the requested operation, when available. The table above indicates the default rate and burst values for this operation. Selling partners whose business demands require higher throughput may see higher rate and burst values than those shown here. For more information, see [Usage Plans and Rate Limits in the Selling Partner API](https://developer-docs.amazon.com/sp-api/docs/usage-plans-and-rate-limits-in-the-sp-api).

func (*Client) SetTransport

func (a *Client) SetTransport(transport runtime.ClientTransport)

SetTransport changes the transport on the client

type ClientOption

type ClientOption func(*runtime.ClientOperation)

ClientOption is the option for Client methods

type ClientService

type ClientService interface {
	CreateUploadDestinationForResource(params *CreateUploadDestinationForResourceParams, opts ...ClientOption) (*CreateUploadDestinationForResourceCreated, error)

	SetTransport(transport runtime.ClientTransport)
}

ClientService is the interface for Client methods

func New

func New(transport runtime.ClientTransport, formats strfmt.Registry) ClientService

New creates a new uploads API client.

type CreateUploadDestinationForResourceBadRequest

type CreateUploadDestinationForResourceBadRequest struct {

	/* Your rate limit (requests per second) for this operation.
	 */
	XAmznRateLimitLimit string

	/* Unique request reference identifier.
	 */
	XAmznRequestID string

	Payload *uploads_2020_11_01_models.CreateUploadDestinationResponse
}

CreateUploadDestinationForResourceBadRequest describes a response with status code 400, with default header values.

Request has missing or invalid parameters and cannot be parsed.

func NewCreateUploadDestinationForResourceBadRequest

func NewCreateUploadDestinationForResourceBadRequest() *CreateUploadDestinationForResourceBadRequest

NewCreateUploadDestinationForResourceBadRequest creates a CreateUploadDestinationForResourceBadRequest with default headers values

func (*CreateUploadDestinationForResourceBadRequest) Error

func (*CreateUploadDestinationForResourceBadRequest) GetPayload

func (*CreateUploadDestinationForResourceBadRequest) IsClientError

IsClientError returns true when this create upload destination for resource bad request response has a 4xx status code

func (*CreateUploadDestinationForResourceBadRequest) IsCode

IsCode returns true when this create upload destination for resource bad request response a status code equal to that given

func (*CreateUploadDestinationForResourceBadRequest) IsRedirect

IsRedirect returns true when this create upload destination for resource bad request response has a 3xx status code

func (*CreateUploadDestinationForResourceBadRequest) IsServerError

IsServerError returns true when this create upload destination for resource bad request response has a 5xx status code

func (*CreateUploadDestinationForResourceBadRequest) IsSuccess

IsSuccess returns true when this create upload destination for resource bad request response has a 2xx status code

func (*CreateUploadDestinationForResourceBadRequest) String

type CreateUploadDestinationForResourceCreated

type CreateUploadDestinationForResourceCreated struct {

	/* Your rate limit (requests per second) for this operation.
	 */
	XAmznRateLimitLimit string

	/* Unique request reference identifier.
	 */
	XAmznRequestID string

	Payload *uploads_2020_11_01_models.CreateUploadDestinationResponse
}

CreateUploadDestinationForResourceCreated describes a response with status code 201, with default header values.

Success.

func NewCreateUploadDestinationForResourceCreated

func NewCreateUploadDestinationForResourceCreated() *CreateUploadDestinationForResourceCreated

NewCreateUploadDestinationForResourceCreated creates a CreateUploadDestinationForResourceCreated with default headers values

func (*CreateUploadDestinationForResourceCreated) Error

func (*CreateUploadDestinationForResourceCreated) GetPayload

func (*CreateUploadDestinationForResourceCreated) IsClientError

IsClientError returns true when this create upload destination for resource created response has a 4xx status code

func (*CreateUploadDestinationForResourceCreated) IsCode

IsCode returns true when this create upload destination for resource created response a status code equal to that given

func (*CreateUploadDestinationForResourceCreated) IsRedirect

IsRedirect returns true when this create upload destination for resource created response has a 3xx status code

func (*CreateUploadDestinationForResourceCreated) IsServerError

IsServerError returns true when this create upload destination for resource created response has a 5xx status code

func (*CreateUploadDestinationForResourceCreated) IsSuccess

IsSuccess returns true when this create upload destination for resource created response has a 2xx status code

func (*CreateUploadDestinationForResourceCreated) String

type CreateUploadDestinationForResourceForbidden

type CreateUploadDestinationForResourceForbidden struct {

	/* Unique request reference identifier.
	 */
	XAmznRequestID string

	Payload *uploads_2020_11_01_models.CreateUploadDestinationResponse
}

CreateUploadDestinationForResourceForbidden describes a response with status code 403, with default header values.

Indicates that access to the resource is forbidden. Possible reasons include Access Denied, Unauthorized, Expired Token, or Invalid Signature.

func NewCreateUploadDestinationForResourceForbidden

func NewCreateUploadDestinationForResourceForbidden() *CreateUploadDestinationForResourceForbidden

NewCreateUploadDestinationForResourceForbidden creates a CreateUploadDestinationForResourceForbidden with default headers values

func (*CreateUploadDestinationForResourceForbidden) Error

func (*CreateUploadDestinationForResourceForbidden) GetPayload

func (*CreateUploadDestinationForResourceForbidden) IsClientError

IsClientError returns true when this create upload destination for resource forbidden response has a 4xx status code

func (*CreateUploadDestinationForResourceForbidden) IsCode

IsCode returns true when this create upload destination for resource forbidden response a status code equal to that given

func (*CreateUploadDestinationForResourceForbidden) IsRedirect

IsRedirect returns true when this create upload destination for resource forbidden response has a 3xx status code

func (*CreateUploadDestinationForResourceForbidden) IsServerError

IsServerError returns true when this create upload destination for resource forbidden response has a 5xx status code

func (*CreateUploadDestinationForResourceForbidden) IsSuccess

IsSuccess returns true when this create upload destination for resource forbidden response has a 2xx status code

func (*CreateUploadDestinationForResourceForbidden) String

type CreateUploadDestinationForResourceInternalServerError

type CreateUploadDestinationForResourceInternalServerError struct {

	/* Your rate limit (requests per second) for this operation.
	_Note:_ For this status code, the rate limit header is deprecated and no longer returned.
	*/
	XAmznRateLimitLimit string

	/* Unique request reference identifier.
	 */
	XAmznRequestID string

	Payload *uploads_2020_11_01_models.CreateUploadDestinationResponse
}

CreateUploadDestinationForResourceInternalServerError describes a response with status code 500, with default header values.

An unexpected condition occurred that prevented the server from fulfilling the request.

func NewCreateUploadDestinationForResourceInternalServerError

func NewCreateUploadDestinationForResourceInternalServerError() *CreateUploadDestinationForResourceInternalServerError

NewCreateUploadDestinationForResourceInternalServerError creates a CreateUploadDestinationForResourceInternalServerError with default headers values

func (*CreateUploadDestinationForResourceInternalServerError) Error

func (*CreateUploadDestinationForResourceInternalServerError) GetPayload

func (*CreateUploadDestinationForResourceInternalServerError) IsClientError

IsClientError returns true when this create upload destination for resource internal server error response has a 4xx status code

func (*CreateUploadDestinationForResourceInternalServerError) IsCode

IsCode returns true when this create upload destination for resource internal server error response a status code equal to that given

func (*CreateUploadDestinationForResourceInternalServerError) IsRedirect

IsRedirect returns true when this create upload destination for resource internal server error response has a 3xx status code

func (*CreateUploadDestinationForResourceInternalServerError) IsServerError

IsServerError returns true when this create upload destination for resource internal server error response has a 5xx status code

func (*CreateUploadDestinationForResourceInternalServerError) IsSuccess

IsSuccess returns true when this create upload destination for resource internal server error response has a 2xx status code

func (*CreateUploadDestinationForResourceInternalServerError) String

type CreateUploadDestinationForResourceNotFound

type CreateUploadDestinationForResourceNotFound struct {

	/* Your rate limit (requests per second) for this operation.
	 */
	XAmznRateLimitLimit string

	/* Unique request reference identifier.
	 */
	XAmznRequestID string

	Payload *uploads_2020_11_01_models.CreateUploadDestinationResponse
}

CreateUploadDestinationForResourceNotFound describes a response with status code 404, with default header values.

The resource specified does not exist.

func NewCreateUploadDestinationForResourceNotFound

func NewCreateUploadDestinationForResourceNotFound() *CreateUploadDestinationForResourceNotFound

NewCreateUploadDestinationForResourceNotFound creates a CreateUploadDestinationForResourceNotFound with default headers values

func (*CreateUploadDestinationForResourceNotFound) Error

func (*CreateUploadDestinationForResourceNotFound) GetPayload

func (*CreateUploadDestinationForResourceNotFound) IsClientError

IsClientError returns true when this create upload destination for resource not found response has a 4xx status code

func (*CreateUploadDestinationForResourceNotFound) IsCode

IsCode returns true when this create upload destination for resource not found response a status code equal to that given

func (*CreateUploadDestinationForResourceNotFound) IsRedirect

IsRedirect returns true when this create upload destination for resource not found response has a 3xx status code

func (*CreateUploadDestinationForResourceNotFound) IsServerError

IsServerError returns true when this create upload destination for resource not found response has a 5xx status code

func (*CreateUploadDestinationForResourceNotFound) IsSuccess

IsSuccess returns true when this create upload destination for resource not found response has a 2xx status code

func (*CreateUploadDestinationForResourceNotFound) String

type CreateUploadDestinationForResourceParams

type CreateUploadDestinationForResourceParams struct {

	/* ContentMD5.

	   An MD5 hash of the content to be submitted to the upload destination. This value is used to determine if the data has been corrupted or tampered with during transit.
	*/
	ContentMD5 string

	/* ContentType.

	   The content type of the file to be uploaded.
	*/
	ContentType *string

	/* MarketplaceIds.

	   A list of marketplace identifiers. This specifies the marketplaces where the upload will be available. Only one marketplace can be specified.
	*/
	MarketplaceIds []string

	/* Resource.

	   The resource for the upload destination that you are creating. For example, if you are creating an upload destination for the createLegalDisclosure operation of the Messaging API, the `{resource}` would be `/messaging/v1/orders/{amazonOrderId}/messages/legalDisclosure`, and the entire path would be `/uploads/2020-11-01/uploadDestinations/messaging/v1/orders/{amazonOrderId}/messages/legalDisclosure`. If you are creating an upload destination for an Aplus content document, the `{resource}` would be `aplus/2020-11-01/contentDocuments` and the path would be `/uploads/v1/uploadDestinations/aplus/2020-11-01/contentDocuments`.
	*/
	Resource string

	Context    context.Context
	HTTPClient *http.Client
	// contains filtered or unexported fields
}

CreateUploadDestinationForResourceParams contains all the parameters to send to the API endpoint

for the create upload destination for resource operation.

Typically these are written to a http.Request.

func NewCreateUploadDestinationForResourceParams

func NewCreateUploadDestinationForResourceParams() *CreateUploadDestinationForResourceParams

NewCreateUploadDestinationForResourceParams creates a new CreateUploadDestinationForResourceParams object, with the default timeout for this client.

Default values are not hydrated, since defaults are normally applied by the API server side.

To enforce default values in parameter, use SetDefaults or WithDefaults.

func NewCreateUploadDestinationForResourceParamsWithContext

func NewCreateUploadDestinationForResourceParamsWithContext(ctx context.Context) *CreateUploadDestinationForResourceParams

NewCreateUploadDestinationForResourceParamsWithContext creates a new CreateUploadDestinationForResourceParams object with the ability to set a context for a request.

func NewCreateUploadDestinationForResourceParamsWithHTTPClient

func NewCreateUploadDestinationForResourceParamsWithHTTPClient(client *http.Client) *CreateUploadDestinationForResourceParams

NewCreateUploadDestinationForResourceParamsWithHTTPClient creates a new CreateUploadDestinationForResourceParams object with the ability to set a custom HTTPClient for a request.

func NewCreateUploadDestinationForResourceParamsWithTimeout

func NewCreateUploadDestinationForResourceParamsWithTimeout(timeout time.Duration) *CreateUploadDestinationForResourceParams

NewCreateUploadDestinationForResourceParamsWithTimeout creates a new CreateUploadDestinationForResourceParams object with the ability to set a timeout on a request.

func (*CreateUploadDestinationForResourceParams) SetContentMD5

func (o *CreateUploadDestinationForResourceParams) SetContentMD5(contentMD5 string)

SetContentMD5 adds the contentMD5 to the create upload destination for resource params

func (*CreateUploadDestinationForResourceParams) SetContentType

func (o *CreateUploadDestinationForResourceParams) SetContentType(contentType *string)

SetContentType adds the contentType to the create upload destination for resource params

func (*CreateUploadDestinationForResourceParams) SetContext

SetContext adds the context to the create upload destination for resource params

func (*CreateUploadDestinationForResourceParams) SetDefaults

SetDefaults hydrates default values in the create upload destination for resource params (not the query body).

All values with no default are reset to their zero value.

func (*CreateUploadDestinationForResourceParams) SetHTTPClient

func (o *CreateUploadDestinationForResourceParams) SetHTTPClient(client *http.Client)

SetHTTPClient adds the HTTPClient to the create upload destination for resource params

func (*CreateUploadDestinationForResourceParams) SetMarketplaceIds

func (o *CreateUploadDestinationForResourceParams) SetMarketplaceIds(marketplaceIds []string)

SetMarketplaceIds adds the marketplaceIds to the create upload destination for resource params

func (*CreateUploadDestinationForResourceParams) SetResource

func (o *CreateUploadDestinationForResourceParams) SetResource(resource string)

SetResource adds the resource to the create upload destination for resource params

func (*CreateUploadDestinationForResourceParams) SetTimeout

SetTimeout adds the timeout to the create upload destination for resource params

func (*CreateUploadDestinationForResourceParams) WithContentMD5

WithContentMD5 adds the contentMD5 to the create upload destination for resource params

func (*CreateUploadDestinationForResourceParams) WithContentType

WithContentType adds the contentType to the create upload destination for resource params

func (*CreateUploadDestinationForResourceParams) WithContext

WithContext adds the context to the create upload destination for resource params

func (*CreateUploadDestinationForResourceParams) WithDefaults

WithDefaults hydrates default values in the create upload destination for resource params (not the query body).

All values with no default are reset to their zero value.

func (*CreateUploadDestinationForResourceParams) WithHTTPClient

WithHTTPClient adds the HTTPClient to the create upload destination for resource params

func (*CreateUploadDestinationForResourceParams) WithMarketplaceIds

WithMarketplaceIds adds the marketplaceIds to the create upload destination for resource params

func (*CreateUploadDestinationForResourceParams) WithResource

WithResource adds the resource to the create upload destination for resource params

func (*CreateUploadDestinationForResourceParams) WithTimeout

WithTimeout adds the timeout to the create upload destination for resource params

func (*CreateUploadDestinationForResourceParams) WriteToRequest

WriteToRequest writes these params to a swagger request

type CreateUploadDestinationForResourceReader

type CreateUploadDestinationForResourceReader struct {
	// contains filtered or unexported fields
}

CreateUploadDestinationForResourceReader is a Reader for the CreateUploadDestinationForResource structure.

func (*CreateUploadDestinationForResourceReader) ReadResponse

func (o *CreateUploadDestinationForResourceReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error)

ReadResponse reads a server response into the received o.

type CreateUploadDestinationForResourceRequestEntityTooLarge

type CreateUploadDestinationForResourceRequestEntityTooLarge struct {

	/* Your rate limit (requests per second) for this operation.
	_Note:_ For this status code, the rate limit header is deprecated and no longer returned.
	*/
	XAmznRateLimitLimit string

	/* Unique request reference identifier.
	 */
	XAmznRequestID string

	Payload *uploads_2020_11_01_models.CreateUploadDestinationResponse
}

CreateUploadDestinationForResourceRequestEntityTooLarge describes a response with status code 413, with default header values.

The request size exceeded the maximum accepted size.

func NewCreateUploadDestinationForResourceRequestEntityTooLarge

func NewCreateUploadDestinationForResourceRequestEntityTooLarge() *CreateUploadDestinationForResourceRequestEntityTooLarge

NewCreateUploadDestinationForResourceRequestEntityTooLarge creates a CreateUploadDestinationForResourceRequestEntityTooLarge with default headers values

func (*CreateUploadDestinationForResourceRequestEntityTooLarge) Error

func (*CreateUploadDestinationForResourceRequestEntityTooLarge) GetPayload

func (*CreateUploadDestinationForResourceRequestEntityTooLarge) IsClientError

IsClientError returns true when this create upload destination for resource request entity too large response has a 4xx status code

func (*CreateUploadDestinationForResourceRequestEntityTooLarge) IsCode

IsCode returns true when this create upload destination for resource request entity too large response a status code equal to that given

func (*CreateUploadDestinationForResourceRequestEntityTooLarge) IsRedirect

IsRedirect returns true when this create upload destination for resource request entity too large response has a 3xx status code

func (*CreateUploadDestinationForResourceRequestEntityTooLarge) IsServerError

IsServerError returns true when this create upload destination for resource request entity too large response has a 5xx status code

func (*CreateUploadDestinationForResourceRequestEntityTooLarge) IsSuccess

IsSuccess returns true when this create upload destination for resource request entity too large response has a 2xx status code

func (*CreateUploadDestinationForResourceRequestEntityTooLarge) String

type CreateUploadDestinationForResourceServiceUnavailable

type CreateUploadDestinationForResourceServiceUnavailable struct {

	/* Your rate limit (requests per second) for this operation.
	_Note:_ For this status code, the rate limit header is deprecated and no longer returned.
	*/
	XAmznRateLimitLimit string

	/* Unique request reference identifier.
	 */
	XAmznRequestID string

	Payload *uploads_2020_11_01_models.CreateUploadDestinationResponse
}

CreateUploadDestinationForResourceServiceUnavailable describes a response with status code 503, with default header values.

Temporary overloading or maintenance of the server.

func NewCreateUploadDestinationForResourceServiceUnavailable

func NewCreateUploadDestinationForResourceServiceUnavailable() *CreateUploadDestinationForResourceServiceUnavailable

NewCreateUploadDestinationForResourceServiceUnavailable creates a CreateUploadDestinationForResourceServiceUnavailable with default headers values

func (*CreateUploadDestinationForResourceServiceUnavailable) Error

func (*CreateUploadDestinationForResourceServiceUnavailable) GetPayload

func (*CreateUploadDestinationForResourceServiceUnavailable) IsClientError

IsClientError returns true when this create upload destination for resource service unavailable response has a 4xx status code

func (*CreateUploadDestinationForResourceServiceUnavailable) IsCode

IsCode returns true when this create upload destination for resource service unavailable response a status code equal to that given

func (*CreateUploadDestinationForResourceServiceUnavailable) IsRedirect

IsRedirect returns true when this create upload destination for resource service unavailable response has a 3xx status code

func (*CreateUploadDestinationForResourceServiceUnavailable) IsServerError

IsServerError returns true when this create upload destination for resource service unavailable response has a 5xx status code

func (*CreateUploadDestinationForResourceServiceUnavailable) IsSuccess

IsSuccess returns true when this create upload destination for resource service unavailable response has a 2xx status code

func (*CreateUploadDestinationForResourceServiceUnavailable) String

type CreateUploadDestinationForResourceTooManyRequests

type CreateUploadDestinationForResourceTooManyRequests struct {

	/* Your rate limit (requests per second) for this operation.
	_Note:_ For this status code, the rate limit header is deprecated and no longer returned.
	*/
	XAmznRateLimitLimit string

	/* Unique request reference identifier.
	 */
	XAmznRequestID string

	Payload *uploads_2020_11_01_models.CreateUploadDestinationResponse
}

CreateUploadDestinationForResourceTooManyRequests describes a response with status code 429, with default header values.

The frequency of requests was greater than allowed.

func NewCreateUploadDestinationForResourceTooManyRequests

func NewCreateUploadDestinationForResourceTooManyRequests() *CreateUploadDestinationForResourceTooManyRequests

NewCreateUploadDestinationForResourceTooManyRequests creates a CreateUploadDestinationForResourceTooManyRequests with default headers values

func (*CreateUploadDestinationForResourceTooManyRequests) Error

func (*CreateUploadDestinationForResourceTooManyRequests) GetPayload

func (*CreateUploadDestinationForResourceTooManyRequests) IsClientError

IsClientError returns true when this create upload destination for resource too many requests response has a 4xx status code

func (*CreateUploadDestinationForResourceTooManyRequests) IsCode

IsCode returns true when this create upload destination for resource too many requests response a status code equal to that given

func (*CreateUploadDestinationForResourceTooManyRequests) IsRedirect

IsRedirect returns true when this create upload destination for resource too many requests response has a 3xx status code

func (*CreateUploadDestinationForResourceTooManyRequests) IsServerError

IsServerError returns true when this create upload destination for resource too many requests response has a 5xx status code

func (*CreateUploadDestinationForResourceTooManyRequests) IsSuccess

IsSuccess returns true when this create upload destination for resource too many requests response has a 2xx status code

func (*CreateUploadDestinationForResourceTooManyRequests) String

type CreateUploadDestinationForResourceUnsupportedMediaType

type CreateUploadDestinationForResourceUnsupportedMediaType struct {

	/* Your rate limit (requests per second) for this operation.
	_Note:_ For this status code, the rate limit header is deprecated and no longer returned.
	*/
	XAmznRateLimitLimit string

	/* Unique request reference identifier.
	 */
	XAmznRequestID string

	Payload *uploads_2020_11_01_models.CreateUploadDestinationResponse
}

CreateUploadDestinationForResourceUnsupportedMediaType describes a response with status code 415, with default header values.

The request payload is in an unsupported format.

func NewCreateUploadDestinationForResourceUnsupportedMediaType

func NewCreateUploadDestinationForResourceUnsupportedMediaType() *CreateUploadDestinationForResourceUnsupportedMediaType

NewCreateUploadDestinationForResourceUnsupportedMediaType creates a CreateUploadDestinationForResourceUnsupportedMediaType with default headers values

func (*CreateUploadDestinationForResourceUnsupportedMediaType) Error

func (*CreateUploadDestinationForResourceUnsupportedMediaType) GetPayload

func (*CreateUploadDestinationForResourceUnsupportedMediaType) IsClientError

IsClientError returns true when this create upload destination for resource unsupported media type response has a 4xx status code

func (*CreateUploadDestinationForResourceUnsupportedMediaType) IsCode

IsCode returns true when this create upload destination for resource unsupported media type response a status code equal to that given

func (*CreateUploadDestinationForResourceUnsupportedMediaType) IsRedirect

IsRedirect returns true when this create upload destination for resource unsupported media type response has a 3xx status code

func (*CreateUploadDestinationForResourceUnsupportedMediaType) IsServerError

IsServerError returns true when this create upload destination for resource unsupported media type response has a 5xx status code

func (*CreateUploadDestinationForResourceUnsupportedMediaType) IsSuccess

IsSuccess returns true when this create upload destination for resource unsupported media type response has a 2xx status code

func (*CreateUploadDestinationForResourceUnsupportedMediaType) String

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL