aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/objective-c/examples/Sample/RemoteTestClient/Messages.pbobjc.h
blob: 5f3231417500e3f56e40da777d4ee0b65fed0ca2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
// Generated by the protocol buffer compiler.  DO NOT EDIT!
// source: messages.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

CF_EXTERN_C_BEGIN

@class RMTPayload;
@class RMTResponseParameters;
@class RMTSimpleRequest;
@class RMTSimpleResponse;
@class RMTStreamingInputCallRequest;
@class RMTStreamingInputCallResponse;
@class RMTStreamingOutputCallRequest;
@class RMTStreamingOutputCallResponse;

#pragma mark - Enum RMTPayloadType

// The type of payload that should be returned.
typedef GPB_ENUM(RMTPayloadType) {
  RMTPayloadType_GPBUnrecognizedEnumeratorValue = kGPBUnrecognizedEnumeratorValue,
  // Compressable text format.
  RMTPayloadType_Compressable = 0,

  // Uncompressable binary format.
  RMTPayloadType_Uncompressable = 1,

  // Randomly chosen from all other formats defined in this enum.
  RMTPayloadType_Random = 2,
};

GPBEnumDescriptor *RMTPayloadType_EnumDescriptor(void);

BOOL RMTPayloadType_IsValidValue(int32_t value);


#pragma mark - RMTMessagesRoot

@interface RMTMessagesRoot : GPBRootObject
@end

#pragma mark - RMTPayload

typedef GPB_ENUM(RMTPayload_FieldNumber) {
  RMTPayload_FieldNumber_Type = 1,
  RMTPayload_FieldNumber_Body = 2,
};

// A block of data, to simply increase gRPC message size.
@interface RMTPayload : GPBMessage

// The type of data in body.
@property(nonatomic, readwrite) RMTPayloadType type;

// Primary contents of payload.
@property(nonatomic, readwrite, copy) NSData *body;

@end

int32_t RMTPayload_Type_RawValue(RMTPayload *message);
void SetRMTPayload_Type_RawValue(RMTPayload *message, int32_t value);

#pragma mark - RMTSimpleRequest

typedef GPB_ENUM(RMTSimpleRequest_FieldNumber) {
  RMTSimpleRequest_FieldNumber_ResponseType = 1,
  RMTSimpleRequest_FieldNumber_ResponseSize = 2,
  RMTSimpleRequest_FieldNumber_Payload = 3,
  RMTSimpleRequest_FieldNumber_FillUsername = 4,
  RMTSimpleRequest_FieldNumber_FillOauthScope = 5,
};

// Unary request.
@interface RMTSimpleRequest : GPBMessage

// Desired payload type in the response from the server.
// If response_type is RANDOM, server randomly chooses one from other formats.
@property(nonatomic, readwrite) RMTPayloadType responseType;

// Desired payload size in the response from the server.
// If response_type is COMPRESSABLE, this denotes the size before compression.
@property(nonatomic, readwrite) int32_t responseSize;

// Optional input payload sent along with the request.
@property(nonatomic, readwrite) BOOL hasPayload;
@property(nonatomic, readwrite, strong) RMTPayload *payload;

// Whether SimpleResponse should include username.
@property(nonatomic, readwrite) BOOL fillUsername;

// Whether SimpleResponse should include OAuth scope.
@property(nonatomic, readwrite) BOOL fillOauthScope;

@end

int32_t RMTSimpleRequest_ResponseType_RawValue(RMTSimpleRequest *message);
void SetRMTSimpleRequest_ResponseType_RawValue(RMTSimpleRequest *message, int32_t value);

#pragma mark - RMTSimpleResponse

typedef GPB_ENUM(RMTSimpleResponse_FieldNumber) {
  RMTSimpleResponse_FieldNumber_Payload = 1,
  RMTSimpleResponse_FieldNumber_Username = 2,
  RMTSimpleResponse_FieldNumber_OauthScope = 3,
};

