urlfetch_service.pb.go 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355
  1. // Code generated by protoc-gen-go.
  2. // source: google.golang.org/appengine/internal/urlfetch/urlfetch_service.proto
  3. // DO NOT EDIT!
  4. /*
  5. Package urlfetch is a generated protocol buffer package.
  6. It is generated from these files:
  7. google.golang.org/appengine/internal/urlfetch/urlfetch_service.proto
  8. It has these top-level messages:
  9. URLFetchServiceError
  10. URLFetchRequest
  11. URLFetchResponse
  12. */
  13. package urlfetch
  14. import proto "github.com/golang/protobuf/proto"
  15. import fmt "fmt"
  16. import math "math"
  17. // Reference imports to suppress errors if they are not otherwise used.
  18. var _ = proto.Marshal
  19. var _ = fmt.Errorf
  20. var _ = math.Inf
  21. type URLFetchServiceError_ErrorCode int32
  22. const (
  23. URLFetchServiceError_OK URLFetchServiceError_ErrorCode = 0
  24. URLFetchServiceError_INVALID_URL URLFetchServiceError_ErrorCode = 1
  25. URLFetchServiceError_FETCH_ERROR URLFetchServiceError_ErrorCode = 2
  26. URLFetchServiceError_UNSPECIFIED_ERROR URLFetchServiceError_ErrorCode = 3
  27. URLFetchServiceError_RESPONSE_TOO_LARGE URLFetchServiceError_ErrorCode = 4
  28. URLFetchServiceError_DEADLINE_EXCEEDED URLFetchServiceError_ErrorCode = 5
  29. URLFetchServiceError_SSL_CERTIFICATE_ERROR URLFetchServiceError_ErrorCode = 6
  30. URLFetchServiceError_DNS_ERROR URLFetchServiceError_ErrorCode = 7
  31. URLFetchServiceError_CLOSED URLFetchServiceError_ErrorCode = 8
  32. URLFetchServiceError_INTERNAL_TRANSIENT_ERROR URLFetchServiceError_ErrorCode = 9
  33. URLFetchServiceError_TOO_MANY_REDIRECTS URLFetchServiceError_ErrorCode = 10
  34. URLFetchServiceError_MALFORMED_REPLY URLFetchServiceError_ErrorCode = 11
  35. URLFetchServiceError_CONNECTION_ERROR URLFetchServiceError_ErrorCode = 12
  36. )
  37. var URLFetchServiceError_ErrorCode_name = map[int32]string{
  38. 0: "OK",
  39. 1: "INVALID_URL",
  40. 2: "FETCH_ERROR",
  41. 3: "UNSPECIFIED_ERROR",
  42. 4: "RESPONSE_TOO_LARGE",
  43. 5: "DEADLINE_EXCEEDED",
  44. 6: "SSL_CERTIFICATE_ERROR",
  45. 7: "DNS_ERROR",
  46. 8: "CLOSED",
  47. 9: "INTERNAL_TRANSIENT_ERROR",
  48. 10: "TOO_MANY_REDIRECTS",
  49. 11: "MALFORMED_REPLY",
  50. 12: "CONNECTION_ERROR",
  51. }
  52. var URLFetchServiceError_ErrorCode_value = map[string]int32{
  53. "OK": 0,
  54. "INVALID_URL": 1,
  55. "FETCH_ERROR": 2,
  56. "UNSPECIFIED_ERROR": 3,
  57. "RESPONSE_TOO_LARGE": 4,
  58. "DEADLINE_EXCEEDED": 5,
  59. "SSL_CERTIFICATE_ERROR": 6,
  60. "DNS_ERROR": 7,
  61. "CLOSED": 8,
  62. "INTERNAL_TRANSIENT_ERROR": 9,
  63. "TOO_MANY_REDIRECTS": 10,
  64. "MALFORMED_REPLY": 11,
  65. "CONNECTION_ERROR": 12,
  66. }
  67. func (x URLFetchServiceError_ErrorCode) Enum() *URLFetchServiceError_ErrorCode {
  68. p := new(URLFetchServiceError_ErrorCode)
  69. *p = x
  70. return p
  71. }
  72. func (x URLFetchServiceError_ErrorCode) String() string {
  73. return proto.EnumName(URLFetchServiceError_ErrorCode_name, int32(x))
  74. }
  75. func (x *URLFetchServiceError_ErrorCode) UnmarshalJSON(data []byte) error {
  76. value, err := proto.UnmarshalJSONEnum(URLFetchServiceError_ErrorCode_value, data, "URLFetchServiceError_ErrorCode")
  77. if err != nil {
  78. return err
  79. }
  80. *x = URLFetchServiceError_ErrorCode(value)
  81. return nil
  82. }
  83. type URLFetchRequest_RequestMethod int32
  84. const (
  85. URLFetchRequest_GET URLFetchRequest_RequestMethod = 1
  86. URLFetchRequest_POST URLFetchRequest_RequestMethod = 2
  87. URLFetchRequest_HEAD URLFetchRequest_RequestMethod = 3
  88. URLFetchRequest_PUT URLFetchRequest_RequestMethod = 4
  89. URLFetchRequest_DELETE URLFetchRequest_RequestMethod = 5
  90. URLFetchRequest_PATCH URLFetchRequest_RequestMethod = 6
  91. )
  92. var URLFetchRequest_RequestMethod_name = map[int32]string{
  93. 1: "GET",
  94. 2: "POST",
  95. 3: "HEAD",
  96. 4: "PUT",
  97. 5: "DELETE",
  98. 6: "PATCH",
  99. }
  100. var URLFetchRequest_RequestMethod_value = map[string]int32{
  101. "GET": 1,
  102. "POST": 2,
  103. "HEAD": 3,
  104. "PUT": 4,
  105. "DELETE": 5,
  106. "PATCH": 6,
  107. }
  108. func (x URLFetchRequest_RequestMethod) Enum() *URLFetchRequest_RequestMethod {
  109. p := new(URLFetchRequest_RequestMethod)
  110. *p = x
  111. return p
  112. }
  113. func (x URLFetchRequest_RequestMethod) String() string {
  114. return proto.EnumName(URLFetchRequest_RequestMethod_name, int32(x))
  115. }
  116. func (x *URLFetchRequest_RequestMethod) UnmarshalJSON(data []byte) error {
  117. value, err := proto.UnmarshalJSONEnum(URLFetchRequest_RequestMethod_value, data, "URLFetchRequest_RequestMethod")
  118. if err != nil {
  119. return err
  120. }
  121. *x = URLFetchRequest_RequestMethod(value)
  122. return nil
  123. }
  124. type URLFetchServiceError struct {
  125. XXX_unrecognized []byte `json:"-"`
  126. }
  127. func (m *URLFetchServiceError) Reset() { *m = URLFetchServiceError{} }
  128. func (m *URLFetchServiceError) String() string { return proto.CompactTextString(m) }
  129. func (*URLFetchServiceError) ProtoMessage() {}
  130. type URLFetchRequest struct {
  131. Method *URLFetchRequest_RequestMethod `protobuf:"varint,1,req,name=Method,enum=appengine.URLFetchRequest_RequestMethod" json:"Method,omitempty"`
  132. Url *string `protobuf:"bytes,2,req,name=Url" json:"Url,omitempty"`
  133. Header []*URLFetchRequest_Header `protobuf:"group,3,rep,name=Header" json:"header,omitempty"`
  134. Payload []byte `protobuf:"bytes,6,opt,name=Payload" json:"Payload,omitempty"`
  135. FollowRedirects *bool `protobuf:"varint,7,opt,name=FollowRedirects,def=1" json:"FollowRedirects,omitempty"`
  136. Deadline *float64 `protobuf:"fixed64,8,opt,name=Deadline" json:"Deadline,omitempty"`
  137. MustValidateServerCertificate *bool `protobuf:"varint,9,opt,name=MustValidateServerCertificate,def=1" json:"MustValidateServerCertificate,omitempty"`
  138. XXX_unrecognized []byte `json:"-"`
  139. }
  140. func (m *URLFetchRequest) Reset() { *m = URLFetchRequest{} }
  141. func (m *URLFetchRequest) String() string { return proto.CompactTextString(m) }
  142. func (*URLFetchRequest) ProtoMessage() {}
  143. const Default_URLFetchRequest_FollowRedirects bool = true
  144. const Default_URLFetchRequest_MustValidateServerCertificate bool = true
  145. func (m *URLFetchRequest) GetMethod() URLFetchRequest_RequestMethod {
  146. if m != nil && m.Method != nil {
  147. return *m.Method
  148. }
  149. return URLFetchRequest_GET
  150. }
  151. func (m *URLFetchRequest) GetUrl() string {
  152. if m != nil && m.Url != nil {
  153. return *m.Url
  154. }
  155. return ""
  156. }
  157. func (m *URLFetchRequest) GetHeader() []*URLFetchRequest_Header {
  158. if m != nil {
  159. return m.Header
  160. }
  161. return nil
  162. }
  163. func (m *URLFetchRequest) GetPayload() []byte {
  164. if m != nil {
  165. return m.Payload
  166. }
  167. return nil
  168. }
  169. func (m *URLFetchRequest) GetFollowRedirects() bool {
  170. if m != nil && m.FollowRedirects != nil {
  171. return *m.FollowRedirects
  172. }
  173. return Default_URLFetchRequest_FollowRedirects
  174. }
  175. func (m *URLFetchRequest) GetDeadline() float64 {
  176. if m != nil && m.Deadline != nil {
  177. return *m.Deadline
  178. }
  179. return 0
  180. }
  181. func (m *URLFetchRequest) GetMustValidateServerCertificate() bool {
  182. if m != nil && m.MustValidateServerCertificate != nil {
  183. return *m.MustValidateServerCertificate
  184. }
  185. return Default_URLFetchRequest_MustValidateServerCertificate
  186. }
  187. type URLFetchRequest_Header struct {
  188. Key *string `protobuf:"bytes,4,req,name=Key" json:"Key,omitempty"`
  189. Value *string `protobuf:"bytes,5,req,name=Value" json:"Value,omitempty"`
  190. XXX_unrecognized []byte `json:"-"`
  191. }
  192. func (m *URLFetchRequest_Header) Reset() { *m = URLFetchRequest_Header{} }
  193. func (m *URLFetchRequest_Header) String() string { return proto.CompactTextString(m) }
  194. func (*URLFetchRequest_Header) ProtoMessage() {}
  195. func (m *URLFetchRequest_Header) GetKey() string {
  196. if m != nil && m.Key != nil {
  197. return *m.Key
  198. }
  199. return ""
  200. }
  201. func (m *URLFetchRequest_Header) GetValue() string {
  202. if m != nil && m.Value != nil {
  203. return *m.Value
  204. }
  205. return ""
  206. }
  207. type URLFetchResponse struct {
  208. Content []byte `protobuf:"bytes,1,opt,name=Content" json:"Content,omitempty"`
  209. StatusCode *int32 `protobuf:"varint,2,req,name=StatusCode" json:"StatusCode,omitempty"`
  210. Header []*URLFetchResponse_Header `protobuf:"group,3,rep,name=Header" json:"header,omitempty"`
  211. ContentWasTruncated *bool `protobuf:"varint,6,opt,name=ContentWasTruncated,def=0" json:"ContentWasTruncated,omitempty"`
  212. ExternalBytesSent *int64 `protobuf:"varint,7,opt,name=ExternalBytesSent" json:"ExternalBytesSent,omitempty"`
  213. ExternalBytesReceived *int64 `protobuf:"varint,8,opt,name=ExternalBytesReceived" json:"ExternalBytesReceived,omitempty"`
  214. FinalUrl *string `protobuf:"bytes,9,opt,name=FinalUrl" json:"FinalUrl,omitempty"`
  215. ApiCpuMilliseconds *int64 `protobuf:"varint,10,opt,name=ApiCpuMilliseconds,def=0" json:"ApiCpuMilliseconds,omitempty"`
  216. ApiBytesSent *int64 `protobuf:"varint,11,opt,name=ApiBytesSent,def=0" json:"ApiBytesSent,omitempty"`
  217. ApiBytesReceived *int64 `protobuf:"varint,12,opt,name=ApiBytesReceived,def=0" json:"ApiBytesReceived,omitempty"`
  218. XXX_unrecognized []byte `json:"-"`
  219. }
  220. func (m *URLFetchResponse) Reset() { *m = URLFetchResponse{} }
  221. func (m *URLFetchResponse) String() string { return proto.CompactTextString(m) }
  222. func (*URLFetchResponse) ProtoMessage() {}
  223. const Default_URLFetchResponse_ContentWasTruncated bool = false
  224. const Default_URLFetchResponse_ApiCpuMilliseconds int64 = 0
  225. const Default_URLFetchResponse_ApiBytesSent int64 = 0
  226. const Default_URLFetchResponse_ApiBytesReceived int64 = 0
  227. func (m *URLFetchResponse) GetContent() []byte {
  228. if m != nil {
  229. return m.Content
  230. }
  231. return nil
  232. }
  233. func (m *URLFetchResponse) GetStatusCode() int32 {
  234. if m != nil && m.StatusCode != nil {
  235. return *m.StatusCode
  236. }
  237. return 0
  238. }
  239. func (m *URLFetchResponse) GetHeader() []*URLFetchResponse_Header {
  240. if m != nil {
  241. return m.Header
  242. }
  243. return nil
  244. }
  245. func (m *URLFetchResponse) GetContentWasTruncated() bool {
  246. if m != nil && m.ContentWasTruncated != nil {
  247. return *m.ContentWasTruncated
  248. }
  249. return Default_URLFetchResponse_ContentWasTruncated
  250. }
  251. func (m *URLFetchResponse) GetExternalBytesSent() int64 {
  252. if m != nil && m.ExternalBytesSent != nil {
  253. return *m.ExternalBytesSent
  254. }
  255. return 0
  256. }
  257. func (m *URLFetchResponse) GetExternalBytesReceived() int64 {
  258. if m != nil && m.ExternalBytesReceived != nil {
  259. return *m.ExternalBytesReceived
  260. }
  261. return 0
  262. }
  263. func (m *URLFetchResponse) GetFinalUrl() string {
  264. if m != nil && m.FinalUrl != nil {
  265. return *m.FinalUrl
  266. }
  267. return ""
  268. }
  269. func (m *URLFetchResponse) GetApiCpuMilliseconds() int64 {
  270. if m != nil && m.ApiCpuMilliseconds != nil {
  271. return *m.ApiCpuMilliseconds
  272. }
  273. return Default_URLFetchResponse_ApiCpuMilliseconds
  274. }
  275. func (m *URLFetchResponse) GetApiBytesSent() int64 {
  276. if m != nil && m.ApiBytesSent != nil {
  277. return *m.ApiBytesSent
  278. }
  279. return Default_URLFetchResponse_ApiBytesSent
  280. }
  281. func (m *URLFetchResponse) GetApiBytesReceived() int64 {
  282. if m != nil && m.ApiBytesReceived != nil {
  283. return *m.ApiBytesReceived
  284. }
  285. return Default_URLFetchResponse_ApiBytesReceived
  286. }
  287. type URLFetchResponse_Header struct {
  288. Key *string `protobuf:"bytes,4,req,name=Key" json:"Key,omitempty"`
  289. Value *string `protobuf:"bytes,5,req,name=Value" json:"Value,omitempty"`
  290. XXX_unrecognized []byte `json:"-"`
  291. }
  292. func (m *URLFetchResponse_Header) Reset() { *m = URLFetchResponse_Header{} }
  293. func (m *URLFetchResponse_Header) String() string { return proto.CompactTextString(m) }
  294. func (*URLFetchResponse_Header) ProtoMessage() {}
  295. func (m *URLFetchResponse_Header) GetKey() string {
  296. if m != nil && m.Key != nil {
  297. return *m.Key
  298. }
  299. return ""
  300. }
  301. func (m *URLFetchResponse_Header) GetValue() string {
  302. if m != nil && m.Value != nil {
  303. return *m.Value
  304. }
  305. return ""
  306. }
  307. func init() {
  308. }