use of com.aliyuncs.fc.model.ServiceMetadata in project fc-java-sdk by aliyun.
the class FunctionComputeClient method getService.
public GetServiceResponse getService(GetServiceRequest request) throws ClientException, ServerException {
HttpResponse response = client.doAction(request, CONTENT_TYPE_APPLICATION_JSON, "GET");
ServiceMetadata serviceMetadata = GSON.fromJson(new String(response.getContent()), ServiceMetadata.class);
GetServiceResponse getServiceResponse = new GetServiceResponse();
getServiceResponse.setServiceMetadata(serviceMetadata);
getServiceResponse.setHeader(response.getHeaders());
getServiceResponse.setContent(response.getContent());
getServiceResponse.setStatus(response.getStatus());
return getServiceResponse;
}
use of com.aliyuncs.fc.model.ServiceMetadata in project fc-java-sdk by aliyun.
the class FunctionComputeClient method createService.
public CreateServiceResponse createService(CreateServiceRequest request) throws ClientException, ServerException {
HttpResponse response = client.doAction(request, CONTENT_TYPE_APPLICATION_JSON, "POST");
ServiceMetadata serviceMetadata = GSON.fromJson(new String(response.getContent()), ServiceMetadata.class);
CreateServiceResponse createServiceResponse = new CreateServiceResponse();
createServiceResponse.setServiceMetadata(serviceMetadata);
createServiceResponse.setHeaders(response.getHeaders());
createServiceResponse.setContent(response.getContent());
createServiceResponse.setStatus(response.getStatus());
return createServiceResponse;
}
use of com.aliyuncs.fc.model.ServiceMetadata in project fc-java-sdk by aliyun.
the class FunctionComputeClient method updateService.
public UpdateServiceResponse updateService(UpdateServiceRequest request) throws ClientException, ServerException {
HttpResponse response = client.doAction(request, CONTENT_TYPE_APPLICATION_JSON, "PUT");
ServiceMetadata serviceMetadata = GSON.fromJson(new String(response.getContent()), ServiceMetadata.class);
UpdateServiceResponse updateServiceResponse = new UpdateServiceResponse();
updateServiceResponse.setServiceMetadata(serviceMetadata);
updateServiceResponse.setHeader(response.getHeaders());
updateServiceResponse.setContent(response.getContent());
updateServiceResponse.setStatus(response.getStatus());
return updateServiceResponse;
}
Aggregations