/**
 * Spacefinder-API
 * No description provided (generated by Swagger Codegen https://github.com/swagger-api/swagger-codegen)
 *
 * OpenAPI spec version: 1.0.0
 *
 *
 * NOTE: This class is auto generated by the swagger code generator program.
 * https://github.com/swagger-api/swagger-codegen.git
 * Do not edit the class manually.
 */ import { Inject , Injectable , Optional } from '@angular/core' ; import { Http , Headers , URLSearchParams } from '@angular/http' ; import { RequestMethod , RequestOptions , RequestOptionsArgs } from '@angular/http' ; import { Response , ResponseContentType } from '@angular/http' ; import { Observable } from 'rxjs/Observable' ; import 'rxjs/add/operator/map' ; import * as models from '../model/models' ; import { BASE_PATH , COLLECTION_FORMATS } from '../variables' ; import { Configuration } from '../configuration' ; @ Injectable ( ) export class DefaultApi { protected basePath = 'https://cpoxt4iiyh.execute-api.us-east-1.amazonaws.com/development' ; public defaultHeaders : Headers = new Headers ( ) ; public configuration : Configuration = new Configuration ( ) ; constructor ( protected http , @ Optional ( ) @ Inject ( BASE_PATH ) basePath , @ Optional ( ) configuration ) { if ( basePath ) { this . basePath = basePath ; } if ( configuration ) { this . configuration = configuration ; } } param userId param booking public bookingsCreate ( userId , booking , extraHttpRequestParams ? ) { return this . bookingsCreateWithHttpInfo ( userId , booking , extraHttpRequestParams ) . map ( ( response ) => { if ( response . status === 204 ) { return undefined ; } else { return response . json ( ) || { } ; } } ) ; } param userId param bookingId public bookingsDelete ( userId , bookingId , extraHttpRequestParams ? ) { return this . bookingsDeleteWithHttpInfo ( userId , bookingId , extraHttpRequestParams ) . map ( ( response ) => { if ( response . status === 204 ) { return undefined ; } else { return response . json ( ) || { } ; } } ) ; } param userId param bookingId public bookingsGet ( userId , bookingId , extraHttpRequestParams ? ) { return this . bookingsGetWithHttpInfo ( userId , bookingId , extraHttpRequestParams ) . map ( ( response ) => { if ( response . status === 204 ) { return undefined ; } else { return response . json ( ) || { } ; } } ) ; } param locationId param resourceId public bookingsListByResourceId ( locationId , resourceId , extraHttpRequestParams ? ) { return this . bookingsListByResourceIdWithHttpInfo ( locationId , resourceId , extraHttpRequestParams ) . map ( ( response ) => { if ( response . status === 204 ) { return undefined ; } else { return response . json ( ) || { } ; } } ) ; } param userId public bookingsListByUserId ( userId , extraHttpRequestParams ? ) { return this . bookingsListByUserIdWithHttpInfo ( userId , extraHttpRequestParams ) . map ( ( response ) => { if ( response . status === 204 ) { return undefined ; } else { return response . json ( ) || { } ; } } ) ; } param location public locationsCreate ( location , extraHttpRequestParams ? ) { return this . locationsCreateWithHttpInfo ( location , extraHttpRequestParams ) . map ( ( response ) => { if ( response . status === 204 ) { return undefined ; } else { return response . json ( ) || { } ; } } ) ; } param locationId public locationsDelete ( locationId , extraHttpRequestParams ? ) { return this . locationsDeleteWithHttpInfo ( locationId , extraHttpRequestParams ) . map ( ( response ) => { if ( response . status === 204 ) { return undefined ; } else { return response . json ( ) || { } ; } } ) ; } param locationId public locationsGet ( locationId , extraHttpRequestParams ? ) { return this . locationsGetWithHttpInfo ( locationId , extraHttpRequestParams ) . map ( ( response ) => { if ( response . status === 204 ) { return undefined ; } else { return response . json ( ) || { } ; } } ) ; } /**
     *
     */ public locationsList ( extraHttpRequestParams ? ) { return this . locationsListWithHttpInfo ( extraHttpRequestParams ) . map ( ( response ) => { if ( response . status === 204 ) { return undefined ; } else { return response . json ( ) || { } ; } } ) ; } param locationId public locationsLocationIdOptions ( locationId , extraHttpRequestParams ? ) { return this . locationsLocationIdOptionsWithHttpInfo ( locationId , extraHttpRequestParams ) . map ( ( response ) => { if ( response . status === 204 ) { return undefined ; } else { return response . json ( ) || { } ; } } ) ; } param locationId public locationsLocationIdResourcesOptions ( locationId , extraHttpRequestParams ? ) { return this . locationsLocationIdResourcesOptionsWithHttpInfo ( locationId , extraHttpRequestParams ) . map ( ( response ) => { if ( response . status === 204 ) { return undefined ; } else { return response . json ( ) || { } ; } } ) ; } param locationId param resourceId public locationsLocationIdResourcesResourceIdBookingsOptions ( locationId , resourceId , extraHttpRequestParams ? ) { return this . locationsLocationIdResourcesResourceIdBookingsOptionsWithHttpInfo ( locationId , resourceId , extraHttpRequestParams ) . map ( ( response ) => { if ( response . status === 204 ) { return undefined ; } else { return response . json ( ) || { } ; } } ) ; } param locationId param resourceId public locationsLocationIdResourcesResourceIdOptions ( locationId , resourceId , extraHttpRequestParams ? ) { return this . locationsLocationIdResourcesResourceIdOptionsWithHttpInfo ( locationId , resourceId , extraHttpRequestParams ) . map ( ( response ) => { if ( response . status === 204 ) { return undefined ; } else { return response . json ( ) || { } ; } } ) ; } /**
     *
     */ public locationsOptions ( extraHttpRequestParams ? ) { return this . locationsOptionsWithHttpInfo ( extraHttpRequestParams ) . map ( ( response ) => { if ( response . status === 204 ) { return undefined ; } else { return response . json ( ) || { } ; } } ) ; } param locationId param resource public resourcesCreate ( locationId , resource , extraHttpRequestParams ? ) { return this . resourcesCreateWithHttpInfo ( locationId , resource , extraHttpRequestParams ) . map ( ( response ) => { if ( response . status === 204 ) { return undefined ; } else { return response . json ( ) || { } ; } } ) ; } param locationId param resourceId public resourcesDelete ( locationId , resourceId , extraHttpRequestParams ? ) { return this . resourcesDeleteWithHttpInfo ( locationId , resourceId , extraHttpRequestParams ) . map ( ( response ) => { if ( response . status === 204 ) { return undefined ; } else { return response . json ( ) || { } ; } } ) ; } param locationId param resourceId public resourcesGet ( locationId , resourceId , extraHttpRequestParams ? ) { return this . resourcesGetWithHttpInfo ( locationId , resourceId , extraHttpRequestParams ) . map ( ( response ) => { if ( response . status === 204 ) { return undefined ; } else { return response . json ( ) || { } ; } } ) ; } param locationId public resourcesList ( locationId , extraHttpRequestParams ? ) { return this . resourcesListWithHttpInfo ( locationId , extraHttpRequestParams ) . map ( ( response ) => { if ( response . status === 204 ) { return undefined ; } else { return response . json ( ) || { } ; } } ) ; } param userId param bookingId public usersUserIdBookingsBookingIdOptions ( userId , bookingId , extraHttpRequestParams ? ) { return this . usersUserIdBookingsBookingIdOptionsWithHttpInfo ( userId , bookingId , extraHttpRequestParams ) . map ( ( response ) => { if ( response . status === 204 ) { return undefined ; } else { return response . json ( ) || { } ; } } ) ; } param userId public usersUserIdBookingsOptions ( userId , extraHttpRequestParams ? ) { return this . usersUserIdBookingsOptionsWithHttpInfo ( userId , extraHttpRequestParams ) . map ( ( response ) => { if ( response . status === 204 ) { return undefined ; } else { return response . json ( ) || { } ; } } ) ; } param userId param booking public bookingsCreateWithHttpInfo ( userId , booking , extraHttpRequestParams ? ) { const path = this . basePath + '/users/${userId}/bookings' . replace ( '${' + 'userId' + '}' , String ( userId ) ) ; let queryParameters = new URLSearchParams ( ) ; let headers = new Headers ( this . defaultHeaders . toJSON ( ) ) ; if ( userId === null || userId === undefined ) { throw new Error ( 'Required parameter userId was null or undefined when calling bookingsCreate.' ) ; } if ( booking === null || booking === undefined ) { throw new Error ( 'Required parameter booking was null or undefined when calling bookingsCreate.' ) ; } let consumes = [ 'application/json' ] ; let produces = [ 'application/json' ] ; if ( this . configuration . apiKey ) { headers . set ( 'Authorization' , this . configuration . apiKey ) ; } headers . set ( 'Content-Type' , 'application/json' ) ; let requestOptions = new RequestOptions ( { method : RequestMethod . Post , headers : headers , body : booking == null ? '' : JSON . stringify ( booking ) , search : queryParameters , withCredentials : this . configuration . withCredentials } ) ; if ( extraHttpRequestParams ) { requestOptions = ( < any > Object ) . assign ( requestOptions , extraHttpRequestParams ) ; } return this . http . request ( path , requestOptions ) ; } param userId param bookingId public bookingsDeleteWithHttpInfo ( userId , bookingId , extraHttpRequestParams ? ) { const path = this . basePath + '/users/${userId}/bookings/${bookingId}' . replace ( '${' + 'userId' + '}' , String ( userId ) ) . replace ( '${' + 'bookingId' + '}' , String ( bookingId ) ) ; let queryParameters = new URLSearchParams ( ) ; let headers = new Headers ( this . defaultHeaders . toJSON ( ) ) ; if ( userId === null || userId === undefined ) { throw new Error ( 'Required parameter userId was null or undefined when calling bookingsDelete.' ) ; } if ( bookingId === null || bookingId === undefined ) { throw new Error ( 'Required parameter bookingId was null or undefined when calling bookingsDelete.' ) ; } let consumes = [ ] ; let produces = [ ] ; if ( this . configuration . apiKey ) { headers . set ( 'Authorization' , this . configuration . apiKey ) ; } let requestOptions = new RequestOptions ( { method : RequestMethod . Delete , headers : headers , search : queryParameters , withCredentials : this . configuration . withCredentials } ) ; if ( extraHttpRequestParams ) { requestOptions = ( < any > Object ) . assign ( requestOptions , extraHttpRequestParams ) ; } return this . http . request ( path , requestOptions ) ; } param userId param bookingId public bookingsGetWithHttpInfo ( userId , bookingId , extraHttpRequestParams ? ) { const path = this . basePath + '/users/${userId}/bookings/${bookingId}' . replace ( '${' + 'userId' + '}' , String ( userId ) ) . replace ( '${' + 'bookingId' + '}' , String ( bookingId ) ) ; let queryParameters = new URLSearchParams ( ) ; let headers = new Headers ( this . defaultHeaders . toJSON ( ) ) ; if ( userId === null || userId === undefined ) { throw new Error ( 'Required parameter userId was null or undefined when calling bookingsGet.' ) ; } if ( bookingId === null || bookingId === undefined ) { throw new Error ( 'Required parameter bookingId was null or undefined when calling bookingsGet.' ) ; } let consumes = [ ] ; let produces = [ 'application/json' ] ; if ( this . configuration . apiKey ) { headers . set ( 'Authorization' , this . configuration . apiKey ) ; } let requestOptions = new RequestOptions ( { method : RequestMethod . Get , headers : headers , search : queryParameters , withCredentials : this . configuration . withCredentials } ) ; if ( extraHttpRequestParams ) { requestOptions = ( < any > Object ) . assign ( requestOptions , extraHttpRequestParams ) ; } return this . http . request ( path , requestOptions ) ; } param locationId param resourceId public bookingsListByResourceIdWithHttpInfo ( locationId , resourceId , extraHttpRequestParams ? ) { const path = this . basePath + '/locations/${locationId}/resources/${resourceId}/bookings' . replace ( '${' + 'locationId' + '}' , String ( locationId ) ) . replace ( '${' + 'resourceId' + '}' , String ( resourceId ) ) ; let queryParameters = new URLSearchParams ( ) ; let headers = new Headers ( this . defaultHeaders . toJSON ( ) ) ; if ( locationId === null || locationId === undefined ) { throw new Error ( 'Required parameter locationId was null or undefined when calling bookingsListByResourceId.' ) ; } if ( resourceId === null || resourceId === undefined ) { throw new Error ( 'Required parameter resourceId was null or undefined when calling bookingsListByResourceId.' ) ; } let consumes = [ ] ; let produces = [ 'application/json' ] ; if ( this . configuration . apiKey ) { headers . set ( 'Authorization' , this . configuration . apiKey ) ; } let requestOptions = new RequestOptions ( { method : RequestMethod . Get , headers : headers , search : queryParameters , withCredentials : this . configuration . withCredentials } ) ; if ( extraHttpRequestParams ) { requestOptions = ( < any > Object ) . assign ( requestOptions , extraHttpRequestParams ) ; } return this . http . request ( path , requestOptions ) ; } param userId public bookingsListByUserIdWithHttpInfo ( userId , extraHttpRequestParams ? ) { const path = this . basePath + '/users/${userId}/bookings' . replace ( '${' + 'userId' + '}' , String ( userId ) ) ; let queryParameters = new URLSearchParams ( ) ; let headers = new Headers ( this . defaultHeaders . toJSON ( ) ) ; if ( userId === null || userId === undefined ) { throw new Error ( 'Required parameter userId was null or undefined when calling bookingsListByUserId.' ) ; } let consumes = [ ] ; let produces = [ 'application/json' ] ; if ( this . configuration . apiKey ) { headers . set ( 'Authorization' , this . configuration . apiKey ) ; } let requestOptions = new RequestOptions ( { method : RequestMethod . Get , headers : headers , search : queryParameters , withCredentials : this . configuration . withCredentials } ) ; if ( extraHttpRequestParams ) { requestOptions = ( < any > Object ) . assign ( requestOptions , extraHttpRequestParams ) ; } return this . http . request ( path , requestOptions ) ; } param location public locationsCreateWithHttpInfo ( location , extraHttpRequestParams ? ) { const path = this . basePath + '/locations' ; let queryParameters = new URLSearchParams ( ) ; let headers = new Headers ( this . defaultHeaders . toJSON ( ) ) ; if ( location === null || location === undefined ) { throw new Error ( 'Required parameter location was null or undefined when calling locationsCreate.' ) ; } let consumes = [ 'application/json' ] ; let produces = [ 'application/json' ] ; if ( this . configuration . apiKey ) { headers . set ( 'Authorization' , this . configuration . apiKey ) ; } headers . set ( 'Content-Type' , 'application/json' ) ; let requestOptions = new RequestOptions ( { method : RequestMethod . Post , headers : headers , body : location == null ? '' : JSON . stringify ( location ) , search : queryParameters , withCredentials : this . configuration . withCredentials } ) ; if ( extraHttpRequestParams ) { requestOptions = ( < any > Object ) . assign ( requestOptions , extraHttpRequestParams ) ; } return this . http . request ( path , requestOptions ) ; } param locationId public locationsDeleteWithHttpInfo ( locationId , extraHttpRequestParams ? ) { const path = this . basePath + '/locations/${locationId}' . replace ( '${' + 'locationId' + '}' , String ( locationId ) ) ; let queryParameters = new URLSearchParams ( ) ; let headers = new Headers ( this . defaultHeaders . toJSON ( ) ) ; if ( locationId === null || locationId === undefined ) { throw new Error ( 'Required parameter locationId was null or undefined when calling locationsDelete.' ) ; } let consumes = [ ] ; let produces = [ ] ; if ( this . configuration . apiKey ) { headers . set ( 'Authorization' , this . configuration . apiKey ) ; } let requestOptions = new RequestOptions ( { method : RequestMethod . Delete , headers : headers , search : queryParameters , withCredentials : this . configuration . withCredentials } ) ; if ( extraHttpRequestParams ) { requestOptions = ( < any > Object ) . assign ( requestOptions , extraHttpRequestParams ) ; } return this . http . request ( path , requestOptions ) ; } param locationId public locationsGetWithHttpInfo ( locationId , extraHttpRequestParams ? ) { const path = this . basePath + '/locations/${locationId}' . replace ( '${' + 'locationId' + '}' , String ( locationId ) ) ; let queryParameters = new URLSearchParams ( ) ; let headers = new Headers ( this . defaultHeaders . toJSON ( ) ) ; if ( locationId === null || locationId === undefined ) { throw new Error ( 'Required parameter locationId was null or undefined when calling locationsGet.' ) ; } let consumes = [ ] ; let produces = [ 'application/json' ] ; if ( this . configuration . apiKey ) { headers . set ( 'Authorization' , this . configuration . apiKey ) ; } let requestOptions = new RequestOptions ( { method : RequestMethod . Get , headers : headers , search : queryParameters , withCredentials : this . configuration . withCredentials } ) ; if ( extraHttpRequestParams ) { requestOptions = ( < any > Object ) . assign ( requestOptions , extraHttpRequestParams ) ; } return this . http . request ( path , requestOptions ) ; } /**
     *
     *
     */ public locationsListWithHttpInfo ( extraHttpRequestParams ? ) { const path = this . basePath + '/locations' ; let queryParameters = new URLSearchParams ( ) ; let headers = new Headers ( this . defaultHeaders . toJSON ( ) ) ; let consumes = [ ] ; let produces = [ 'application/json' ] ; if ( this . configuration . apiKey ) { headers . set ( 'Authorization' , this . configuration . apiKey ) ; } let requestOptions = new RequestOptions ( { method : RequestMethod . Get , headers : headers , search : queryParameters , withCredentials : this . configuration . withCredentials } ) ; if ( extraHttpRequestParams ) { requestOptions = ( < any > Object ) . assign ( requestOptions , extraHttpRequestParams ) ; } return this . http . request ( path , requestOptions ) ; } param locationId public locationsLocationIdOptionsWithHttpInfo ( locationId , extraHttpRequestParams ? ) { const path = this . basePath + '/locations/${locationId}' . replace ( '${' + 'locationId' + '}' , String ( locationId ) ) ; let queryParameters = new URLSearchParams ( ) ; let headers = new Headers ( this . defaultHeaders . toJSON ( ) ) ; if ( locationId === null || locationId === undefined ) { throw new Error ( 'Required parameter locationId was null or undefined when calling locationsLocationIdOptions.' ) ; } let consumes = [ 'application/json' ] ; let produces = [ ] ; let requestOptions = new RequestOptions ( { method : RequestMethod . Options , headers : headers , search : queryParameters , withCredentials : this . configuration . withCredentials } ) ; if ( extraHttpRequestParams ) { requestOptions = ( < any > Object ) . assign ( requestOptions , extraHttpRequestParams ) ; } return this . http . request ( path , requestOptions ) ; } param locationId public locationsLocationIdResourcesOptionsWithHttpInfo ( locationId , extraHttpRequestParams ? ) { const path = this . basePath + '/locations/${locationId}/resources' . replace ( '${' + 'locationId' + '}' , String ( locationId ) ) ; let queryParameters = new URLSearchParams ( ) ; let headers = new Headers ( this . defaultHeaders . toJSON ( ) ) ; if ( locationId === null || locationId === undefined ) { throw new Error ( 'Required parameter locationId was null or undefined when calling locationsLocationIdResourcesOptions.' ) ; } let consumes = [ 'application/json' ] ; let produces = [ ] ; let requestOptions = new RequestOptions ( { method : RequestMethod . Options , headers : headers , search : queryParameters , withCredentials : this . configuration . withCredentials } ) ; if ( extraHttpRequestParams ) { requestOptions = ( < any > Object ) . assign ( requestOptions , extraHttpRequestParams ) ; } return this . http . request ( path , requestOptions ) ; } param locationId param resourceId public locationsLocationIdResourcesResourceIdBookingsOptionsWithHttpInfo ( locationId , resourceId , extraHttpRequestParams ? ) { const path = this . basePath + '/locations/${locationId}/resources/${resourceId}/bookings' . replace ( '${' + 'locationId' + '}' , String ( locationId ) ) . replace ( '${' + 'resourceId' + '}' , String ( resourceId ) ) ; let queryParameters = new URLSearchParams ( ) ; let headers = new Headers ( this . defaultHeaders . toJSON ( ) ) ; if ( locationId === null || locationId === undefined ) { throw new Error ( 'Required parameter locationId was null or undefined when calling locationsLocationIdResourcesResourceIdBookingsOptions.' ) ; } if ( resourceId === null || resourceId === undefined ) { throw new Error ( 'Required parameter resourceId was null or undefined when calling locationsLocationIdResourcesResourceIdBookingsOptions.' ) ; } let consumes = [ 'application/json' ] ; let produces = [ ] ; let requestOptions = new RequestOptions ( { method : RequestMethod . Options , headers : headers , search : queryParameters , withCredentials : this . configuration . withCredentials } ) ; if ( extraHttpRequestParams ) { requestOptions = ( < any > Object ) . assign ( requestOptions , extraHttpRequestParams ) ; } return this . http . request ( path , requestOptions ) ; } param locationId param resourceId public locationsLocationIdResourcesResourceIdOptionsWithHttpInfo ( locationId , resourceId , extraHttpRequestParams ? ) { const path = this . basePath + '/locations/${locationId}/resources/${resourceId}' . replace ( '${' + 'locationId' + '}' , String ( locationId ) ) . replace ( '${' + 'resourceId' + '}' , String ( resourceId ) ) ; let queryParameters = new URLSearchParams ( ) ; let headers = new Headers ( this . defaultHeaders . toJSON ( ) ) ; if ( locationId === null || locationId === undefined ) { throw new Error ( 'Required parameter locationId was null or undefined when calling locationsLocationIdResourcesResourceIdOptions.' ) ; } if ( resourceId === null || resourceId === undefined ) { throw new Error ( 'Required parameter resourceId was null or undefined when calling locationsLocationIdResourcesResourceIdOptions.' ) ; } let consumes = [ 'application/json' ] ; let produces = [ ] ; let requestOptions = new RequestOptions ( { method : RequestMethod . Options , headers : headers , search : queryParameters , withCredentials : this . configuration . withCredentials } ) ; if ( extraHttpRequestParams ) { requestOptions = ( < any > Object ) . assign ( requestOptions , extraHttpRequestParams ) ; } return this . http . request ( path , requestOptions ) ; } /**
     *
     *
     */ public locationsOptionsWithHttpInfo ( extraHttpRequestParams ? ) { const path = this . basePath + '/locations' ; let queryParameters = new URLSearchParams ( ) ; let headers = new Headers ( this . defaultHeaders . toJSON ( ) ) ; let consumes = [ 'application/json' ] ; let produces = [ ] ; let requestOptions = new RequestOptions ( { method : RequestMethod . Options , headers : headers , search : queryParameters , withCredentials : this . configuration . withCredentials } ) ; if ( extraHttpRequestParams ) { requestOptions = ( < any > Object ) . assign ( requestOptions , extraHttpRequestParams ) ; } return this . http . request ( path , requestOptions ) ; } param locationId param resource public resourcesCreateWithHttpInfo ( locationId , resource , extraHttpRequestParams ? ) { const path = this . basePath + '/locations/${locationId}/resources' . replace ( '${' + 'locationId' + '}' , String ( locationId ) ) ; let queryParameters = new URLSearchParams ( ) ; let headers = new Headers ( this . defaultHeaders . toJSON ( ) ) ; if ( locationId === null || locationId === undefined ) { throw new Error ( 'Required parameter locationId was null or undefined when calling resourcesCreate.' ) ; } if ( resource === null || resource === undefined ) { throw new Error ( 'Required parameter resource was null or undefined when calling resourcesCreate.' ) ; } let consumes = [ 'application/json' ] ; let produces = [ 'application/json' ] ; if ( this . configuration . apiKey ) { headers . set ( 'Authorization' , this . configuration . apiKey ) ; } headers . set ( 'Content-Type' , 'application/json' ) ; let requestOptions = new RequestOptions ( { method : RequestMethod . Post , headers : headers , body : resource == null ? '' : JSON . stringify ( resource ) , search : queryParameters , withCredentials : this . configuration . withCredentials } ) ; if ( extraHttpRequestParams ) { requestOptions = ( < any > Object ) . assign ( requestOptions , extraHttpRequestParams ) ; } return this . http . request ( path , requestOptions ) ; } param locationId param resourceId public resourcesDeleteWithHttpInfo ( locationId , resourceId , extraHttpRequestParams ? ) { const path = this . basePath + '/locations/${locationId}/resources/${resourceId}' . replace ( '${' + 'locationId' + '}' , String ( locationId ) ) . replace ( '${' + 'resourceId' + '}' , String ( resourceId ) ) ; let queryParameters = new URLSearchParams ( ) ; let headers = new Headers ( this . defaultHeaders . toJSON ( ) ) ; if ( locationId === null || locationId === undefined ) { throw new Error ( 'Required parameter locationId was null or undefined when calling resourcesDelete.' ) ; } if ( resourceId === null || resourceId === undefined ) { throw new Error ( 'Required parameter resourceId was null or undefined when calling resourcesDelete.' ) ; } let consumes = [ ] ; let produces = [ ] ; if ( this . configuration . apiKey ) { headers . set ( 'Authorization' , this . configuration . apiKey ) ; } let requestOptions = new RequestOptions ( { method : RequestMethod . Delete , headers : headers , search : queryParameters , withCredentials : this . configuration . withCredentials } ) ; if ( extraHttpRequestParams ) { requestOptions = ( < any > Object ) . assign ( requestOptions , extraHttpRequestParams ) ; } return this . http . request ( path , requestOptions ) ; } param locationId param resourceId public resourcesGetWithHttpInfo ( locationId , resourceId , extraHttpRequestParams ? ) { const path = this . basePath + '/locations/${locationId}/resources/${resourceId}' . replace ( '${' + 'locationId' + '}' , String ( locationId ) ) . replace ( '${' + 'resourceId' + '}' , String ( resourceId ) ) ; let queryParameters = new URLSearchParams ( ) ; let headers = new Headers ( this . defaultHeaders . toJSON ( ) ) ; if ( locationId === null || locationId === undefined ) { throw new Error ( 'Required parameter locationId was null or undefined when calling resourcesGet.' ) ; } if ( resourceId === null || resourceId === undefined ) { throw new Error ( 'Required parameter resourceId was null or undefined when calling resourcesGet.' ) ; } let consumes = [ ] ; let produces = [ 'application/json' ] ; if ( this . configuration . apiKey ) { headers . set ( 'Authorization' , this . configuration . apiKey ) ; } let requestOptions = new RequestOptions ( { method : RequestMethod . Get , headers : headers , search : queryParameters , withCredentials : this . configuration . withCredentials } ) ; if ( extraHttpRequestParams ) { requestOptions = ( < any > Object ) . assign ( requestOptions , extraHttpRequestParams ) ; } return this . http . request ( path , requestOptions ) ; } param locationId public resourcesListWithHttpInfo ( locationId , extraHttpRequestParams ? ) { const path = this . basePath + '/locations/${locationId}/resources' . replace ( '${' + 'locationId' + '}' , String ( locationId ) ) ; let queryParameters = new URLSearchParams ( ) ; let headers = new Headers ( this . defaultHeaders . toJSON ( ) ) ; if ( locationId === null || locationId === undefined ) { throw new Error ( 'Required parameter locationId was null or undefined when calling resourcesList.' ) ; } let consumes = [ ] ; let produces = [ 'application/json' ] ; if ( this . configuration . apiKey ) { headers . set ( 'Authorization' , this . configuration . apiKey ) ; } let requestOptions = new RequestOptions ( { method : RequestMethod . Get , headers : headers , search : queryParameters , withCredentials : this . configuration . withCredentials } ) ; if ( extraHttpRequestParams ) { requestOptions = ( < any > Object ) . assign ( requestOptions , extraHttpRequestParams ) ; } return this . http . request ( path , requestOptions ) ; } param userId param bookingId public usersUserIdBookingsBookingIdOptionsWithHttpInfo ( userId , bookingId , extraHttpRequestParams ? ) { const path = this . basePath + '/users/${userId}/bookings/${bookingId}' . replace ( '${' + 'userId' + '}' , String ( userId ) ) . replace ( '${' + 'bookingId' + '}' , String ( bookingId ) ) ; let queryParameters = new URLSearchParams ( ) ; let headers = new Headers ( this . defaultHeaders . toJSON ( ) ) ; if ( userId === null || userId === undefined ) { throw new Error ( 'Required parameter userId was null or undefined when calling usersUserIdBookingsBookingIdOptions.' ) ; } if ( bookingId === null || bookingId === undefined ) { throw new Error ( 'Required parameter bookingId was null or undefined when calling usersUserIdBookingsBookingIdOptions.' ) ; } let consumes = [ 'application/json' ] ; let produces = [ ] ; let requestOptions = new RequestOptions ( { method : RequestMethod . Options , headers : headers , search : queryParameters , withCredentials : this . configuration . withCredentials } ) ; if ( extraHttpRequestParams ) { requestOptions = ( < any > Object ) . assign ( requestOptions , extraHttpRequestParams ) ; } return this . http . request ( path , requestOptions ) ; } param userId public usersUserIdBookingsOptionsWithHttpInfo ( userId , extraHttpRequestParams ? ) { const path = this . basePath + '/users/${userId}/bookings' . replace ( '${' + 'userId' + '}' , String ( userId ) ) ; let queryParameters = new URLSearchParams ( ) ; let headers = new Headers ( this . defaultHeaders . toJSON ( ) ) ; if ( userId === null || userId === undefined ) { throw new Error ( 'Required parameter userId was null or undefined when calling usersUserIdBookingsOptions.' ) ; } let consumes = [ 'application/json' ] ; let produces = [ ] ; let requestOptions = new RequestOptions ( { method : RequestMethod . Options , headers : headers , search : queryParameters , withCredentials : this . configuration . withCredentials } ) ; if ( extraHttpRequestParams ) { requestOptions = ( < any > Object ) . assign ( requestOptions , extraHttpRequestParams ) ; } return this . http . request ( path , requestOptions ) ; } }