/**
 * Agravity OpenAPI Documentation - Public Functions
 *
 * Contact: support@agravity.io
 *
 * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
 * https://openapi-generator.tech
 * Do not edit the class manually.
 */
/* tslint:disable:no-unused-variable member-ordering */

import { Inject, Injectable, Optional } from '@angular/core';
import { HttpClient, HttpHeaders, HttpParams, HttpResponse, HttpEvent, HttpContext } from '@angular/common/http';
import { Observable } from 'rxjs';
import { OpenApiHttpParams, QueryParamStyle } from '../query.params';

// @ts-ignore
import { AgravityErrorResponse } from '../model/agravityErrorResponse.pub.agravity';
// @ts-ignore
import { AssetAvailability } from '../model/assetAvailability.pub.agravity';
// @ts-ignore
import { AssetBlob } from '../model/assetBlob.pub.agravity';
// @ts-ignore
import { AssetRelation } from '../model/assetRelation.pub.agravity';
// @ts-ignore
import { Collection } from '../model/collection.pub.agravity';
// @ts-ignore
import { DynamicImageOperation } from '../model/dynamicImageOperation.pub.agravity';
// @ts-ignore
import { MoveCollectionBody } from '../model/moveCollectionBody.pub.agravity';

// @ts-ignore
import { BASE_PATH, COLLECTION_FORMATS } from '../variables';
import { AgravityPublicConfiguration } from '../configuration';
import { BaseService } from '../api.base.service';

export interface HttpAssetImageEditRequestParams {
	/** The ID of the asset. */
	id: string;
	/** The width of the final image. */
	width?: number;
	/** The height of the final image. */
	height?: number;
	/** The supported modes: contain (default), cover, fill, crop, none */
	mode?: string;
	/** The file type which the image should be (i.e. webp, png, jpg, gif) */
	target?: string;
	/** The color of the background color if background is visible (crop outside, png). RGB(A) in hex code (i.e. 00FFAA or with alpha channel: 44AABB77) and color names (i.e. lightgray) supported - default: transparent */
	bgcolor?: string;
	/** The density (counts for X and Y) of the target image. */
	dpi?: number;
	/** The bit depth of the target image. */
	depth?: number;
	/** The quality of the target image (1-100). */
	quality?: number;
	/** The color space of the image (Default: sRGB). */
	colorspace?: string;
	/** If mode is crop: The x coordinate of the point (if image is extended (outside) it is negative) */
	cropX?: number;
	/** If mode is crop: The y coordinate of the point (if image is extended (outside) it is negative) */
	cropY?: number;
	/** If mode&#x3D;crop: The width of the cropping rectangle (from original pixel) */
	cropWidth?: number;
	/** If mode&#x3D;crop: The height of the cropping rectangle (from original pixel) */
	cropHeight?: number;
	/** Which filter should be applied. To get all filters available use: /api/helper/imageeditfilters */
	filter?: string;
	/** If set to true the internal image is used instead of the default original */
	original?: boolean;
}

export interface HttpAssetResizeRequestParams {
	/** The ID of the asset. */
	id: string;
}

export interface HttpAssetToCollectionRequestParams {
	/** The ID of the asset. */
	id: string;
	/** Contains information about this operation. */
	moveCollectionBody: MoveCollectionBody;
}

export interface HttpGetAssetBlobRequestParams {
	/** The ID of the asset. */
	id: string;
	/** \&quot;t\&quot; for thumbnail (default); \&quot;op\&quot; for optimized; \&quot;os\&quot; for original size; \&quot;o\&quot; for original. */
	c: string;
	/** If the request comes from portal this is the indicator. If used the \&quot;key\&quot; param becomes mandatory. */
	portalId?: string;
	/** The key is the MD5 hash of the original blob of the asset. */
	key?: string;
}

export interface HttpGetAssetCollectionsByIdRequestParams {
	/** The ID of the asset. */
	id: string;
	/** This limits the fields which are returned, separated by comma (\&#39;,\&#39;). */
	fields?: string;
	/** When default language should be returned and the translation dictionary is delivered. (Ignores the \&quot;Accept-Language\&quot; header) */
	translations?: boolean;
	/** The requested language of the response. If not matching it falls back to default language. */
	acceptLanguage?: string;
}

export interface HttpGetAssetDownloadRequestParams {
	/** The ID of the asset. */
	id: string;
	/** \&quot;t\&quot; for thumbnail (default); \&quot;op\&quot; for optimized; \&quot;os\&quot; for original size; \&quot;o\&quot; for original. */
	c?: string;
	/** (optional) provide the id of any valid download format. */
	f?: string;
	/** If the request comes from portal this is the indicator. It will be checked if the requested blob is valid for the portal. */
	portalId?: string;
	/** The key is the MD5 hash of the original blob of the asset. */
	key?: string;
}

export interface HttpGetAssetRelationsByIdRequestParams {
	/** The ID of the asset. */
	id: string;
}

export interface HttpGetAssetViewRequestParams {
	/** The ID of the asset. */
	id: string;
	/** (optional) provide the id of any valid download format. Otherwise the original is returned. */
	format?: string;
	/** If the request comes from portal this is the indicator. It will be checked if the requested blob is valid for the portal. */
	portalId?: string;
	/** Returns assets on permissions which are locked and accessable (User needs editor permissions). Default: true */
	locked?: boolean;
	/** Returns assets which are not in state ACTIVE (User needs editor permissions). Default: true */
	uncompleted?: boolean;
}

