- Style fixups in the code. - map<> serialization fixes and more tests. - Autocreation of map<> fields (to match repeated fields). - @@protoc_insertion_point(global_scope|imports). - Fixup proto2 syntax extension support. - Move all startup code to +initialize so it happen on class usage and not app startup. - Have generated headers use forward declarations and move imports into generated code, reduces what is need at compile time to speed up compiled and avoid pointless rippling of rebuilds.pull/410/head
parent
c3480926f9
commit
1dcc329427
95 changed files with 6091 additions and 1254 deletions
@ -0,0 +1,228 @@ |
||||
#!/bin/bash |
||||
# |
||||
# Helper to do build so you don't have to remember all the steps/args. |
||||
|
||||
|
||||
set -eu |
||||
|
||||
# Some base locations. |
||||
readonly ScriptDir=$(dirname "$(echo $0 | sed -e "s,^\([^/]\),$(pwd)/\1,")") |
||||
readonly ProtoRootDir="${ScriptDir}/../.." |
||||
|
||||
printUsage() { |
||||
NAME=$(basename "${0}") |
||||
cat << EOF |
||||
usage: ${NAME} [OPTIONS] |
||||
|
||||
This script does the common build steps needed. |
||||
|
||||
OPTIONS: |
||||
|
||||
General: |
||||
|
||||
-h, --help |
||||
Show this message |
||||
-c, --clean |
||||
Issue a clean before the normal build. |
||||
-a, --autogen |
||||
Start by rerunning autogen & configure. |
||||
-r, --regenerate-descriptors |
||||
The descriptor.proto is checked in generated, cause it to regenerate. |
||||
-j #, --jobs # |
||||
Force the number of parallel jobs (useful for debugging build issues). |
||||
--skip-xcode |
||||
Skip the invoke of Xcode to test the runtime on both iOS and OS X. |
||||
--skip-xcode-ios |
||||
Skip the invoke of Xcode to test the runtime on iOS. |
||||
--skip-xcode-osx |
||||
Skip the invoke of Xcode to test the runtime on OS X. |
||||
|
||||
EOF |
||||
} |
||||
|
||||
header() { |
||||
echo "" |
||||
echo "========================================================================" |
||||
echo " ${@}" |
||||
echo "========================================================================" |
||||
} |
||||
|
||||
# Thanks to libtool, builds can fail in odd ways and since it eats some output |
||||
# it can be hard to spot, so force error output if make exits with a non zero. |
||||
wrapped_make() { |
||||
set +e # Don't stop if the command fails. |
||||
make $* |
||||
MAKE_EXIT_STATUS=$? |
||||
if [ ${MAKE_EXIT_STATUS} -ne 0 ]; then |
||||
echo "Error: 'make $*' exited with status ${MAKE_EXIT_STATUS}" |
||||
exit ${MAKE_EXIT_STATUS} |
||||
fi |
||||
set -e |
||||
} |
||||
|
||||
NUM_MAKE_JOBS=$(/usr/sbin/sysctl -n hw.ncpu) |
||||
if [[ "${NUM_MAKE_JOBS}" -lt 4 ]] ; then |
||||
NUM_MAKE_JOBS=4 |
||||
fi |
||||
|
||||
DO_AUTOGEN=no |
||||
DO_CLEAN=no |
||||
REGEN_CPP_DESCRIPTORS=no |
||||
DO_XCODE_IOS_TESTS=yes |
||||
DO_XCODE_OSX_TESTS=yes |
||||
while [[ $# != 0 ]]; do |
||||
case "${1}" in |
||||
-h | --help ) |
||||
printUsage |
||||
exit 0 |
||||
;; |
||||
-c | --clean ) |
||||
DO_CLEAN=yes |
||||
;; |
||||
-a | --autogen ) |
||||
DO_AUTOGEN=yes |
||||
;; |
||||
-r | --regenerate-cpp-descriptors ) |
||||
REGEN_CPP_DESCRIPTORS=yes |
||||
;; |
||||
-j | --jobs ) |
||||
shift |
||||
NUM_MAKE_JOBS="${1}" |
||||
;; |
||||
--skip-xcode ) |
||||
DO_XCODE_IOS_TESTS=no |
||||
DO_XCODE_OSX_TESTS=no |
||||
;; |
||||
--skip-xcode-ios ) |
||||
DO_XCODE_IOS_TESTS=no |
||||
;; |
||||
--skip-xcode-osx ) |
||||
DO_XCODE_OSX_TESTS=no |
||||
;; |
||||
-*) |
||||
echo "ERROR: Unknown option: ${1}" 1>&2 |
||||
printUsage |
||||
exit 1 |
||||
;; |
||||
*) |
||||
echo "ERROR: Unknown argument: ${1}" 1>&2 |
||||
printUsage |
||||
exit 1 |
||||
;; |
||||
esac |
||||
shift |
||||
done |
||||
|
||||
# Into the proto dir. |
||||
pushd "${ProtoRootDir}" |
||||
|
||||
# if no Makefile, force the autogen. |
||||
if [[ ! -f Makefile ]] ; then |
||||
DO_AUTOGEN=yes |
||||
fi |
||||
|
||||
if [[ "${DO_AUTOGEN}" == "yes" ]] ; then |
||||
header "Running autogen & configure" |
||||
./autogen.sh |
||||
./configure CXXFLAGS="-mmacosx-version-min=10.9 -Wnon-virtual-dtor -Woverloaded-virtual -Wunused-const-variable -Wunused-function" |
||||
fi |
||||
|
||||
if [[ "${DO_CLEAN}" == "yes" ]] ; then |
||||
header "Cleaning" |
||||
wrapped_make clean |
||||
if [[ "${DO_XCODE_IOS_TESTS}" == "yes" ]] ; then |
||||
XCODEBUILD_CLEAN_BASE_IOS=( |
||||
xcodebuild |
||||
-project objectivec/ProtocolBuffers_iOS.xcodeproj |
||||
-scheme ProtocolBuffers |
||||
) |
||||
"${XCODEBUILD_CLEAN_BASE_IOS[@]}" -configuration Debug clean |
||||
"${XCODEBUILD_CLEAN_BASE_IOS[@]}" -configuration Release clean |
||||
fi |
||||
if [[ "${DO_XCODE_OSX_TESTS}" == "yes" ]] ; then |
||||
XCODEBUILD_CLEAN_BASE_OSX=( |
||||
xcodebuild |
||||
-project objectivec/ProtocolBuffers_OSX.xcodeproj |
||||
-scheme ProtocolBuffers |
||||
) |
||||
"${XCODEBUILD_CLEAN_BASE_OSX[@]}" -configuration Debug clean |
||||
"${XCODEBUILD_CLEAN_BASE_OSX[@]}" -configuration Release clean |
||||
fi |
||||
fi |
||||
|
||||
if [[ "${REGEN_CPP_DESCRIPTORS}" == "yes" ]] ; then |
||||
header "Regenerating the C++ descriptor sources." |
||||
./generate_descriptor_proto.sh -j "${NUM_MAKE_JOBS}" |
||||
fi |
||||
|
||||
header "Building" |
||||
# Can't issue these together, when fully parallel, something sometimes chokes |
||||
# at random. |
||||
wrapped_make -j "${NUM_MAKE_JOBS}" all |
||||
wrapped_make -j "${NUM_MAKE_JOBS}" check |
||||
|
||||
header "Ensuring the ObjC descriptors are current." |
||||
# Find the newest input file (protos, compiler, and this script). |
||||
# (these patterns catch some extra stuff, but better to over sample than under) |
||||
readonly NewestInput=$(find \ |
||||
src/google/protobuf/*.proto \ |
||||
src/.libs src/*.la src/protoc \ |
||||
objectivec/generate_descriptors_proto.sh \ |
||||
-type f -print0 \ |
||||
| xargs -0 stat -f "%m %N" \ |
||||
| sort -n | tail -n1 | cut -f2- -d" ") |
||||
# Find the oldest output file. |
||||
readonly OldestOutput=$(find \ |
||||
"${ProtoRootDir}/objectivec/google" \ |
||||
-type f -print0 \ |
||||
| xargs -0 stat -f "%m %N" \ |
||||
| sort -n -r | tail -n1 | cut -f2- -d" ") |
||||
# If the newest input is newer than the oldest output, regenerate. |
||||
if [[ "${NewestInput}" -nt "${OldestOutput}" ]] ; then |
||||
echo ">> Newest input is newer than oldest output, regenerating." |
||||
objectivec/generate_descriptors_proto.sh -j "${NUM_MAKE_JOBS}" |
||||
else |
||||
echo ">> Newest input is older than oldest output, no need to regenerating." |
||||
fi |
||||
|
||||
header "Checking on the ObjC Runtime Code" |
||||
objectivec/DevTools/pddm_tests.py |
||||
if ! objectivec/DevTools/pddm.py --dry-run objectivec/*.[hm] objectivec/Tests/*.[hm] ; then |
||||
echo "" |
||||
echo "Update by running:" |
||||
echo " objectivec/DevTools/pddm.py objectivec/*.[hm] objectivec/Tests/*.[hm]" |
||||
exit 1 |
||||
fi |
||||
|
||||
if [[ "${DO_XCODE_IOS_TESTS}" == "yes" ]] ; then |
||||
XCODEBUILD_TEST_BASE_IOS=( |
||||
xcodebuild |
||||
-project objectivec/ProtocolBuffers_iOS.xcodeproj |
||||
-scheme ProtocolBuffers |
||||
# Don't need to worry about form factors or retina/non retina; |
||||
# just pick a mix of OS Versions and 32/64 bit. |
||||
-destination "platform=iOS Simulator,name=iPhone 4s,OS=7.1" # 32bit |
||||
-destination "platform=iOS Simulator,name=iPhone 6,OS=8.3" # 64bit |
||||
-destination "platform=iOS Simulator,name=iPad 2,OS=7.1" # 32bit |
||||
-destination "platform=iOS Simulator,name=iPad Air,OS=8.3" # 64bit |
||||
) |
||||
header "Doing Xcode iOS build/tests - Debug" |
||||
"${XCODEBUILD_TEST_BASE_IOS[@]}" -configuration Debug test |
||||
header "Doing Xcode iOS build/tests - Release" |
||||
"${XCODEBUILD_TEST_BASE_IOS[@]}" -configuration Release test |
||||
# Don't leave the simulator in the developer's face. |
||||
killall "iOS Simulator" |
||||
fi |
||||
if [[ "${DO_XCODE_OSX_TESTS}" == "yes" ]] ; then |
||||
XCODEBUILD_TEST_BASE_OSX=( |
||||
xcodebuild |
||||
-project objectivec/ProtocolBuffers_OSX.xcodeproj |
||||
-scheme ProtocolBuffers |
||||
# Since the ObjC 2.0 Runtime is required, 32bit OS X isn't supported. |
||||
-destination "platform=OS X,arch=x86_64" # 64bit |
||||
) |
||||
header "Doing Xcode OS X build/tests - Debug" |
||||
"${XCODEBUILD_TEST_BASE_OSX[@]}" -configuration Debug test |
||||
header "Doing Xcode OS X build/tests - Release" |
||||
"${XCODEBUILD_TEST_BASE_OSX[@]}" -configuration Release test |
||||
fi |
@ -1,36 +0,0 @@ |
||||
#!/bin/bash |
||||
|
||||
# This script will generate the common descriptors needed by the Objective C |
||||
# runtime. |
||||
|
||||
# HINT: Flags passed to generate_descriptor_proto.sh will be passed directly |
||||
# to make when building protoc. This is particularly useful for passing |
||||
# -j4 to run 4 jobs simultaneously. |
||||
|
||||
set -eu |
||||
|
||||
readonly ScriptDir=$(dirname "$(echo $0 | sed -e "s,^\([^/]\),$(pwd)/\1,")") |
||||
readonly ProtoRootDir="${ScriptDir}/../.." |
||||
readonly ProtoC="${ProtoRootDir}/src/protoc" |
||||
|
||||
pushd "${ProtoRootDir}" > /dev/null |
||||
|
||||
# Compiler build fails if config.h hasn't been made yet (even if configure/etc. |
||||
# have been run, so get that made first). |
||||
make $@ config.h |
||||
|
||||
# Make sure the compiler is current. |
||||
cd src |
||||
make $@ protoc |
||||
|
||||
# These really should only be run when the inputs or compiler are newer than |
||||
# the outputs. |
||||
|
||||
# Needed by the runtime. |
||||
./protoc --objc_out="${ProtoRootDir}/objectivec" google/protobuf/descriptor.proto |
||||
|
||||
# Well known types that the library provides helpers for. |
||||
./protoc --objc_out="${ProtoRootDir}/objectivec" google/protobuf/timestamp.proto |
||||
./protoc --objc_out="${ProtoRootDir}/objectivec" google/protobuf/duration.proto |
||||
|
||||
popd > /dev/null |
File diff suppressed because it is too large
Load Diff
@ -1,40 +0,0 @@ |
||||
// Protocol Buffers - Google's data interchange format
|
||||
// Copyright 2008 Google Inc. All rights reserved.
|
||||
// https://developers.google.com/protocol-buffers/
|
||||
//
|
||||
// Redistribution and use in source and binary forms, with or without
|
||||
// modification, are permitted provided that the following conditions are
|
||||
// met:
|
||||
//
|
||||
// * Redistributions of source code must retain the above copyright
|
||||
// notice, this list of conditions and the following disclaimer.
|
||||
// * Redistributions in binary form must reproduce the above
|
||||
// copyright notice, this list of conditions and the following disclaimer
|
||||
// in the documentation and/or other materials provided with the
|
||||
// distribution.
|
||||
// * Neither the name of Google Inc. nor the names of its
|
||||
// contributors may be used to endorse or promote products derived from
|
||||
// this software without specific prior written permission.
|
||||
//
|
||||
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
|
||||
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
|
||||
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
|
||||
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
|
||||
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
|
||||
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
|
||||
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
|
||||
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
|
||||
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
|
||||
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
#import <Foundation/Foundation.h> |
||||
|
||||
#import "GPBExtensionRegistry.h" |
||||
|
||||
@interface GPBExtensionRegistry () |
||||
|
||||
- (void)addExtension:(GPBExtensionField *)extension; |
||||
- (void)addExtensions:(GPBExtensionRegistry *)registry; |
||||
|
||||
@end |
File diff suppressed because it is too large
Load Diff
@ -0,0 +1,77 @@ |
||||
Protocol Buffers - Google's data interchange format |
||||
=================================================== |
||||
|
||||
[](https://travis-ci.org/google/protobuf) |
||||
|
||||
Copyright 2008 Google Inc. |
||||
|
||||
This directory contains the Objective C Protocol Buffers runtime library. |
||||
|
||||
Requirements |
||||
------------ |
||||
|
||||
The Objective C implemention requires: |
||||
|
||||
- Objective C 2.0 Runtime (32bit & 64bit iOS, 64bit OS X). |
||||
- Xcode 6.3 (or later). |
||||
- The library code does *not* use ARC (for performance reasons), but it all can |
||||
be called from ARC code. |
||||
|
||||
Installation |
||||
------------ |
||||
|
||||
The full distribution pulled from github includes the sources for both the |
||||
compiler (protoc) and the runtime (this directory). To build the compiler |
||||
and run the runtime tests, you can use: |
||||
|
||||
$ objectivec/DevTools/full_mac_build.sh |
||||
|
||||
This will generate the `src/protoc` binary. |
||||
|
||||
Usage |
||||
----- |
||||
|
||||
There are two ways to include the Runtime sources in your project: |
||||
|
||||
Add `objectivec/\*.h` & `objectivec/GPBProtocolBuffers.m` to your project. |
||||
|
||||
*or* |
||||
|
||||
Add `objectivec/\*.h` & `objectivec/\*.m` except for |
||||
`objectivec/GPBProtocolBuffers.m` to your project. |
||||
|
||||
|
||||
If the target is using ARC, remember to turn off ARC (`-fno-objc-arc`) for the |
||||
`.m` files. |
||||
|
||||
The files generated by `protoc` for the `*.proto` files (`\*.pbobjc.h' and |
||||
`\*.pbobjc.m`) are then also added to the target. |
||||
|
||||
The Objective C classes/enums can be used from Swift code. |
||||
|
||||
Objective C Generator Options |
||||
----------------------------- |
||||
|
||||
**objc_class_prefix=\<prefix\>** (no default) |
||||
|
||||
Since Objective C uses a global namespace for all of its classes, there can |
||||
be collisions. This option provides a prefix that will be added to the Enums |
||||
and Objects (for messages) generated from the proto. Convention is to base |
||||
the prefix on the package the proto is in. |
||||
|
||||
Contributing |
||||
------------ |
||||
|
||||
Please make updates to the tests along with changes. If just changing the |
||||
runtime, the Xcode projects can be used to build and run tests. If change also |
||||
require changes to the generated code, `objectivec/DevTools/full_mac_build.sh` |
||||
can be used to easily rebuild and test changes. Passing `-h` to the script will |
||||
show the addition options that could be useful. |
||||
|
||||
Documentation |
||||
------------- |
||||
|
||||
The complete documentation for Protocol Buffers is available via the |
||||
web at: |
||||
|
||||
https://developers.google.com/protocol-buffers/ |
@ -0,0 +1,54 @@ |
||||
#!/bin/bash |
||||
|
||||
# Run this script to regenerate descriptor.pbobjc.{h,m} after the protocol |
||||
# compiler changes. |
||||
|
||||
# HINT: Flags passed to generate_descriptor_proto.sh will be passed directly |
||||
# to make when building protoc. This is particularly useful for passing |
||||
# -j4 to run 4 jobs simultaneously. |
||||
|
||||
set -eu |
||||
|
||||
readonly ScriptDir=$(dirname "$(echo $0 | sed -e "s,^\([^/]\),$(pwd)/\1,")") |
||||
readonly ProtoRootDir="${ScriptDir}/.." |
||||
readonly ProtoC="${ProtoRootDir}/src/protoc" |
||||
|
||||
pushd "${ProtoRootDir}" > /dev/null |
||||
|
||||
if test ! -e src/google/protobuf/stubs/common.h; then |
||||
cat >&2 << __EOF__ |
||||
Could not find source code. Make sure you are running this script from the |
||||
root of the distribution tree. |
||||
__EOF__ |
||||
exit 1 |
||||
fi |
||||
|
||||
if test ! -e src/Makefile; then |
||||
cat >&2 << __EOF__ |
||||
Could not find src/Makefile. You must run ./configure (and perhaps |
||||
./autogen.sh) first. |
||||
__EOF__ |
||||
exit 1 |
||||
fi |
||||
|
||||
# Make sure the compiler is current. |
||||
cd src |
||||
make $@ google/protobuf/stubs/pbconfig.h |
||||
make $@ protoc |
||||
|
||||
declare -a RUNTIME_PROTO_FILES=(\ |
||||
google/protobuf/any.proto \ |
||||
google/protobuf/api.proto \ |
||||
google/protobuf/descriptor.proto \ |
||||
google/protobuf/duration.proto \ |
||||
google/protobuf/empty.proto \ |
||||
google/protobuf/field_mask.proto \ |
||||
google/protobuf/source_context.proto \ |
||||
google/protobuf/struct.proto \ |
||||
google/protobuf/timestamp.proto \ |
||||
google/protobuf/type.proto \ |
||||
google/protobuf/wrappers.proto) |
||||
|
||||
./protoc --objc_out="${ProtoRootDir}/objectivec" ${RUNTIME_PROTO_FILES[@]} |
||||
|
||||
popd > /dev/null |
@ -0,0 +1,100 @@ |
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: google/protobuf/any.proto
|
||||
|
||||
#import "GPBProtocolBuffers.h" |
||||
|
||||
#if GOOGLE_PROTOBUF_OBJC_GEN_VERSION != 30000 |
||||
#error This file was generated by a different version of protoc-gen-objc which is incompatible with your Protocol Buffer sources. |
||||
#endif |
||||
|
||||
// @@protoc_insertion_point(imports)
|
||||
|
||||
CF_EXTERN_C_BEGIN |
||||
|
||||
|
||||
#pragma mark - GPBAnyRoot |
||||
|
||||
@interface GPBAnyRoot : GPBRootObject |
||||
|
||||
// The base class provides:
|
||||
// + (GPBExtensionRegistry *)extensionRegistry;
|
||||
// which is an GPBExtensionRegistry that includes all the extensions defined by
|
||||
// this file and all files that it depends on.
|
||||
|
||||
@end |
||||
|
||||
#pragma mark - GPBAny |
||||
|
||||
typedef GPB_ENUM(GPBAny_FieldNumber) { |
||||
GPBAny_FieldNumber_TypeURL = 1, |
||||
GPBAny_FieldNumber_Value = 2, |
||||
}; |
||||
|
||||
// `Any` contains an arbitrary serialized message along with a URL
|
||||
// that describes the type of the serialized message.
|
||||
//
|
||||
// The proto runtimes and/or compiler will eventually
|
||||
// provide utilities to pack/unpack Any values (projected Q1/15).
|
||||
//
|
||||
// # JSON
|
||||
// The JSON representation of an `Any` value uses the regular
|
||||
// representation of the deserialized, embedded message, with an
|
||||
// additional field `@type` which contains the type URL. Example:
|
||||
//
|
||||
// package google.profile;
|
||||
// message Person {
|
||||
// string first_name = 1;
|
||||
// string last_name = 2;
|
||||
// }
|
||||
//
|
||||
// {
|
||||
// "@type": "type.googleapis.com/google.profile.Person",
|
||||
// "firstName": <string>,
|
||||
// "lastName": <string>
|
||||
// }
|
||||
//
|
||||
// If the embedded message type is well-known and has a custom JSON
|
||||
// representation, that representation will be embedded adding a field
|
||||
// `value` which holds the custom JSON in addition to the the `@type`
|
||||
// field. Example (for message [google.protobuf.Duration][google.protobuf.Duration]):
|
||||
//
|
||||
// {
|
||||
// "@type": "type.googleapis.com/google.protobuf.Duration",
|
||||
// "value": "1.212s"
|
||||
// }
|
||||
@interface GPBAny : GPBMessage |
||||
|
||||
// A URL/resource name whose content describes the type of the
|
||||
// serialized message.
|
||||
//
|
||||
// For URLs which use the schema `http`, `https`, or no schema, the
|
||||
// following restrictions and interpretations apply:
|
||||
//
|
||||
// * If no schema is provided, `https` is assumed.
|
||||
// * The last segment of the URL's path must represent the fully
|
||||
// qualified name of the type (as in `path/google.protobuf.Duration`).
|
||||
// * An HTTP GET on the URL must yield a [google.protobuf.Type][google.protobuf.Type]
|
||||
// value in binary format, or produce an error.
|
||||
// * Applications are allowed to cache lookup results based on the
|
||||
// URL, or have them precompiled into a binary to avoid any
|
||||
// lookup. Therefore, binary compatibility needs to be preserved
|
||||
// on changes to types. (Use versioned type names to manage
|
||||
// breaking changes.)
|
||||
//
|
||||
// Schemas other than `http`, `https` (or the empty schema) might be
|
||||
// used with implementation specific semantics.
|
||||
//
|
||||
// Types originating from the `google.*` package
|
||||
// namespace should use `type.googleapis.com/full.type.name` (without
|
||||
// schema and path). A type service will eventually become available which
|
||||
// serves those URLs (projected Q2/15).
|
||||
@property(nonatomic, readwrite, copy) NSString *typeURL; |
||||
|
||||
// Must be valid serialized data of the above specified type.
|
||||
@property(nonatomic, readwrite, copy) NSData *value; |
||||
|
||||
@end |
||||
|
||||
CF_EXTERN_C_END |
||||
|
||||
// @@protoc_insertion_point(global_scope)
|
@ -0,0 +1,93 @@ |
||||
// Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
// source: google/protobuf/any.proto |
||||
|
||||
#import "GPBProtocolBuffers_RuntimeSupport.h" |
||||
#import "google/protobuf/Any.pbobjc.h" |
||||
// @@protoc_insertion_point(imports) |
||||
|
||||
#pragma mark - GPBAnyRoot |
||||
|
||||
@implementation GPBAnyRoot |
||||
|
||||
@end |
||||
|
||||
static GPBFileDescriptor *GPBAnyRoot_FileDescriptor(void) { |
||||
// This is called by +initialize so there is no need to worry |
||||
// about thread safety of the singleton. |
||||
static GPBFileDescriptor *descriptor = NULL; |
||||
if (!descriptor) { |
||||
descriptor = [[GPBFileDescriptor alloc] initWithPackage:@"google.protobuf" |
||||
syntax:GPBFileSyntaxProto3]; |
||||
} |
||||
return descriptor; |
||||
} |
||||
|
||||
#pragma mark - GPBAny |
||||
|
||||
@implementation GPBAny |
||||
|
||||
@dynamic typeURL; |
||||
@dynamic value; |
||||
|
||||
typedef struct GPBAny_Storage { |
||||
uint32_t _has_storage_[1]; |
||||
NSString *typeURL; |
||||
NSData *value; |
||||
} GPBAny_Storage; |
||||
|
||||
// This method is threadsafe because it is initially called |
||||
// in +initialize for each subclass. |
||||
+ (GPBDescriptor *)descriptor { |
||||
static GPBDescriptor *descriptor = NULL; |
||||
if (!descriptor) { |
||||
static GPBMessageFieldDescription fields[] = { |
||||
{ |
||||
.name = "typeURL", |
||||
.number = GPBAny_FieldNumber_TypeURL, |
||||
.hasIndex = 0, |
||||
.flags = GPBFieldOptional | GPBFieldTextFormatNameCustom, |
||||
.type = GPBTypeString, |
||||
.offset = offsetof(GPBAny_Storage, typeURL), |
||||
.defaultValue.valueString = nil, |
||||
.typeSpecific.className = NULL, |
||||
.fieldOptions = NULL, |
||||
}, |
||||
{ |
||||
.name = "value", |
||||
.number = GPBAny_FieldNumber_Value, |
||||
.hasIndex = 1, |
||||
.flags = GPBFieldOptional, |
||||
.type = GPBTypeData, |
||||
.offset = offsetof(GPBAny_Storage, value), |
||||
.defaultValue.valueData = nil, |
||||
.typeSpecific.className = NULL, |
||||
.fieldOptions = NULL, |
||||
}, |
||||
}; |
||||
#if GPBOBJC_SKIP_MESSAGE_TEXTFORMAT_EXTRAS |
||||
const char *extraTextFormatInfo = NULL; |
||||
#else |
||||
static const char *extraTextFormatInfo = "\001\001\004\241!!\000"; |
||||
#endif // GPBOBJC_SKIP_MESSAGE_TEXTFORMAT_EXTRAS |
||||
descriptor = [GPBDescriptor allocDescriptorForClass:[GPBAny class] |
||||
rootClass:[GPBAnyRoot class] |
||||
file:GPBAnyRoot_FileDescriptor() |
||||
fields:fields |
||||
fieldCount:sizeof(fields) / sizeof(GPBMessageFieldDescription) |
||||
oneofs:NULL |
||||
oneofCount:0 |
||||
enums:NULL |
||||
enumCount:0 |
||||
ranges:NULL |
||||
rangeCount:0 |
||||
storageSize:sizeof(GPBAny_Storage) |
||||
wireFormat:NO |
||||
extraTextFormatInfo:extraTextFormatInfo]; |
||||
} |
||||
return descriptor; |
||||
} |
||||
|
||||
@end |
||||
|
||||
|
||||
// @@protoc_insertion_point(global_scope) |
@ -0,0 +1,121 @@ |
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: google/protobuf/api.proto
|
||||
|
||||
#import "GPBProtocolBuffers.h" |
||||
|
||||
#if GOOGLE_PROTOBUF_OBJC_GEN_VERSION != 30000 |
||||
#error This file was generated by a different version of protoc-gen-objc which is incompatible with your Protocol Buffer sources. |
||||
#endif |
||||
|
||||
// @@protoc_insertion_point(imports)
|
||||
|
||||
CF_EXTERN_C_BEGIN |
||||
|
||||
@class GPBSourceContext; |
||||
|
||||
|
||||
#pragma mark - GPBApiRoot |
||||
|
||||
@interface GPBApiRoot : GPBRootObject |
||||
|
||||
// The base class provides:
|
||||
// + (GPBExtensionRegistry *)extensionRegistry;
|
||||
// which is an GPBExtensionRegistry that includes all the extensions defined by
|
||||
// this file and all files that it depends on.
|
||||
|
||||
@end |
||||
|
||||
#pragma mark - GPBApi |
||||
|
||||
typedef GPB_ENUM(GPBApi_FieldNumber) { |
||||
GPBApi_FieldNumber_Name = 1, |
||||
GPBApi_FieldNumber_MethodsArray = 2, |
||||
GPBApi_FieldNumber_OptionsArray = 3, |
||||
GPBApi_FieldNumber_Version = 4, |
||||
GPBApi_FieldNumber_SourceContext = 5, |
||||
}; |
||||
|
||||
// Api is a light-weight descriptor for a protocol buffer service.
|
||||
@interface GPBApi : GPBMessage |
||||
|
||||
// The fully qualified name of this api, including package name
|
||||
// followed by the api's simple name.
|
||||
@property(nonatomic, readwrite, copy) NSString *name; |
||||
|
||||
// The methods of this api, in unspecified order.
|
||||
// |methodsArray| contains |GPBMethod|
|
||||
@property(nonatomic, readwrite, strong) NSMutableArray *methodsArray; |
||||
|
||||
// Any metadata attached to the API.
|
||||
// |optionsArray| contains |GPBOption|
|
||||
@property(nonatomic, readwrite, strong) NSMutableArray *optionsArray; |
||||
|
||||
// A version string for this api. If specified, must have the form
|
||||
// `major-version.minor-version`, as in `1.10`. If the minor version
|
||||
// is omitted, it defaults to zero. If the entire version field is
|
||||
// empty, the major version is derived from the package name, as
|
||||
// outlined below. If the field is not empty, the version in the
|
||||
// package name will be verified to be consistent with what is
|
||||
// provided here.
|
||||
//
|
||||
// The versioning schema uses [semantic
|
||||
// versioning](http://semver.org) where the major version number
|
||||
// indicates a breaking change and the minor version an additive,
|
||||
// non-breaking change. Both version numbers are signals to users
|
||||
// what to expect from different versions, and should be carefully
|
||||
// chosen based on the product plan.
|
||||
//
|
||||
// The major version is also reflected in the package name of the
|
||||
// API, which must end in `v<major-version>`, as in
|
||||
// `google.feature.v1`. For major versions 0 and 1, the suffix can
|
||||
// be omitted. Zero major versions must only be used for
|
||||
// experimental, none-GA apis.
|
||||
//
|
||||
// See also: [design doc](http://go/api-versioning).
|
||||
@property(nonatomic, readwrite, copy) NSString *version; |
||||
|
||||
// Source context for the protocol buffer service represented by this
|
||||
// message.
|
||||
@property(nonatomic, readwrite) BOOL hasSourceContext; |
||||
@property(nonatomic, readwrite, strong) GPBSourceContext *sourceContext; |
||||
|
||||
@end |
||||
|
||||
#pragma mark - GPBMethod |
||||
|
||||
typedef GPB_ENUM(GPBMethod_FieldNumber) { |
||||
GPBMethod_FieldNumber_Name = 1, |
||||
GPBMethod_FieldNumber_RequestTypeURL = 2, |
||||
GPBMethod_FieldNumber_RequestStreaming = 3, |
||||
GPBMethod_FieldNumber_ResponseTypeURL = 4, |
||||
GPBMethod_FieldNumber_ResponseStreaming = 5, |
||||
GPBMethod_FieldNumber_OptionsArray = 6, |
||||
}; |
||||
|
||||
// Method represents a method of an api.
|
||||
@interface GPBMethod : GPBMessage |
||||
|
||||
// The simple name of this method.
|
||||
@property(nonatomic, readwrite, copy) NSString *name; |
||||
|
||||
// A URL of the input message type.
|
||||
@property(nonatomic, readwrite, copy) NSString *requestTypeURL; |
||||
|
||||
// If true, the request is streamed.
|
||||
@property(nonatomic, readwrite) BOOL requestStreaming; |
||||
|
||||
// The URL of the output message type.
|
||||
@property(nonatomic, readwrite, copy) NSString *responseTypeURL; |
||||
|
||||
// If true, the response is streamed.
|
||||
@property(nonatomic, readwrite) BOOL responseStreaming; |
||||
|
||||
// Any metadata attached to the method.
|
||||
// |optionsArray| contains |GPBOption|
|
||||
@property(nonatomic, readwrite, strong) NSMutableArray *optionsArray; |
||||
|
||||
@end |
||||
|
||||
CF_EXTERN_C_END |
||||
|
||||
// @@protoc_insertion_point(global_scope)
|
@ -0,0 +1,262 @@ |
||||
// Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
// source: google/protobuf/api.proto |
||||
|
||||
#import "GPBProtocolBuffers_RuntimeSupport.h" |
||||
#import "google/protobuf/Api.pbobjc.h" |
||||
#import "google/protobuf/SourceContext.pbobjc.h" |
||||
#import "google/protobuf/Type.pbobjc.h" |
||||
// @@protoc_insertion_point(imports) |
||||
|
||||
#pragma mark - GPBApiRoot |
||||
|
||||
@implementation GPBApiRoot |
||||
|
||||
+ (GPBExtensionRegistry*)extensionRegistry { |
||||
// This is called by +initialize so there is no need to worry |
||||
// about thread safety and initialization of registry. |
||||
static GPBExtensionRegistry* registry = nil; |
||||
if (!registry) { |
||||
registry = [[GPBExtensionRegistry alloc] init]; |
||||
static GPBExtensionDescription descriptions[] = { |
||||
}; |
||||
#pragma unused (descriptions) |
||||
[registry addExtensions:[GPBSourceContextRoot extensionRegistry]]; |
||||
[registry addExtensions:[GPBTypeRoot extensionRegistry]]; |
||||
} |
||||
return registry; |
||||
} |
||||
|
||||
@end |
||||
|
||||
static GPBFileDescriptor *GPBApiRoot_FileDescriptor(void) { |
||||
// This is called by +initialize so there is no need to worry |
||||
// about thread safety of the singleton. |
||||
static GPBFileDescriptor *descriptor = NULL; |
||||
if (!descriptor) { |
||||
descriptor = [[GPBFileDescriptor alloc] initWithPackage:@"google.protobuf" |
||||
syntax:GPBFileSyntaxProto3]; |
||||
} |
||||
return descriptor; |
||||
} |
||||
|
||||
#pragma mark - GPBApi |
||||
|
||||
@implementation GPBApi |
||||
|
||||
@dynamic name; |
||||
@dynamic methodsArray; |
||||
@dynamic optionsArray; |
||||
@dynamic version; |
||||
@dynamic hasSourceContext, sourceContext; |
||||
|
||||
typedef struct GPBApi_Storage { |
||||
uint32_t _has_storage_[1]; |
||||
NSString *name; |
||||
NSMutableArray *methodsArray; |
||||
NSMutableArray *optionsArray; |
||||
NSString *version; |
||||
GPBSourceContext *sourceContext; |
||||
} GPBApi_Storage; |
||||
|
||||
// This method is threadsafe because it is initially called |
||||
// in +initialize for each subclass. |
||||
+ (GPBDescriptor *)descriptor { |
||||
static GPBDescriptor *descriptor = NULL; |
||||
if (!descriptor) { |
||||
static GPBMessageFieldDescription fields[] = { |
||||
{ |
||||
.name = "name", |
||||
.number = GPBApi_FieldNumber_Name, |
||||
.hasIndex = 0, |
||||
.flags = GPBFieldOptional, |
||||
.type = GPBTypeString, |
||||
.offset = offsetof(GPBApi_Storage, name), |
||||
.defaultValue.valueString = nil, |
||||
.typeSpecific.className = NULL, |
||||
.fieldOptions = NULL, |
||||
}, |
||||
{ |
||||
.name = "methodsArray", |
||||
.number = GPBApi_FieldNumber_MethodsArray, |
||||
.hasIndex = GPBNoHasBit, |
||||
.flags = GPBFieldRepeated, |
||||
.type = GPBTypeMessage, |
||||
.offset = offsetof(GPBApi_Storage, methodsArray), |
||||
.defaultValue.valueMessage = nil, |
||||
.typeSpecific.className = GPBStringifySymbol(GPBMethod), |
||||
.fieldOptions = NULL, |
||||
}, |
||||
{ |
||||
.name = "optionsArray", |
||||
.number = GPBApi_FieldNumber_OptionsArray, |
||||
.hasIndex = GPBNoHasBit, |
||||
.flags = GPBFieldRepeated, |
||||
.type = GPBTypeMessage, |
||||
.offset = offsetof(GPBApi_Storage, optionsArray), |
||||
.defaultValue.valueMessage = nil, |
||||
.typeSpecific.className = GPBStringifySymbol(GPBOption), |
||||
.fieldOptions = NULL, |
||||
}, |
||||
{ |
||||
.name = "version", |
||||
.number = GPBApi_FieldNumber_Version, |
||||
.hasIndex = 3, |
||||
.flags = GPBFieldOptional, |
||||
.type = GPBTypeString, |
||||
.offset = offsetof(GPBApi_Storage, version), |
||||
.defaultValue.valueString = nil, |
||||
.typeSpecific.className = NULL, |
||||
.fieldOptions = NULL, |
||||
}, |
||||
{ |
||||
.name = "sourceContext", |
||||
.number = GPBApi_FieldNumber_SourceContext, |
||||
.hasIndex = 4, |
||||
.flags = GPBFieldOptional, |
||||
.type = GPBTypeMessage, |
||||
.offset = offsetof(GPBApi_Storage, sourceContext), |
||||
.defaultValue.valueMessage = nil, |
||||
.typeSpecific.className = GPBStringifySymbol(GPBSourceContext), |
||||
.fieldOptions = NULL, |
||||
}, |
||||
}; |
||||
descriptor = [GPBDescriptor allocDescriptorForClass:[GPBApi class] |
||||
rootClass:[GPBApiRoot class] |
||||
file:GPBApiRoot_FileDescriptor() |
||||
fields:fields |
||||
fieldCount:sizeof(fields) / sizeof(GPBMessageFieldDescription) |
||||
oneofs:NULL |
||||
oneofCount:0 |
||||
enums:NULL |
||||
enumCount:0 |
||||
ranges:NULL |
||||
rangeCount:0 |
||||
storageSize:sizeof(GPBApi_Storage) |
||||
wireFormat:NO]; |
||||
} |
||||
return descriptor; |
||||
} |
||||
|
||||
@end |
||||
|
||||
#pragma mark - GPBMethod |
||||
|
||||
@implementation GPBMethod |
||||
|
||||
@dynamic name; |
||||
@dynamic requestTypeURL; |
||||
@dynamic requestStreaming; |
||||
@dynamic responseTypeURL; |
||||
@dynamic responseStreaming; |
||||
@dynamic optionsArray; |
||||
|
||||
typedef struct GPBMethod_Storage { |
||||
uint32_t _has_storage_[1]; |
||||
BOOL requestStreaming; |
||||
BOOL responseStreaming; |
||||
NSString *name; |
||||
NSString *requestTypeURL; |
||||
NSString *responseTypeURL; |
||||
NSMutableArray *optionsArray; |
||||
} GPBMethod_Storage; |
||||
|
||||
// This method is threadsafe because it is initially called |
||||
// in +initialize for each subclass. |
||||
+ (GPBDescriptor *)descriptor { |
||||
static GPBDescriptor *descriptor = NULL; |
||||
if (!descriptor) { |
||||
static GPBMessageFieldDescription fields[] = { |
||||
{ |
||||
.name = "name", |
||||
.number = GPBMethod_FieldNumber_Name, |
||||
.hasIndex = 0, |
||||
.flags = GPBFieldOptional, |
||||
.type = GPBTypeString, |
||||
.offset = offsetof(GPBMethod_Storage, name), |
||||
.defaultValue.valueString = nil, |
||||
.typeSpecific.className = NULL, |
||||
.fieldOptions = NULL, |
||||
}, |
||||
{ |
||||
.name = "requestTypeURL", |
||||
.number = GPBMethod_FieldNumber_RequestTypeURL, |
||||
.hasIndex = 1, |
||||
.flags = GPBFieldOptional | GPBFieldTextFormatNameCustom, |
||||
.type = GPBTypeString, |
||||
.offset = offsetof(GPBMethod_Storage, requestTypeURL), |
||||
.defaultValue.valueString = nil, |
||||
.typeSpecific.className = NULL, |
||||
.fieldOptions = NULL, |
||||
}, |
||||
{ |
||||
.name = "requestStreaming", |
||||
.number = GPBMethod_FieldNumber_RequestStreaming, |
||||
.hasIndex = 2, |
||||
.flags = GPBFieldOptional, |
||||
.type = GPBTypeBool, |
||||
.offset = offsetof(GPBMethod_Storage, requestStreaming), |
||||
.defaultValue.valueBool = NO, |
||||
.typeSpecific.className = NULL, |
||||
.fieldOptions = NULL, |
||||
}, |
||||
{ |
||||
.name = "responseTypeURL", |
||||
.number = GPBMethod_FieldNumber_ResponseTypeURL, |
||||
.hasIndex = 3, |
||||
.flags = GPBFieldOptional | GPBFieldTextFormatNameCustom, |
||||
.type = GPBTypeString, |
||||
.offset = offsetof(GPBMethod_Storage, responseTypeURL), |
||||
.defaultValue.valueString = nil, |
||||
.typeSpecific.className = NULL, |
||||
.fieldOptions = NULL, |
||||
}, |
||||
{ |
||||
.name = "responseStreaming", |
||||
.number = GPBMethod_FieldNumber_ResponseStreaming, |
||||
.hasIndex = 4, |
||||
.flags = GPBFieldOptional, |
||||
.type = GPBTypeBool, |
||||
.offset = offsetof(GPBMethod_Storage, responseStreaming), |
||||
.defaultValue.valueBool = NO, |
||||
.typeSpecific.className = NULL, |
||||
.fieldOptions = NULL, |
||||
}, |
||||
{ |
||||
.name = "optionsArray", |
||||
.number = GPBMethod_FieldNumber_OptionsArray, |
||||
.hasIndex = GPBNoHasBit, |
||||
.flags = GPBFieldRepeated, |
||||
.type = GPBTypeMessage, |
||||
.offset = offsetof(GPBMethod_Storage, optionsArray), |
||||
.defaultValue.valueMessage = nil, |
||||
.typeSpecific.className = GPBStringifySymbol(GPBOption), |
||||
.fieldOptions = NULL, |
||||
}, |
||||
}; |
||||
#if GPBOBJC_SKIP_MESSAGE_TEXTFORMAT_EXTRAS |
||||
const char *extraTextFormatInfo = NULL; |
||||
#else |
||||
static const char *extraTextFormatInfo = "\002\002\007\244\241!!\000\004\010\244\241!!\000"; |
||||
#endif // GPBOBJC_SKIP_MESSAGE_TEXTFORMAT_EXTRAS |
||||
descriptor = [GPBDescriptor allocDescriptorForClass:[GPBMethod class] |
||||
rootClass:[GPBApiRoot class] |
||||
file:GPBApiRoot_FileDescriptor() |
||||
fields:fields |
||||
fieldCount:sizeof(fields) / sizeof(GPBMessageFieldDescription) |
||||
oneofs:NULL |
||||
oneofCount:0 |
||||
enums:NULL |
||||
enumCount:0 |
||||
ranges:NULL |
||||
rangeCount:0 |
||||
storageSize:sizeof(GPBMethod_Storage) |
||||
wireFormat:NO |
||||
extraTextFormatInfo:extraTextFormatInfo]; |
||||
} |
||||
return descriptor; |
||||
} |
||||
|
||||
@end |
||||
|
||||
|
||||
// @@protoc_insertion_point(global_scope) |
@ -0,0 +1,41 @@ |
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: google/protobuf/empty.proto
|
||||
|
||||
#import "GPBProtocolBuffers.h" |
||||
|
||||
#if GOOGLE_PROTOBUF_OBJC_GEN_VERSION != 30000 |
||||
#error This file was generated by a different version of protoc-gen-objc which is incompatible with your Protocol Buffer sources. |
||||
#endif |
||||
|
||||
// @@protoc_insertion_point(imports)
|
||||
|
||||
CF_EXTERN_C_BEGIN |
||||
|
||||
|
||||
#pragma mark - GPBEmptyRoot |
||||
|
||||
@interface GPBEmptyRoot : GPBRootObject |
||||
|
||||
// The base class provides:
|
||||
// + (GPBExtensionRegistry *)extensionRegistry;
|
||||
// which is an GPBExtensionRegistry that includes all the extensions defined by
|
||||
// this file and all files that it depends on.
|
||||
|
||||
@end |
||||
|
||||
#pragma mark - GPBEmpty |
||||
|
||||
// A generic empty message that you can re-use to avoid defining duplicated
|
||||
// empty messages in your APIs. A typical example is to use it as the request
|
||||
// or the response type of an API method. For instance:
|
||||
//
|
||||
// service Foo {
|
||||
// rpc Bar(google.protobuf.Empty) returns (google.protobuf.Empty);
|
||||
// }
|
||||
@interface GPBEmpty : GPBMessage |
||||
|
||||
@end |
||||
|
||||
CF_EXTERN_C_END |
||||
|
||||
// @@protoc_insertion_point(global_scope)
|
@ -0,0 +1,61 @@ |
||||
// Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
// source: google/protobuf/empty.proto |
||||
|
||||
#import "GPBProtocolBuffers_RuntimeSupport.h" |
||||
#import "google/protobuf/Empty.pbobjc.h" |
||||
// @@protoc_insertion_point(imports) |
||||
|
||||
#pragma mark - GPBEmptyRoot |
||||
|
||||
@implementation GPBEmptyRoot |
||||
|
||||
@end |
||||
|
||||
static GPBFileDescriptor *GPBEmptyRoot_FileDescriptor(void) { |
||||
// This is called by +initialize so there is no need to worry |
||||
// about thread safety of the singleton. |
||||
static GPBFileDescriptor *descriptor = NULL; |
||||
if (!descriptor) { |
||||
descriptor = [[GPBFileDescriptor alloc] initWithPackage:@"google.protobuf" |
||||
syntax:GPBFileSyntaxProto3]; |
||||
} |
||||
return descriptor; |
||||
} |
||||
|
||||
#pragma mark - GPBEmpty |
||||
|
||||
@implementation GPBEmpty |
||||
|
||||
|
||||
typedef struct GPBEmpty_Storage { |
||||
uint32_t _has_storage_[0]; |
||||
} GPBEmpty_Storage; |
||||
|
||||
// This method is threadsafe because it is initially called |
||||
// in +initialize for each subclass. |
||||
+ (GPBDescriptor *)descriptor { |
||||
static GPBDescriptor *descriptor = NULL; |
||||
if (!descriptor) { |
||||
static GPBMessageFieldDescription fields[] = { |
||||
}; |
||||
descriptor = [GPBDescriptor allocDescriptorForClass:[GPBEmpty class] |
||||
rootClass:[GPBEmptyRoot class] |
||||
file:GPBEmptyRoot_FileDescriptor() |
||||
fields:fields |
||||
fieldCount:sizeof(fields) / sizeof(GPBMessageFieldDescription) |
||||
oneofs:NULL |
||||
oneofCount:0 |
||||
enums:NULL |
||||
enumCount:0 |
||||
ranges:NULL |
||||
rangeCount:0 |
||||
storageSize:sizeof(GPBEmpty_Storage) |
||||
wireFormat:NO]; |
||||
} |
||||
return descriptor; |
||||
} |
||||
|
||||
@end |
||||
|
||||
|
||||
// @@protoc_insertion_point(global_scope) |
@ -0,0 +1,160 @@ |
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: google/protobuf/field_mask.proto
|
||||
|
||||
#import "GPBProtocolBuffers.h" |
||||
|
||||
#if GOOGLE_PROTOBUF_OBJC_GEN_VERSION != 30000 |
||||
#error This file was generated by a different version of protoc-gen-objc which is incompatible with your Protocol Buffer sources. |
||||
#endif |
||||
|
||||
// @@protoc_insertion_point(imports)
|
||||
|
||||
CF_EXTERN_C_BEGIN |
||||
|
||||
|
||||
#pragma mark - GPBFieldMaskRoot |
||||
|
||||
@interface GPBFieldMaskRoot : GPBRootObject |
||||
|
||||
// The base class provides:
|
||||
// + (GPBExtensionRegistry *)extensionRegistry;
|
||||
// which is an GPBExtensionRegistry that includes all the extensions defined by
|
||||
// this file and all files that it depends on.
|
||||
|
||||
@end |
||||
|
||||
#pragma mark - GPBFieldMask |
||||
|
||||
typedef GPB_ENUM(GPBFieldMask_FieldNumber) { |
||||
GPBFieldMask_FieldNumber_PathsArray = 1, |
||||
}; |
||||
|
||||
// `FieldMask` represents a set of symbolic field paths, for example:
|
||||
//
|
||||
// paths: "f.a"
|
||||
// paths: "f.b.d"
|
||||
//
|
||||
// Here `f` represents a field in some root message, `a` and `b`
|
||||
// fields in the message found in `f`, and `d` a field found in the
|
||||
// message in `f.b`.
|
||||
//
|
||||
// Field masks are used to specify a subset of fields that should be
|
||||
// returned by a get operation or modified by an update operation.
|
||||
// Field masks also have a custom JSON encoding (see below).
|
||||
//
|
||||
// # Field Masks in Projections
|
||||
// When used in the context of a projection, a response message or
|
||||
// sub-message is filtered by the API to only contain those fields as
|
||||
// specified in the mask. For example, if the mask in the previous
|
||||
// example is applied to a response message as follows:
|
||||
//
|
||||
// f {
|
||||
// a : 22
|
||||
// b {
|
||||
// d : 1
|
||||
// x : 2
|
||||
// }
|
||||
// y : 13
|
||||
// }
|
||||
// z: 8
|
||||
//
|
||||
// The result will not contain specific values for fields x,y and z
|
||||
// (there value will be set to the default, and omitted in proto text
|
||||
// output):
|
||||
//
|
||||
//
|
||||
// f {
|
||||
// a : 22
|
||||
// b {
|
||||
// d : 1
|
||||
// }
|
||||
// }
|
||||
//
|
||||
// A repeated field is not allowed except at the last position of a
|
||||
// field mask.
|
||||
//
|
||||
// If a FieldMask object is not present in a get operation, the
|
||||
// operation applies to all fields (as if a FieldMask of all fields
|
||||
// had been specified).
|
||||
//
|
||||
// Note that a field mask does not necessarily applies to the
|
||||
// top-level response message. In case of a REST get operation, the
|
||||
// field mask applies directly to the response, but in case of a REST
|
||||
// list operation, the mask instead applies to each individual message
|
||||
// in the returned resource list. In case of a REST custom method,
|
||||
// other definitions may be used. Where the mask applies will be
|
||||
// clearly documented together with its declaration in the API. In
|
||||
// any case, the effect on the returned resource/resources is required
|
||||
// behavior for APIs.
|
||||
//
|
||||
// # Field Masks in Update Operations
|
||||
// A field mask in update operations specifies which fields of the
|
||||
// targeted resource are going to be updated. The API is required
|
||||
// to only change the values of the fields as specified in the mask
|
||||
// and leave the others untouched. If a resource is passed in to
|
||||
// describe the updated values, the API ignores the values of all
|
||||
// fields not covered by the mask.
|
||||
//
|
||||
// In order to reset a field's value to the default, the field must
|
||||
// be in the mask and set to the default value in the provided resource.
|
||||
// Hence, in order to reset all fields of a resource, provide a default
|
||||
// instance of the resource and set all fields in the mask, or do
|
||||
// not provide a mask as described below.
|
||||
//
|
||||
// If a field mask is not present on update, the operation applies to
|
||||
// all fields (as if a field mask of all fields has been specified).
|
||||
// Note that in the presence of schema evolution, this may mean that
|
||||
// fields the client does not know and has therefore not filled into
|
||||
// the request will be reset to their default. If this is unwanted
|
||||
// behavior, a specific service may require a client to always specify
|
||||
// a field mask, producing an error if not.
|
||||
//
|
||||
// As with get operations, the location of the resource which
|
||||
// describes the updated values in the request message depends on the
|
||||
// operation kind. In any case, the effect of the field mask is
|
||||
// required to be honored by the API.
|
||||
//
|
||||
// ## Considerations for HTTP REST
|
||||
// The HTTP kind of an update operation which uses a field mask must
|
||||
// be set to PATCH instead of PUT in order to satisfy HTTP semantics
|
||||
// (PUT must only be used for full updates).
|
||||
//
|
||||
// # JSON Encoding of Field Masks
|
||||
// In JSON, a field mask is encoded as a single string where paths are
|
||||
// separated by a comma. Fields name in each path are converted
|
||||
// to/from lower-camel naming conventions.
|
||||
//
|
||||
// As an example, consider the following message declarations:
|
||||
//
|
||||
// message Profile {
|
||||
// User user = 1;
|
||||
// Photo photo = 2;
|
||||
// }
|
||||
// message User {
|
||||
// string display_name = 1;
|
||||
// string address = 2;
|
||||
// }
|
||||
//
|
||||
// In proto a field mask for `Profile` may look as such:
|
||||
//
|
||||
// mask {
|
||||
// paths: "user.display_name"
|
||||
// paths: "photo"
|
||||
// }
|
||||
//
|
||||
// In JSON, the same mask is represented as below:
|
||||
//
|
||||
// {
|
||||
// mask: "user.displayName,photo"
|
||||
// }
|
||||
@interface GPBFieldMask : GPBMessage |
||||
|
||||
// The set of field mask paths.
|
||||
// |pathsArray| contains |NSString|
|
||||
@property(nonatomic, readwrite, strong) NSMutableArray *pathsArray; |
||||
|
||||
@end |
||||
|
||||
CF_EXTERN_C_END |
||||
|
||||
// @@protoc_insertion_point(global_scope)
|
@ -0,0 +1,74 @@ |
||||
// Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
// source: google/protobuf/field_mask.proto |
||||
|
||||
#import "GPBProtocolBuffers_RuntimeSupport.h" |
||||
#import "google/protobuf/FieldMask.pbobjc.h" |
||||
// @@protoc_insertion_point(imports) |
||||
|
||||
#pragma mark - GPBFieldMaskRoot |
||||
|
||||
@implementation GPBFieldMaskRoot |
||||
|
||||
@end |
||||
|
||||
static GPBFileDescriptor *GPBFieldMaskRoot_FileDescriptor(void) { |
||||
// This is called by +initialize so there is no need to worry |
||||
// about thread safety of the singleton. |
||||
static GPBFileDescriptor *descriptor = NULL; |
||||
if (!descriptor) { |
||||
descriptor = [[GPBFileDescriptor alloc] initWithPackage:@"google.protobuf" |
||||
syntax:GPBFileSyntaxProto3]; |
||||
} |
||||
return descriptor; |
||||
} |
||||
|
||||
#pragma mark - GPBFieldMask |
||||
|
||||
@implementation GPBFieldMask |
||||
|
||||
@dynamic pathsArray; |
||||
|
||||
typedef struct GPBFieldMask_Storage { |
||||
uint32_t _has_storage_[1]; |
||||
NSMutableArray *pathsArray; |
||||
} GPBFieldMask_Storage; |
||||
|
||||
// This method is threadsafe because it is initially called |
||||
// in +initialize for each subclass. |
||||
+ (GPBDescriptor *)descriptor { |
||||
static GPBDescriptor *descriptor = NULL; |
||||
if (!descriptor) { |
||||
static GPBMessageFieldDescription fields[] = { |
||||
{ |
||||
.name = "pathsArray", |
||||
.number = GPBFieldMask_FieldNumber_PathsArray, |
||||
.hasIndex = GPBNoHasBit, |
||||
.flags = GPBFieldRepeated, |
||||
.type = GPBTypeString, |
||||
.offset = offsetof(GPBFieldMask_Storage, pathsArray), |
||||
.defaultValue.valueMessage = nil, |
||||
.typeSpecific.className = NULL, |
||||
.fieldOptions = NULL, |
||||
}, |
||||
}; |
||||
descriptor = [GPBDescriptor allocDescriptorForClass:[GPBFieldMask class] |
||||
rootClass:[GPBFieldMaskRoot class] |
||||
file:GPBFieldMaskRoot_FileDescriptor() |
||||
fields:fields |
||||
fieldCount:sizeof(fields) / sizeof(GPBMessageFieldDescription) |
||||
oneofs:NULL |
||||
oneofCount:0 |
||||
enums:NULL |
||||
enumCount:0 |
||||
ranges:NULL |
||||
rangeCount:0 |
||||
storageSize:sizeof(GPBFieldMask_Storage) |
||||
wireFormat:NO]; |
||||
} |
||||
return descriptor; |
||||
} |
||||
|
||||
@end |
||||
|
||||
|
||||
// @@protoc_insertion_point(global_scope) |
@ -0,0 +1,44 @@ |
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: google/protobuf/source_context.proto
|
||||
|
||||
#import "GPBProtocolBuffers.h" |
||||
|
||||
#if GOOGLE_PROTOBUF_OBJC_GEN_VERSION != 30000 |
||||
#error This file was generated by a different version of protoc-gen-objc which is incompatible with your Protocol Buffer sources. |
||||
#endif |
||||
|
||||
// @@protoc_insertion_point(imports)
|
||||
|
||||
CF_EXTERN_C_BEGIN |
||||
|
||||
|
||||
#pragma mark - GPBSourceContextRoot |
||||
|
||||
@interface GPBSourceContextRoot : GPBRootObject |
||||
|
||||
// The base class provides:
|
||||
// + (GPBExtensionRegistry *)extensionRegistry;
|
||||
// which is an GPBExtensionRegistry that includes all the extensions defined by
|
||||
// this file and all files that it depends on.
|
||||
|
||||
@end |
||||
|
||||
#pragma mark - GPBSourceContext |
||||
|
||||
typedef GPB_ENUM(GPBSourceContext_FieldNumber) { |
||||
GPBSourceContext_FieldNumber_FileName = 1, |
||||
}; |
||||
|
||||
// `SourceContext` represents information about the source of a
|
||||
// protobuf element, like the file in which it is defined.
|
||||
@interface GPBSourceContext : GPBMessage |
||||
|
||||
// The path-qualified name of the .proto file that contained the associated
|
||||
// protobuf element. For example: `"google/protobuf/source.proto"`.
|
||||
@property(nonatomic, readwrite, copy) NSString *fileName; |
||||
|
||||
@end |
||||
|
||||
CF_EXTERN_C_END |
||||
|
||||
// @@protoc_insertion_point(global_scope)
|
@ -0,0 +1,74 @@ |
||||
// Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
// source: google/protobuf/source_context.proto |
||||
|
||||
#import "GPBProtocolBuffers_RuntimeSupport.h" |
||||
#import "google/protobuf/SourceContext.pbobjc.h" |
||||
// @@protoc_insertion_point(imports) |
||||
|
||||
#pragma mark - GPBSourceContextRoot |
||||
|
||||
@implementation GPBSourceContextRoot |
||||
|
||||
@end |
||||
|
||||
static GPBFileDescriptor *GPBSourceContextRoot_FileDescriptor(void) { |
||||
// This is called by +initialize so there is no need to worry |
||||
// about thread safety of the singleton. |
||||
static GPBFileDescriptor *descriptor = NULL; |
||||
if (!descriptor) { |
||||
descriptor = [[GPBFileDescriptor alloc] initWithPackage:@"google.protobuf" |
||||
syntax:GPBFileSyntaxProto3]; |
||||
} |
||||
return descriptor; |
||||
} |
||||
|
||||
#pragma mark - GPBSourceContext |
||||
|
||||
@implementation GPBSourceContext |
||||
|
||||
@dynamic fileName; |
||||
|
||||
typedef struct GPBSourceContext_Storage { |
||||
uint32_t _has_storage_[1]; |
||||
NSString *fileName; |
||||
} GPBSourceContext_Storage; |
||||
|
||||
// This method is threadsafe because it is initially called |
||||
// in +initialize for each subclass. |
||||
+ (GPBDescriptor *)descriptor { |
||||
static GPBDescriptor *descriptor = NULL; |
||||
if (!descriptor) { |
||||
static GPBMessageFieldDescription fields[] = { |
||||
{ |
||||
.name = "fileName", |
||||
.number = GPBSourceContext_FieldNumber_FileName, |
||||
.hasIndex = 0, |
||||
.flags = GPBFieldOptional, |
||||
.type = GPBTypeString, |
||||
.offset = offsetof(GPBSourceContext_Storage, fileName), |
||||
.defaultValue.valueString = nil, |
||||
.typeSpecific.className = NULL, |
||||
.fieldOptions = NULL, |
||||
}, |
||||
}; |
||||
descriptor = [GPBDescriptor allocDescriptorForClass:[GPBSourceContext class] |
||||
rootClass:[GPBSourceContextRoot class] |
||||
file:GPBSourceContextRoot_FileDescriptor() |
||||
fields:fields |
||||
fieldCount:sizeof(fields) / sizeof(GPBMessageFieldDescription) |
||||
oneofs:NULL |
||||
oneofCount:0 |
||||
enums:NULL |
||||
enumCount:0 |
||||
ranges:NULL |
||||
rangeCount:0 |
||||
storageSize:sizeof(GPBSourceContext_Storage) |
||||
wireFormat:NO]; |
||||
} |
||||
return descriptor; |
||||
} |
||||
|
||||
@end |
||||
|
||||
|
||||
// @@protoc_insertion_point(global_scope) |
@ -0,0 +1,134 @@ |
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: google/protobuf/struct.proto
|
||||
|
||||
#import "GPBProtocolBuffers.h" |
||||
|
||||
#if GOOGLE_PROTOBUF_OBJC_GEN_VERSION != 30000 |
||||
#error This file was generated by a different version of protoc-gen-objc which is incompatible with your Protocol Buffer sources. |
||||
#endif |
||||
|
||||
// @@protoc_insertion_point(imports)
|
||||
|
||||
CF_EXTERN_C_BEGIN |
||||
|
||||
@class GPBListValue; |
||||
@class GPBStruct; |
||||
|
||||
#pragma mark - Enum GPBNullValue |
||||
|
||||
// `NullValue` is a singleton enumeration to represent the null
|
||||
// value for the `Value` type union.
|
||||
typedef GPB_ENUM(GPBNullValue) { |
||||
GPBNullValue_GPBUnrecognizedEnumeratorValue = kGPBUnrecognizedEnumeratorValue, |
||||
// Null value.
|
||||
GPBNullValue_NullValue = 0, |
||||
}; |
||||
|
||||
GPBEnumDescriptor *GPBNullValue_EnumDescriptor(void); |
||||
|
||||
BOOL GPBNullValue_IsValidValue(int32_t value); |
||||
|
||||
|
||||
#pragma mark - GPBStructRoot |
||||
|
||||
@interface GPBStructRoot : GPBRootObject |
||||
|
||||
// The base class provides:
|
||||
// + (GPBExtensionRegistry *)extensionRegistry;
|
||||
// which is an GPBExtensionRegistry that includes all the extensions defined by
|
||||
// this file and all files that it depends on.
|
||||
|
||||
@end |
||||
|
||||
#pragma mark - GPBStruct |
||||
|
||||
typedef GPB_ENUM(GPBStruct_FieldNumber) { |
||||
GPBStruct_FieldNumber_Fields = 1, |
||||
}; |
||||
|
||||
// `Struct` represents a structured data value, consisting of fields
|
||||
// which map to dynamically typed values. In some languages, `Struct`
|
||||
// might be supported by a native representation. For example, in
|
||||
// scripting languages like JS a struct is represented as an
|
||||
// object. The details of that representation are described together
|
||||
// with the proto support for the language.
|
||||
@interface GPBStruct : GPBMessage |
||||
|
||||
// Map of dynamically typed values.
|
||||
// |fields| values are |GPBValue|
|
||||
@property(nonatomic, readwrite, strong) NSMutableDictionary *fields; |
||||
|
||||
@end |
||||
|
||||
#pragma mark - GPBValue |
||||
|
||||
typedef GPB_ENUM(GPBValue_FieldNumber) { |
||||
GPBValue_FieldNumber_NullValue = 1, |
||||
GPBValue_FieldNumber_NumberValue = 2, |
||||
GPBValue_FieldNumber_StringValue = 3, |
||||
GPBValue_FieldNumber_BoolValue = 4, |
||||
GPBValue_FieldNumber_StructValue = 5, |
||||
GPBValue_FieldNumber_ListValue = 6, |
||||
}; |
||||
|
||||
typedef GPB_ENUM(GPBValue_Kind_OneOfCase) { |
||||
GPBValue_Kind_OneOfCase_GPBUnsetOneOfCase = 0, |
||||
GPBValue_Kind_OneOfCase_NullValue = 1, |
||||
GPBValue_Kind_OneOfCase_NumberValue = 2, |
||||
GPBValue_Kind_OneOfCase_StringValue = 3, |
||||
GPBValue_Kind_OneOfCase_BoolValue = 4, |
||||
GPBValue_Kind_OneOfCase_StructValue = 5, |
||||
GPBValue_Kind_OneOfCase_ListValue = 6, |
||||
}; |
||||
|
||||
// `Value` represents a dynamically typed value which can be either
|
||||
// null, a number, a string, a boolean, a recursive struct value, or a
|
||||
// list of values. A producer of value is expected to set one of that
|
||||
// variants, absence of any variant indicates an error.
|
||||
@interface GPBValue : GPBMessage |
||||
|
||||
@property(nonatomic, readonly) GPBValue_Kind_OneOfCase kindOneOfCase; |
||||
|
||||
// Represents a null value.
|
||||
@property(nonatomic, readwrite) GPBNullValue nullValue; |
||||
|
||||
// Represents a double value.
|
||||
@property(nonatomic, readwrite) double numberValue; |
||||
|
||||
// Represents a string value.
|
||||
@property(nonatomic, readwrite, copy) NSString *stringValue; |
||||
|
||||
// Represents a boolean value.
|
||||
@property(nonatomic, readwrite) BOOL boolValue; |
||||
|
||||
// Represents a structured value.
|
||||
@property(nonatomic, readwrite, strong) GPBStruct *structValue; |
||||
|
||||
// Represents a repeated `Value`.
|
||||
@property(nonatomic, readwrite, strong) GPBListValue *listValue; |
||||
|
||||
@end |
||||
|
||||
int32_t GPBValue_NullValue_RawValue(GPBValue *message); |
||||
void SetGPBValue_NullValue_RawValue(GPBValue *message, int32_t value); |
||||
|
||||
void GPBValue_ClearKindOneOfCase(GPBValue *message); |
||||
|
||||
#pragma mark - GPBListValue |
||||
|
||||
typedef GPB_ENUM(GPBListValue_FieldNumber) { |
||||
GPBListValue_FieldNumber_ValuesArray = 1, |
||||
}; |
||||
|
||||
// `ListValue` is a wrapper around a repeated field of values.
|
||||
@interface GPBListValue : GPBMessage |
||||
|
||||
// Repeated field of dynamically typed values.
|
||||
// |valuesArray| contains |GPBValue|
|
||||
@property(nonatomic, readwrite, strong) NSMutableArray *valuesArray; |
||||
|
||||
@end |
||||
|
||||
CF_EXTERN_C_END |
||||
|
||||
// @@protoc_insertion_point(global_scope)
|
@ -0,0 +1,284 @@ |
||||
// Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
// source: google/protobuf/struct.proto |
||||
|
||||
#import "GPBProtocolBuffers_RuntimeSupport.h" |
||||
#import "google/protobuf/Struct.pbobjc.h" |
||||
// @@protoc_insertion_point(imports) |
||||
|
||||
#pragma mark - GPBStructRoot |
||||
|
||||
@implementation GPBStructRoot |
||||
|
||||
@end |
||||
|
||||
static GPBFileDescriptor *GPBStructRoot_FileDescriptor(void) { |
||||
// This is called by +initialize so there is no need to worry |
||||
// about thread safety of the singleton. |
||||
static GPBFileDescriptor *descriptor = NULL; |
||||
if (!descriptor) { |
||||
descriptor = [[GPBFileDescriptor alloc] initWithPackage:@"google.protobuf" |
||||
syntax:GPBFileSyntaxProto3]; |
||||
} |
||||
return descriptor; |
||||
} |
||||
|
||||
#pragma mark - Enum GPBNullValue |
||||
|
||||
GPBEnumDescriptor *GPBNullValue_EnumDescriptor(void) { |
||||
static GPBEnumDescriptor *descriptor = NULL; |
||||
if (!descriptor) { |
||||
static GPBMessageEnumValueDescription values[] = { |
||||
{ .name = "NullValue", .number = GPBNullValue_NullValue }, |
||||
}; |
||||
descriptor = [GPBEnumDescriptor allocDescriptorForName:GPBNSStringifySymbol(GPBNullValue) |
||||
values:values |
||||
valueCount:sizeof(values) / sizeof(GPBMessageEnumValueDescription) |
||||
enumVerifier:GPBNullValue_IsValidValue]; |
||||
} |
||||
return descriptor; |
||||
} |
||||
|
||||
BOOL GPBNullValue_IsValidValue(int32_t value__) { |
||||
switch (value__) { |
||||
case GPBNullValue_NullValue: |
||||
return YES; |
||||
default: |
||||
return NO; |
||||
} |
||||
} |
||||
|
||||
#pragma mark - GPBStruct |
||||
|
||||
@implementation GPBStruct |
||||
|
||||
@dynamic fields; |
||||
|
||||
typedef struct GPBStruct_Storage { |
||||
uint32_t _has_storage_[1]; |
||||
NSMutableDictionary *fields; |
||||
} GPBStruct_Storage; |
||||
|
||||
// This method is threadsafe because it is initially called |
||||
// in +initialize for each subclass. |
||||
+ (GPBDescriptor *)descriptor { |
||||
static GPBDescriptor *descriptor = NULL; |
||||
if (!descriptor) { |
||||
static GPBMessageFieldDescription fields[] = { |
||||
{ |
||||
.name = "fields", |
||||
.number = GPBStruct_FieldNumber_Fields, |
||||
.hasIndex = GPBNoHasBit, |
||||
.flags = GPBFieldMapKeyString, |
||||
.type = GPBTypeMessage, |
||||
.offset = offsetof(GPBStruct_Storage, fields), |
||||
.defaultValue.valueMessage = nil, |
||||
.typeSpecific.className = GPBStringifySymbol(GPBValue), |
||||
.fieldOptions = NULL, |
||||
}, |
||||
}; |
||||
descriptor = [GPBDescriptor allocDescriptorForClass:[GPBStruct class] |
||||
rootClass:[GPBStructRoot class] |
||||
file:GPBStructRoot_FileDescriptor() |
||||
fields:fields |
||||
fieldCount:sizeof(fields) / sizeof(GPBMessageFieldDescription) |
||||
oneofs:NULL |
||||
oneofCount:0 |
||||
enums:NULL |
||||
enumCount:0 |
||||
ranges:NULL |
||||
rangeCount:0 |
||||
storageSize:sizeof(GPBStruct_Storage) |
||||
wireFormat:NO]; |
||||
} |
||||
return descriptor; |
||||
} |
||||
|
||||
@end |
||||
|
||||
#pragma mark - GPBValue |
||||
|
||||
@implementation GPBValue |
||||
|
||||
@dynamic kindOneOfCase; |
||||
@dynamic nullValue; |
||||
@dynamic numberValue; |
||||
@dynamic stringValue; |
||||
@dynamic boolValue; |
||||
@dynamic structValue; |
||||
@dynamic listValue; |
||||
|
||||
typedef struct GPBValue_Storage { |
||||
uint32_t _has_storage_[2]; |
||||
BOOL boolValue; |
||||
GPBNullValue nullValue; |
||||
NSString *stringValue; |
||||
GPBStruct *structValue; |
||||
GPBListValue *listValue; |
||||
double numberValue; |
||||
} GPBValue_Storage; |
||||
|
||||
// This method is threadsafe because it is initially called |
||||
// in +initialize for each subclass. |
||||
+ (GPBDescriptor *)descriptor { |
||||
static GPBDescriptor *descriptor = NULL; |
||||
if (!descriptor) { |
||||
static GPBMessageOneofDescription oneofs[] = { |
||||
{ |
||||
.name = "kind", |
||||
.index = -1, |
||||
}, |
||||
}; |
||||
static GPBMessageFieldDescription fields[] = { |
||||
{ |
||||
.name = "nullValue", |
||||
.number = GPBValue_FieldNumber_NullValue, |
||||
.hasIndex = -1, |
||||
.flags = GPBFieldOptional | GPBFieldHasEnumDescriptor, |
||||
.type = GPBTypeEnum, |
||||
.offset = offsetof(GPBValue_Storage, nullValue), |
||||
.defaultValue.valueEnum = GPBNullValue_NullValue, |
||||
.typeSpecific.enumDescFunc = GPBNullValue_EnumDescriptor, |
||||
.fieldOptions = NULL, |
||||
}, |
||||
{ |
||||
.name = "numberValue", |
||||
.number = GPBValue_FieldNumber_NumberValue, |
||||
.hasIndex = -1, |
||||
.flags = GPBFieldOptional, |
||||
.type = GPBTypeDouble, |
||||
.offset = offsetof(GPBValue_Storage, numberValue), |
||||
.defaultValue.valueDouble = 0, |
||||
.typeSpecific.className = NULL, |
||||
.fieldOptions = NULL, |
||||
}, |
||||
{ |
||||
.name = "stringValue", |
||||
.number = GPBValue_FieldNumber_StringValue, |
||||
.hasIndex = -1, |
||||
.flags = GPBFieldOptional, |
||||
.type = GPBTypeString, |
||||
.offset = offsetof(GPBValue_Storage, stringValue), |
||||
.defaultValue.valueString = nil, |
||||
.typeSpecific.className = NULL, |
||||
.fieldOptions = NULL, |
||||
}, |
||||
{ |
||||
.name = "boolValue", |
||||
.number = GPBValue_FieldNumber_BoolValue, |
||||
.hasIndex = -1, |
||||
.flags = GPBFieldOptional, |
||||
.type = GPBTypeBool, |
||||
.offset = offsetof(GPBValue_Storage, boolValue), |
||||
.defaultValue.valueBool = NO, |
||||
.typeSpecific.className = NULL, |
||||
.fieldOptions = NULL, |
||||
}, |
||||
{ |
||||
.name = "structValue", |
||||
.number = GPBValue_FieldNumber_StructValue, |
||||
.hasIndex = -1, |
||||
.flags = GPBFieldOptional, |
||||
.type = GPBTypeMessage, |
||||
.offset = offsetof(GPBValue_Storage, structValue), |
||||
.defaultValue.valueMessage = nil, |
||||
.typeSpecific.className = GPBStringifySymbol(GPBStruct), |
||||
.fieldOptions = NULL, |
||||
}, |
||||
{ |
||||
.name = "listValue", |
||||
.number = GPBValue_FieldNumber_ListValue, |
||||
.hasIndex = -1, |
||||
.flags = GPBFieldOptional, |
||||
.type = GPBTypeMessage, |
||||
.offset = offsetof(GPBValue_Storage, listValue), |
||||
.defaultValue.valueMessage = nil, |
||||
.typeSpecific.className = GPBStringifySymbol(GPBListValue), |
||||
.fieldOptions = NULL, |
||||
}, |
||||
}; |
||||
descriptor = [GPBDescriptor allocDescriptorForClass:[GPBValue class] |
||||
rootClass:[GPBStructRoot class] |
||||
file:GPBStructRoot_FileDescriptor() |
||||
fields:fields |
||||
fieldCount:sizeof(fields) / sizeof(GPBMessageFieldDescription) |
||||
oneofs:oneofs |
||||
oneofCount:sizeof(oneofs) / sizeof(GPBMessageOneofDescription) |
||||
enums:NULL |
||||
enumCount:0 |
||||
ranges:NULL |
||||
rangeCount:0 |
||||
storageSize:sizeof(GPBValue_Storage) |
||||
wireFormat:NO]; |
||||
} |
||||
return descriptor; |
||||
} |
||||
|
||||
@end |
||||
|
||||
int32_t GPBValue_NullValue_RawValue(GPBValue *message) { |
||||
GPBDescriptor *descriptor = [GPBValue descriptor]; |
||||
GPBFieldDescriptor *field = [descriptor fieldWithNumber:GPBValue_FieldNumber_NullValue]; |
||||
return GPBGetInt32IvarWithField(message, field); |
||||
} |
||||
|
||||
void SetGPBValue_NullValue_RawValue(GPBValue *message, int32_t value) { |
||||
GPBDescriptor *descriptor = [GPBValue descriptor]; |
||||
GPBFieldDescriptor *field = [descriptor fieldWithNumber:GPBValue_FieldNumber_NullValue]; |
||||
GPBSetInt32IvarWithFieldInternal(message, field, value, descriptor.file.syntax); |
||||
} |
||||
|
||||
void GPBValue_ClearKindOneOfCase(GPBValue *message) { |
||||
GPBDescriptor *descriptor = [message descriptor]; |
||||
GPBOneofDescriptor *oneof = descriptor->oneofs_[0]; |
||||
GPBMaybeClearOneof(message, oneof, 0); |
||||
} |
||||
#pragma mark - GPBListValue |
||||
|
||||
@implementation GPBListValue |
||||
|
||||
@dynamic valuesArray; |
||||
|
||||
typedef struct GPBListValue_Storage { |
||||
uint32_t _has_storage_[1]; |
||||
NSMutableArray *valuesArray; |
||||
} GPBListValue_Storage; |
||||
|
||||
// This method is threadsafe because it is initially called |
||||
// in +initialize for each subclass. |
||||
+ (GPBDescriptor *)descriptor { |
||||
static GPBDescriptor *descriptor = NULL; |
||||
if (!descriptor) { |
||||
static GPBMessageFieldDescription fields[] = { |
||||
{ |
||||
.name = "valuesArray", |
||||
.number = GPBListValue_FieldNumber_ValuesArray, |
||||
.hasIndex = GPBNoHasBit, |
||||
.flags = GPBFieldRepeated, |
||||
.type = GPBTypeMessage, |
||||
.offset = offsetof(GPBListValue_Storage, valuesArray), |
||||
.defaultValue.valueMessage = nil, |
||||
.typeSpecific.className = GPBStringifySymbol(GPBValue), |
||||
.fieldOptions = NULL, |
||||
}, |
||||
}; |
||||
descriptor = [GPBDescriptor allocDescriptorForClass:[GPBListValue class] |
||||
rootClass:[GPBStructRoot class] |
||||
file:GPBStructRoot_FileDescriptor() |
||||
fields:fields |
||||
fieldCount:sizeof(fields) / sizeof(GPBMessageFieldDescription) |
||||
oneofs:NULL |
||||
oneofCount:0 |
||||
enums:NULL |
||||
enumCount:0 |
||||
ranges:NULL |
||||
rangeCount:0 |
||||
storageSize:sizeof(GPBListValue_Storage) |
||||
wireFormat:NO]; |
||||
} |
||||
return descriptor; |
||||
} |
||||
|
||||
@end |
||||
|
||||
|
||||
// @@protoc_insertion_point(global_scope) |
@ -0,0 +1,274 @@ |
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: google/protobuf/type.proto
|
||||
|
||||
#import "GPBProtocolBuffers.h" |
||||
|
||||
#if GOOGLE_PROTOBUF_OBJC_GEN_VERSION != 30000 |
||||
#error This file was generated by a different version of protoc-gen-objc which is incompatible with your Protocol Buffer sources. |
||||
#endif |
||||
|
||||
// @@protoc_insertion_point(imports)
|
||||
|
||||
CF_EXTERN_C_BEGIN |
||||
|
||||
@class GPBAny; |
||||
@class GPBSourceContext; |
||||
|
||||
#pragma mark - Enum GPBField_Kind |
||||
|
||||
// Kind represents a basic field type.
|
||||
typedef GPB_ENUM(GPBField_Kind) { |
||||
GPBField_Kind_GPBUnrecognizedEnumeratorValue = kGPBUnrecognizedEnumeratorValue, |
||||
// Field type unknown.
|
||||
GPBField_Kind_TypeUnknown = 0, |
||||
|
||||
// Field type double.
|
||||
GPBField_Kind_TypeDouble = 1, |
||||
|
||||
// Field type float.
|
||||
GPBField_Kind_TypeFloat = 2, |
||||
|
||||
// Field type int64.
|
||||
GPBField_Kind_TypeInt64 = 3, |
||||
|
||||
// Field type uint64.
|
||||
GPBField_Kind_TypeUint64 = 4, |
||||
|
||||
// Field type int32.
|
||||
GPBField_Kind_TypeInt32 = 5, |
||||
|
||||
// Field type fixed64.
|
||||
GPBField_Kind_TypeFixed64 = 6, |
||||
|
||||
// Field type fixed32.
|
||||
GPBField_Kind_TypeFixed32 = 7, |
||||
|
||||
// Field type bool.
|
||||
GPBField_Kind_TypeBool = 8, |
||||
|
||||
// Field type string.
|
||||
GPBField_Kind_TypeString = 9, |
||||
|
||||
// Field type message.
|
||||
GPBField_Kind_TypeMessage = 11, |
||||
|
||||
// Field type bytes.
|
||||
GPBField_Kind_TypeBytes = 12, |
||||
|
||||
// Field type uint32.
|
||||
GPBField_Kind_TypeUint32 = 13, |
||||
|
||||
// Field type enum.
|
||||
GPBField_Kind_TypeEnum = 14, |
||||
|
||||
// Field type sfixed32.
|
||||
GPBField_Kind_TypeSfixed32 = 15, |
||||
|
||||
// Field type sfixed64.
|
||||
GPBField_Kind_TypeSfixed64 = 16, |
||||
|
||||
// Field type sint32.
|
||||
GPBField_Kind_TypeSint32 = 17, |
||||
|
||||
// Field type sint64.
|
||||
GPBField_Kind_TypeSint64 = 18, |
||||
}; |
||||
|
||||
GPBEnumDescriptor *GPBField_Kind_EnumDescriptor(void); |
||||
|
||||
BOOL GPBField_Kind_IsValidValue(int32_t value); |
||||
|
||||
#pragma mark - Enum GPBField_Cardinality |
||||
|
||||
// Cardinality represents whether a field is optional, required, or
|
||||
// repeated.
|
||||
typedef GPB_ENUM(GPBField_Cardinality) { |
||||
GPBField_Cardinality_GPBUnrecognizedEnumeratorValue = kGPBUnrecognizedEnumeratorValue, |
||||
// The field cardinality is unknown. Typically an error condition.
|
||||
GPBField_Cardinality_CardinalityUnknown = 0, |
||||
|
||||
// For optional fields.
|
||||
GPBField_Cardinality_CardinalityOptional = 1, |
||||
|
||||
// For required fields. Not used for proto3.
|
||||
GPBField_Cardinality_CardinalityRequired = 2, |
||||
|
||||
// For repeated fields.
|
||||
GPBField_Cardinality_CardinalityRepeated = 3, |
||||
}; |
||||
|
||||
GPBEnumDescriptor *GPBField_Cardinality_EnumDescriptor(void); |
||||
|
||||
BOOL GPBField_Cardinality_IsValidValue(int32_t value); |
||||
|
||||
|
||||
#pragma mark - GPBTypeRoot |
||||
|
||||
@interface GPBTypeRoot : GPBRootObject |
||||
|
||||
// The base class provides:
|
||||
// + (GPBExtensionRegistry *)extensionRegistry;
|
||||
// which is an GPBExtensionRegistry that includes all the extensions defined by
|
||||
// this file and all files that it depends on.
|
||||
|
||||
@end |
||||
|
||||
#pragma mark - GPBType |
||||
|
||||
typedef GPB_ENUM(GPBType_FieldNumber) { |
||||
GPBType_FieldNumber_Name = 1, |
||||
GPBType_FieldNumber_FieldsArray = 2, |
||||
GPBType_FieldNumber_OneofsArray = 3, |
||||
GPBType_FieldNumber_OptionsArray = 4, |
||||
GPBType_FieldNumber_SourceContext = 5, |
||||
}; |
||||
|
||||
// A light-weight descriptor for a proto message type.
|
||||
@interface GPBType : GPBMessage |
||||
|
||||
// The fully qualified message name.
|
||||
@property(nonatomic, readwrite, copy) NSString *name; |
||||
|
||||
// The list of fields.
|
||||
// |fieldsArray| contains |GPBField|
|
||||
@property(nonatomic, readwrite, strong) NSMutableArray *fieldsArray; |
||||
|
||||
// The list of oneof definitions.
|
||||
// The list of oneofs declared in this Type
|
||||
// |oneofsArray| contains |NSString|
|
||||
@property(nonatomic, readwrite, strong) NSMutableArray *oneofsArray; |
||||
|
||||
// The proto options.
|
||||
// |optionsArray| contains |GPBOption|
|
||||
@property(nonatomic, readwrite, strong) NSMutableArray *optionsArray; |
||||
|
||||
// The source context.
|
||||
@property(nonatomic, readwrite) BOOL hasSourceContext; |
||||
@property(nonatomic, readwrite, strong) GPBSourceContext *sourceContext; |
||||
|
||||
@end |
||||
|
||||
#pragma mark - GPBField |
||||
|
||||
typedef GPB_ENUM(GPBField_FieldNumber) { |
||||
GPBField_FieldNumber_Kind = 1, |
||||
GPBField_FieldNumber_Cardinality = 2, |
||||
GPBField_FieldNumber_Number = 3, |
||||
GPBField_FieldNumber_Name = 4, |
||||
GPBField_FieldNumber_TypeURL = 6, |
||||
GPBField_FieldNumber_OneofIndex = 7, |
||||
GPBField_FieldNumber_Packed = 8, |
||||
GPBField_FieldNumber_OptionsArray = 9, |
||||
}; |
||||
|
||||
// Field represents a single field of a message type.
|
||||
@interface GPBField : GPBMessage |
||||
|
||||
// The field kind.
|
||||
@property(nonatomic, readwrite) GPBField_Kind kind; |
||||
|
||||
// The field cardinality, i.e. optional/required/repeated.
|
||||
@property(nonatomic, readwrite) GPBField_Cardinality cardinality; |
||||
|
||||
// The proto field number.
|
||||
@property(nonatomic, readwrite) int32_t number; |
||||
|
||||
// The field name.
|
||||
@property(nonatomic, readwrite, copy) NSString *name; |
||||
|
||||
// The type URL (without the scheme) when the type is MESSAGE or ENUM,
|
||||
// such as `type.googleapis.com/google.protobuf.Empty`.
|
||||
@property(nonatomic, readwrite, copy) NSString *typeURL; |
||||
|
||||
// Index in Type.oneofs. Starts at 1. Zero means no oneof mapping.
|
||||
@property(nonatomic, readwrite) int32_t oneofIndex; |
||||
|
||||
// Whether to use alternative packed wire representation.
|
||||
@property(nonatomic, readwrite) BOOL packed; |
||||
|
||||
// The proto options.
|
||||
// |optionsArray| contains |GPBOption|
|
||||
@property(nonatomic, readwrite, strong) NSMutableArray *optionsArray; |
||||
|
||||
@end |
||||
|
||||
int32_t GPBField_Kind_RawValue(GPBField *message); |
||||
void SetGPBField_Kind_RawValue(GPBField *message, int32_t value); |
||||
|
||||
int32_t GPBField_Cardinality_RawValue(GPBField *message); |
||||
void SetGPBField_Cardinality_RawValue(GPBField *message, int32_t value); |
||||
|
||||
#pragma mark - GPBEnum |
||||
|
||||
typedef GPB_ENUM(GPBEnum_FieldNumber) { |
||||
GPBEnum_FieldNumber_Name = 1, |
||||
GPBEnum_FieldNumber_EnumvalueArray = 2, |
||||
GPBEnum_FieldNumber_OptionsArray = 3, |
||||
GPBEnum_FieldNumber_SourceContext = 4, |
||||
}; |
||||
|
||||
// Enum type definition.
|
||||
@interface GPBEnum : GPBMessage |
||||
|
||||
// Enum type name.
|
||||
@property(nonatomic, readwrite, copy) NSString *name; |
||||
|
||||
// Enum value definitions.
|
||||
// |enumvalueArray| contains |GPBEnumValue|
|
||||
@property(nonatomic, readwrite, strong) NSMutableArray *enumvalueArray; |
||||
|
||||
// Proto options for the enum type.
|
||||
// |optionsArray| contains |GPBOption|
|
||||
@property(nonatomic, readwrite, strong) NSMutableArray *optionsArray; |
||||
|
||||
// The source context.
|
||||
@property(nonatomic, readwrite) BOOL hasSourceContext; |
||||
@property(nonatomic, readwrite, strong) GPBSourceContext *sourceContext; |
||||
|
||||
@end |
||||
|
||||
#pragma mark - GPBEnumValue |
||||
|
||||
typedef GPB_ENUM(GPBEnumValue_FieldNumber) { |
||||
GPBEnumValue_FieldNumber_Name = 1, |
||||
GPBEnumValue_FieldNumber_Number = 2, |
||||
GPBEnumValue_FieldNumber_OptionsArray = 3, |
||||
}; |
||||
|
||||
// Enum value definition.
|
||||
@interface GPBEnumValue : GPBMessage |
||||
|
||||
// Enum value name.
|
||||
@property(nonatomic, readwrite, copy) NSString *name; |
||||
|
||||
// Enum value number.
|
||||
@property(nonatomic, readwrite) int32_t number; |
||||
|
||||
// Proto options for the enum value.
|
||||
// |optionsArray| contains |GPBOption|
|
||||
@property(nonatomic, readwrite, strong) NSMutableArray *optionsArray; |
||||
|
||||
@end |
||||
|
||||
#pragma mark - GPBOption |
||||
|
||||
typedef GPB_ENUM(GPBOption_FieldNumber) { |
||||
GPBOption_FieldNumber_Name = 1, |
||||
GPBOption_FieldNumber_Value = 2, |
||||
}; |
||||
|
||||
// Proto option attached to messages/fields/enums etc.
|
||||
@interface GPBOption : GPBMessage |
||||
|
||||
// Proto option name.
|
||||
@property(nonatomic, readwrite, copy) NSString *name; |
||||
|
||||
// Proto option value.
|
||||
@property(nonatomic, readwrite) BOOL hasValue; |
||||
@property(nonatomic, readwrite, strong) GPBAny *value; |
||||
|
||||
@end |
||||
|
||||
CF_EXTERN_C_END |
||||
|
||||
// @@protoc_insertion_point(global_scope)
|
@ -0,0 +1,628 @@ |
||||
// Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
// source: google/protobuf/type.proto |
||||
|
||||
#import "GPBProtocolBuffers_RuntimeSupport.h" |
||||
#import "google/protobuf/Type.pbobjc.h" |
||||
#import "google/protobuf/Any.pbobjc.h" |
||||
#import "google/protobuf/SourceContext.pbobjc.h" |
||||
// @@protoc_insertion_point(imports) |
||||
|
||||
#pragma mark - GPBTypeRoot |
||||
|
||||
@implementation GPBTypeRoot |
||||
|
||||
+ (GPBExtensionRegistry*)extensionRegistry { |
||||
// This is called by +initialize so there is no need to worry |
||||
// about thread safety and initialization of registry. |
||||
static GPBExtensionRegistry* registry = nil; |
||||
if (!registry) { |
||||
registry = [[GPBExtensionRegistry alloc] init]; |
||||
static GPBExtensionDescription descriptions[] = { |
||||
}; |
||||
#pragma unused (descriptions) |
||||
[registry addExtensions:[GPBAnyRoot extensionRegistry]]; |
||||
[registry addExtensions:[GPBSourceContextRoot extensionRegistry]]; |
||||
} |
||||
return registry; |
||||
} |
||||
|
||||
@end |
||||
|
||||
static GPBFileDescriptor *GPBTypeRoot_FileDescriptor(void) { |
||||
// This is called by +initialize so there is no need to worry |
||||
// about thread safety of the singleton. |
||||
static GPBFileDescriptor *descriptor = NULL; |
||||
if (!descriptor) { |
||||
descriptor = [[GPBFileDescriptor alloc] initWithPackage:@"google.protobuf" |
||||
syntax:GPBFileSyntaxProto3]; |
||||
} |
||||
return descriptor; |
||||
} |
||||
|
||||
#pragma mark - GPBType |
||||
|
||||
@implementation GPBType |
||||
|
||||
@dynamic name; |
||||
@dynamic fieldsArray; |
||||
@dynamic oneofsArray; |
||||
@dynamic optionsArray; |
||||
@dynamic hasSourceContext, sourceContext; |
||||
|
||||
typedef struct GPBType_Storage { |
||||
uint32_t _has_storage_[1]; |
||||
NSString *name; |
||||
NSMutableArray *fieldsArray; |
||||
NSMutableArray *oneofsArray; |
||||
NSMutableArray *optionsArray; |
||||
GPBSourceContext *sourceContext; |
||||
} GPBType_Storage; |
||||
|
||||
// This method is threadsafe because it is initially called |
||||
// in +initialize for each subclass. |
||||
+ (GPBDescriptor *)descriptor { |
||||
static GPBDescriptor *descriptor = NULL; |
||||
if (!descriptor) { |
||||
static GPBMessageFieldDescription fields[] = { |
||||
{ |
||||
.name = "name", |
||||
.number = GPBType_FieldNumber_Name, |
||||
.hasIndex = 0, |
||||
.flags = GPBFieldOptional, |
||||
.type = GPBTypeString, |
||||
.offset = offsetof(GPBType_Storage, name), |
||||
.defaultValue.valueString = nil, |
||||
.typeSpecific.className = NULL, |
||||
.fieldOptions = NULL, |
||||
}, |
||||
{ |
||||
.name = "fieldsArray", |
||||
.number = GPBType_FieldNumber_FieldsArray, |
||||
.hasIndex = GPBNoHasBit, |
||||
.flags = GPBFieldRepeated, |
||||
.type = GPBTypeMessage, |
||||
.offset = offsetof(GPBType_Storage, fieldsArray), |
||||
.defaultValue.valueMessage = nil, |
||||
.typeSpecific.className = GPBStringifySymbol(GPBField), |
||||
.fieldOptions = NULL, |
||||
}, |
||||
{ |
||||
.name = "oneofsArray", |
||||
.number = GPBType_FieldNumber_OneofsArray, |
||||
.hasIndex = GPBNoHasBit, |
||||
.flags = GPBFieldRepeated, |
||||
.type = GPBTypeString, |
||||
.offset = offsetof(GPBType_Storage, oneofsArray), |
||||
.defaultValue.valueMessage = nil, |
||||
.typeSpecific.className = NULL, |
||||
.fieldOptions = NULL, |
||||
}, |
||||
{ |
||||
.name = "optionsArray", |
||||
.number = GPBType_FieldNumber_OptionsArray, |
||||
.hasIndex = GPBNoHasBit, |
||||
.flags = GPBFieldRepeated, |
||||
.type = GPBTypeMessage, |
||||
.offset = offsetof(GPBType_Storage, optionsArray), |
||||
.defaultValue.valueMessage = nil, |
||||
.typeSpecific.className = GPBStringifySymbol(GPBOption), |
||||
.fieldOptions = NULL, |
||||
}, |
||||
{ |
||||
.name = "sourceContext", |
||||
.number = GPBType_FieldNumber_SourceContext, |
||||
.hasIndex = 4, |
||||
.flags = GPBFieldOptional, |
||||
.type = GPBTypeMessage, |
||||
.offset = offsetof(GPBType_Storage, sourceContext), |
||||
.defaultValue.valueMessage = nil, |
||||
.typeSpecific.className = GPBStringifySymbol(GPBSourceContext), |
||||
.fieldOptions = NULL, |
||||
}, |
||||
}; |
||||
descriptor = [GPBDescriptor allocDescriptorForClass:[GPBType class] |
||||
rootClass:[GPBTypeRoot class] |
||||
file:GPBTypeRoot_FileDescriptor() |
||||
fields:fields |
||||
fieldCount:sizeof(fields) / sizeof(GPBMessageFieldDescription) |
||||
oneofs:NULL |
||||
oneofCount:0 |
||||
enums:NULL |
||||
enumCount:0 |
||||
ranges:NULL |
||||
rangeCount:0 |
||||
storageSize:sizeof(GPBType_Storage) |
||||
wireFormat:NO]; |
||||
} |
||||
return descriptor; |
||||
} |
||||
|
||||
@end |
||||
|
||||
#pragma mark - GPBField |
||||
|
||||
@implementation GPBField |
||||
|
||||
@dynamic kind; |
||||
@dynamic cardinality; |
||||
@dynamic number; |
||||
@dynamic name; |
||||
@dynamic typeURL; |
||||
@dynamic oneofIndex; |
||||
@dynamic packed; |
||||
@dynamic optionsArray; |
||||
|
||||
typedef struct GPBField_Storage { |
||||
uint32_t _has_storage_[1]; |
||||
BOOL packed; |
||||
GPBField_Kind kind; |
||||
GPBField_Cardinality cardinality; |
||||
int32_t number; |
||||
int32_t oneofIndex; |
||||
NSString *name; |
||||
NSString *typeURL; |
||||
NSMutableArray *optionsArray; |
||||
} GPBField_Storage; |
||||
|
||||
// This method is threadsafe because it is initially called |
||||
// in +initialize for each subclass. |
||||
+ (GPBDescriptor *)descriptor { |
||||
static GPBDescriptor *descriptor = NULL; |
||||
if (!descriptor) { |
||||
static GPBMessageFieldDescription fields[] = { |
||||
{ |
||||
.name = "kind", |
||||
.number = GPBField_FieldNumber_Kind, |
||||
.hasIndex = 0, |
||||
.flags = GPBFieldOptional | GPBFieldHasEnumDescriptor, |
||||
.type = GPBTypeEnum, |
||||
.offset = offsetof(GPBField_Storage, kind), |
||||
.defaultValue.valueEnum = GPBField_Kind_TypeUnknown, |
||||
.typeSpecific.enumDescFunc = GPBField_Kind_EnumDescriptor, |
||||
.fieldOptions = NULL, |
||||
}, |
||||
{ |
||||
.name = "cardinality", |
||||
.number = GPBField_FieldNumber_Cardinality, |
||||
.hasIndex = 1, |
||||
.flags = GPBFieldOptional | GPBFieldHasEnumDescriptor, |
||||
.type = GPBTypeEnum, |
||||
.offset = offsetof(GPBField_Storage, cardinality), |
||||
.defaultValue.valueEnum = GPBField_Cardinality_CardinalityUnknown, |
||||
.typeSpecific.enumDescFunc = GPBField_Cardinality_EnumDescriptor, |
||||
.fieldOptions = NULL, |
||||
}, |
||||
{ |
||||
.name = "number", |
||||
.number = GPBField_FieldNumber_Number, |
||||
.hasIndex = 2, |
||||
.flags = GPBFieldOptional, |
||||
.type = GPBTypeInt32, |
||||
.offset = offsetof(GPBField_Storage, number), |
||||
.defaultValue.valueInt32 = 0, |
||||
.typeSpecific.className = NULL, |
||||
.fieldOptions = NULL, |
||||
}, |
||||
{ |
||||
.name = "name", |
||||
.number = GPBField_FieldNumber_Name, |
||||
.hasIndex = 3, |
||||
.flags = GPBFieldOptional, |
||||
.type = GPBTypeString, |
||||
.offset = offsetof(GPBField_Storage, name), |
||||
.defaultValue.valueString = nil, |
||||
.typeSpecific.className = NULL, |
||||
.fieldOptions = NULL, |
||||
}, |
||||
{ |
||||
.name = "typeURL", |
||||
.number = GPBField_FieldNumber_TypeURL, |
||||
.hasIndex = 4, |
||||
.flags = GPBFieldOptional | GPBFieldTextFormatNameCustom, |
||||
.type = GPBTypeString, |
||||
.offset = offsetof(GPBField_Storage, typeURL), |
||||
.defaultValue.valueString = nil, |
||||
.typeSpecific.className = NULL, |
||||
.fieldOptions = NULL, |
||||
}, |
||||
{ |
||||
.name = "oneofIndex", |
||||
.number = GPBField_FieldNumber_OneofIndex, |
||||
.hasIndex = 5, |
||||
.flags = GPBFieldOptional, |
||||
.type = GPBTypeInt32, |
||||
.offset = offsetof(GPBField_Storage, oneofIndex), |
||||
.defaultValue.valueInt32 = 0, |
||||
.typeSpecific.className = NULL, |
||||
.fieldOptions = NULL, |
||||
}, |
||||
{ |
||||
.name = "packed", |
||||
.number = GPBField_FieldNumber_Packed, |
||||
.hasIndex = 6, |
||||
.flags = GPBFieldOptional, |
||||
.type = GPBTypeBool, |
||||
.offset = offsetof(GPBField_Storage, packed), |
||||
.defaultValue.valueBool = NO, |
||||
.typeSpecific.className = NULL, |
||||
.fieldOptions = NULL, |
||||
}, |
||||
{ |
||||
.name = "optionsArray", |
||||
.number = GPBField_FieldNumber_OptionsArray, |
||||
.hasIndex = GPBNoHasBit, |
||||
.flags = GPBFieldRepeated, |
||||
.type = GPBTypeMessage, |
||||
.offset = offsetof(GPBField_Storage, optionsArray), |
||||
.defaultValue.valueMessage = nil, |
||||
.typeSpecific.className = GPBStringifySymbol(GPBOption), |
||||
.fieldOptions = NULL, |
||||
}, |
||||
}; |
||||
static GPBMessageEnumDescription enums[] = { |
||||
{ .enumDescriptorFunc = GPBField_Kind_EnumDescriptor }, |
||||
{ .enumDescriptorFunc = GPBField_Cardinality_EnumDescriptor }, |
||||
}; |
||||
#if GPBOBJC_SKIP_MESSAGE_TEXTFORMAT_EXTRAS |
||||
const char *extraTextFormatInfo = NULL; |
||||
#else |
||||
static const char *extraTextFormatInfo = "\001\006\004\241!!\000"; |
||||
#endif // GPBOBJC_SKIP_MESSAGE_TEXTFORMAT_EXTRAS |
||||
descriptor = [GPBDescriptor allocDescriptorForClass:[GPBField class] |
||||
rootClass:[GPBTypeRoot class] |
||||
file:GPBTypeRoot_FileDescriptor() |
||||
fields:fields |
||||
fieldCount:sizeof(fields) / sizeof(GPBMessageFieldDescription) |
||||
oneofs:NULL |
||||
oneofCount:0 |
||||
enums:enums |
||||
enumCount:sizeof(enums) / sizeof(GPBMessageEnumDescription) |
||||
ranges:NULL |
||||
rangeCount:0 |
||||
storageSize:sizeof(GPBField_Storage) |
||||
wireFormat:NO |
||||
extraTextFormatInfo:extraTextFormatInfo]; |
||||
} |
||||
return descriptor; |
||||
} |
||||
|
||||
@end |
||||
|
||||
int32_t GPBField_Kind_RawValue(GPBField *message) { |
||||
GPBDescriptor *descriptor = [GPBField descriptor]; |
||||
GPBFieldDescriptor *field = [descriptor fieldWithNumber:GPBField_FieldNumber_Kind]; |
||||
return GPBGetInt32IvarWithField(message, field); |
||||
} |
||||
|
||||
void SetGPBField_Kind_RawValue(GPBField *message, int32_t value) { |
||||
GPBDescriptor *descriptor = [GPBField descriptor]; |
||||
GPBFieldDescriptor *field = [descriptor fieldWithNumber:GPBField_FieldNumber_Kind]; |
||||
GPBSetInt32IvarWithFieldInternal(message, field, value, descriptor.file.syntax); |
||||
} |
||||
|
||||
int32_t GPBField_Cardinality_RawValue(GPBField *message) { |
||||
GPBDescriptor *descriptor = [GPBField descriptor]; |
||||
GPBFieldDescriptor *field = [descriptor fieldWithNumber:GPBField_FieldNumber_Cardinality]; |
||||
return GPBGetInt32IvarWithField(message, field); |
||||
} |
||||
|
||||
void SetGPBField_Cardinality_RawValue(GPBField *message, int32_t value) { |
||||
GPBDescriptor *descriptor = [GPBField descriptor]; |
||||
GPBFieldDescriptor *field = [descriptor fieldWithNumber:GPBField_FieldNumber_Cardinality]; |
||||
GPBSetInt32IvarWithFieldInternal(message, field, value, descriptor.file.syntax); |
||||
} |
||||
|
||||
#pragma mark - Enum GPBField_Kind |
||||
|
||||
GPBEnumDescriptor *GPBField_Kind_EnumDescriptor(void) { |
||||
static GPBEnumDescriptor *descriptor = NULL; |
||||
if (!descriptor) { |
||||
static GPBMessageEnumValueDescription values[] = { |
||||
{ .name = "TypeUnknown", .number = GPBField_Kind_TypeUnknown }, |
||||
{ .name = "TypeDouble", .number = GPBField_Kind_TypeDouble }, |
||||
{ .name = "TypeFloat", .number = GPBField_Kind_TypeFloat }, |
||||
{ .name = "TypeInt64", .number = GPBField_Kind_TypeInt64 }, |
||||
{ .name = "TypeUint64", .number = GPBField_Kind_TypeUint64 }, |
||||
{ .name = "TypeInt32", .number = GPBField_Kind_TypeInt32 }, |
||||
{ .name = "TypeFixed64", .number = GPBField_Kind_TypeFixed64 }, |
||||
{ .name = "TypeFixed32", .number = GPBField_Kind_TypeFixed32 }, |
||||
{ .name = "TypeBool", .number = GPBField_Kind_TypeBool }, |
||||
{ .name = "TypeString", .number = GPBField_Kind_TypeString }, |
||||
{ .name = "TypeMessage", .number = GPBField_Kind_TypeMessage }, |
||||
{ .name = "TypeBytes", .number = GPBField_Kind_TypeBytes }, |
||||
{ .name = "TypeUint32", .number = GPBField_Kind_TypeUint32 }, |
||||
{ .name = "TypeEnum", .number = GPBField_Kind_TypeEnum }, |
||||
{ .name = "TypeSfixed32", .number = GPBField_Kind_TypeSfixed32 }, |
||||
{ .name = "TypeSfixed64", .number = GPBField_Kind_TypeSfixed64 }, |
||||
{ .name = "TypeSint32", .number = GPBField_Kind_TypeSint32 }, |
||||
{ .name = "TypeSint64", .number = GPBField_Kind_TypeSint64 }, |
||||
}; |
||||
descriptor = [GPBEnumDescriptor allocDescriptorForName:GPBNSStringifySymbol(GPBField_Kind) |
||||
values:values |
||||
valueCount:sizeof(values) / sizeof(GPBMessageEnumValueDescription) |
||||
enumVerifier:GPBField_Kind_IsValidValue]; |
||||
} |
||||
return descriptor; |
||||
} |
||||
|
||||
BOOL GPBField_Kind_IsValidValue(int32_t value__) { |
||||
switch (value__) { |
||||
case GPBField_Kind_TypeUnknown: |
||||
case GPBField_Kind_TypeDouble: |
||||
case GPBField_Kind_TypeFloat: |
||||
case GPBField_Kind_TypeInt64: |
||||
case GPBField_Kind_TypeUint64: |
||||
case GPBField_Kind_TypeInt32: |
||||
case GPBField_Kind_TypeFixed64: |
||||
case GPBField_Kind_TypeFixed32: |
||||
case GPBField_Kind_TypeBool: |
||||
case GPBField_Kind_TypeString: |
||||
case GPBField_Kind_TypeMessage: |
||||
case GPBField_Kind_TypeBytes: |
||||
case GPBField_Kind_TypeUint32: |
||||
case GPBField_Kind_TypeEnum: |
||||
case GPBField_Kind_TypeSfixed32: |
||||
case GPBField_Kind_TypeSfixed64: |
||||
case GPBField_Kind_TypeSint32: |
||||
case GPBField_Kind_TypeSint64: |
||||
return YES; |
||||
default: |
||||
return NO; |
||||
} |
||||
} |
||||
|
||||
#pragma mark - Enum GPBField_Cardinality |
||||
|
||||
GPBEnumDescriptor *GPBField_Cardinality_EnumDescriptor(void) { |
||||
static GPBEnumDescriptor *descriptor = NULL; |
||||
if (!descriptor) { |
||||
static GPBMessageEnumValueDescription values[] = { |
||||
{ .name = "CardinalityUnknown", .number = GPBField_Cardinality_CardinalityUnknown }, |
||||
{ .name = "CardinalityOptional", .number = GPBField_Cardinality_CardinalityOptional }, |
||||
{ .name = "CardinalityRequired", .number = GPBField_Cardinality_CardinalityRequired }, |
||||
{ .name = "CardinalityRepeated", .number = GPBField_Cardinality_CardinalityRepeated }, |
||||
}; |
||||
descriptor = [GPBEnumDescriptor allocDescriptorForName:GPBNSStringifySymbol(GPBField_Cardinality) |
||||
values:values |
||||
valueCount:sizeof(values) / sizeof(GPBMessageEnumValueDescription) |
||||
enumVerifier:GPBField_Cardinality_IsValidValue]; |
||||
} |
||||
return descriptor; |
||||
} |
||||
|
||||
BOOL GPBField_Cardinality_IsValidValue(int32_t value__) { |
||||
switch (value__) { |
||||
case GPBField_Cardinality_CardinalityUnknown: |
||||
case GPBField_Cardinality_CardinalityOptional: |
||||
case GPBField_Cardinality_CardinalityRequired: |
||||
case GPBField_Cardinality_CardinalityRepeated: |
||||
return YES; |
||||
default: |
||||
return NO; |
||||
} |
||||
} |
||||
|
||||
#pragma mark - GPBEnum |
||||
|
||||
@implementation GPBEnum |
||||
|
||||
@dynamic name; |
||||
@dynamic enumvalueArray; |
||||
@dynamic optionsArray; |
||||
@dynamic hasSourceContext, sourceContext; |
||||
|
||||
typedef struct GPBEnum_Storage { |
||||
uint32_t _has_storage_[1]; |
||||
NSString *name; |
||||
NSMutableArray *enumvalueArray; |
||||
NSMutableArray *optionsArray; |
||||
GPBSourceContext *sourceContext; |
||||
} GPBEnum_Storage; |
||||
|
||||
// This method is threadsafe because it is initially called |
||||
// in +initialize for each subclass. |
||||
+ (GPBDescriptor *)descriptor { |
||||
static GPBDescriptor *descriptor = NULL; |
||||
if (!descriptor) { |
||||
static GPBMessageFieldDescription fields[] = { |
||||
{ |
||||
.name = "name", |
||||
.number = GPBEnum_FieldNumber_Name, |
||||
.hasIndex = 0, |
||||
.flags = GPBFieldOptional, |
||||
.type = GPBTypeString, |
||||
.offset = offsetof(GPBEnum_Storage, name), |
||||
.defaultValue.valueString = nil, |
||||
.typeSpecific.className = NULL, |
||||
.fieldOptions = NULL, |
||||
}, |
||||
{ |
||||
.name = "enumvalueArray", |
||||
.number = GPBEnum_FieldNumber_EnumvalueArray, |
||||
.hasIndex = GPBNoHasBit, |
||||
.flags = GPBFieldRepeated, |
||||
.type = GPBTypeMessage, |
||||
.offset = offsetof(GPBEnum_Storage, enumvalueArray), |
||||
.defaultValue.valueMessage = nil, |
||||
.typeSpecific.className = GPBStringifySymbol(GPBEnumValue), |
||||
.fieldOptions = NULL, |
||||
}, |
||||
{ |
||||
.name = "optionsArray", |
||||
.number = GPBEnum_FieldNumber_OptionsArray, |
||||
.hasIndex = GPBNoHasBit, |
||||
.flags = GPBFieldRepeated, |
||||
.type = GPBTypeMessage, |
||||
.offset = offsetof(GPBEnum_Storage, optionsArray), |
||||
.defaultValue.valueMessage = nil, |
||||
.typeSpecific.className = GPBStringifySymbol(GPBOption), |
||||
.fieldOptions = NULL, |
||||
}, |
||||
{ |
||||
.name = "sourceContext", |
||||
.number = GPBEnum_FieldNumber_SourceContext, |
||||
.hasIndex = 3, |
||||
.flags = GPBFieldOptional, |
||||
.type = GPBTypeMessage, |
||||
.offset = offsetof(GPBEnum_Storage, sourceContext), |
||||
.defaultValue.valueMessage = nil, |
||||
.typeSpecific.className = GPBStringifySymbol(GPBSourceContext), |
||||
.fieldOptions = NULL, |
||||
}, |
||||
}; |
||||
descriptor = [GPBDescriptor allocDescriptorForClass:[GPBEnum class] |
||||
rootClass:[GPBTypeRoot class] |
||||
file:GPBTypeRoot_FileDescriptor() |
||||
fields:fields |
||||
fieldCount:sizeof(fields) / sizeof(GPBMessageFieldDescription) |
||||
oneofs:NULL |
||||
oneofCount:0 |
||||
enums:NULL |
||||
enumCount:0 |
||||
ranges:NULL |
||||
rangeCount:0 |
||||
storageSize:sizeof(GPBEnum_Storage) |
||||
wireFormat:NO]; |
||||
} |
||||
return descriptor; |
||||
} |
||||
|
||||
@end |
||||
|
||||
#pragma mark - GPBEnumValue |
||||
|
||||
@implementation GPBEnumValue |
||||
|
||||
@dynamic name; |
||||
@dynamic number; |
||||
@dynamic optionsArray; |
||||
|
||||
typedef struct GPBEnumValue_Storage { |
||||
uint32_t _has_storage_[1]; |
||||
int32_t number; |
||||
NSString *name; |
||||
NSMutableArray *optionsArray; |
||||
} GPBEnumValue_Storage; |
||||
|
||||
// This method is threadsafe because it is initially called |
||||
// in +initialize for each subclass. |
||||
+ (GPBDescriptor *)descriptor { |
||||
static GPBDescriptor *descriptor = NULL; |
||||
if (!descriptor) { |
||||
static GPBMessageFieldDescription fields[] = { |
||||
{ |
||||
.name = "name", |
||||
.number = GPBEnumValue_FieldNumber_Name, |
||||
.hasIndex = 0, |
||||
.flags = GPBFieldOptional, |
||||
.type = GPBTypeString, |
||||
.offset = offsetof(GPBEnumValue_Storage, name), |
||||
.defaultValue.valueString = nil, |
||||
.typeSpecific.className = NULL, |
||||
.fieldOptions = NULL, |
||||
}, |
||||
{ |
||||
.name = "number", |
||||
.number = GPBEnumValue_FieldNumber_Number, |
||||
.hasIndex = 1, |
||||
.flags = GPBFieldOptional, |
||||
.type = GPBTypeInt32, |
||||
.offset = offsetof(GPBEnumValue_Storage, number), |
||||
.defaultValue.valueInt32 = 0, |
||||
.typeSpecific.className = NULL, |
||||
.fieldOptions = NULL, |
||||
}, |
||||
{ |
||||
.name = "optionsArray", |
||||
.number = GPBEnumValue_FieldNumber_OptionsArray, |
||||
.hasIndex = GPBNoHasBit, |
||||
.flags = GPBFieldRepeated, |
||||
.type = GPBTypeMessage, |
||||
.offset = offsetof(GPBEnumValue_Storage, optionsArray), |
||||
.defaultValue.valueMessage = nil, |
||||
.typeSpecific.className = GPBStringifySymbol(GPBOption), |
||||
.fieldOptions = NULL, |
||||
}, |
||||
}; |
||||
descriptor = [GPBDescriptor allocDescriptorForClass:[GPBEnumValue class] |
||||
rootClass:[GPBTypeRoot class] |
||||
file:GPBTypeRoot_FileDescriptor() |
||||
fields:fields |
||||
fieldCount:sizeof(fields) / sizeof(GPBMessageFieldDescription) |
||||
oneofs:NULL |
||||
oneofCount:0 |
||||
enums:NULL |
||||
enumCount:0 |
||||
ranges:NULL |
||||
rangeCount:0 |
||||
storageSize:sizeof(GPBEnumValue_Storage) |
||||
wireFormat:NO]; |
||||
} |
||||
return descriptor; |
||||
} |
||||
|
||||
@end |
||||
|
||||
#pragma mark - GPBOption |
||||
|
||||
@implementation GPBOption |
||||
|
||||
@dynamic name; |
||||
@dynamic hasValue, value; |
||||
|
||||
typedef struct GPBOption_Storage { |
||||
uint32_t _has_storage_[1]; |
||||
NSString *name; |
||||
GPBAny *value; |
||||
} GPBOption_Storage; |
||||
|
||||
// This method is threadsafe because it is initially called |
||||
// in +initialize for each subclass. |
||||
+ (GPBDescriptor *)descriptor { |
||||
static GPBDescriptor *descriptor = NULL; |
||||
if (!descriptor) { |
||||
static GPBMessageFieldDescription fields[] = { |
||||
{ |
||||
.name = "name", |
||||
.number = GPBOption_FieldNumber_Name, |
||||
.hasIndex = 0, |
||||
.flags = GPBFieldOptional, |
||||
.type = GPBTypeString, |
||||
.offset = offsetof(GPBOption_Storage, name), |
||||
.defaultValue.valueString = nil, |
||||
.typeSpecific.className = NULL, |
||||
.fieldOptions = NULL, |
||||
}, |
||||
{ |
||||
.name = "value", |
||||
.number = GPBOption_FieldNumber_Value, |
||||
.hasIndex = 1, |
||||
.flags = GPBFieldOptional, |
||||
.type = GPBTypeMessage, |
||||
.offset = offsetof(GPBOption_Storage, value), |
||||
.defaultValue.valueMessage = nil, |
||||
.typeSpecific.className = GPBStringifySymbol(GPBAny), |
||||
.fieldOptions = NULL, |
||||
}, |
||||
}; |
||||
descriptor = [GPBDescriptor allocDescriptorForClass:[GPBOption class] |
||||
rootClass:[GPBTypeRoot class] |
||||
file:GPBTypeRoot_FileDescriptor() |
||||
fields:fields |
||||
fieldCount:sizeof(fields) / sizeof(GPBMessageFieldDescription) |
||||
oneofs:NULL |
||||
oneofCount:0 |
||||
enums:NULL |
||||
enumCount:0 |
||||
ranges:NULL |
||||
rangeCount:0 |
||||
storageSize:sizeof(GPBOption_Storage) |
||||
wireFormat:NO]; |
||||
} |
||||
return descriptor; |
||||
} |
||||
|
||||
@end |
||||
|
||||
|
||||
// @@protoc_insertion_point(global_scope) |
@ -0,0 +1,154 @@ |
||||
// Generated by the protocol buffer compiler. DO NOT EDIT!
|
||||
// source: google/protobuf/wrappers.proto
|
||||
|
||||
#import "GPBProtocolBuffers.h" |
||||
|
||||
#if GOOGLE_PROTOBUF_OBJC_GEN_VERSION != 30000 |
||||
#error This file was generated by a different version of protoc-gen-objc which is incompatible with your Protocol Buffer sources. |
||||
#endif |
||||
|
||||
// @@protoc_insertion_point(imports)
|
||||
|
||||
CF_EXTERN_C_BEGIN |
||||
|
||||
|
||||
#pragma mark - GPBWrappersRoot |
||||
|
||||
@interface GPBWrappersRoot : GPBRootObject |
||||
|
||||
// The base class provides:
|
||||
// + (GPBExtensionRegistry *)extensionRegistry;
|
||||
// which is an GPBExtensionRegistry that includes all the extensions defined by
|
||||
// this file and all files that it depends on.
|
||||
|
||||
@end |
||||
|
||||
#pragma mark - GPBDoubleValue |
||||
|
||||
typedef GPB_ENUM(GPBDoubleValue_FieldNumber) { |
||||
GPBDoubleValue_FieldNumber_Value = 1, |
||||
}; |
||||
|
||||
// Wrapper message for double.
|
||||
@interface GPBDoubleValue : GPBMessage |
||||
|
||||
// The double value.
|
||||
@property(nonatomic, readwrite) double value; |
||||
|
||||
@end |
||||
|
||||
#pragma mark - GPBFloatValue |
||||
|
||||
typedef GPB_ENUM(GPBFloatValue_FieldNumber) { |
||||
GPBFloatValue_FieldNumber_Value = 1, |
||||
}; |
||||
|
||||
// Wrapper message for float.
|
||||
@interface GPBFloatValue : GPBMessage |
||||
|
||||
// The float value.
|
||||
@property(nonatomic, readwrite) float value; |
||||
|
||||
@end |
||||
|
||||
#pragma mark - GPBInt64Value |
||||
|
||||
typedef GPB_ENUM(GPBInt64Value_FieldNumber) { |
||||
GPBInt64Value_FieldNumber_Value = 1, |
||||
}; |
||||
|
||||
// Wrapper message for int64.
|
||||
@interface GPBInt64Value : GPBMessage |
||||
|
||||
// The int64 value.
|
||||
@property(nonatomic, readwrite) int64_t value; |
||||
|
||||
@end |
||||
|
||||
#pragma mark - GPBUInt64Value |
||||
|
||||
typedef GPB_ENUM(GPBUInt64Value_FieldNumber) { |
||||
GPBUInt64Value_FieldNumber_Value = 1, |
||||
}; |
||||
|
||||
// Wrapper message for uint64.
|
||||
@interface GPBUInt64Value : GPBMessage |
||||
|
||||
// The uint64 value.
|
||||
@property(nonatomic, readwrite) uint64_t value; |
||||
|
||||
@end |
||||
|
||||
#pragma mark - GPBInt32Value |
||||
|
||||
typedef GPB_ENUM(GPBInt32Value_FieldNumber) { |
||||
GPBInt32Value_FieldNumber_Value = 1, |
||||
}; |
||||
|
||||
// Wrapper message for int32.
|
||||
@interface GPBInt32Value : GPBMessage |
||||
|
||||
// The int32 value.
|
||||
@property(nonatomic, readwrite) int32_t value; |
||||
|
||||
@end |
||||
|
||||
#pragma mark - GPBUInt32Value |
||||
|
||||
typedef GPB_ENUM(GPBUInt32Value_FieldNumber) { |
||||
GPBUInt32Value_FieldNumber_Value = 1, |
||||
}; |
||||
|
||||
// Wrapper message for uint32.
|
||||
@interface GPBUInt32Value : GPBMessage |
||||
|
||||
// The uint32 value.
|
||||
@property(nonatomic, readwrite) uint32_t value; |
||||
|
||||
@end |
||||
|
||||
#pragma mark - GPBBoolValue |
||||
|
||||
typedef GPB_ENUM(GPBBoolValue_FieldNumber) { |
||||
GPBBoolValue_FieldNumber_Value = 1, |
||||
}; |
||||
|
||||
// Wrapper message for bool.
|
||||
@interface GPBBoolValue : GPBMessage |
||||
|
||||
// The bool value.
|
||||
@property(nonatomic, readwrite) BOOL value; |
||||
|
||||
@end |
||||
|
||||
#pragma mark - GPBStringValue |
||||
|
||||
typedef GPB_ENUM(GPBStringValue_FieldNumber) { |
||||
GPBStringValue_FieldNumber_Value = 1, |
||||
}; |
||||
|
||||
// Wrapper message for string.
|
||||
@interface GPBStringValue : GPBMessage |
||||
|
||||
// The string value.
|
||||
@property(nonatomic, readwrite, copy) NSString *value; |
||||
|
||||
@end |
||||
|
||||
#pragma mark - GPBBytesValue |
||||
|
||||
typedef GPB_ENUM(GPBBytesValue_FieldNumber) { |
||||
GPBBytesValue_FieldNumber_Value = 1, |
||||
}; |
||||
|
||||
// Wrapper message for bytes.
|
||||
@interface GPBBytesValue : GPBMessage |
||||
|
||||
// The bytes value.
|
||||
@property(nonatomic, readwrite, copy) NSData *value; |
||||
|
||||
@end |
||||
|
||||
CF_EXTERN_C_END |
||||
|
||||
// @@protoc_insertion_point(global_scope)
|
@ -0,0 +1,458 @@ |
||||
// Generated by the protocol buffer compiler. DO NOT EDIT! |
||||
// source: google/protobuf/wrappers.proto |
||||
|
||||
#import "GPBProtocolBuffers_RuntimeSupport.h" |
||||
#import "google/protobuf/Wrappers.pbobjc.h" |
||||
// @@protoc_insertion_point(imports) |
||||
|
||||
#pragma mark - GPBWrappersRoot |
||||
|
||||
@implementation GPBWrappersRoot |
||||
|
||||
@end |
||||
|
||||
static GPBFileDescriptor *GPBWrappersRoot_FileDescriptor(void) { |
||||
// This is called by +initialize so there is no need to worry |
||||
// about thread safety of the singleton. |
||||
static GPBFileDescriptor *descriptor = NULL; |
||||
if (!descriptor) { |
||||
descriptor = [[GPBFileDescriptor alloc] initWithPackage:@"google.protobuf" |
||||
syntax:GPBFileSyntaxProto3]; |
||||
} |
||||
return descriptor; |
||||
} |
||||
|
||||
#pragma mark - GPBDoubleValue |
||||
|
||||
@implementation GPBDoubleValue |
||||
|
||||
@dynamic value; |
||||
|
||||
typedef struct GPBDoubleValue_Storage { |
||||
uint32_t _has_storage_[1]; |
||||
double value; |
||||
} GPBDoubleValue_Storage; |
||||
|
||||
// This method is threadsafe because it is initially called |
||||
// in +initialize for each subclass. |
||||
+ (GPBDescriptor *)descriptor { |
||||
static GPBDescriptor *descriptor = NULL; |
||||
if (!descriptor) { |
||||
static GPBMessageFieldDescription fields[] = { |
||||
{ |
||||
.name = "value", |
||||
.number = GPBDoubleValue_FieldNumber_Value, |
||||
.hasIndex = 0, |
||||
.flags = GPBFieldOptional, |
||||
.type = GPBTypeDouble, |
||||
.offset = offsetof(GPBDoubleValue_Storage, value), |
||||
.defaultValue.valueDouble = 0, |
||||
.typeSpecific.className = NULL, |
||||
.fieldOptions = NULL, |
||||
}, |
||||
}; |
||||
descriptor = [GPBDescriptor allocDescriptorForClass:[GPBDoubleValue class] |
||||
rootClass:[GPBWrappersRoot class] |
||||
file:GPBWrappersRoot_FileDescriptor() |
||||
fields:fields |
||||
fieldCount:sizeof(fields) / sizeof(GPBMessageFieldDescription) |
||||
oneofs:NULL |
||||
oneofCount:0 |
||||
enums:NULL |
||||
enumCount:0 |
||||
ranges:NULL |
||||
rangeCount:0 |
||||
storageSize:sizeof(GPBDoubleValue_Storage) |
||||
wireFormat:NO]; |
||||
} |
||||
return descriptor; |
||||
} |
||||
|
||||
@end |
||||
|
||||
#pragma mark - GPBFloatValue |
||||
|
||||
@implementation GPBFloatValue |
||||
|
||||
@dynamic value; |
||||
|
||||
typedef struct GPBFloatValue_Storage { |
||||
uint32_t _has_storage_[1]; |
||||
float value; |
||||
} GPBFloatValue_Storage; |
||||
|
||||
// This method is threadsafe because it is initially called |
||||
// in +initialize for each subclass. |
||||
+ (GPBDescriptor *)descriptor { |
||||
static GPBDescriptor *descriptor = NULL; |
||||
if (!descriptor) { |
||||
static GPBMessageFieldDescription fields[] = { |
||||
{ |
||||
.name = "value", |
||||
.number = GPBFloatValue_FieldNumber_Value, |
||||
.hasIndex = 0, |
||||
.flags = GPBFieldOptional, |
||||
.type = GPBTypeFloat, |
||||
.offset = offsetof(GPBFloatValue_Storage, value), |
||||
.defaultValue.valueFloat = 0, |
||||
.typeSpecific.className = NULL, |
||||
.fieldOptions = NULL, |
||||
}, |
||||
}; |
||||
descriptor = [GPBDescriptor allocDescriptorForClass:[GPBFloatValue class] |
||||
rootClass:[GPBWrappersRoot class] |
||||
file:GPBWrappersRoot_FileDescriptor() |
||||
fields:fields |
||||
fieldCount:sizeof(fields) / sizeof(GPBMessageFieldDescription) |
||||
oneofs:NULL |
||||
oneofCount:0 |
||||
enums:NULL |
||||
enumCount:0 |
||||
ranges:NULL |
||||
rangeCount:0 |
||||
storageSize:sizeof(GPBFloatValue_Storage) |
||||
wireFormat:NO]; |
||||
} |
||||
return descriptor; |
||||
} |
||||
|
||||
@end |
||||
|
||||
#pragma mark - GPBInt64Value |
||||
|
||||
@implementation GPBInt64Value |
||||
|
||||
@dynamic value; |
||||
|
||||
typedef struct GPBInt64Value_Storage { |
||||
uint32_t _has_storage_[1]; |
||||
int64_t value; |
||||
} GPBInt64Value_Storage; |
||||
|
||||
// This method is threadsafe because it is initially called |
||||
// in +initialize for each subclass. |
||||
+ (GPBDescriptor *)descriptor { |
||||
static GPBDescriptor *descriptor = NULL; |
||||
if (!descriptor) { |
||||
static GPBMessageFieldDescription fields[] = { |
||||
{ |
||||
.name = "value", |
||||
.number = GPBInt64Value_FieldNumber_Value, |
||||
.hasIndex = 0, |
||||
.flags = GPBFieldOptional, |
||||
.type = GPBTypeInt64, |
||||
.offset = offsetof(GPBInt64Value_Storage, value), |
||||
.defaultValue.valueInt64 = 0LL, |
||||
.typeSpecific.className = NULL, |
||||
.fieldOptions = NULL, |
||||
}, |
||||
}; |
||||
descriptor = [GPBDescriptor allocDescriptorForClass:[GPBInt64Value class] |
||||
rootClass:[GPBWrappersRoot class] |
||||
file:GPBWrappersRoot_FileDescriptor() |
||||
fields:fields |
||||
fieldCount:sizeof(fields) / sizeof(GPBMessageFieldDescription) |
||||
oneofs:NULL |
||||
oneofCount:0 |
||||
enums:NULL |
||||
enumCount:0 |
||||
ranges:NULL |
||||
rangeCount:0 |
||||
storageSize:sizeof(GPBInt64Value_Storage) |
||||
wireFormat:NO]; |
||||
} |
||||
return descriptor; |
||||
} |
||||
|
||||
@end |
||||
|
||||
#pragma mark - GPBUInt64Value |
||||
|
||||
@implementation GPBUInt64Value |
||||
|
||||
@dynamic value; |
||||
|
||||
typedef struct GPBUInt64Value_Storage { |
||||
uint32_t _has_storage_[1]; |
||||
uint64_t value; |
||||
} GPBUInt64Value_Storage; |
||||
|
||||
// This method is threadsafe because it is initially called |
||||
// in +initialize for each subclass. |
||||
+ (GPBDescriptor *)descriptor { |
||||
static GPBDescriptor *descriptor = NULL; |
||||
if (!descriptor) { |
||||
static GPBMessageFieldDescription fields[] = { |
||||
{ |
||||
.name = "value", |
||||
.number = GPBUInt64Value_FieldNumber_Value, |
||||
.hasIndex = 0, |
||||
.flags = GPBFieldOptional, |
||||
.type = GPBTypeUInt64, |
||||
.offset = offsetof(GPBUInt64Value_Storage, value), |
||||
.defaultValue.valueUInt64 = 0ULL, |
||||
.typeSpecific.className = NULL, |
||||
.fieldOptions = NULL, |
||||
}, |
||||
}; |
||||
descriptor = [GPBDescriptor allocDescriptorForClass:[GPBUInt64Value class] |
||||
rootClass:[GPBWrappersRoot class] |
||||
file:GPBWrappersRoot_FileDescriptor() |
||||
fields:fields |
||||
fieldCount:sizeof(fields) / sizeof(GPBMessageFieldDescription) |
||||
oneofs:NULL |
||||
oneofCount:0 |
||||
enums:NULL |
||||
enumCount:0 |
||||
ranges:NULL |
||||
rangeCount:0 |
||||
storageSize:sizeof(GPBUInt64Value_Storage) |
||||
wireFormat:NO]; |
||||
} |
||||
return descriptor; |
||||
} |
||||
|
||||
@end |
||||
|
||||
#pragma mark - GPBInt32Value |
||||
|
||||
@implementation GPBInt32Value |
||||
|
||||
@dynamic value; |
||||
|
||||
typedef struct GPBInt32Value_Storage { |
||||
uint32_t _has_storage_[1]; |
||||
int32_t value; |
||||
} GPBInt32Value_Storage; |
||||
|
||||
// This method is threadsafe because it is initially called |
||||
// in +initialize for each subclass. |
||||
+ (GPBDescriptor *)descriptor { |
||||
static GPBDescriptor *descriptor = NULL; |
||||
if (!descriptor) { |
||||
static GPBMessageFieldDescription fields[] = { |
||||
{ |
||||
.name = "value", |
||||
.number = GPBInt32Value_FieldNumber_Value, |
||||
.hasIndex = 0, |
||||
.flags = GPBFieldOptional, |
||||
.type = GPBTypeInt32, |
||||
.offset = offsetof(GPBInt32Value_Storage, value), |
||||
.defaultValue.valueInt32 = 0, |
||||
.typeSpecific.className = NULL, |
||||
.fieldOptions = NULL, |
||||
}, |
||||
}; |
||||
descriptor = [GPBDescriptor allocDescriptorForClass:[GPBInt32Value class] |
||||
rootClass:[GPBWrappersRoot class] |
||||
file:GPBWrappersRoot_FileDescriptor() |
||||
fields:fields |
||||
fieldCount:sizeof(fields) / sizeof(GPBMessageFieldDescription) |
||||
oneofs:NULL |
||||
oneofCount:0 |
||||
enums:NULL |
||||
enumCount:0 |
||||
ranges:NULL |
||||
rangeCount:0 |
||||
storageSize:sizeof(GPBInt32Value_Storage) |
||||
wireFormat:NO]; |
||||
} |
||||
return descriptor; |
||||
} |
||||
|
||||
@end |
||||
|
||||
#pragma mark - GPBUInt32Value |
||||
|
||||
@implementation GPBUInt32Value |
||||
|
||||
@dynamic value; |
||||
|
||||
typedef struct GPBUInt32Value_Storage { |
||||
uint32_t _has_storage_[1]; |
||||
uint32_t value; |
||||
} GPBUInt32Value_Storage; |
||||
|
||||
// This method is threadsafe because it is initially called |
||||
// in +initialize for each subclass. |
||||
+ (GPBDescriptor *)descriptor { |
||||
static GPBDescriptor *descriptor = NULL; |
||||
if (!descriptor) { |
||||
static GPBMessageFieldDescription fields[] = { |
||||
{ |
||||
.name = "value", |
||||
.number = GPBUInt32Value_FieldNumber_Value, |
||||
.hasIndex = 0, |
||||
.flags = GPBFieldOptional, |
||||
.type = GPBTypeUInt32, |
||||
.offset = offsetof(GPBUInt32Value_Storage, value), |
||||
.defaultValue.valueUInt32 = 0U, |
||||
.typeSpecific.className = NULL, |
||||
.fieldOptions = NULL, |
||||
}, |
||||
}; |
||||
descriptor = [GPBDescriptor allocDescriptorForClass:[GPBUInt32Value class] |
||||
rootClass:[GPBWrappersRoot class] |
||||
file:GPBWrappersRoot_FileDescriptor() |
||||
fields:fields |
||||
fieldCount:sizeof(fields) / sizeof(GPBMessageFieldDescription) |
||||
oneofs:NULL |
||||
oneofCount:0 |
||||
enums:NULL |
||||
enumCount:0 |
||||
ranges:NULL |
||||
rangeCount:0 |
||||
storageSize:sizeof(GPBUInt32Value_Storage) |
||||
wireFormat:NO]; |
||||
} |
||||
return descriptor; |
||||
} |
||||
|
||||
@end |
||||
|
||||
#pragma mark - GPBBoolValue |
||||
|
||||
@implementation GPBBoolValue |
||||
|
||||
@dynamic value; |
||||
|
||||
typedef struct GPBBoolValue_Storage { |
||||
uint32_t _has_storage_[1]; |
||||
BOOL value; |
||||
} GPBBoolValue_Storage; |
||||
|
||||
// This method is threadsafe because it is initially called |
||||
// in +initialize for each subclass. |
||||
+ (GPBDescriptor *)descriptor { |
||||
static GPBDescriptor *descriptor = NULL; |
||||
if (!descriptor) { |
||||
static GPBMessageFieldDescription fields[] = { |
||||
{ |
||||
.name = "value", |
||||
.number = GPBBoolValue_FieldNumber_Value, |
||||
.hasIndex = 0, |
||||
.flags = GPBFieldOptional, |
||||
.type = GPBTypeBool, |
||||
.offset = offsetof(GPBBoolValue_Storage, value), |
||||
.defaultValue.valueBool = NO, |
||||
.typeSpecific.className = NULL, |
||||
.fieldOptions = NULL, |
||||
}, |
||||
}; |
||||
descriptor = [GPBDescriptor allocDescriptorForClass:[GPBBoolValue class] |
||||
rootClass:[GPBWrappersRoot class] |
||||
file:GPBWrappersRoot_FileDescriptor() |
||||
fields:fields |
||||
fieldCount:sizeof(fields) / sizeof(GPBMessageFieldDescription) |
||||
oneofs:NULL |
||||
oneofCount:0 |
||||
enums:NULL |
||||
enumCount:0 |
||||
ranges:NULL |
||||
rangeCount:0 |
||||
storageSize:sizeof(GPBBoolValue_Storage) |
||||
wireFormat:NO]; |
||||
} |
||||
return descriptor; |
||||
} |
||||
|
||||
@end |
||||
|
||||
#pragma mark - GPBStringValue |
||||
|
||||
@implementation GPBStringValue |
||||
|
||||
@dynamic value; |
||||
|
||||
typedef struct GPBStringValue_Storage { |
||||
uint32_t _has_storage_[1]; |
||||
NSString *value; |
||||
} GPBStringValue_Storage; |
||||
|
||||
// This method is threadsafe because it is initially called |
||||
// in +initialize for each subclass. |
||||
+ (GPBDescriptor *)descriptor { |
||||
static GPBDescriptor *descriptor = NULL; |
||||
if (!descriptor) { |
||||
static GPBMessageFieldDescription fields[] = { |
||||
{ |
||||
.name = "value", |
||||
.number = GPBStringValue_FieldNumber_Value, |
||||
.hasIndex = 0, |
||||
.flags = GPBFieldOptional, |
||||
.type = GPBTypeString, |
||||
.offset = offsetof(GPBStringValue_Storage, value), |
||||
.defaultValue.valueString = nil, |
||||
.typeSpecific.className = NULL, |
||||
.fieldOptions = NULL, |
||||
}, |
||||
}; |
||||
descriptor = [GPBDescriptor allocDescriptorForClass:[GPBStringValue class] |
||||
rootClass:[GPBWrappersRoot class] |
||||
file:GPBWrappersRoot_FileDescriptor() |
||||
fields:fields |
||||
fieldCount:sizeof(fields) / sizeof(GPBMessageFieldDescription) |
||||
oneofs:NULL |
||||
oneofCount:0 |
||||
enums:NULL |
||||
enumCount:0 |
||||
ranges:NULL |
||||
rangeCount:0 |
||||
storageSize:sizeof(GPBStringValue_Storage) |
||||
wireFormat:NO]; |
||||
} |
||||
return descriptor; |
||||
} |
||||
|
||||
@end |
||||
|
||||
#pragma mark - GPBBytesValue |
||||
|
||||
@implementation GPBBytesValue |
||||
|
||||
@dynamic value; |
||||
|
||||
typedef struct GPBBytesValue_Storage { |
||||
uint32_t _has_storage_[1]; |
||||
NSData *value; |
||||
} GPBBytesValue_Storage; |
||||
|
||||
// This method is threadsafe because it is initially called |
||||
// in +initialize for each subclass. |
||||
+ (GPBDescriptor *)descriptor { |
||||
static GPBDescriptor *descriptor = NULL; |
||||
if (!descriptor) { |
||||
static GPBMessageFieldDescription fields[] = { |
||||
{ |
||||
.name = "value", |
||||
.number = GPBBytesValue_FieldNumber_Value, |
||||
.hasIndex = 0, |
||||
.flags = GPBFieldOptional, |
||||
.type = GPBTypeData, |
||||
.offset = offsetof(GPBBytesValue_Storage, value), |
||||
.defaultValue.valueData = nil, |
||||
.typeSpecific.className = NULL, |
||||
.fieldOptions = NULL, |
||||
}, |
||||
}; |
||||
descriptor = [GPBDescriptor allocDescriptorForClass:[GPBBytesValue class] |
||||
rootClass:[GPBWrappersRoot class] |
||||
file:GPBWrappersRoot_FileDescriptor() |
||||
fields:fields |
||||
fieldCount:sizeof(fields) / sizeof(GPBMessageFieldDescription) |
||||
oneofs:NULL |
||||
oneofCount:0 |
||||
enums:NULL |
||||
enumCount:0 |
||||
ranges:NULL |
||||
rangeCount:0 |
||||
storageSize:sizeof(GPBBytesValue_Storage) |
||||
wireFormat:NO]; |
||||
} |
||||
return descriptor; |
||||
} |
||||
|
||||
@end |
||||
|
||||
|
||||
// @@protoc_insertion_point(global_scope) |
Loading…
Reference in new issue