1ffe3c632Sopenharmony_ci// Generated by the protocol buffer compiler.  DO NOT EDIT!
2ffe3c632Sopenharmony_ci// source: google/protobuf/any.proto
3ffe3c632Sopenharmony_ci
4ffe3c632Sopenharmony_ci// This CPP symbol can be defined to use imports that match up to the framework
5ffe3c632Sopenharmony_ci// imports needed when using CocoaPods.
6ffe3c632Sopenharmony_ci#if !defined(GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS)
7ffe3c632Sopenharmony_ci #define GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS 0
8ffe3c632Sopenharmony_ci#endif
9ffe3c632Sopenharmony_ci
10ffe3c632Sopenharmony_ci#if GPB_USE_PROTOBUF_FRAMEWORK_IMPORTS
11ffe3c632Sopenharmony_ci #import <Protobuf/GPBDescriptor.h>
12ffe3c632Sopenharmony_ci #import <Protobuf/GPBMessage.h>
13ffe3c632Sopenharmony_ci #import <Protobuf/GPBRootObject.h>
14ffe3c632Sopenharmony_ci#else
15ffe3c632Sopenharmony_ci #import "GPBDescriptor.h"
16ffe3c632Sopenharmony_ci #import "GPBMessage.h"
17ffe3c632Sopenharmony_ci #import "GPBRootObject.h"
18ffe3c632Sopenharmony_ci#endif
19ffe3c632Sopenharmony_ci
20ffe3c632Sopenharmony_ci#if GOOGLE_PROTOBUF_OBJC_VERSION < 30004
21ffe3c632Sopenharmony_ci#error This file was generated by a newer version of protoc which is incompatible with your Protocol Buffer library sources.
22ffe3c632Sopenharmony_ci#endif
23ffe3c632Sopenharmony_ci#if 30004 < GOOGLE_PROTOBUF_OBJC_MIN_SUPPORTED_VERSION
24ffe3c632Sopenharmony_ci#error This file was generated by an older version of protoc which is incompatible with your Protocol Buffer library sources.
25ffe3c632Sopenharmony_ci#endif
26ffe3c632Sopenharmony_ci
27ffe3c632Sopenharmony_ci// @@protoc_insertion_point(imports)
28ffe3c632Sopenharmony_ci
29ffe3c632Sopenharmony_ci#pragma clang diagnostic push
30ffe3c632Sopenharmony_ci#pragma clang diagnostic ignored "-Wdeprecated-declarations"
31ffe3c632Sopenharmony_ci
32ffe3c632Sopenharmony_ciCF_EXTERN_C_BEGIN
33ffe3c632Sopenharmony_ci
34ffe3c632Sopenharmony_ciNS_ASSUME_NONNULL_BEGIN
35ffe3c632Sopenharmony_ci
36ffe3c632Sopenharmony_ci#pragma mark - GPBAnyRoot
37ffe3c632Sopenharmony_ci
38ffe3c632Sopenharmony_ci/**
39ffe3c632Sopenharmony_ci * Exposes the extension registry for this file.
40ffe3c632Sopenharmony_ci *
41ffe3c632Sopenharmony_ci * The base class provides:
42ffe3c632Sopenharmony_ci * @code
43ffe3c632Sopenharmony_ci *   + (GPBExtensionRegistry *)extensionRegistry;
44ffe3c632Sopenharmony_ci * @endcode
45ffe3c632Sopenharmony_ci * which is a @c GPBExtensionRegistry that includes all the extensions defined by
46ffe3c632Sopenharmony_ci * this file and all files that it depends on.
47ffe3c632Sopenharmony_ci **/
48ffe3c632Sopenharmony_ciGPB_FINAL @interface GPBAnyRoot : GPBRootObject
49ffe3c632Sopenharmony_ci@end
50ffe3c632Sopenharmony_ci
51ffe3c632Sopenharmony_ci#pragma mark - GPBAny
52ffe3c632Sopenharmony_ci
53ffe3c632Sopenharmony_citypedef GPB_ENUM(GPBAny_FieldNumber) {
54ffe3c632Sopenharmony_ci  GPBAny_FieldNumber_TypeURL = 1,
55ffe3c632Sopenharmony_ci  GPBAny_FieldNumber_Value = 2,
56ffe3c632Sopenharmony_ci};
57ffe3c632Sopenharmony_ci
58ffe3c632Sopenharmony_ci/**
59ffe3c632Sopenharmony_ci * `Any` contains an arbitrary serialized protocol buffer message along with a
60ffe3c632Sopenharmony_ci * URL that describes the type of the serialized message.
61ffe3c632Sopenharmony_ci *
62ffe3c632Sopenharmony_ci * Protobuf library provides support to pack/unpack Any values in the form
63ffe3c632Sopenharmony_ci * of utility functions or additional generated methods of the Any type.
64ffe3c632Sopenharmony_ci *
65ffe3c632Sopenharmony_ci * Example 1: Pack and unpack a message in C++.
66ffe3c632Sopenharmony_ci *
67ffe3c632Sopenharmony_ci *     Foo foo = ...;
68ffe3c632Sopenharmony_ci *     Any any;
69ffe3c632Sopenharmony_ci *     any.PackFrom(foo);
70ffe3c632Sopenharmony_ci *     ...
71ffe3c632Sopenharmony_ci *     if (any.UnpackTo(&foo)) {
72ffe3c632Sopenharmony_ci *       ...
73ffe3c632Sopenharmony_ci *     }
74ffe3c632Sopenharmony_ci *
75ffe3c632Sopenharmony_ci * Example 2: Pack and unpack a message in Java.
76ffe3c632Sopenharmony_ci *
77ffe3c632Sopenharmony_ci *     Foo foo = ...;
78ffe3c632Sopenharmony_ci *     Any any = Any.pack(foo);
79ffe3c632Sopenharmony_ci *     ...
80ffe3c632Sopenharmony_ci *     if (any.is(Foo.class)) {
81ffe3c632Sopenharmony_ci *       foo = any.unpack(Foo.class);
82ffe3c632Sopenharmony_ci *     }
83ffe3c632Sopenharmony_ci *
84ffe3c632Sopenharmony_ci *  Example 3: Pack and unpack a message in Python.
85ffe3c632Sopenharmony_ci *
86ffe3c632Sopenharmony_ci *     foo = Foo(...)
87ffe3c632Sopenharmony_ci *     any = Any()
88ffe3c632Sopenharmony_ci *     any.Pack(foo)
89ffe3c632Sopenharmony_ci *     ...
90ffe3c632Sopenharmony_ci *     if any.Is(Foo.DESCRIPTOR):
91ffe3c632Sopenharmony_ci *       any.Unpack(foo)
92ffe3c632Sopenharmony_ci *       ...
93ffe3c632Sopenharmony_ci *
94ffe3c632Sopenharmony_ci *  Example 4: Pack and unpack a message in Go
95ffe3c632Sopenharmony_ci *
96ffe3c632Sopenharmony_ci *      foo := &pb.Foo{...}
97ffe3c632Sopenharmony_ci *      any, err := ptypes.MarshalAny(foo)
98ffe3c632Sopenharmony_ci *      ...
99ffe3c632Sopenharmony_ci *      foo := &pb.Foo{}
100ffe3c632Sopenharmony_ci *      if err := ptypes.UnmarshalAny(any, foo); err != nil {
101ffe3c632Sopenharmony_ci *        ...
102ffe3c632Sopenharmony_ci *      }
103ffe3c632Sopenharmony_ci *
104ffe3c632Sopenharmony_ci * The pack methods provided by protobuf library will by default use
105ffe3c632Sopenharmony_ci * 'type.googleapis.com/full.type.name' as the type URL and the unpack
106ffe3c632Sopenharmony_ci * methods only use the fully qualified type name after the last '/'
107ffe3c632Sopenharmony_ci * in the type URL, for example "foo.bar.com/x/y.z" will yield type
108ffe3c632Sopenharmony_ci * name "y.z".
109ffe3c632Sopenharmony_ci *
110ffe3c632Sopenharmony_ci *
111ffe3c632Sopenharmony_ci * JSON
112ffe3c632Sopenharmony_ci * ====
113ffe3c632Sopenharmony_ci * The JSON representation of an `Any` value uses the regular
114ffe3c632Sopenharmony_ci * representation of the deserialized, embedded message, with an
115ffe3c632Sopenharmony_ci * additional field `\@type` which contains the type URL. Example:
116ffe3c632Sopenharmony_ci *
117ffe3c632Sopenharmony_ci *     package google.profile;
118ffe3c632Sopenharmony_ci *     message Person {
119ffe3c632Sopenharmony_ci *       string first_name = 1;
120ffe3c632Sopenharmony_ci *       string last_name = 2;
121ffe3c632Sopenharmony_ci *     }
122ffe3c632Sopenharmony_ci *
123ffe3c632Sopenharmony_ci *     {
124ffe3c632Sopenharmony_ci *       "\@type": "type.googleapis.com/google.profile.Person",
125ffe3c632Sopenharmony_ci *       "firstName": <string>,
126ffe3c632Sopenharmony_ci *       "lastName": <string>
127ffe3c632Sopenharmony_ci *     }
128ffe3c632Sopenharmony_ci *
129ffe3c632Sopenharmony_ci * If the embedded message type is well-known and has a custom JSON
130ffe3c632Sopenharmony_ci * representation, that representation will be embedded adding a field
131ffe3c632Sopenharmony_ci * `value` which holds the custom JSON in addition to the `\@type`
132ffe3c632Sopenharmony_ci * field. Example (for message [google.protobuf.Duration][]):
133ffe3c632Sopenharmony_ci *
134ffe3c632Sopenharmony_ci *     {
135ffe3c632Sopenharmony_ci *       "\@type": "type.googleapis.com/google.protobuf.Duration",
136ffe3c632Sopenharmony_ci *       "value": "1.212s"
137ffe3c632Sopenharmony_ci *     }
138ffe3c632Sopenharmony_ci **/
139ffe3c632Sopenharmony_ciGPB_FINAL @interface GPBAny : GPBMessage
140ffe3c632Sopenharmony_ci
141ffe3c632Sopenharmony_ci/**
142ffe3c632Sopenharmony_ci * A URL/resource name that uniquely identifies the type of the serialized
143ffe3c632Sopenharmony_ci * protocol buffer message. This string must contain at least
144ffe3c632Sopenharmony_ci * one "/" character. The last segment of the URL's path must represent
145ffe3c632Sopenharmony_ci * the fully qualified name of the type (as in
146ffe3c632Sopenharmony_ci * `path/google.protobuf.Duration`). The name should be in a canonical form
147ffe3c632Sopenharmony_ci * (e.g., leading "." is not accepted).
148ffe3c632Sopenharmony_ci *
149ffe3c632Sopenharmony_ci * In practice, teams usually precompile into the binary all types that they
150ffe3c632Sopenharmony_ci * expect it to use in the context of Any. However, for URLs which use the
151ffe3c632Sopenharmony_ci * scheme `http`, `https`, or no scheme, one can optionally set up a type
152ffe3c632Sopenharmony_ci * server that maps type URLs to message definitions as follows:
153ffe3c632Sopenharmony_ci *
154ffe3c632Sopenharmony_ci * * If no scheme is provided, `https` is assumed.
155ffe3c632Sopenharmony_ci * * An HTTP GET on the URL must yield a [google.protobuf.Type][]
156ffe3c632Sopenharmony_ci *   value in binary format, or produce an error.
157ffe3c632Sopenharmony_ci * * Applications are allowed to cache lookup results based on the
158ffe3c632Sopenharmony_ci *   URL, or have them precompiled into a binary to avoid any
159ffe3c632Sopenharmony_ci *   lookup. Therefore, binary compatibility needs to be preserved
160ffe3c632Sopenharmony_ci *   on changes to types. (Use versioned type names to manage
161ffe3c632Sopenharmony_ci *   breaking changes.)
162ffe3c632Sopenharmony_ci *
163ffe3c632Sopenharmony_ci * Note: this functionality is not currently available in the official
164ffe3c632Sopenharmony_ci * protobuf release, and it is not used for type URLs beginning with
165ffe3c632Sopenharmony_ci * type.googleapis.com.
166ffe3c632Sopenharmony_ci *
167ffe3c632Sopenharmony_ci * Schemes other than `http`, `https` (or the empty scheme) might be
168ffe3c632Sopenharmony_ci * used with implementation specific semantics.
169ffe3c632Sopenharmony_ci **/
170ffe3c632Sopenharmony_ci@property(nonatomic, readwrite, copy, null_resettable) NSString *typeURL;
171ffe3c632Sopenharmony_ci
172ffe3c632Sopenharmony_ci/** Must be a valid serialized protocol buffer of the above specified type. */
173ffe3c632Sopenharmony_ci@property(nonatomic, readwrite, copy, null_resettable) NSData *value;
174ffe3c632Sopenharmony_ci
175ffe3c632Sopenharmony_ci@end
176ffe3c632Sopenharmony_ci
177ffe3c632Sopenharmony_ciNS_ASSUME_NONNULL_END
178ffe3c632Sopenharmony_ci
179ffe3c632Sopenharmony_ciCF_EXTERN_C_END
180ffe3c632Sopenharmony_ci
181ffe3c632Sopenharmony_ci#pragma clang diagnostic pop
182ffe3c632Sopenharmony_ci
183ffe3c632Sopenharmony_ci// @@protoc_insertion_point(global_scope)
184