export interface HttpGetSharedAssetBlobRequestParams {
	/** This share ID is like an API key. Check on validy (format, expire, collection still availabe). Otherwise StatusCode 403 (Forbidden) is returned. */
	shareId: string;
	/** The ID of the asset. */
	id: string;
	/** Which download format the blob is requested. */
	format: string;
	/** If shared collection has a password, this header is mandatory. Otherwise StatusCode 403 (Forbidden) is returned. */
	ayPassword?: string;
}

export interface HttpImageDynamicEditRequestParams {
	/** The ID of the asset. */
	id: string;
	/** Operations to be performed on the image directly mapped to c# imagemagick sdk */
	dynamicImageOperation: Array<DynamicImageOperation>;
	/** If the file should have a specific naming. */
	targetFilename?: string;
}

export interface HttpImageDynamicGetFromDownloadIdRequestParams {
	/** The ID of the asset. */
	id: string;
	/** The ID of the download format. */
	downloadFormatId: string;
}

export interface HttpPutAssetAvailabilityRequestParams {
	/** The ID of the asset. */
	id: string;
	/** The values are validated and put directly on the asset. */
	assetAvailability: AssetAvailability;
}

@Injectable({
	providedIn: 'root'
})
export class PublicAssetOperationsService extends BaseService {
	constructor(
		protected httpClient: HttpClient,
		@Optional() @Inject(BASE_PATH) basePath: string | string[],
		@Optional() configuration?: AgravityPublicConfiguration
	) {
		super(basePath, configuration);
	}

	/**
	 * This endpoint lets you resize/modify the image asset according to the given parameter(s).
	 * @endpoint get /assets/{id}/imageedit
	 * @param requestParameters
	 * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
	 * @param reportProgress flag to report request and response progress.
	 * @param options additional options
	 */
	public httpAssetImageEdit(
		requestParameters: HttpAssetImageEditRequestParams,
		observe?: 'body',
		reportProgress?: boolean,
		options?: { httpHeaderAccept?: 'image/xyz' | 'application/json'; context?: HttpContext; transferCache?: boolean }
	): Observable<Blob>;
	public httpAssetImageEdit(
		requestParameters: HttpAssetImageEditRequestParams,
		observe?: 'response',
		reportProgress?: boolean,
		options?: { httpHeaderAccept?: 'image/xyz' | 'application/json'; context?: HttpContext; transferCache?: boolean }
	): Observable<HttpResponse<Blob>>;
	public httpAssetImageEdit(
		requestParameters: HttpAssetImageEditRequestParams,
		observe?: 'events',
		reportProgress?: boolean,
		options?: { httpHeaderAccept?: 'image/xyz' | 'application/json'; context?: HttpContext; transferCache?: boolean }
	): Observable<HttpEvent<Blob>>;
	public httpAssetImageEdit(
		requestParameters: HttpAssetImageEditRequestParams,
		observe: any = 'body',
		reportProgress: boolean = false,
		options?: { httpHeaderAccept?: 'image/xyz' | 'application/json'; context?: HttpContext; transferCache?: boolean }
	): Observable<any> {
		const id = requestParameters?.id;
		if (id === null || id === undefined) {
			throw new Error('Required parameter id was null or undefined when calling httpAssetImageEdit.');
		}
		const width = requestParameters?.width;
		const height = requestParameters?.height;
		const mode = requestParameters?.mode;
		const target = requestParameters?.target;
		const bgcolor = requestParameters?.bgcolor;
		const dpi = requestParameters?.dpi;
		const depth = requestParameters?.depth;
		const quality = requestParameters?.quality;
		const colorspace = requestParameters?.colorspace;
		const cropX = requestParameters?.cropX;
		const cropY = requestParameters?.cropY;
		const cropWidth = requestParameters?.cropWidth;
		const cropHeight = requestParameters?.cropHeight;
		const filter = requestParameters?.filter;
		const original = requestParameters?.original;

		let localVarQueryParameters = new OpenApiHttpParams(this.encoder);

		localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, 'width', <any>width, QueryParamStyle.Form, true);

		localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, 'height', <any>height, QueryParamStyle.Form, true);

		localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, 'mode', <any>mode, QueryParamStyle.Form, true);

		localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, 'target', <any>target, QueryParamStyle.Form, true);

		localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, 'bgcolor', <any>bgcolor, QueryParamStyle.Form, true);

		localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, 'dpi', <any>dpi, QueryParamStyle.Form, true);

		localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, 'depth', <any>depth, QueryParamStyle.Form, true);

		localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, 'quality', <any>quality, QueryParamStyle.Form, true);

		localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, 'colorspace', <any>colorspace, QueryParamStyle.Form, true);

		localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, 'crop_x', <any>cropX, QueryParamStyle.Form, true);

		localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, 'crop_y', <any>cropY, QueryParamStyle.Form, true);

		localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, 'crop_width', <any>cropWidth, QueryParamStyle.Form, true);

		localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, 'crop_height', <any>cropHeight, QueryParamStyle.Form, true);

		localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, 'filter', <any>filter, QueryParamStyle.Form, true);

		localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, 'original', <any>original, QueryParamStyle.Form, true);

		let localVarHeaders = this.defaultHeaders;

		// authentication (function_key) required
		localVarHeaders = this.configuration.addCredentialToHeaders('function_key', 'x-functions-key', localVarHeaders);

		const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept(['image/xyz', 'application/json']);
		if (localVarHttpHeaderAcceptSelected !== undefined) {
			localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
		}

		const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();

		const localVarTransferCache: boolean = options?.transferCache ?? true;

		let localVarPath = `/assets/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/imageedit`;
		const { basePath, withCredentials } = this.configuration;
		return this.httpClient.request('get', `${basePath}${localVarPath}`, {
			context: localVarHttpContext,
			params: localVarQueryParameters.toHttpParams(),
			responseType: 'blob',
			...(withCredentials ? { withCredentials } : {}),
			headers: localVarHeaders,
			observe: observe,
			...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
			reportProgress: reportProgress
		});
	}

	/**
	 * This endpoint lets you resize/modify the image asset according to the given parameter(s).
	 * @endpoint get /assets/{id}/resize
	 * @param requestParameters
	 * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
	 * @param reportProgress flag to report request and response progress.
	 * @param options additional options
	 */
	public httpAssetResize(
		requestParameters: HttpAssetResizeRequestParams,
		observe?: 'body',
		reportProgress?: boolean,
		options?: { httpHeaderAccept?: 'image/xyz' | 'application/json'; context?: HttpContext; transferCache?: boolean }
	): Observable<Blob>;
	public httpAssetResize(
		requestParameters: HttpAssetResizeRequestParams,
		observe?: 'response',
		reportProgress?: boolean,
		options?: { httpHeaderAccept?: 'image/xyz' | 'application/json'; context?: HttpContext; transferCache?: boolean }
	): Observable<HttpResponse<Blob>>;
	public httpAssetResize(
		requestParameters: HttpAssetResizeRequestParams,
		observe?: 'events',
		reportProgress?: boolean,
		options?: { httpHeaderAccept?: 'image/xyz' | 'application/json'; context?: HttpContext; transferCache?: boolean }
	): Observable<HttpEvent<Blob>>;
	public httpAssetResize(
		requestParameters: HttpAssetResizeRequestParams,
		observe: any = 'body',
		reportProgress: boolean = false,
		options?: { httpHeaderAccept?: 'image/xyz' | 'application/json'; context?: HttpContext; transferCache?: boolean }
	): Observable<any> {
		const id = requestParameters?.id;
		if (id === null || id === undefined) {
			throw new Error('Required parameter id was null or undefined when calling httpAssetResize.');
		}

		let localVarHeaders = this.defaultHeaders;

		// authentication (function_key) required
		localVarHeaders = this.configuration.addCredentialToHeaders('function_key', 'x-functions-key', localVarHeaders);

		const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept(['image/xyz', 'application/json']);
		if (localVarHttpHeaderAcceptSelected !== undefined) {
			localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
		}

		const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();

		const localVarTransferCache: boolean = options?.transferCache ?? true;

		let localVarPath = `/assets/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/resize`;
		const { basePath, withCredentials } = this.configuration;
		return this.httpClient.request('get', `${basePath}${localVarPath}`, {
			context: localVarHttpContext,
			responseType: 'blob',
			...(withCredentials ? { withCredentials } : {}),
			headers: localVarHeaders,
			observe: observe,
			...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
			reportProgress: reportProgress
		});
	}

	/**
	 * This endpoint allows to move/assign from/to another collection with the given operation parameter.
	 * @endpoint post /assets/{id}/tocollection
	 * @param requestParameters
	 * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
	 * @param reportProgress flag to report request and response progress.
	 * @param options additional options
	 */
	public httpAssetToCollection(
		requestParameters: HttpAssetToCollectionRequestParams,
		observe?: 'body',
		reportProgress?: boolean,
		options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
	): Observable<any>;
	public httpAssetToCollection(
		requestParameters: HttpAssetToCollectionRequestParams,
		observe?: 'response',
		reportProgress?: boolean,
		options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
	): Observable<HttpResponse<any>>;
	public httpAssetToCollection(
		requestParameters: HttpAssetToCollectionRequestParams,
		observe?: 'events',
		reportProgress?: boolean,
		options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
	): Observable<HttpEvent<any>>;
	public httpAssetToCollection(
		requestParameters: HttpAssetToCollectionRequestParams,
		observe: any = 'body',
		reportProgress: boolean = false,
		options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
	): Observable<any> {
		const id = requestParameters?.id;
		if (id === null || id === undefined) {
			throw new Error('Required parameter id was null or undefined when calling httpAssetToCollection.');
		}
		const moveCollectionBody = requestParameters?.moveCollectionBody;
		if (moveCollectionBody === null || moveCollectionBody === undefined) {
			throw new Error('Required parameter moveCollectionBody was null or undefined when calling httpAssetToCollection.');
		}

		let localVarHeaders = this.defaultHeaders;

		// authentication (function_key) required
		localVarHeaders = this.configuration.addCredentialToHeaders('function_key', 'x-functions-key', localVarHeaders);

		const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept(['application/json']);
		if (localVarHttpHeaderAcceptSelected !== undefined) {
			localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
		}

		const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();

		const localVarTransferCache: boolean = options?.transferCache ?? true;

		// to determine the Content-Type header
		const consumes: string[] = ['application/json'];
		const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
		if (httpContentTypeSelected !== undefined) {
			localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
		}

		let responseType_: 'text' | 'json' | 'blob' = 'json';
		if (localVarHttpHeaderAcceptSelected) {
			if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
				responseType_ = 'text';
			} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
				responseType_ = 'json';
			} else {
				responseType_ = 'blob';
			}
		}

		let localVarPath = `/assets/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/tocollection`;
		const { basePath, withCredentials } = this.configuration;
		return this.httpClient.request<any>('post', `${basePath}${localVarPath}`, {
			context: localVarHttpContext,
			body: moveCollectionBody,
			responseType: <any>responseType_,
			...(withCredentials ? { withCredentials } : {}),
			headers: localVarHeaders,
			observe: observe,
			...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
			reportProgress: reportProgress
		});
	}

	/**
	 * This endpoint checks, if an asset exists and returns the url for the requested blob.
	 * @endpoint get /assets/{id}/blobs
	 * @param requestParameters
	 * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
	 * @param reportProgress flag to report request and response progress.
	 * @param options additional options
	 */
	public httpGetAssetBlob(
		requestParameters: HttpGetAssetBlobRequestParams,
		observe?: 'body',
		reportProgress?: boolean,
		options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
	): Observable<AssetBlob>;
	public httpGetAssetBlob(
		requestParameters: HttpGetAssetBlobRequestParams,
		observe?: 'response',
		reportProgress?: boolean,
		options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
	): Observable<HttpResponse<AssetBlob>>;
	public httpGetAssetBlob(
		requestParameters: HttpGetAssetBlobRequestParams,
		observe?: 'events',
		reportProgress?: boolean,
		options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
	): Observable<HttpEvent<AssetBlob>>;
	public httpGetAssetBlob(
		requestParameters: HttpGetAssetBlobRequestParams,
		observe: any = 'body',
		reportProgress: boolean = false,
		options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
	): Observable<any> {
		const id = requestParameters?.id;
		if (id === null || id === undefined) {
			throw new Error('Required parameter id was null or undefined when calling httpGetAssetBlob.');
		}
		const c = requestParameters?.c;
		if (c === null || c === undefined) {
			throw new Error('Required parameter c was null or undefined when calling httpGetAssetBlob.');
		}
		const portalId = requestParameters?.portalId;
		const key = requestParameters?.key;

		let localVarQueryParameters = new OpenApiHttpParams(this.encoder);

		localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, 'c', <any>c, QueryParamStyle.Form, true);

		localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, 'portal_id', <any>portalId, QueryParamStyle.Form, true);

		localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, 'key', <any>key, QueryParamStyle.Form, true);

		let localVarHeaders = this.defaultHeaders;

		// authentication (function_key) required
		localVarHeaders = this.configuration.addCredentialToHeaders('function_key', 'x-functions-key', localVarHeaders);

		const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept(['application/json']);
		if (localVarHttpHeaderAcceptSelected !== undefined) {
			localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
		}

		const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();

		const localVarTransferCache: boolean = options?.transferCache ?? true;

		let responseType_: 'text' | 'json' | 'blob' = 'json';
		if (localVarHttpHeaderAcceptSelected) {
			if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
				responseType_ = 'text';
			} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
				responseType_ = 'json';
			} else {
				responseType_ = 'blob';
			}
		}

		let localVarPath = `/assets/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/blobs`;
		const { basePath, withCredentials } = this.configuration;
		return this.httpClient.request<AssetBlob>('get', `${basePath}${localVarPath}`, {
			context: localVarHttpContext,
			params: localVarQueryParameters.toHttpParams(),
			responseType: <any>responseType_,
			...(withCredentials ? { withCredentials } : {}),
			headers: localVarHeaders,
			observe: observe,
			...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
			reportProgress: reportProgress
		});
	}

	/**
	 * Returns all collections of a specific asset.
	 * @endpoint get /assets/{id}/collections
	 * @param requestParameters
	 * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
	 * @param reportProgress flag to report request and response progress.
	 * @param options additional options
	 */
	public httpGetAssetCollectionsById(
		requestParameters: HttpGetAssetCollectionsByIdRequestParams,
		observe?: 'body',
		reportProgress?: boolean,
		options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
	): Observable<Array<Collection>>;
	public httpGetAssetCollectionsById(
		requestParameters: HttpGetAssetCollectionsByIdRequestParams,
		observe?: 'response',
		reportProgress?: boolean,
		options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
	): Observable<HttpResponse<Array<Collection>>>;
	public httpGetAssetCollectionsById(
		requestParameters: HttpGetAssetCollectionsByIdRequestParams,
		observe?: 'events',
		reportProgress?: boolean,
		options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
	): Observable<HttpEvent<Array<Collection>>>;
	public httpGetAssetCollectionsById(
		requestParameters: HttpGetAssetCollectionsByIdRequestParams,
		observe: any = 'body',
		reportProgress: boolean = false,
		options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
	): Observable<any> {
		const id = requestParameters?.id;
		if (id === null || id === undefined) {
			throw new Error('Required parameter id was null or undefined when calling httpGetAssetCollectionsById.');
		}
		const fields = requestParameters?.fields;
		const translations = requestParameters?.translations;
		const acceptLanguage = requestParameters?.acceptLanguage;

		let localVarQueryParameters = new OpenApiHttpParams(this.encoder);

		localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, 'fields', <any>fields, QueryParamStyle.Form, true);

		localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, 'translations', <any>translations, QueryParamStyle.Form, true);

		let localVarHeaders = this.defaultHeaders;
		if (acceptLanguage !== undefined && acceptLanguage !== null) {
			localVarHeaders = localVarHeaders.set('Accept-Language', String(acceptLanguage));
		}

		// authentication (function_key) required
		localVarHeaders = this.configuration.addCredentialToHeaders('function_key', 'x-functions-key', localVarHeaders);

		const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept(['application/json']);
		if (localVarHttpHeaderAcceptSelected !== undefined) {
			localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
		}

		const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();

		const localVarTransferCache: boolean = options?.transferCache ?? true;

		let responseType_: 'text' | 'json' | 'blob' = 'json';
		if (localVarHttpHeaderAcceptSelected) {
			if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
				responseType_ = 'text';
			} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
				responseType_ = 'json';
			} else {
				responseType_ = 'blob';
			}
		}

		let localVarPath = `/assets/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/collections`;
		const { basePath, withCredentials } = this.configuration;
		return this.httpClient.request<Array<Collection>>('get', `${basePath}${localVarPath}`, {
			context: localVarHttpContext,
			params: localVarQueryParameters.toHttpParams(),
			responseType: <any>responseType_,
			...(withCredentials ? { withCredentials } : {}),
			headers: localVarHeaders,
			observe: observe,
			...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
			reportProgress: reportProgress
		});
	}

	/**
	 * This endpoint is similar to GetAssetBlob but with ContentDistribution and filename to let browser download the content.
	 * @endpoint get /assets/{id}/download
	 * @param requestParameters
	 * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
	 * @param reportProgress flag to report request and response progress.
	 * @param options additional options
	 */
	public httpGetAssetDownload(
		requestParameters: HttpGetAssetDownloadRequestParams,
		observe?: 'body',
		reportProgress?: boolean,
		options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
	): Observable<AssetBlob>;
	public httpGetAssetDownload(
		requestParameters: HttpGetAssetDownloadRequestParams,
		observe?: 'response',
		reportProgress?: boolean,
		options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
	): Observable<HttpResponse<AssetBlob>>;
	public httpGetAssetDownload(
		requestParameters: HttpGetAssetDownloadRequestParams,
		observe?: 'events',
		reportProgress?: boolean,
		options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
	): Observable<HttpEvent<AssetBlob>>;
	public httpGetAssetDownload(
		requestParameters: HttpGetAssetDownloadRequestParams,
		observe: any = 'body',
		reportProgress: boolean = false,
		options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
	): Observable<any> {
		const id = requestParameters?.id;
		if (id === null || id === undefined) {
			throw new Error('Required parameter id was null or undefined when calling httpGetAssetDownload.');
		}
		const c = requestParameters?.c;
		const f = requestParameters?.f;
		const portalId = requestParameters?.portalId;
		const key = requestParameters?.key;

		let localVarQueryParameters = new OpenApiHttpParams(this.encoder);

		localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, 'c', <any>c, QueryParamStyle.Form, true);

		localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, 'f', <any>f, QueryParamStyle.Form, true);

		localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, 'portal_id', <any>portalId, QueryParamStyle.Form, true);

		localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, 'key', <any>key, QueryParamStyle.Form, true);

		let localVarHeaders = this.defaultHeaders;

		// authentication (function_key) required
		localVarHeaders = this.configuration.addCredentialToHeaders('function_key', 'x-functions-key', localVarHeaders);

		const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept(['application/json']);
		if (localVarHttpHeaderAcceptSelected !== undefined) {
			localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
		}

		const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();

		const localVarTransferCache: boolean = options?.transferCache ?? true;

		let responseType_: 'text' | 'json' | 'blob' = 'json';
		if (localVarHttpHeaderAcceptSelected) {
			if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
				responseType_ = 'text';
			} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
				responseType_ = 'json';
			} else {
				responseType_ = 'blob';
			}
		}

		let localVarPath = `/assets/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/download`;
		const { basePath, withCredentials } = this.configuration;
		return this.httpClient.request<AssetBlob>('get', `${basePath}${localVarPath}`, {
			context: localVarHttpContext,
			params: localVarQueryParameters.toHttpParams(),
			responseType: <any>responseType_,
			...(withCredentials ? { withCredentials } : {}),
			headers: localVarHeaders,
			observe: observe,
			...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
			reportProgress: reportProgress
		});
	}

	/**
	 * This endpoint returns the asset relations
	 * @endpoint get /assets/{id}/relations
	 * @param requestParameters
	 * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
	 * @param reportProgress flag to report request and response progress.
	 * @param options additional options
	 */
	public httpGetAssetRelationsById(
		requestParameters: HttpGetAssetRelationsByIdRequestParams,
		observe?: 'body',
		reportProgress?: boolean,
		options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
	): Observable<Array<AssetRelation>>;
	public httpGetAssetRelationsById(
		requestParameters: HttpGetAssetRelationsByIdRequestParams,
		observe?: 'response',
		reportProgress?: boolean,
		options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
	): Observable<HttpResponse<Array<AssetRelation>>>;
	public httpGetAssetRelationsById(
		requestParameters: HttpGetAssetRelationsByIdRequestParams,
		observe?: 'events',
		reportProgress?: boolean,
		options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
	): Observable<HttpEvent<Array<AssetRelation>>>;
	public httpGetAssetRelationsById(
		requestParameters: HttpGetAssetRelationsByIdRequestParams,
		observe: any = 'body',
		reportProgress: boolean = false,
		options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
	): Observable<any> {
		const id = requestParameters?.id;
		if (id === null || id === undefined) {
			throw new Error('Required parameter id was null or undefined when calling httpGetAssetRelationsById.');
		}

		let localVarHeaders = this.defaultHeaders;

		// authentication (function_key) required
		localVarHeaders = this.configuration.addCredentialToHeaders('function_key', 'x-functions-key', localVarHeaders);

		const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept(['application/json']);
		if (localVarHttpHeaderAcceptSelected !== undefined) {
			localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
		}

		const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();

		const localVarTransferCache: boolean = options?.transferCache ?? true;

		let responseType_: 'text' | 'json' | 'blob' = 'json';
		if (localVarHttpHeaderAcceptSelected) {
			if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
				responseType_ = 'text';
			} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
				responseType_ = 'json';
			} else {
				responseType_ = 'blob';
			}
		}

		let localVarPath = `/assets/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/relations`;
		const { basePath, withCredentials } = this.configuration;
		return this.httpClient.request<Array<AssetRelation>>('get', `${basePath}${localVarPath}`, {
			context: localVarHttpContext,
			responseType: <any>responseType_,
			...(withCredentials ? { withCredentials } : {}),
			headers: localVarHeaders,
			observe: observe,
			...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
			reportProgress: reportProgress
		});
	}

	/**
	 * This endpoint returns the binary directly to the endpoint
	 * @endpoint get /assets/{id}/view
	 * @param requestParameters
	 * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
	 * @param reportProgress flag to report request and response progress.
	 * @param options additional options
	 */
	public httpGetAssetView(
		requestParameters: HttpGetAssetViewRequestParams,
		observe?: 'body',
		reportProgress?: boolean,
		options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
	): Observable<AssetBlob>;
	public httpGetAssetView(
		requestParameters: HttpGetAssetViewRequestParams,
		observe?: 'response',
		reportProgress?: boolean,
		options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
	): Observable<HttpResponse<AssetBlob>>;
	public httpGetAssetView(
		requestParameters: HttpGetAssetViewRequestParams,
		observe?: 'events',
		reportProgress?: boolean,
		options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
	): Observable<HttpEvent<AssetBlob>>;
	public httpGetAssetView(
		requestParameters: HttpGetAssetViewRequestParams,
		observe: any = 'body',
		reportProgress: boolean = false,
		options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
	): Observable<any> {
		const id = requestParameters?.id;
		if (id === null || id === undefined) {
			throw new Error('Required parameter id was null or undefined when calling httpGetAssetView.');
		}
		const format = requestParameters?.format;
		const portalId = requestParameters?.portalId;
		const locked = requestParameters?.locked;
		const uncompleted = requestParameters?.uncompleted;

		let localVarQueryParameters = new OpenApiHttpParams(this.encoder);

		localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, 'format', <any>format, QueryParamStyle.Form, true);

		localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, 'portal_id', <any>portalId, QueryParamStyle.Form, true);

		localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, 'locked', <any>locked, QueryParamStyle.Form, true);

		localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, 'uncompleted', <any>uncompleted, QueryParamStyle.Form, true);

		let localVarHeaders = this.defaultHeaders;

		// authentication (function_key) required
		localVarHeaders = this.configuration.addCredentialToHeaders('function_key', 'x-functions-key', localVarHeaders);

		const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept(['application/json']);
		if (localVarHttpHeaderAcceptSelected !== undefined) {
			localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
		}

		const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();

		const localVarTransferCache: boolean = options?.transferCache ?? true;

		let responseType_: 'text' | 'json' | 'blob' = 'json';
		if (localVarHttpHeaderAcceptSelected) {
			if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
				responseType_ = 'text';
			} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
				responseType_ = 'json';
			} else {
				responseType_ = 'blob';
			}
		}

		let localVarPath = `/assets/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/view`;
		const { basePath, withCredentials } = this.configuration;
		return this.httpClient.request<AssetBlob>('get', `${basePath}${localVarPath}`, {
			context: localVarHttpContext,
			params: localVarQueryParameters.toHttpParams(),
			responseType: <any>responseType_,
			...(withCredentials ? { withCredentials } : {}),
			headers: localVarHeaders,
			observe: observe,
			...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
			reportProgress: reportProgress
		});
	}

	/**
	 * This endpoint checks, if an asset exists, is an image, has original blob, is status active, is part of the shared collection and returns the requested asset blob.
	 * @endpoint get /assets/{id}/blob
	 * @param requestParameters
	 * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
	 * @param reportProgress flag to report request and response progress.
	 * @param options additional options
	 */
	public httpGetSharedAssetBlob(
		requestParameters: HttpGetSharedAssetBlobRequestParams,
		observe?: 'body',
		reportProgress?: boolean,
		options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
	): Observable<AssetBlob>;
	public httpGetSharedAssetBlob(
		requestParameters: HttpGetSharedAssetBlobRequestParams,
		observe?: 'response',
		reportProgress?: boolean,
		options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
	): Observable<HttpResponse<AssetBlob>>;
	public httpGetSharedAssetBlob(
		requestParameters: HttpGetSharedAssetBlobRequestParams,
		observe?: 'events',
		reportProgress?: boolean,
		options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
	): Observable<HttpEvent<AssetBlob>>;
	public httpGetSharedAssetBlob(
		requestParameters: HttpGetSharedAssetBlobRequestParams,
		observe: any = 'body',
		reportProgress: boolean = false,
		options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
	): Observable<any> {
		const shareId = requestParameters?.shareId;
		if (shareId === null || shareId === undefined) {
			throw new Error('Required parameter shareId was null or undefined when calling httpGetSharedAssetBlob.');
		}
		const id = requestParameters?.id;
		if (id === null || id === undefined) {
			throw new Error('Required parameter id was null or undefined when calling httpGetSharedAssetBlob.');
		}
		const format = requestParameters?.format;
		if (format === null || format === undefined) {
			throw new Error('Required parameter format was null or undefined when calling httpGetSharedAssetBlob.');
		}
		const ayPassword = requestParameters?.ayPassword;

		let localVarQueryParameters = new OpenApiHttpParams(this.encoder);

		localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, 'share_id', <any>shareId, QueryParamStyle.Form, true);

		localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, 'format', <any>format, QueryParamStyle.Form, true);

		let localVarHeaders = this.defaultHeaders;
		if (ayPassword !== undefined && ayPassword !== null) {
			localVarHeaders = localVarHeaders.set('ay-password', String(ayPassword));
		}

		const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept(['application/json']);
		if (localVarHttpHeaderAcceptSelected !== undefined) {
			localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
		}

		const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();

		const localVarTransferCache: boolean = options?.transferCache ?? true;

		let responseType_: 'text' | 'json' | 'blob' = 'json';
		if (localVarHttpHeaderAcceptSelected) {
			if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
				responseType_ = 'text';
			} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
				responseType_ = 'json';
			} else {
				responseType_ = 'blob';
			}
		}

		let localVarPath = `/assets/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/blob`;
		const { basePath, withCredentials } = this.configuration;
		return this.httpClient.request<AssetBlob>('get', `${basePath}${localVarPath}`, {
			context: localVarHttpContext,
			params: localVarQueryParameters.toHttpParams(),
			responseType: <any>responseType_,
			...(withCredentials ? { withCredentials } : {}),
			headers: localVarHeaders,
			observe: observe,
			...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
			reportProgress: reportProgress
		});
	}

	/**
	 * This endpoint lets you use the entire api of Imagemagick to edit the image.
	 * @endpoint post /assets/{id}/imageedit
	 * @param requestParameters
	 * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
	 * @param reportProgress flag to report request and response progress.
	 * @param options additional options
	 */
	public httpImageDynamicEdit(
		requestParameters: HttpImageDynamicEditRequestParams,
		observe?: 'body',
		reportProgress?: boolean,
		options?: { httpHeaderAccept?: 'image/xyz' | 'application/json'; context?: HttpContext; transferCache?: boolean }
	): Observable<Blob>;
	public httpImageDynamicEdit(
		requestParameters: HttpImageDynamicEditRequestParams,
		observe?: 'response',
		reportProgress?: boolean,
		options?: { httpHeaderAccept?: 'image/xyz' | 'application/json'; context?: HttpContext; transferCache?: boolean }
	): Observable<HttpResponse<Blob>>;
	public httpImageDynamicEdit(
		requestParameters: HttpImageDynamicEditRequestParams,
		observe?: 'events',
		reportProgress?: boolean,
		options?: { httpHeaderAccept?: 'image/xyz' | 'application/json'; context?: HttpContext; transferCache?: boolean }
	): Observable<HttpEvent<Blob>>;
	public httpImageDynamicEdit(
		requestParameters: HttpImageDynamicEditRequestParams,
		observe: any = 'body',
		reportProgress: boolean = false,
		options?: { httpHeaderAccept?: 'image/xyz' | 'application/json'; context?: HttpContext; transferCache?: boolean }
	): Observable<any> {
		const id = requestParameters?.id;
		if (id === null || id === undefined) {
			throw new Error('Required parameter id was null or undefined when calling httpImageDynamicEdit.');
		}
		const dynamicImageOperation = requestParameters?.dynamicImageOperation;
		if (dynamicImageOperation === null || dynamicImageOperation === undefined) {
			throw new Error('Required parameter dynamicImageOperation was null or undefined when calling httpImageDynamicEdit.');
		}
		const targetFilename = requestParameters?.targetFilename;

		let localVarQueryParameters = new OpenApiHttpParams(this.encoder);

		localVarQueryParameters = this.addToHttpParams(localVarQueryParameters, 'target_filename', <any>targetFilename, QueryParamStyle.Form, true);

		let localVarHeaders = this.defaultHeaders;

		// authentication (function_key) required
		localVarHeaders = this.configuration.addCredentialToHeaders('function_key', 'x-functions-key', localVarHeaders);

		const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept(['image/xyz', 'application/json']);
		if (localVarHttpHeaderAcceptSelected !== undefined) {
			localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
		}

		const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();

		const localVarTransferCache: boolean = options?.transferCache ?? true;

		// to determine the Content-Type header
		const consumes: string[] = ['application/json'];
		const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
		if (httpContentTypeSelected !== undefined) {
			localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
		}

		let localVarPath = `/assets/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/imageedit`;
		const { basePath, withCredentials } = this.configuration;
		return this.httpClient.request('post', `${basePath}${localVarPath}`, {
			context: localVarHttpContext,
			body: dynamicImageOperation,
			params: localVarQueryParameters.toHttpParams(),
			responseType: 'blob',
			...(withCredentials ? { withCredentials } : {}),
			headers: localVarHeaders,
			observe: observe,
			...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
			reportProgress: reportProgress
		});
	}

	/**
	 * This endpoint returns an image with the requested download format applied.
	 * @endpoint get /assets/{id}/imageedit/{download_format_id}
	 * @param requestParameters
	 * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
	 * @param reportProgress flag to report request and response progress.
	 * @param options additional options
	 */
	public httpImageDynamicGetFromDownloadId(
		requestParameters: HttpImageDynamicGetFromDownloadIdRequestParams,
		observe?: 'body',
		reportProgress?: boolean,
		options?: { httpHeaderAccept?: 'image/xyz' | 'application/json'; context?: HttpContext; transferCache?: boolean }
	): Observable<Blob>;
	public httpImageDynamicGetFromDownloadId(
		requestParameters: HttpImageDynamicGetFromDownloadIdRequestParams,
		observe?: 'response',
		reportProgress?: boolean,
		options?: { httpHeaderAccept?: 'image/xyz' | 'application/json'; context?: HttpContext; transferCache?: boolean }
	): Observable<HttpResponse<Blob>>;
	public httpImageDynamicGetFromDownloadId(
		requestParameters: HttpImageDynamicGetFromDownloadIdRequestParams,
		observe?: 'events',
		reportProgress?: boolean,
		options?: { httpHeaderAccept?: 'image/xyz' | 'application/json'; context?: HttpContext; transferCache?: boolean }
	): Observable<HttpEvent<Blob>>;
	public httpImageDynamicGetFromDownloadId(
		requestParameters: HttpImageDynamicGetFromDownloadIdRequestParams,
		observe: any = 'body',
		reportProgress: boolean = false,
		options?: { httpHeaderAccept?: 'image/xyz' | 'application/json'; context?: HttpContext; transferCache?: boolean }
	): Observable<any> {
		const id = requestParameters?.id;
		if (id === null || id === undefined) {
			throw new Error('Required parameter id was null or undefined when calling httpImageDynamicGetFromDownloadId.');
		}
		const downloadFormatId = requestParameters?.downloadFormatId;
		if (downloadFormatId === null || downloadFormatId === undefined) {
			throw new Error('Required parameter downloadFormatId was null or undefined when calling httpImageDynamicGetFromDownloadId.');
		}

		let localVarHeaders = this.defaultHeaders;

		// authentication (function_key) required
		localVarHeaders = this.configuration.addCredentialToHeaders('function_key', 'x-functions-key', localVarHeaders);

		const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept(['image/xyz', 'application/json']);
		if (localVarHttpHeaderAcceptSelected !== undefined) {
			localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
		}

		const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();

		const localVarTransferCache: boolean = options?.transferCache ?? true;

		let localVarPath = `/assets/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/imageedit/${this.configuration.encodeParam({ name: 'downloadFormatId', value: downloadFormatId, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}`;
		const { basePath, withCredentials } = this.configuration;
		return this.httpClient.request('get', `${basePath}${localVarPath}`, {
			context: localVarHttpContext,
			responseType: 'blob',
			...(withCredentials ? { withCredentials } : {}),
			headers: localVarHeaders,
			observe: observe,
			...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
			reportProgress: reportProgress
		});
	}

	/**
	 * This endpoint sets the availability of the asset. All properties are put on the asset and replace previous values.To make an asset unavailable set the &#x60;availability&#x60; property to \&#39;locked\&#39; or set the &#x60;available_from&#x60; property below the current date. To make it available set empty string to &#x60;availability&#x60; property or &#x60;available_to&#x60; property into past.
	 * @endpoint put /assets/{id}/availability
	 * @param requestParameters
	 * @param observe set whether or not to return the data Observable as the body, response or events. defaults to returning the body.
	 * @param reportProgress flag to report request and response progress.
	 * @param options additional options
	 */
	public httpPutAssetAvailability(
		requestParameters: HttpPutAssetAvailabilityRequestParams,
		observe?: 'body',
		reportProgress?: boolean,
		options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
	): Observable<AssetAvailability>;
	public httpPutAssetAvailability(
		requestParameters: HttpPutAssetAvailabilityRequestParams,
		observe?: 'response',
		reportProgress?: boolean,
		options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
	): Observable<HttpResponse<AssetAvailability>>;
	public httpPutAssetAvailability(
		requestParameters: HttpPutAssetAvailabilityRequestParams,
		observe?: 'events',
		reportProgress?: boolean,
		options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
	): Observable<HttpEvent<AssetAvailability>>;
	public httpPutAssetAvailability(
		requestParameters: HttpPutAssetAvailabilityRequestParams,
		observe: any = 'body',
		reportProgress: boolean = false,
		options?: { httpHeaderAccept?: 'application/json'; context?: HttpContext; transferCache?: boolean }
	): Observable<any> {
		const id = requestParameters?.id;
		if (id === null || id === undefined) {
			throw new Error('Required parameter id was null or undefined when calling httpPutAssetAvailability.');
		}
		const assetAvailability = requestParameters?.assetAvailability;
		if (assetAvailability === null || assetAvailability === undefined) {
			throw new Error('Required parameter assetAvailability was null or undefined when calling httpPutAssetAvailability.');
		}

		let localVarHeaders = this.defaultHeaders;

		// authentication (function_key) required
		localVarHeaders = this.configuration.addCredentialToHeaders('function_key', 'x-functions-key', localVarHeaders);

		const localVarHttpHeaderAcceptSelected: string | undefined = options?.httpHeaderAccept ?? this.configuration.selectHeaderAccept(['application/json']);
		if (localVarHttpHeaderAcceptSelected !== undefined) {
			localVarHeaders = localVarHeaders.set('Accept', localVarHttpHeaderAcceptSelected);
		}

		const localVarHttpContext: HttpContext = options?.context ?? new HttpContext();

		const localVarTransferCache: boolean = options?.transferCache ?? true;

		// to determine the Content-Type header
		const consumes: string[] = ['application/json'];
		const httpContentTypeSelected: string | undefined = this.configuration.selectHeaderContentType(consumes);
		if (httpContentTypeSelected !== undefined) {
			localVarHeaders = localVarHeaders.set('Content-Type', httpContentTypeSelected);
		}

		let responseType_: 'text' | 'json' | 'blob' = 'json';
		if (localVarHttpHeaderAcceptSelected) {
			if (localVarHttpHeaderAcceptSelected.startsWith('text')) {
				responseType_ = 'text';
			} else if (this.configuration.isJsonMime(localVarHttpHeaderAcceptSelected)) {
				responseType_ = 'json';
			} else {
				responseType_ = 'blob';
			}
		}

		let localVarPath = `/assets/${this.configuration.encodeParam({ name: 'id', value: id, in: 'path', style: 'simple', explode: false, dataType: 'string', dataFormat: undefined })}/availability`;
		const { basePath, withCredentials } = this.configuration;
		return this.httpClient.request<AssetAvailability>('put', `${basePath}${localVarPath}`, {
			context: localVarHttpContext,
			body: assetAvailability,
			responseType: <any>responseType_,
			...(withCredentials ? { withCredentials } : {}),
			headers: localVarHeaders,
			observe: observe,
			...(localVarTransferCache !== undefined ? { transferCache: localVarTransferCache } : {}),
			reportProgress: reportProgress
		});
	}
}
