text: (window.webpackJsonp=window.webpackJsonp||[]).push([[54],{126:function(e,t,a){"use strict";a.r(t),a.d(t,"frontMatter",(function(){return b})),a.d(t,"metadata",(function(){return i})),a.d(t,"toc",(function(){return c})),a.d(t,"default",(function(){return o}));var n=a(3),l=a(8),r=(a(0),a(198)),b={title:"Protocol Buffers API"},i={unversionedId:"reference/proto-api",id:"reference/proto-api",isDocsHomePage:!1,title:"Protocol Buffers API",description:"The API is divided into the read APIs",source:"@site/docs/reference/proto-api.mdx",sourceDirName:"reference",slug:"/reference/proto-api",permalink:"/keto/docs/next/reference/proto-api",editUrl:"https://github.com/ory/keto/edit/master/docs/docs/reference/proto-api.mdx",version:"current",lastUpdatedBy:"Patrik",lastUpdatedAt:1617785555,formattedLastUpdatedAt:"4/7/2021",frontMatter:{title:"Protocol Buffers API"},sidebar:"docs",previous:{title:"REST API",permalink:"/keto/docs/next/reference/rest-api"},next:{title:"keto",permalink:"/keto/docs/next/cli/keto"}},c=[{value:"ory/keto/acl/v1alpha1/acl.proto",id:"oryketoaclv1alpha1aclproto",children:[{value:"RelationTuple",id:"relationtuple",children:[]},{value:"Subject",id:"subject",children:[]},{value:"SubjectSet",id:"subjectset",children:[]}]},{value:"ory/keto/acl/v1alpha1/check_service.proto",id:"oryketoaclv1alpha1check_serviceproto",children:[{value:"CheckService",id:"checkservice",children:[]},{value:"CheckRequest",id:"checkrequest",children:[]},{value:"CheckResponse",id:"checkresponse",children:[]}]},{value:"ory/keto/acl/v1alpha1/expand_service.proto",id:"oryketoaclv1alpha1expand_serviceproto",children:[{value:"ExpandService",id:"expandservice",children:[]},{value:"ExpandRequest",id:"expandrequest",children:[]},{value:"ExpandResponse",id:"expandresponse",children:[]},{value:"SubjectTree",id:"subjecttree",children:[]},{value:"NodeType",id:"nodetype",children:[]}]},{value:"ory/keto/acl/v1alpha1/read_service.proto",id:"oryketoaclv1alpha1read_serviceproto",children:[{value:"ReadService",id:"readservice",children:[]},{value:"ListRelationTuplesRequest",id:"listrelationtuplesrequest",children:[]},{value:"ListRelationTuplesRequest.Query",id:"listrelationtuplesrequestquery",children:[]},{value:"ListRelationTuplesResponse",id:"listrelationtuplesresponse",children:[]}]},{value:"ory/keto/acl/v1alpha1/version.proto",id:"oryketoaclv1alpha1versionproto",children:[{value:"VersionService",id:"versionservice",children:[]},{value:"GetVersionRequest",id:"getversionrequest",children:[]},{value:"GetVersionResponse",id:"getversionresponse",children:[]}]},{value:"ory/keto/acl/v1alpha1/write_service.proto",id:"oryketoaclv1alpha1write_serviceproto",children:[{value:"WriteService",id:"writeservice",children:[]},{value:"RelationTupleDelta",id:"relationtupledelta",children:[]},{value:"TransactRelationTuplesRequest",id:"transactrelationtuplesrequest",children:[]},{value:"TransactRelationTuplesResponse",id:"transactrelationtuplesresponse",children:[]},{value:"RelationTupleDelta.Action",id:"relationtupledeltaaction",children:[]}]},{value:"Scalar Value Types",id:"scalar-value-types",children:[]}],p={toc:c};function o(e){var t=e.components,a=Object(l.a)(e,["components"]);return Object(r.b)("wrapper",Object(n.a)({},p,a,{components:t,mdxType:"MDXLayout"}),Object(r.b)("p",null,"The API is divided into the ",Object(r.b)("a",{parentName:"p",href:"/keto/docs/next/concepts/api-overview#read-apis"},"read APIs"),"\nand ",Object(r.b)("a",{parentName:"p",href:"/keto/docs/next/concepts/api-overview#write-apis"},"write APIs"),". Each service is\nannotated with the API it belongs to."),Object(r.b)("h2",{id:"oryketoaclv1alpha1aclproto"},"ory/keto/acl/v1alpha1/acl.proto"),Object(r.b)("h3",{id:"relationtuple"},"RelationTuple"),Object(r.b)("p",null,"RelationTuple defines a relation between an Object and a Subject."),Object(r.b)("table",null,Object(r.b)("thead",{parentName:"table"},Object(r.b)("tr",{parentName:"thead"},Object(r.b)("th",{parentName:"tr",align:null},"Field"),Object(r.b)("th",{parentName:"tr",align:null},"Type"),Object(r.b)("th",{parentName:"tr",align:null},"Label"),Object(r.b)("th",{parentName:"tr",align:null},"Description"))),Object(r.b)("tbody",{parentName:"table"},Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",{parentName:"tr",align:null},"namespace"),Object(r.b)("td",{parentName:"tr",align:null},Object(r.b)("a",{parentName:"td",href:"#string"},"string")),Object(r.b)("td",{parentName:"tr",align:null}),Object(r.b)("td",{parentName:"tr",align:null},"The namespace this relation tuple lives in.")),Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",{parentName:"tr",align:null},"object"),Object(r.b)("td",{parentName:"tr",align:null},Object(r.b)("a",{parentName:"td",href:"#string"},"string")),Object(r.b)("td",{parentName:"tr",align:null}),Object(r.b)("td",{parentName:"tr",align:null},"The object related by this tuple. It is an object in the namespace of the tuple.")),Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",{parentName:"tr",align:null},"relation"),Object(r.b)("td",{parentName:"tr",align:null},Object(r.b)("a",{parentName:"td",href:"#string"},"string")),Object(r.b)("td",{parentName:"tr",align:null}),Object(r.b)("td",{parentName:"tr",align:null},"The relation between an Object and a Subject.")),Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",{parentName:"tr",align:null},"subject"),Object(r.b)("td",{parentName:"tr",align:null},Object(r.b)("a",{parentName:"td",href:"#ory.keto.acl.v1alpha1.Subject"},"Subject")),Object(r.b)("td",{parentName:"tr",align:null}),Object(r.b)("td",{parentName:"tr",align:null},"The subject related by this tuple. A Subject either represents a concrete subject id or a ",Object(r.b)("inlineCode",{parentName:"td"},"SubjectSet")," that expands to more Subjects.")))),Object(r.b)("h3",{id:"subject"},"Subject"),Object(r.b)("p",null,"Subject is either a concrete subject id or a ",Object(r.b)("inlineCode",{parentName:"p"},"SubjectSet")," expanding to more\nSubjects."),Object(r.b)("table",null,Object(r.b)("thead",{parentName:"table"},Object(r.b)("tr",{parentName:"thead"},Object(r.b)("th",{parentName:"tr",align:null},"Field"),Object(r.b)("th",{parentName:"tr",align:null},"Type"),Object(r.b)("th",{parentName:"tr",align:null},"Label"),Object(r.b)("th",{parentName:"tr",align:null},"Description"))),Object(r.b)("tbody",{parentName:"table"},Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",{parentName:"tr",align:null},"id"),Object(r.b)("td",{parentName:"tr",align:null},Object(r.b)("a",{parentName:"td",href:"#string"},"string")),Object(r.b)("td",{parentName:"tr",align:null}),Object(r.b)("td",{parentName:"tr",align:null},"A concrete id of the subject.")),Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",{parentName:"tr",align:null},"set"),Object(r.b)("td",{parentName:"tr",align:null},Object(r.b)("a",{parentName:"td",href:"#ory.keto.acl.v1alpha1.SubjectSet"},"SubjectSet")),Object(r.b)("td",{parentName:"tr",align:null}),Object(r.b)("td",{parentName:"tr",align:null},"A subject set that expands to more Subjects. More information are available under ",Object(r.b)("a",{parentName:"td",href:"/keto/docs/next/concepts/subjects"},"concepts"),".")))),Object(r.b)("h3",{id:"subjectset"},"SubjectSet"),Object(r.b)("p",null,"SubjectSet refers to all subjects who have the same ",Object(r.b)("inlineCode",{parentName:"p"},"relation")," on an ",Object(r.b)("inlineCode",{parentName:"p"},"object"),"."),Object(r.b)("table",null,Object(r.b)("thead",{parentName:"table"},Object(r.b)("tr",{parentName:"thead"},Object(r.b)("th",{parentName:"tr",align:null},"Field"),Object(r.b)("th",{parentName:"tr",align:null},"Type"),Object(r.b)("th",{parentName:"tr",align:null},"Label"),Object(r.b)("th",{parentName:"tr",align:null},"Description"))),Object(r.b)("tbody",{parentName:"table"},Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",{parentName:"tr",align:null},"namespace"),Object(r.b)("td",{parentName:"tr",align:null},Object(r.b)("a",{parentName:"td",href:"#string"},"string")),Object(r.b)("td",{parentName:"tr",align:null}),Object(r.b)("td",{parentName:"tr",align:null},"The namespace of the object and relation referenced in this subject set.")),Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",{parentName:"tr",align:null},"object"),Object(r.b)("td",{parentName:"tr",align:null},Object(r.b)("a",{parentName:"td",href:"#string"},"string")),Object(r.b)("td",{parentName:"tr",align:null}),Object(r.b)("td",{parentName:"tr",align:null},"The object related by this subject set.")),Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",{parentName:"tr",align:null},"relation"),Object(r.b)("td",{parentName:"tr",align:null},Object(r.b)("a",{parentName:"td",href:"#string"},"string")),Object(r.b)("td",{parentName:"tr",align:null}),Object(r.b)("td",{parentName:"tr",align:null},"The relation between the object and the subjects.")))),Object(r.b)("h2",{id:"oryketoaclv1alpha1check_serviceproto"},"ory/keto/acl/v1alpha1/check_service.proto"),Object(r.b)("h3",{id:"checkservice"},"CheckService"),Object(r.b)("p",null,"The service that performs authorization checks based on the stored Access\nControl Lists."),Object(r.b)("p",null,"This service is part of the ",Object(r.b)("a",{parentName:"p",href:"/keto/docs/next/concepts/api-overview#read-apis"},"read-APIs"),"."),Object(r.b)("table",null,Object(r.b)("thead",{parentName:"table"},Object(r.b)("tr",{parentName:"thead"},Object(r.b)("th",{parentName:"tr",align:null},"Method Name"),Object(r.b)("th",{parentName:"tr",align:null},"Request Type"),Object(r.b)("th",{parentName:"tr",align:null},"Response Type"),Object(r.b)("th",{parentName:"tr",align:null},"Description"))),Object(r.b)("tbody",{parentName:"table"},Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",{parentName:"tr",align:null},"Check"),Object(r.b)("td",{parentName:"tr",align:null},Object(r.b)("a",{parentName:"td",href:"#ory.keto.acl.v1alpha1.CheckRequest"},"CheckRequest")),Object(r.b)("td",{parentName:"tr",align:null},Object(r.b)("a",{parentName:"td",href:"#ory.keto.acl.v1alpha1.CheckResponse"},"CheckResponse")),Object(r.b)("td",{parentName:"tr",align:null},"Performs an authorization check.")))),Object(r.b)("h3",{id:"checkrequest"},"CheckRequest"),Object(r.b)("p",null,"The request for a CheckService.Check RPC. Checks whether a specific subject is\nrelated to an object."),Object(r.b)("table",null,Object(r.b)("thead",{parentName:"table"},Object(r.b)("tr",{parentName:"thead"},Object(r.b)("th",{parentName:"tr",align:null},"Field"),Object(r.b)("th",{parentName:"tr",align:null},"Type"),Object(r.b)("th",{parentName:"tr",align:null},"Label"),Object(r.b)("th",{parentName:"tr",align:null},"Description"))),Object(r.b)("tbody",{parentName:"table"},Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",{parentName:"tr",align:null},"namespace"),Object(r.b)("td",{parentName:"tr",align:null},Object(r.b)("a",{parentName:"td",href:"#string"},"string")),Object(r.b)("td",{parentName:"tr",align:null}),Object(r.b)("td",{parentName:"tr",align:null},"The namespace to evaluate the check.",Object(r.b)("br",null),"Note: If you use the expand-API and the check evaluates a RelationTuple specifying a SubjectSet as subject or due to a rewrite rule in a namespace config this check request may involve other namespaces automatically.")),Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",{parentName:"tr",align:null},"object"),Object(r.b)("td",{parentName:"tr",align:null},Object(r.b)("a",{parentName:"td",href:"#string"},"string")),Object(r.b)("td",{parentName:"tr",align:null}),Object(r.b)("td",{parentName:"tr",align:null},"The related object in this check.")),Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",{parentName:"tr",align:null},"relation"),Object(r.b)("td",{parentName:"tr",align:null},Object(r.b)("a",{parentName:"td",href:"#string"},"string")),Object(r.b)("td",{parentName:"tr",align:null}),Object(r.b)("td",{parentName:"tr",align:null},"The relation between the Object and the Subject.")),Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",{parentName:"tr",align:null},"subject"),Object(r.b)("td",{parentName:"tr",align:null},Object(r.b)("a",{parentName:"td",href:"#ory.keto.acl.v1alpha1.Subject"},"Subject")),Object(r.b)("td",{parentName:"tr",align:null}),Object(r.b)("td",{parentName:"tr",align:null},"The related subject in this check.")),Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",{parentName:"tr",align:null},"latest"),Object(r.b)("td",{parentName:"tr",align:null},Object(r.b)("a",{parentName:"td",href:"#bool"},"bool")),Object(r.b)("td",{parentName:"tr",align:null}),Object(r.b)("td",{parentName:"tr",align:null},"This field is not implemented yet and has no effect. ")),Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",{parentName:"tr",align:null},"snaptoken"),Object(r.b)("td",{parentName:"tr",align:null},Object(r.b)("a",{parentName:"td",href:"#string"},"string")),Object(r.b)("td",{parentName:"tr",align:null}),Object(r.b)("td",{parentName:"tr",align:null},"This field is not implemented yet and has no effect. ")))),Object(r.b)("h3",{id:"checkresponse"},"CheckResponse"),Object(r.b)("p",null,"The response for a CheckService.Check rpc."),Object(r.b)("table",null,Object(r.b)("thead",{parentName:"table"},Object(r.b)("tr",{parentName:"thead"},Object(r.b)("th",{parentName:"tr",align:null},"Field"),Object(r.b)("th",{parentName:"tr",align:null},"Type"),Object(r.b)("th",{parentName:"tr",align:null},"Label"),Object(r.b)("th",{parentName:"tr",align:null},"Description"))),Object(r.b)("tbody",{parentName:"table"},Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",{parentName:"tr",align:null},"allowed"),Object(r.b)("td",{parentName:"tr",align:null},Object(r.b)("a",{parentName:"td",href:"#bool"},"bool")),Object(r.b)("td",{parentName:"tr",align:null}),Object(r.b)("td",{parentName:"tr",align:null},"Whether the specified subject (id) is related to the requested object.",Object(r.b)("br",null),"It is false by default if no ACL matches.")),Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",{parentName:"tr",align:null},"snaptoken"),Object(r.b)("td",{parentName:"tr",align:null},Object(r.b)("a",{parentName:"td",href:"#string"},"string")),Object(r.b)("td",{parentName:"tr",align:null}),Object(r.b)("td",{parentName:"tr",align:null},"This field is not implemented yet and has no effect. ")))),Object(r.b)("h2",{id:"oryketoaclv1alpha1expand_serviceproto"},"ory/keto/acl/v1alpha1/expand_service.proto"),Object(r.b)("h3",{id:"expandservice"},"ExpandService"),Object(r.b)("p",null,"The service that performs subject set expansion based on the stored Access\nControl Lists."),Object(r.b)("p",null,"This service is part of the ",Object(r.b)("a",{parentName:"p",href:"/keto/docs/next/concepts/api-overview#read-apis"},"read-APIs"),"."),Object(r.b)("table",null,Object(r.b)("thead",{parentName:"table"},Object(r.b)("tr",{parentName:"thead"},Object(r.b)("th",{parentName:"tr",align:null},"Method Name"),Object(r.b)("th",{parentName:"tr",align:null},"Request Type"),Object(r.b)("th",{parentName:"tr",align:null},"Response Type"),Object(r.b)("th",{parentName:"tr",align:null},"Description"))),Object(r.b)("tbody",{parentName:"table"},Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",{parentName:"tr",align:null},"Expand"),Object(r.b)("td",{parentName:"tr",align:null},Object(r.b)("a",{parentName:"td",href:"#ory.keto.acl.v1alpha1.ExpandRequest"},"ExpandRequest")),Object(r.b)("td",{parentName:"tr",align:null},Object(r.b)("a",{parentName:"td",href:"#ory.keto.acl.v1alpha1.ExpandResponse"},"ExpandResponse")),Object(r.b)("td",{parentName:"tr",align:null},"Expands the subject set into a tree of subjects.")))),Object(r.b)("h3",{id:"expandrequest"},"ExpandRequest"),Object(r.b)("p",null,"The request for an ExpandService.Expand RPC. Expands the given subject set."),Object(r.b)("table",null,Object(r.b)("thead",{parentName:"table"},Object(r.b)("tr",{parentName:"thead"},Object(r.b)("th",{parentName:"tr",align:null},"Field"),Object(r.b)("th",{parentName:"tr",align:null},"Type"),Object(r.b)("th",{parentName:"tr",align:null},"Label"),Object(r.b)("th",{parentName:"tr",align:null},"Description"))),Object(r.b)("tbody",{parentName:"table"},Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",{parentName:"tr",align:null},"subject"),Object(r.b)("td",{parentName:"tr",align:null},Object(r.b)("a",{parentName:"td",href:"#ory.keto.acl.v1alpha1.Subject"},"Subject")),Object(r.b)("td",{parentName:"tr",align:null}),Object(r.b)("td",{parentName:"tr",align:null},"The subject to expand.")),Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",{parentName:"tr",align:null},"max_depth"),Object(r.b)("td",{parentName:"tr",align:null},Object(r.b)("a",{parentName:"td",href:"#int32"},"int32")),Object(r.b)("td",{parentName:"tr",align:null}),Object(r.b)("td",{parentName:"tr",align:null},"The maximum depth of tree to build. It is important to set this parameter to a meaningful value. Ponder how deep you really want to display this.")),Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",{parentName:"tr",align:null},"snaptoken"),Object(r.b)("td",{parentName:"tr",align:null},Object(r.b)("a",{parentName:"td",href:"#string"},"string")),Object(r.b)("td",{parentName:"tr",align:null}),Object(r.b)("td",{parentName:"tr",align:null},"This field is not implemented yet and has no effect. ")))),Object(r.b)("h3",{id:"expandresponse"},"ExpandResponse"),Object(r.b)("p",null,"The response for a ExpandService.Expand RPC."),Object(r.b)("table",null,Object(r.b)("thead",{parentName:"table"},Object(r.b)("tr",{parentName:"thead"},Object(r.b)("th",{parentName:"tr",align:null},"Field"),Object(r.b)("th",{parentName:"tr",align:null},"Type"),Object(r.b)("th",{parentName:"tr",align:null},"Label"),Object(r.b)("th",{parentName:"tr",align:null},"Description"))),Object(r.b)("tbody",{parentName:"table"},Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",{parentName:"tr",align:null},"tree"),Object(r.b)("td",{parentName:"tr",align:null},Object(r.b)("a",{parentName:"td",href:"#ory.keto.acl.v1alpha1.SubjectTree"},"SubjectTree")),Object(r.b)("td",{parentName:"tr",align:null}),Object(r.b)("td",{parentName:"tr",align:null},"The tree the requested subject set expands to. The requested subject set is the subject of the root.",Object(r.b)("br",null),"This field can be nil in some circumstances.")))),Object(r.b)("h3",{id:"subjecttree"},"SubjectTree"),Object(r.b)("table",null,Object(r.b)("thead",{parentName:"table"},Object(r.b)("tr",{parentName:"thead"},Object(r.b)("th",{parentName:"tr",align:null},"Field"),Object(r.b)("th",{parentName:"tr",align:null},"Type"),Object(r.b)("th",{parentName:"tr",align:null},"Label"),Object(r.b)("th",{parentName:"tr",align:null},"Description"))),Object(r.b)("tbody",{parentName:"table"},Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",{parentName:"tr",align:null},"node_type"),Object(r.b)("td",{parentName:"tr",align:null},Object(r.b)("a",{parentName:"td",href:"#ory.keto.acl.v1alpha1.NodeType"},"NodeType")),Object(r.b)("td",{parentName:"tr",align:null}),Object(r.b)("td",{parentName:"tr",align:null},"The type of the node.")),Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",{parentName:"tr",align:null},"subject"),Object(r.b)("td",{parentName:"tr",align:null},Object(r.b)("a",{parentName:"td",href:"#ory.keto.acl.v1alpha1.Subject"},"Subject")),Object(r.b)("td",{parentName:"tr",align:null}),Object(r.b)("td",{parentName:"tr",align:null},"The subject this node represents.")),Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",{parentName:"tr",align:null},"children"),Object(r.b)("td",{parentName:"tr",align:null},Object(r.b)("a",{parentName:"td",href:"#ory.keto.acl.v1alpha1.SubjectTree"},"SubjectTree")),Object(r.b)("td",{parentName:"tr",align:null},"repeated"),Object(r.b)("td",{parentName:"tr",align:null},"The children of this node.",Object(r.b)("br",null),"This is never set if ",Object(r.b)("inlineCode",{parentName:"td"},"node_type")," == ",Object(r.b)("inlineCode",{parentName:"td"},"NODE_TYPE_LEAF"),".")))),Object(r.b)("h3",{id:"nodetype"},"NodeType"),Object(r.b)("table",null,Object(r.b)("thead",{parentName:"table"},Object(r.b)("tr",{parentName:"thead"},Object(r.b)("th",{parentName:"tr",align:null},"Name"),Object(r.b)("th",{parentName:"tr",align:null},"Number"),Object(r.b)("th",{parentName:"tr",align:null},"Description"))),Object(r.b)("tbody",{parentName:"table"},Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",{parentName:"tr",align:null},"NODE_TYPE_UNSPECIFIED"),Object(r.b)("td",{parentName:"tr",align:null},"0"),Object(r.b)("td",{parentName:"tr",align:null})),Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",{parentName:"tr",align:null},"NODE_TYPE_UNION"),Object(r.b)("td",{parentName:"tr",align:null},"1"),Object(r.b)("td",{parentName:"tr",align:null},"This node expands to a union of all children.")),Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",{parentName:"tr",align:null},"NODE_TYPE_EXCLUSION"),Object(r.b)("td",{parentName:"tr",align:null},"2"),Object(r.b)("td",{parentName:"tr",align:null},"Not implemented yet.")),Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",{parentName:"tr",align:null},"NODE_TYPE_INTERSECTION"),Object(r.b)("td",{parentName:"tr",align:null},"3"),Object(r.b)("td",{parentName:"tr",align:null},"Not implemented yet.")),Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",{parentName:"tr",align:null},"NODE_TYPE_LEAF"),Object(r.b)("td",{parentName:"tr",align:null},"4"),Object(r.b)("td",{parentName:"tr",align:null},"This node is a leaf and contains no children. Its subject is a ",Object(r.b)("inlineCode",{parentName:"td"},"SubjectID")," unless ",Object(r.b)("inlineCode",{parentName:"td"},"max_depth")," was reached.")))),Object(r.b)("h2",{id:"oryketoaclv1alpha1read_serviceproto"},"ory/keto/acl/v1alpha1/read_service.proto"),Object(r.b)("h3",{id:"readservice"},"ReadService"),Object(r.b)("p",null,"The service to query relation tuples."),Object(r.b)("p",null,"This service is part of the ",Object(r.b)("a",{parentName:"p",href:"/keto/docs/next/concepts/api-overview#read-apis"},"read-APIs"),"."),Object(r.b)("table",null,Object(r.b)("thead",{parentName:"table"},Object(r.b)("tr",{parentName:"thead"},Object(r.b)("th",{parentName:"tr",align:null},"Method Name"),Object(r.b)("th",{parentName:"tr",align:null},"Request Type"),Object(r.b)("th",{parentName:"tr",align:null},"Response Type"),Object(r.b)("th",{parentName:"tr",align:null},"Description"))),Object(r.b)("tbody",{parentName:"table"},Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",{parentName:"tr",align:null},"ListRelationTuples"),Object(r.b)("td",{parentName:"tr",align:null},Object(r.b)("a",{parentName:"td",href:"#ory.keto.acl.v1alpha1.ListRelationTuplesRequest"},"ListRelationTuplesRequest")),Object(r.b)("td",{parentName:"tr",align:null},Object(r.b)("a",{parentName:"td",href:"#ory.keto.acl.v1alpha1.ListRelationTuplesResponse"},"ListRelationTuplesResponse")),Object(r.b)("td",{parentName:"tr",align:null},"Lists ACL relation tuples.")))),Object(r.b)("h3",{id:"listrelationtuplesrequest"},"ListRelationTuplesRequest"),Object(r.b)("p",null,"Request for ReadService.ListRelationTuples RPC. See\n",Object(r.b)("inlineCode",{parentName:"p"},"ListRelationTuplesRequest_Query")," for how to filter the query."),Object(r.b)("table",null,Object(r.b)("thead",{parentName:"table"},Object(r.b)("tr",{parentName:"thead"},Object(r.b)("th",{parentName:"tr",align:null},"Field"),Object(r.b)("th",{parentName:"tr",align:null},"Type"),Object(r.b)("th",{parentName:"tr",align:null},"Label"),Object(r.b)("th",{parentName:"tr",align:null},"Description"))),Object(r.b)("tbody",{parentName:"table"},Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",{parentName:"tr",align:null},"query"),Object(r.b)("td",{parentName:"tr",align:null},Object(r.b)("a",{parentName:"td",href:"#ory.keto.acl.v1alpha1.ListRelationTuplesRequest.Query"},"ListRelationTuplesRequest.Query")),Object(r.b)("td",{parentName:"tr",align:null}),Object(r.b)("td",{parentName:"tr",align:null},"All query constraints are concatenated with a logical AND operator.",Object(r.b)("br",null),"The RelationTuple list from ListRelationTuplesResponse is ordered from the newest RelationTuple to the oldest.")),Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",{parentName:"tr",align:null},"expand_mask"),Object(r.b)("td",{parentName:"tr",align:null},Object(r.b)("a",{parentName:"td",href:"#google.protobuf.FieldMask"},"google.protobuf.FieldMask")),Object(r.b)("td",{parentName:"tr",align:null}),Object(r.b)("td",{parentName:"tr",align:null},"This field is not implemented yet and has no effect. ")),Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",{parentName:"tr",align:null},"snaptoken"),Object(r.b)("td",{parentName:"tr",align:null},Object(r.b)("a",{parentName:"td",href:"#string"},"string")),Object(r.b)("td",{parentName:"tr",align:null}),Object(r.b)("td",{parentName:"tr",align:null},"This field is not implemented yet and has no effect. ")),Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",{parentName:"tr",align:null},"page_size"),Object(r.b)("td",{parentName:"tr",align:null},Object(r.b)("a",{parentName:"td",href:"#int32"},"int32")),Object(r.b)("td",{parentName:"tr",align:null}),Object(r.b)("td",{parentName:"tr",align:null},"Optional. The maximum number of RelationTuples to return in the response.",Object(r.b)("br",null),"Default: 100")),Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",{parentName:"tr",align:null},"page_token"),Object(r.b)("td",{parentName:"tr",align:null},Object(r.b)("a",{parentName:"td",href:"#string"},"string")),Object(r.b)("td",{parentName:"tr",align:null}),Object(r.b)("td",{parentName:"tr",align:null},"Optional. An opaque pagination token returned from a previous call to ",Object(r.b)("inlineCode",{parentName:"td"},"ListRelationTuples")," that indicates where the page should start at.",Object(r.b)("br",null),"An empty token denotes the first page. All successive pages require the token from the previous page.")))),Object(r.b)("h3",{id:"listrelationtuplesrequestquery"},"ListRelationTuplesRequest.Query"),Object(r.b)("p",null,"The query for listing relation tuples. Clients can specify any optional field to\npartially filter for specific relation tuples."),Object(r.b)("p",null,"Example use cases (namespace is always required):"),Object(r.b)("ul",null,Object(r.b)("li",{parentName:"ul"},"object only: display a list of all permissions referring to a specific object"),Object(r.b)("li",{parentName:"ul"},"relation only: get all groups that have members; get all directories that have\ncontent"),Object(r.b)("li",{parentName:"ul"},"object & relation: display all subjects that have a specific permission\nrelation"),Object(r.b)("li",{parentName:"ul"},"subject & relation: display all groups a subject belongs to; display all\nobjects a subject has access to"),Object(r.b)("li",{parentName:"ul"},"object & relation & subject: check whether the relation tuple already exists")),Object(r.b)("table",null,Object(r.b)("thead",{parentName:"table"},Object(r.b)("tr",{parentName:"thead"},Object(r.b)("th",{parentName:"tr",align:null},"Field"),Object(r.b)("th",{parentName:"tr",align:null},"Type"),Object(r.b)("th",{parentName:"tr",align:null},"Label"),Object(r.b)("th",{parentName:"tr",align:null},"Description"))),Object(r.b)("tbody",{parentName:"table"},Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",{parentName:"tr",align:null},"namespace"),Object(r.b)("td",{parentName:"tr",align:null},Object(r.b)("a",{parentName:"td",href:"#string"},"string")),Object(r.b)("td",{parentName:"tr",align:null}),Object(r.b)("td",{parentName:"tr",align:null},"Required. The namespace to query.")),Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",{parentName:"tr",align:null},"object"),Object(r.b)("td",{parentName:"tr",align:null},Object(r.b)("a",{parentName:"td",href:"#string"},"string")),Object(r.b)("td",{parentName:"tr",align:null}),Object(r.b)("td",{parentName:"tr",align:null},"Optional. The object to query for.")),Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",{parentName:"tr",align:null},"relation"),Object(r.b)("td",{parentName:"tr",align:null},Object(r.b)("a",{parentName:"td",href:"#string"},"string")),Object(r.b)("td",{parentName:"tr",align:null}),Object(r.b)("td",{parentName:"tr",align:null},"Optional. The relation to query for.")),Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",{parentName:"tr",align:null},"subject"),Object(r.b)("td",{parentName:"tr",align:null},Object(r.b)("a",{parentName:"td",href:"#ory.keto.acl.v1alpha1.Subject"},"Subject")),Object(r.b)("td",{parentName:"tr",align:null}),Object(r.b)("td",{parentName:"tr",align:null},"Optional. The subject to query for.")))),Object(r.b)("h3",{id:"listrelationtuplesresponse"},"ListRelationTuplesResponse"),Object(r.b)("p",null,"The response of a ReadService.ListRelationTuples RPC."),Object(r.b)("table",null,Object(r.b)("thead",{parentName:"table"},Object(r.b)("tr",{parentName:"thead"},Object(r.b)("th",{parentName:"tr",align:null},"Field"),Object(r.b)("th",{parentName:"tr",align:null},"Type"),Object(r.b)("th",{parentName:"tr",align:null},"Label"),Object(r.b)("th",{parentName:"tr",align:null},"Description"))),Object(r.b)("tbody",{parentName:"table"},Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",{parentName:"tr",align:null},"relation_tuples"),Object(r.b)("td",{parentName:"tr",align:null},Object(r.b)("a",{parentName:"td",href:"#ory.keto.acl.v1alpha1.RelationTuple"},"RelationTuple")),Object(r.b)("td",{parentName:"tr",align:null},"repeated"),Object(r.b)("td",{parentName:"tr",align:null},"The relation tuples matching the list request.")),Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",{parentName:"tr",align:null},"next_page_token"),Object(r.b)("td",{parentName:"tr",align:null},Object(r.b)("a",{parentName:"td",href:"#string"},"string")),Object(r.b)("td",{parentName:"tr",align:null}),Object(r.b)("td",{parentName:"tr",align:null},"The token required to get the next page. If this is the last page, the token will be the empty string.")))),Object(r.b)("h2",{id:"oryketoaclv1alpha1versionproto"},"ory/keto/acl/v1alpha1/version.proto"),Object(r.b)("h3",{id:"versionservice"},"VersionService"),Object(r.b)("p",null,"The service returning the specific Ory Keto instance version."),Object(r.b)("p",null,"This service is part of the ",Object(r.b)("a",{parentName:"p",href:"/keto/docs/next/concepts/api-overview#read-apis"},"read-APIs"),"\nand ",Object(r.b)("a",{parentName:"p",href:"/keto/docs/next/concepts/api-overview#write-apis"},"write-APIs"),"."),Object(r.b)("table",null,Object(r.b)("thead",{parentName:"table"},Object(r.b)("tr",{parentName:"thead"},Object(r.b)("th",{parentName:"tr",align:null},"Method Name"),Object(r.b)("th",{parentName:"tr",align:null},"Request Type"),Object(r.b)("th",{parentName:"tr",align:null},"Response Type"),Object(r.b)("th",{parentName:"tr",align:null},"Description"))),Object(r.b)("tbody",{parentName:"table"},Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",{parentName:"tr",align:null},"GetVersion"),Object(r.b)("td",{parentName:"tr",align:null},Object(r.b)("a",{parentName:"td",href:"#ory.keto.acl.v1alpha1.GetVersionRequest"},"GetVersionRequest")),Object(r.b)("td",{parentName:"tr",align:null},Object(r.b)("a",{parentName:"td",href:"#ory.keto.acl.v1alpha1.GetVersionResponse"},"GetVersionResponse")),Object(r.b)("td",{parentName:"tr",align:null},"Returns the version of the Ory Keto instance.")))),Object(r.b)("h3",{id:"getversionrequest"},"GetVersionRequest"),Object(r.b)("p",null,"Request for the VersionService.GetVersion RPC."),Object(r.b)("h3",{id:"getversionresponse"},"GetVersionResponse"),Object(r.b)("p",null,"Response of the VersionService.GetVersion RPC."),Object(r.b)("table",null,Object(r.b)("thead",{parentName:"table"},Object(r.b)("tr",{parentName:"thead"},Object(r.b)("th",{parentName:"tr",align:null},"Field"),Object(r.b)("th",{parentName:"tr",align:null},"Type"),Object(r.b)("th",{parentName:"tr",align:null},"Label"),Object(r.b)("th",{parentName:"tr",align:null},"Description"))),Object(r.b)("tbody",{parentName:"table"},Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",{parentName:"tr",align:null},"version"),Object(r.b)("td",{parentName:"tr",align:null},Object(r.b)("a",{parentName:"td",href:"#string"},"string")),Object(r.b)("td",{parentName:"tr",align:null}),Object(r.b)("td",{parentName:"tr",align:null},"The version string of the Ory Keto instance.")))),Object(r.b)("h2",{id:"oryketoaclv1alpha1write_serviceproto"},"ory/keto/acl/v1alpha1/write_service.proto"),Object(r.b)("h3",{id:"writeservice"},"WriteService"),Object(r.b)("p",null,"The write service to create and delete Access Control Lists."),Object(r.b)("p",null,"This service is part of the\n",Object(r.b)("a",{parentName:"p",href:"/keto/docs/next/concepts/api-overview#write-apis"},"write-APIs"),"."),Object(r.b)("table",null,Object(r.b)("thead",{parentName:"table"},Object(r.b)("tr",{parentName:"thead"},Object(r.b)("th",{parentName:"tr",align:null},"Method Name"),Object(r.b)("th",{parentName:"tr",align:null},"Request Type"),Object(r.b)("th",{parentName:"tr",align:null},"Response Type"),Object(r.b)("th",{parentName:"tr",align:null},"Description"))),Object(r.b)("tbody",{parentName:"table"},Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",{parentName:"tr",align:null},"TransactRelationTuples"),Object(r.b)("td",{parentName:"tr",align:null},Object(r.b)("a",{parentName:"td",href:"#ory.keto.acl.v1alpha1.TransactRelationTuplesRequest"},"TransactRelationTuplesRequest")),Object(r.b)("td",{parentName:"tr",align:null},Object(r.b)("a",{parentName:"td",href:"#ory.keto.acl.v1alpha1.TransactRelationTuplesResponse"},"TransactRelationTuplesResponse")),Object(r.b)("td",{parentName:"tr",align:null},"Writes one or more relation tuples in a single transaction.")))),Object(r.b)("h3",{id:"relationtupledelta"},"RelationTupleDelta"),Object(r.b)("p",null,"Write-delta for a TransactRelationTuplesRequest."),Object(r.b)("table",null,Object(r.b)("thead",{parentName:"table"},Object(r.b)("tr",{parentName:"thead"},Object(r.b)("th",{parentName:"tr",align:null},"Field"),Object(r.b)("th",{parentName:"tr",align:null},"Type"),Object(r.b)("th",{parentName:"tr",align:null},"Label"),Object(r.b)("th",{parentName:"tr",align:null},"Description"))),Object(r.b)("tbody",{parentName:"table"},Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",{parentName:"tr",align:null},"action"),Object(r.b)("td",{parentName:"tr",align:null},Object(r.b)("a",{parentName:"td",href:"#ory.keto.acl.v1alpha1.RelationTupleDelta.Action"},"RelationTupleDelta.Action")),Object(r.b)("td",{parentName:"tr",align:null}),Object(r.b)("td",{parentName:"tr",align:null},"The action to do on the RelationTuple.")),Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",{parentName:"tr",align:null},"relation_tuple"),Object(r.b)("td",{parentName:"tr",align:null},Object(r.b)("a",{parentName:"td",href:"#ory.keto.acl.v1alpha1.RelationTuple"},"RelationTuple")),Object(r.b)("td",{parentName:"tr",align:null}),Object(r.b)("td",{parentName:"tr",align:null},"The target RelationTuple.")))),Object(r.b)("h3",{id:"transactrelationtuplesrequest"},"TransactRelationTuplesRequest"),Object(r.b)("p",null,"The request of a WriteService.TransactRelationTuples RPC."),Object(r.b)("table",null,Object(r.b)("thead",{parentName:"table"},Object(r.b)("tr",{parentName:"thead"},Object(r.b)("th",{parentName:"tr",align:null},"Field"),Object(r.b)("th",{parentName:"tr",align:null},"Type"),Object(r.b)("th",{parentName:"tr",align:null},"Label"),Object(r.b)("th",{parentName:"tr",align:null},"Description"))),Object(r.b)("tbody",{parentName:"table"},Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",{parentName:"tr",align:null},"relation_tuple_deltas"),Object(r.b)("td",{parentName:"tr",align:null},Object(r.b)("a",{parentName:"td",href:"#ory.keto.acl.v1alpha1.RelationTupleDelta"},"RelationTupleDelta")),Object(r.b)("td",{parentName:"tr",align:null},"repeated"),Object(r.b)("td",{parentName:"tr",align:null},"The write delta for the relation tuples operated in one single transaction. Either all actions succeed or no change takes effect on error.")))),Object(r.b)("h3",{id:"transactrelationtuplesresponse"},"TransactRelationTuplesResponse"),Object(r.b)("p",null,"The response of a WriteService.TransactRelationTuples rpc."),Object(r.b)("table",null,Object(r.b)("thead",{parentName:"table"},Object(r.b)("tr",{parentName:"thead"},Object(r.b)("th",{parentName:"tr",align:null},"Field"),Object(r.b)("th",{parentName:"tr",align:null},"Type"),Object(r.b)("th",{parentName:"tr",align:null},"Label"),Object(r.b)("th",{parentName:"tr",align:null},"Description"))),Object(r.b)("tbody",{parentName:"table"},Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",{parentName:"tr",align:null},"snaptokens"),Object(r.b)("td",{parentName:"tr",align:null},Object(r.b)("a",{parentName:"td",href:"#string"},"string")),Object(r.b)("td",{parentName:"tr",align:null},"repeated"),Object(r.b)("td",{parentName:"tr",align:null},"This field is not implemented yet and has no effect. ")))),Object(r.b)("h3",{id:"relationtupledeltaaction"},"RelationTupleDelta.Action"),Object(r.b)("table",null,Object(r.b)("thead",{parentName:"table"},Object(r.b)("tr",{parentName:"thead"},Object(r.b)("th",{parentName:"tr",align:null},"Name"),Object(r.b)("th",{parentName:"tr",align:null},"Number"),Object(r.b)("th",{parentName:"tr",align:null},"Description"))),Object(r.b)("tbody",{parentName:"table"},Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",{parentName:"tr",align:null},"ACTION_UNSPECIFIED"),Object(r.b)("td",{parentName:"tr",align:null},"0"),Object(r.b)("td",{parentName:"tr",align:null},"Unspecified. The ",Object(r.b)("inlineCode",{parentName:"td"},"TransactRelationTuples")," RPC ignores this RelationTupleDelta if an action was unspecified.")),Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",{parentName:"tr",align:null},"INSERT"),Object(r.b)("td",{parentName:"tr",align:null},"1"),Object(r.b)("td",{parentName:"tr",align:null},"Insertion of a new RelationTuple. It is ignored if already existing.")),Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",{parentName:"tr",align:null},"DELETE"),Object(r.b)("td",{parentName:"tr",align:null},"2"),Object(r.b)("td",{parentName:"tr",align:null},"Deletion of the RelationTuple. It is ignored if it does not exist.")))),Object(r.b)("h2",{id:"scalar-value-types"},"Scalar Value Types"),Object(r.b)("table",null,Object(r.b)("thead",{parentName:"table"},Object(r.b)("tr",{parentName:"thead"},Object(r.b)("th",{parentName:"tr",align:null},".proto Type"),Object(r.b)("th",{parentName:"tr",align:null},"Notes"),Object(r.b)("th",{parentName:"tr",align:null},"C++"),Object(r.b)("th",{parentName:"tr",align:null},"Java"),Object(r.b)("th",{parentName:"tr",align:null},"Python"),Object(r.b)("th",{parentName:"tr",align:null},"Go"),Object(r.b)("th",{parentName:"tr",align:null},"C#"),Object(r.b)("th",{parentName:"tr",align:null},"PHP"),Object(r.b)("th",{parentName:"tr",align:null},"Ruby"))),Object(r.b)("tbody",{parentName:"table"},Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",{parentName:"tr",align:null},Object(r.b)("a",{id:"double"})," double"),Object(r.b)("td",{parentName:"tr",align:null}),Object(r.b)("td",{parentName:"tr",align:null},"double"),Object(r.b)("td",{parentName:"tr",align:null},"double"),Object(r.b)("td",{parentName:"tr",align:null},"float"),Object(r.b)("td",{parentName:"tr",align:null},"float64"),Object(r.b)("td",{parentName:"tr",align:null},"double"),Object(r.b)("td",{parentName:"tr",align:null},"float"),Object(r.b)("td",{parentName:"tr",align:null},"Float")),Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",{parentName:"tr",align:null},Object(r.b)("a",{id:"float"})," float"),Object(r.b)("td",{parentName:"tr",align:null}),Object(r.b)("td",{parentName:"tr",align:null},"float"),Object(r.b)("td",{parentName:"tr",align:null},"float"),Object(r.b)("td",{parentName:"tr",align:null},"float"),Object(r.b)("td",{parentName:"tr",align:null},"float32"),Object(r.b)("td",{parentName:"tr",align:null},"float"),Object(r.b)("td",{parentName:"tr",align:null},"float"),Object(r.b)("td",{parentName:"tr",align:null},"Float")),Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",{parentName:"tr",align:null},Object(r.b)("a",{id:"int32"})," int32"),Object(r.b)("td",{parentName:"tr",align:null},"Uses variable-length encoding. Inefficient for encoding negative numbers \u2013 if your field is likely to have negative values, use sint32 instead."),Object(r.b)("td",{parentName:"tr",align:null},"int32"),Object(r.b)("td",{parentName:"tr",align:null},"int"),Object(r.b)("td",{parentName:"tr",align:null},"int"),Object(r.b)("td",{parentName:"tr",align:null},"int32"),Object(r.b)("td",{parentName:"tr",align:null},"int"),Object(r.b)("td",{parentName:"tr",align:null},"integer"),Object(r.b)("td",{parentName:"tr",align:null},"Bignum or Fixnum (as required)")),Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",{parentName:"tr",align:null},Object(r.b)("a",{id:"int64"})," int64"),Object(r.b)("td",{parentName:"tr",align:null},"Uses variable-length encoding. Inefficient for encoding negative numbers \u2013 if your field is likely to have negative values, use sint64 instead."),Object(r.b)("td",{parentName:"tr",align:null},"int64"),Object(r.b)("td",{parentName:"tr",align:null},"long"),Object(r.b)("td",{parentName:"tr",align:null},"int/long"),Object(r.b)("td",{parentName:"tr",align:null},"int64"),Object(r.b)("td",{parentName:"tr",align:null},"long"),Object(r.b)("td",{parentName:"tr",align:null},"integer/string"),Object(r.b)("td",{parentName:"tr",align:null},"Bignum")),Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",{parentName:"tr",align:null},Object(r.b)("a",{id:"uint32"})," uint32"),Object(r.b)("td",{parentName:"tr",align:null},"Uses variable-length encoding."),Object(r.b)("td",{parentName:"tr",align:null},"uint32"),Object(r.b)("td",{parentName:"tr",align:null},"int"),Object(r.b)("td",{parentName:"tr",align:null},"int/long"),Object(r.b)("td",{parentName:"tr",align:null},"uint32"),Object(r.b)("td",{parentName:"tr",align:null},"uint"),Object(r.b)("td",{parentName:"tr",align:null},"integer"),Object(r.b)("td",{parentName:"tr",align:null},"Bignum or Fixnum (as required)")),Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",{parentName:"tr",align:null},Object(r.b)("a",{id:"uint64"})," uint64"),Object(r.b)("td",{parentName:"tr",align:null},"Uses variable-length encoding."),Object(r.b)("td",{parentName:"tr",align:null},"uint64"),Object(r.b)("td",{parentName:"tr",align:null},"long"),Object(r.b)("td",{parentName:"tr",align:null},"int/long"),Object(r.b)("td",{parentName:"tr",align:null},"uint64"),Object(r.b)("td",{parentName:"tr",align:null},"ulong"),Object(r.b)("td",{parentName:"tr",align:null},"integer/string"),Object(r.b)("td",{parentName:"tr",align:null},"Bignum or Fixnum (as required)")),Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",{parentName:"tr",align:null},Object(r.b)("a",{id:"sint32"})," sint32"),Object(r.b)("td",{parentName:"tr",align:null},"Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s."),Object(r.b)("td",{parentName:"tr",align:null},"int32"),Object(r.b)("td",{parentName:"tr",align:null},"int"),Object(r.b)("td",{parentName:"tr",align:null},"int"),Object(r.b)("td",{parentName:"tr",align:null},"int32"),Object(r.b)("td",{parentName:"tr",align:null},"int"),Object(r.b)("td",{parentName:"tr",align:null},"integer"),Object(r.b)("td",{parentName:"tr",align:null},"Bignum or Fixnum (as required)")),Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",{parentName:"tr",align:null},Object(r.b)("a",{id:"sint64"})," sint64"),Object(r.b)("td",{parentName:"tr",align:null},"Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s."),Object(r.b)("td",{parentName:"tr",align:null},"int64"),Object(r.b)("td",{parentName:"tr",align:null},"long"),Object(r.b)("td",{parentName:"tr",align:null},"int/long"),Object(r.b)("td",{parentName:"tr",align:null},"int64"),Object(r.b)("td",{parentName:"tr",align:null},"long"),Object(r.b)("td",{parentName:"tr",align:null},"integer/string"),Object(r.b)("td",{parentName:"tr",align:null},"Bignum")),Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",{parentName:"tr",align:null},Object(r.b)("a",{id:"fixed32"})," fixed32"),Object(r.b)("td",{parentName:"tr",align:null},"Always four bytes. More efficient than uint32 if values are often greater than 2^28."),Object(r.b)("td",{parentName:"tr",align:null},"uint32"),Object(r.b)("td",{parentName:"tr",align:null},"int"),Object(r.b)("td",{parentName:"tr",align:null},"int"),Object(r.b)("td",{parentName:"tr",align:null},"uint32"),Object(r.b)("td",{parentName:"tr",align:null},"uint"),Object(r.b)("td",{parentName:"tr",align:null},"integer"),Object(r.b)("td",{parentName:"tr",align:null},"Bignum or Fixnum (as required)")),Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",{parentName:"tr",align:null},Object(r.b)("a",{id:"fixed64"})," fixed64"),Object(r.b)("td",{parentName:"tr",align:null},"Always eight bytes. More efficient than uint64 if values are often greater than 2^56."),Object(r.b)("td",{parentName:"tr",align:null},"uint64"),Object(r.b)("td",{parentName:"tr",align:null},"long"),Object(r.b)("td",{parentName:"tr",align:null},"int/long"),Object(r.b)("td",{parentName:"tr",align:null},"uint64"),Object(r.b)("td",{parentName:"tr",align:null},"ulong"),Object(r.b)("td",{parentName:"tr",align:null},"integer/string"),Object(r.b)("td",{parentName:"tr",align:null},"Bignum")),Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",{parentName:"tr",align:null},Object(r.b)("a",{id:"sfixed32"})," sfixed32"),Object(r.b)("td",{parentName:"tr",align:null},"Always four bytes."),Object(r.b)("td",{parentName:"tr",align:null},"int32"),Object(r.b)("td",{parentName:"tr",align:null},"int"),Object(r.b)("td",{parentName:"tr",align:null},"int"),Object(r.b)("td",{parentName:"tr",align:null},"int32"),Object(r.b)("td",{parentName:"tr",align:null},"int"),Object(r.b)("td",{parentName:"tr",align:null},"integer"),Object(r.b)("td",{parentName:"tr",align:null},"Bignum or Fixnum (as required)")),Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",{parentName:"tr",align:null},Object(r.b)("a",{id:"sfixed64"})," sfixed64"),Object(r.b)("td",{parentName:"tr",align:null},"Always eight bytes."),Object(r.b)("td",{parentName:"tr",align:null},"int64"),Object(r.b)("td",{parentName:"tr",align:null},"long"),Object(r.b)("td",{parentName:"tr",align:null},"int/long"),Object(r.b)("td",{parentName:"tr",align:null},"int64"),Object(r.b)("td",{parentName:"tr",align:null},"long"),Object(r.b)("td",{parentName:"tr",align:null},"integer/string"),Object(r.b)("td",{parentName:"tr",align:null},"Bignum")),Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",{parentName:"tr",align:null},Object(r.b)("a",{id:"bool"})," bool"),Object(r.b)("td",{parentName:"tr",align:null}),Object(r.b)("td",{parentName:"tr",align:null},"bool"),Object(r.b)("td",{parentName:"tr",align:null},"boolean"),Object(r.b)("td",{parentName:"tr",align:null},"boolean"),Object(r.b)("td",{parentName:"tr",align:null},"bool"),Object(r.b)("td",{parentName:"tr",align:null},"bool"),Object(r.b)("td",{parentName:"tr",align:null},"boolean"),Object(r.b)("td",{parentName:"tr",align:null},"TrueClass/FalseClass")),Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",{parentName:"tr",align:null},Object(r.b)("a",{id:"string"})," string"),Object(r.b)("td",{parentName:"tr",align:null},"A string must always contain UTF-8 encoded or 7-bit ASCII text."),Object(r.b)("td",{parentName:"tr",align:null},"string"),Object(r.b)("td",{parentName:"tr",align:null},"String"),Object(r.b)("td",{parentName:"tr",align:null},"str/unicode"),Object(r.b)("td",{parentName:"tr",align:null},"string"),Object(r.b)("td",{parentName:"tr",align:null},"string"),Object(r.b)("td",{parentName:"tr",align:null},"string"),Object(r.b)("td",{parentName:"tr",align:null},"String (UTF-8)")),Object(r.b)("tr",{parentName:"tbody"},Object(r.b)("td",{parentName:"tr",align:null},Object(r.b)("a",{id:"bytes"})," bytes"),Object(r.b)("td",{parentName:"tr",align:null},"May contain any arbitrary sequence of bytes."),Object(r.b)("td",{parentName:"tr",align:null},"string"),Object(r.b)("td",{parentName:"tr",align:null},"ByteString"),Object(r.b)("td",{parentName:"tr",align:null},"str"),Object(r.b)("td",{parentName:"tr",align:null},"[]byte"),Object(r.b)("td",{parentName:"tr",align:null},"ByteString"),Object(r.b)("td",{parentName:"tr",align:null},"string"),Object(r.b)("td",{parentName:"tr",align:null},"String (ASCII-8BIT)")))))}o.isMDXComponent=!0},198:function(e,t,a){"use strict";a.d(t,"a",(function(){return d})),a.d(t,"b",(function(){return s}));var n=a(0),l=a.n(n);function r(e,t,a){return t in e?Object.defineProperty(e,t,{value:a,enumerable:!0,configurable:!0,writable:!0}):e[t]=a,e}function b(e,t){var a=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),a.push.apply(a,n)}return a}function i(e){for(var t=1;t<arguments.length;t++){var a=null!=arguments[t]?arguments[t]:{};t%2?b(Object(a),!0).forEach((function(t){r(e,t,a[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(a)):b(Object(a)).forEach((function(t){Object.defineProperty(e,t,Object.getOwnPropertyDescriptor(a,t))}))}return e}function c(e,t){if(null==e)return{};var a,n,l=function(e,t){if(null==e)return{};var a,n,l={},r=Object.keys(e);for(n=0;n<r.length;n++)a=r[n],t.indexOf(a)>=0||(l[a]=e[a]);return l}(e,t);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);for(n=0;n<r.length;n++)a=r[n],t.indexOf(a)>=0||Object.prototype.propertyIsEnumerable.call(e,a)&&(l[a]=e[a])}return l}var p=l.a.createContext({}),o=function(e){var t=l.a.useContext(p),a=t;return e&&(a="function"==typeof e?e(t):i(i({},t),e)),a},d=function(e){var t=o(e.components);return l.a.createElement(p.Provider,{value:t},e.children)},u={inlineCode:"code",wrapper:function(e){var t=e.children;return l.a.createElement(l.a.Fragment,{},t)}},j=l.a.forwardRef((function(e,t){var a=e.components,n=e.mdxType,r=e.originalType,b=e.parentName,p=c(e,["components","mdxType","originalType","parentName"]),d=o(a),j=n,s=d["".concat(b,".").concat(j)]||d[j]||u[j]||r;return a?l.a.createElement(s,i(i({ref:t},p),{},{components:a})):l.a.createElement(s,i({ref:t},p))}));function s(e,t){var a=arguments,n=t&&t.mdxType;if("string"==typeof e||n){var r=a.length,b=new Array(r);b[0]=j;var i={};for(var c in t)hasOwnProperty.call(t,c)&&(i[c]=t[c]);i.originalType=e,i.mdxType="string"==typeof e?e:n,b[1]=i;for(var p=2;p<r;p++)b[p]=a[p];return l.a.createElement.apply(null,b)}return l.a.createElement.apply(null,a)}j.displayName="MDXCreateElement"}}]);