ProtocApi

<back to all web services

Protoc

The following routes are available for this service:
All Verbs/protoc/{Lang}
import java.math.*;
import java.util.*;
import net.servicestack.client.*;

public class dtos
{

    public static class Protoc
    {
        public ProtocLang lang = null;
        public HashMap<String,String> files = null;
        public String protoUrl = null;
        
        public ProtocLang getLang() { return lang; }
        public Protoc setLang(ProtocLang value) { this.lang = value; return this; }
        public HashMap<String,String> getFiles() { return files; }
        public Protoc setFiles(HashMap<String,String> value) { this.files = value; return this; }
        public String getProtoUrl() { return protoUrl; }
        public Protoc setProtoUrl(String value) { this.protoUrl = value; return this; }
    }

    @DataContract
    public static enum ProtocLang
    {
        Cpp,
        CSharp,
        Dart,
        Java,
        JavaLite,
        ObjectiveC,
        Php,
        Python,
        Ruby,
        Go,
        JavaScriptClosure,
        JavaScriptCommonJs,
        JavaScriptNodeJs,
        Swift,
        TypeScript,
        TypeScriptBinary;
    }

    public static class ProtocResponse
    {
        public ProtocLang lang = null;
        public HashMap<String,String> generatedFiles = null;
        public String archiveUrl = null;
        public ResponseStatus responseStatus = null;
        
        public ProtocLang getLang() { return lang; }
        public ProtocResponse setLang(ProtocLang value) { this.lang = value; return this; }
        public HashMap<String,String> getGeneratedFiles() { return generatedFiles; }
        public ProtocResponse setGeneratedFiles(HashMap<String,String> value) { this.generatedFiles = value; return this; }
        public String getArchiveUrl() { return archiveUrl; }
        public ProtocResponse setArchiveUrl(String value) { this.archiveUrl = value; return this; }
        public ResponseStatus getResponseStatus() { return responseStatus; }
        public ProtocResponse setResponseStatus(ResponseStatus value) { this.responseStatus = value; return this; }
    }

}

Java Protoc DTOs

To override the Content-type in your clients, use the HTTP Accept Header, append the .json suffix or ?format=json

To embed the response in a jsonp callback, append ?callback=myCallback

HTTP + JSON

The following are sample HTTP requests and responses. The placeholders shown need to be replaced with actual values.

POST /protoc/{Lang} HTTP/1.1 
Host: grpc.servicestack.net 
Accept: application/json
Content-Type: application/json
Content-Length: length

{"lang":"cpp","files":{"String":"String"},"protoUrl":"String"}
HTTP/1.1 200 OK
Content-Type: application/json
Content-Length: length

{"lang":"cpp","generatedFiles":{"String":"String"},"archiveUrl":"String","responseStatus":{"errorCode":"String","message":"String","stackTrace":"String","errors":[{"errorCode":"String","fieldName":"String","message":"String","meta":{"String":"String"}}],"meta":{"String":"String"}}}