fi.otavanopisto.restfulptv.client.ServicesApi Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of restful-ptv-rest-client Show documentation
Show all versions of restful-ptv-rest-client Show documentation
Restful way to use Palvelutietovaranto.
/**
* RESTful PTV
* Restful way to use Palvelutietovaranto.
*
* OpenAPI spec version: v1
*
*
* 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.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
package fi.otavanopisto.restfulptv.client;
import fi.otavanopisto.restfulptv.client.model.*;
import fi.otavanopisto.restfulptv.client.model.BadRequest;
import fi.otavanopisto.restfulptv.client.model.Service;
import fi.otavanopisto.restfulptv.client.model.Forbidden;
import fi.otavanopisto.restfulptv.client.model.InternalServerError;
import fi.otavanopisto.restfulptv.client.model.ElectronicChannel;
import fi.otavanopisto.restfulptv.client.model.NotFound;
import fi.otavanopisto.restfulptv.client.model.PhoneChannel;
import fi.otavanopisto.restfulptv.client.model.PrintableFormChannel;
import fi.otavanopisto.restfulptv.client.model.ServiceLocationChannel;
import fi.otavanopisto.restfulptv.client.model.WebPageChannel;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;
@javax.annotation.Generated(value = "class io.swagger.codegen.languages.JavaClientCodegen", date = "2016-10-03T15:33:19.141+03:00")
public class ServicesApi {
private ApiClient client;
private String baseUrl;
public ServicesApi(String baseUrl, ApiClient client) {
this.client = client;
this.baseUrl = baseUrl;
}
/**
* Create service
* Creates new service
* @param body Payload (required)
*/
public ApiResponse createService(Service body) {
Map queryParams = new HashMap<>();
Map formParams = new HashMap<>();
String path = String.format("%s/services", baseUrl);
ResultType resultType = new ResultType() {};
return client.doPOSTRequest(path, resultType, queryParams, formParams);
}
/**
* creates ElectronicChannel
* creates ElectronicChannel
* @param serviceId service id (required)
* @param body Payload (required)
*/
public ApiResponse createServiceElectronicChannel(String serviceId, ElectronicChannel body) {
Map queryParams = new HashMap<>();
Map formParams = new HashMap<>();
String path = String.format("%s/services/{serviceId}/electronicChannels"
.replaceAll("\\{" + "serviceId" + "\\}", String.valueOf(serviceId)), baseUrl);
ResultType resultType = new ResultType() {};
return client.doPOSTRequest(path, resultType, queryParams, formParams);
}
/**
* creates PhoneChannel
* creates PhoneChannel
* @param serviceId service id (required)
* @param body Payload (required)
*/
public ApiResponse createServicePhoneChannel(String serviceId, PhoneChannel body) {
Map queryParams = new HashMap<>();
Map formParams = new HashMap<>();
String path = String.format("%s/services/{serviceId}/phoneChannels"
.replaceAll("\\{" + "serviceId" + "\\}", String.valueOf(serviceId)), baseUrl);
ResultType resultType = new ResultType() {};
return client.doPOSTRequest(path, resultType, queryParams, formParams);
}
/**
* creates PrintableFormChannel
* creates PrintableFormChannel
* @param serviceId service id (required)
* @param body Payload (required)
*/
public ApiResponse createServicePrintableFormChannel(String serviceId, PrintableFormChannel body) {
Map queryParams = new HashMap<>();
Map formParams = new HashMap<>();
String path = String.format("%s/services/{serviceId}/printableFormChannels"
.replaceAll("\\{" + "serviceId" + "\\}", String.valueOf(serviceId)), baseUrl);
ResultType resultType = new ResultType() {};
return client.doPOSTRequest(path, resultType, queryParams, formParams);
}
/**
* creates ServiceLocationChannel
* creates ServiceLocationChannel
* @param serviceId service id (required)
* @param body Payload (required)
*/
public ApiResponse createServiceServiceLocationChannel(String serviceId, ServiceLocationChannel body) {
Map queryParams = new HashMap<>();
Map formParams = new HashMap<>();
String path = String.format("%s/services/{serviceId}/serviceLocationChannels"
.replaceAll("\\{" + "serviceId" + "\\}", String.valueOf(serviceId)), baseUrl);
ResultType resultType = new ResultType() {};
return client.doPOSTRequest(path, resultType, queryParams, formParams);
}
/**
* creates WebPageChannel
* creates WebPageChannel
* @param serviceId service id (required)
* @param body Payload (required)
*/
public ApiResponse createServiceWebPageChannel(String serviceId, WebPageChannel body) {
Map queryParams = new HashMap<>();
Map formParams = new HashMap<>();
String path = String.format("%s/services/{serviceId}/webPageChannels"
.replaceAll("\\{" + "serviceId" + "\\}", String.valueOf(serviceId)), baseUrl);
ResultType resultType = new ResultType() {};
return client.doPOSTRequest(path, resultType, queryParams, formParams);
}
/**
* Finds a service by id
* Finds service
* @param serviceId Service id (required)
*/
public ApiResponse findService(String serviceId) {
Map queryParams = new HashMap<>();
Map formParams = new HashMap<>();
String path = String.format("%s/services/{serviceId}"
.replaceAll("\\{" + "serviceId" + "\\}", String.valueOf(serviceId)), baseUrl);
ResultType resultType = new ResultType() {};
return client.doGETRequest(path, resultType, queryParams, formParams);
}
/**
* finds ElectronicChannel by electronicChannelId
* finds ElectronicChannels by electronicChannelId
* @param serviceId Service id (required)
* @param electronicChannelId electronicChannel id (required)
*/
public ApiResponse findServiceElectronicChannel(String serviceId, String electronicChannelId) {
Map queryParams = new HashMap<>();
Map formParams = new HashMap<>();
String path = String.format("%s/services/{serviceId}/electronicChannels/{electronicChannelId}"
.replaceAll("\\{" + "serviceId" + "\\}", String.valueOf(serviceId))
.replaceAll("\\{" + "electronicChannelId" + "\\}", String.valueOf(electronicChannelId)), baseUrl);
ResultType resultType = new ResultType() {};
return client.doGETRequest(path, resultType, queryParams, formParams);
}
/**
* finds PhoneChannel by phoneChannelId
* finds PhoneChannels by phoneChannelId
* @param serviceId Service id (required)
* @param phoneChannelId phoneChannel id (required)
*/
public ApiResponse findServicePhoneChannel(String serviceId, String phoneChannelId) {
Map queryParams = new HashMap<>();
Map formParams = new HashMap<>();
String path = String.format("%s/services/{serviceId}/phoneChannels/{phoneChannelId}"
.replaceAll("\\{" + "serviceId" + "\\}", String.valueOf(serviceId))
.replaceAll("\\{" + "phoneChannelId" + "\\}", String.valueOf(phoneChannelId)), baseUrl);
ResultType resultType = new ResultType() {};
return client.doGETRequest(path, resultType, queryParams, formParams);
}
/**
* finds PrintableFormChannel by printableFormChannelId
* finds PrintableFormChannels by printableFormChannelId
* @param serviceId Service id (required)
* @param printableFormChannelId printableFormChannel id (required)
*/
public ApiResponse findServicePrintableFormChannel(String serviceId, String printableFormChannelId) {
Map queryParams = new HashMap<>();
Map formParams = new HashMap<>();
String path = String.format("%s/services/{serviceId}/printableFormChannels/{printableFormChannelId}"
.replaceAll("\\{" + "serviceId" + "\\}", String.valueOf(serviceId))
.replaceAll("\\{" + "printableFormChannelId" + "\\}", String.valueOf(printableFormChannelId)), baseUrl);
ResultType resultType = new ResultType() {};
return client.doGETRequest(path, resultType, queryParams, formParams);
}
/**
* finds ServiceLocationChannel by serviceLocationChannelId
* finds ServiceLocationChannels by serviceLocationChannelId
* @param serviceId Service id (required)
* @param serviceLocationChannelId serviceLocationChannel id (required)
*/
public ApiResponse findServiceServiceLocationChannel(String serviceId, String serviceLocationChannelId) {
Map queryParams = new HashMap<>();
Map formParams = new HashMap<>();
String path = String.format("%s/services/{serviceId}/serviceLocationChannels/{serviceLocationChannelId}"
.replaceAll("\\{" + "serviceId" + "\\}", String.valueOf(serviceId))
.replaceAll("\\{" + "serviceLocationChannelId" + "\\}", String.valueOf(serviceLocationChannelId)), baseUrl);
ResultType resultType = new ResultType() {};
return client.doGETRequest(path, resultType, queryParams, formParams);
}
/**
* finds WebPageChannel by webPageChannelId
* finds WebPageChannels by webPageChannelId
* @param serviceId Service id (required)
* @param webPageChannelId webPageChannel id (required)
*/
public ApiResponse findServiceWebPageChannel(String serviceId, String webPageChannelId) {
Map queryParams = new HashMap<>();
Map formParams = new HashMap<>();
String path = String.format("%s/services/{serviceId}/webPageChannels/{webPageChannelId}"
.replaceAll("\\{" + "serviceId" + "\\}", String.valueOf(serviceId))
.replaceAll("\\{" + "webPageChannelId" + "\\}", String.valueOf(webPageChannelId)), baseUrl);
ResultType resultType = new ResultType() {};
return client.doGETRequest(path, resultType, queryParams, formParams);
}
/**
* Lists ElectronicChannels by serviceId
* Lists ElectronicChannels by serviceId
* @param serviceId Service id (required)
* @param firstResult First result (optional)
* @param maxResults Max results (optional)
*/
public ApiResponse> listServiceElectronicChannels(String serviceId, Long firstResult, Long maxResults) {
Map queryParams = new HashMap<>();
Map formParams = new HashMap<>();
if (firstResult != null)
queryParams.put("firstResult", firstResult);
if (maxResults != null)
queryParams.put("maxResults", maxResults);
String path = String.format("%s/services/{serviceId}/electronicChannels"
.replaceAll("\\{" + "serviceId" + "\\}", String.valueOf(serviceId)), baseUrl);
ResultType> resultType = new ResultType>() {};
return client.doGETRequest(path, resultType, queryParams, formParams);
}
/**
* Lists PhoneChannels by serviceId
* Lists PhoneChannels by serviceId
* @param serviceId Service id (required)
* @param firstResult First result (optional)
* @param maxResults Max results (optional)
*/
public ApiResponse> listServicePhoneChannels(String serviceId, Long firstResult, Long maxResults) {
Map queryParams = new HashMap<>();
Map formParams = new HashMap<>();
if (firstResult != null)
queryParams.put("firstResult", firstResult);
if (maxResults != null)
queryParams.put("maxResults", maxResults);
String path = String.format("%s/services/{serviceId}/phoneChannels"
.replaceAll("\\{" + "serviceId" + "\\}", String.valueOf(serviceId)), baseUrl);
ResultType> resultType = new ResultType>() {};
return client.doGETRequest(path, resultType, queryParams, formParams);
}
/**
* Lists PrintableFormChannels by serviceId
* Lists PrintableFormChannels by serviceId
* @param serviceId Service id (required)
* @param firstResult First result (optional)
* @param maxResults Max results (optional)
*/
public ApiResponse> listServicePrintableFormChannels(String serviceId, Long firstResult, Long maxResults) {
Map queryParams = new HashMap<>();
Map formParams = new HashMap<>();
if (firstResult != null)
queryParams.put("firstResult", firstResult);
if (maxResults != null)
queryParams.put("maxResults", maxResults);
String path = String.format("%s/services/{serviceId}/printableFormChannels"
.replaceAll("\\{" + "serviceId" + "\\}", String.valueOf(serviceId)), baseUrl);
ResultType> resultType = new ResultType>() {};
return client.doGETRequest(path, resultType, queryParams, formParams);
}
/**
* Lists ServiceLocationChannels by serviceId
* Lists ServiceLocationChannels by serviceId
* @param serviceId Service id (required)
* @param firstResult First result (optional)
* @param maxResults Max results (optional)
*/
public ApiResponse> listServiceServiceLocationChannels(String serviceId, Long firstResult, Long maxResults) {
Map queryParams = new HashMap<>();
Map formParams = new HashMap<>();
if (firstResult != null)
queryParams.put("firstResult", firstResult);
if (maxResults != null)
queryParams.put("maxResults", maxResults);
String path = String.format("%s/services/{serviceId}/serviceLocationChannels"
.replaceAll("\\{" + "serviceId" + "\\}", String.valueOf(serviceId)), baseUrl);
ResultType> resultType = new ResultType>() {};
return client.doGETRequest(path, resultType, queryParams, formParams);
}
/**
* Lists WebPageChannels by serviceId
* Lists WebPageChannels by serviceId
* @param serviceId Service id (required)
* @param firstResult First result (optional)
* @param maxResults Max results (optional)
*/
public ApiResponse> listServiceWebPageChannels(String serviceId, Long firstResult, Long maxResults) {
Map queryParams = new HashMap<>();
Map formParams = new HashMap<>();
if (firstResult != null)
queryParams.put("firstResult", firstResult);
if (maxResults != null)
queryParams.put("maxResults", maxResults);
String path = String.format("%s/services/{serviceId}/webPageChannels"
.replaceAll("\\{" + "serviceId" + "\\}", String.valueOf(serviceId)), baseUrl);
ResultType> resultType = new ResultType>() {};
return client.doGETRequest(path, resultType, queryParams, formParams);
}
/**
* Service list
* Lists services
* @param firstResult First result (optional)
* @param maxResults Max results (optional)
*/
public ApiResponse> listServices(Long firstResult, Long maxResults) {
Map queryParams = new HashMap<>();
Map formParams = new HashMap<>();
if (firstResult != null)
queryParams.put("firstResult", firstResult);
if (maxResults != null)
queryParams.put("maxResults", maxResults);
String path = String.format("%s/services", baseUrl);
ResultType> resultType = new ResultType>() {};
return client.doGETRequest(path, resultType, queryParams, formParams);
}
/**
* Updates PhoneChannel
* Updates PhoneChannel
* @param serviceId service id (required)
* @param phoneChannelId phoneChannel id (required)
* @param body Payload (required)
*/
public ApiResponse updatePhoneChannel(String serviceId, String phoneChannelId, PhoneChannel body) {
Map queryParams = new HashMap<>();
Map formParams = new HashMap<>();
String path = String.format("%s/services/{serviceId}/phoneChannels/{phoneChannelId}"
.replaceAll("\\{" + "serviceId" + "\\}", String.valueOf(serviceId))
.replaceAll("\\{" + "phoneChannelId" + "\\}", String.valueOf(phoneChannelId)), baseUrl);
ResultType resultType = new ResultType() {};
return client.doPUTRequest(path, resultType, queryParams, formParams);
}
/**
* Updates PrintableFormChannel
* Updates PrintableFormChannel
* @param serviceId service id (required)
* @param printableFormChannelId printableFormChannel id (required)
* @param body Payload (required)
*/
public ApiResponse updatePrintableFormChannel(String serviceId, String printableFormChannelId, PrintableFormChannel body) {
Map queryParams = new HashMap<>();
Map formParams = new HashMap<>();
String path = String.format("%s/services/{serviceId}/printableFormChannels/{printableFormChannelId}"
.replaceAll("\\{" + "serviceId" + "\\}", String.valueOf(serviceId))
.replaceAll("\\{" + "printableFormChannelId" + "\\}", String.valueOf(printableFormChannelId)), baseUrl);
ResultType resultType = new ResultType() {};
return client.doPUTRequest(path, resultType, queryParams, formParams);
}
/**
* Updates service
* Updates service
* @param serviceId Organization service id (required)
* @param body Payload (required)
*/
public ApiResponse updateService(String serviceId, Service body) {
Map queryParams = new HashMap<>();
Map formParams = new HashMap<>();
String path = String.format("%s/services/{serviceId}"
.replaceAll("\\{" + "serviceId" + "\\}", String.valueOf(serviceId)), baseUrl);
ResultType resultType = new ResultType() {};
return client.doPUTRequest(path, resultType, queryParams, formParams);
}
/**
* Updates ElectronicChannel
* Updates ElectronicChannel
* @param serviceId service id (required)
* @param electronicChannelId electronicChannel id (required)
* @param body Payload (required)
*/
public ApiResponse updateServiceElectronicChannel(String serviceId, String electronicChannelId, ElectronicChannel body) {
Map queryParams = new HashMap<>();
Map formParams = new HashMap<>();
String path = String.format("%s/services/{serviceId}/electronicChannels/{electronicChannelId}"
.replaceAll("\\{" + "serviceId" + "\\}", String.valueOf(serviceId))
.replaceAll("\\{" + "electronicChannelId" + "\\}", String.valueOf(electronicChannelId)), baseUrl);
ResultType resultType = new ResultType() {};
return client.doPUTRequest(path, resultType, queryParams, formParams);
}
/**
* Updates ServiceLocationChannel
* Updates ServiceLocationChannel
* @param serviceId service id (required)
* @param serviceLocationChannelId serviceLocationChannel id (required)
* @param body Payload (required)
*/
public ApiResponse updateServiceLocationChannel(String serviceId, String serviceLocationChannelId, ServiceLocationChannel body) {
Map queryParams = new HashMap<>();
Map formParams = new HashMap<>();
String path = String.format("%s/services/{serviceId}/serviceLocationChannels/{serviceLocationChannelId}"
.replaceAll("\\{" + "serviceId" + "\\}", String.valueOf(serviceId))
.replaceAll("\\{" + "serviceLocationChannelId" + "\\}", String.valueOf(serviceLocationChannelId)), baseUrl);
ResultType resultType = new ResultType() {};
return client.doPUTRequest(path, resultType, queryParams, formParams);
}
/**
* Updates WebPageChannel
* Updates WebPageChannel
* @param serviceId service id (required)
* @param webPageChannelId webPageChannel id (required)
* @param body Payload (required)
*/
public ApiResponse updateWebPageChannel(String serviceId, String webPageChannelId, WebPageChannel body) {
Map queryParams = new HashMap<>();
Map formParams = new HashMap<>();
String path = String.format("%s/services/{serviceId}/webPageChannels/{webPageChannelId}"
.replaceAll("\\{" + "serviceId" + "\\}", String.valueOf(serviceId))
.replaceAll("\\{" + "webPageChannelId" + "\\}", String.valueOf(webPageChannelId)), baseUrl);
ResultType resultType = new ResultType() {};
return client.doPUTRequest(path, resultType, queryParams, formParams);
}
}