Status.pbobjc.m 4.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136
  1. /*
  2. * Copyright 2017 Google
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License");
  5. * you may not use this file except in compliance with the License.
  6. * You may obtain a copy of the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS,
  12. * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  13. * See the License for the specific language governing permissions and
  14. * limitations under the License.
  15. */
  16. // Generated by the protocol buffer compiler. DO NOT EDIT!
  17. // source: google/rpc/status.proto
  18. // This CPP symbol can be defined to use imports that match up to the framework
  19. // imports needed when using CocoaPods.
  20. #if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS)
  21. #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0
  22. #endif
  23. #if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
  24. #import <Protobuf/GPBProtocolBuffers_RuntimeSupport.h>
  25. #else
  26. #import "GPBProtocolBuffers_RuntimeSupport.h"
  27. #endif
  28. #if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
  29. #import <Protobuf/Any.pbobjc.h>
  30. #else
  31. #import "Any.pbobjc.h"
  32. #endif
  33. #import "Status.pbobjc.h"
  34. // @@protoc_insertion_point(imports)
  35. #pragma clang diagnostic push
  36. #pragma clang diagnostic ignored "-Wdeprecated-declarations"
  37. #pragma mark - RPCStatusRoot
  38. @implementation RPCStatusRoot
  39. // No extensions in the file and none of the imports (direct or indirect)
  40. // defined extensions, so no need to generate +extensionRegistry.
  41. @end
  42. #pragma mark - RPCStatusRoot_FileDescriptor
  43. static GPBFileDescriptor *RPCStatusRoot_FileDescriptor(void) {
  44. // This is called by +initialize so there is no need to worry
  45. // about thread safety of the singleton.
  46. static GPBFileDescriptor *descriptor = NULL;
  47. if (!descriptor) {
  48. GPB_DEBUG_CHECK_RUNTIME_VERSIONS();
  49. descriptor = [[GPBFileDescriptor alloc] initWithPackage:@"google.rpc"
  50. objcPrefix:@"RPC"
  51. syntax:GPBFileSyntaxProto3];
  52. }
  53. return descriptor;
  54. }
  55. #pragma mark - RPCStatus
  56. @implementation RPCStatus
  57. @dynamic code;
  58. @dynamic message;
  59. @dynamic detailsArray, detailsArray_Count;
  60. typedef struct RPCStatus__storage_ {
  61. uint32_t _has_storage_[1];
  62. int32_t code;
  63. NSString *message;
  64. NSMutableArray *detailsArray;
  65. } RPCStatus__storage_;
  66. // This method is threadsafe because it is initially called
  67. // in +initialize for each subclass.
  68. + (GPBDescriptor *)descriptor {
  69. static GPBDescriptor *descriptor = nil;
  70. if (!descriptor) {
  71. static GPBMessageFieldDescription fields[] = {
  72. {
  73. .name = "code",
  74. .dataTypeSpecific.className = NULL,
  75. .number = RPCStatus_FieldNumber_Code,
  76. .hasIndex = 0,
  77. .offset = (uint32_t)offsetof(RPCStatus__storage_, code),
  78. .flags = GPBFieldOptional,
  79. .dataType = GPBDataTypeInt32,
  80. },
  81. {
  82. .name = "message",
  83. .dataTypeSpecific.className = NULL,
  84. .number = RPCStatus_FieldNumber_Message,
  85. .hasIndex = 1,
  86. .offset = (uint32_t)offsetof(RPCStatus__storage_, message),
  87. .flags = GPBFieldOptional,
  88. .dataType = GPBDataTypeString,
  89. },
  90. {
  91. .name = "detailsArray",
  92. .dataTypeSpecific.className = GPBStringifySymbol(GPBAny),
  93. .number = RPCStatus_FieldNumber_DetailsArray,
  94. .hasIndex = GPBNoHasBit,
  95. .offset = (uint32_t)offsetof(RPCStatus__storage_, detailsArray),
  96. .flags = GPBFieldRepeated,
  97. .dataType = GPBDataTypeMessage,
  98. },
  99. };
  100. GPBDescriptor *localDescriptor =
  101. [GPBDescriptor allocDescriptorForClass:[RPCStatus class]
  102. rootClass:[RPCStatusRoot class]
  103. file:RPCStatusRoot_FileDescriptor()
  104. fields:fields
  105. fieldCount:(uint32_t)(sizeof(fields) / sizeof(GPBMessageFieldDescription))
  106. storageSize:sizeof(RPCStatus__storage_)
  107. flags:GPBDescriptorInitializationFlag_None];
  108. NSAssert(descriptor == nil, @"Startup recursed!");
  109. descriptor = localDescriptor;
  110. }
  111. return descriptor;
  112. }
  113. @end
  114. #pragma clang diagnostic pop
  115. // @@protoc_insertion_point(global_scope)