// Unary response, as configured by the request.
@interface RMTSimpleResponse : GPBMessage

// Payload to increase message size.
@property(nonatomic, readwrite) BOOL hasPayload;
@property(nonatomic, readwrite, strong) RMTPayload *payload;

// The user the request came from, for verifying authentication was
// successful when the client expected it.
@property(nonatomic, readwrite, copy) NSString *username;

// OAuth scope.
@property(nonatomic, readwrite, copy) NSString *oauthScope;

@end

#pragma mark - RMTStreamingInputCallRequest

typedef GPB_ENUM(RMTStreamingInputCallRequest_FieldNumber) {
  RMTStreamingInputCallRequest_FieldNumber_Payload = 1,
};

// Client-streaming request.
@interface RMTStreamingInputCallRequest : GPBMessage

// Optional input payload sent along with the request.
@property(nonatomic, readwrite) BOOL hasPayload;
@property(nonatomic, readwrite, strong) RMTPayload *payload;

@end

#pragma mark - RMTStreamingInputCallResponse

typedef GPB_ENUM(RMTStreamingInputCallResponse_FieldNumber) {
  RMTStreamingInputCallResponse_FieldNumber_AggregatedPayloadSize = 1,
};

// Client-streaming response.
@interface RMTStreamingInputCallResponse : GPBMessage

// Aggregated size of payloads received from the client.
@property(nonatomic, readwrite) int32_t aggregatedPayloadSize;

@end

#pragma mark - RMTResponseParameters

typedef GPB_ENUM(RMTResponseParameters_FieldNumber) {
  RMTResponseParameters_FieldNumber_Size = 1,
  RMTResponseParameters_FieldNumber_IntervalUs = 2,
};

// Configuration for a particular response.
@interface RMTResponseParameters : GPBMessage

// Desired payload sizes in responses from the server.
// If response_type is COMPRESSABLE, this denotes the size before compression.
@property(nonatomic, readwrite) int32_t size;

// Desired interval between consecutive responses in the response stream in
// microseconds.
@property(nonatomic, readwrite) int32_t intervalUs;

@end

#pragma mark - RMTStreamingOutputCallRequest

typedef GPB_ENUM(RMTStreamingOutputCallRequest_FieldNumber) {
  RMTStreamingOutputCallRequest_FieldNumber_ResponseType = 1,
  RMTStreamingOutputCallRequest_FieldNumber_ResponseParametersArray = 2,
  RMTStreamingOutputCallRequest_FieldNumber_Payload = 3,
};

// Server-streaming request.
@interface RMTStreamingOutputCallRequest : GPBMessage

// Desired payload type in the response from the server.
// If response_type is RANDOM, the payload from each response in the stream
// might be of different types. This is to simulate a mixed type of payload
// stream.
@property(nonatomic, readwrite) RMTPayloadType responseType;

// Configuration for each expected response message.
// |responseParametersArray| contains |RMTResponseParameters|
@property(nonatomic, readwrite, strong) NSMutableArray *responseParametersArray;

// Optional input payload sent along with the request.
@property(nonatomic, readwrite) BOOL hasPayload;
@property(nonatomic, readwrite, strong) RMTPayload *payload;

@end

int32_t RMTStreamingOutputCallRequest_ResponseType_RawValue(RMTStreamingOutputCallRequest *message);
void SetRMTStreamingOutputCallRequest_ResponseType_RawValue(RMTStreamingOutputCallRequest *message, int32_t value);

#pragma mark - RMTStreamingOutputCallResponse

typedef GPB_ENUM(RMTStreamingOutputCallResponse_FieldNumber) {
  RMTStreamingOutputCallResponse_FieldNumber_Payload = 1,
};

// Server-streaming response, as configured by the request and parameters.
@interface RMTStreamingOutputCallResponse : GPBMessage

// Payload to increase response size.
@property(nonatomic, readwrite) BOOL hasPayload;
@property(nonatomic, readwrite, strong) RMTPayload *payload;

@end

CF_EXTERN_C_END