snap-control 0.8.3

Control plane implementation of the SNAP transport underlay for SCION
Documentation
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
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
// @generated by buffa-codegen. DO NOT EDIT.
// source: anapaya/snap/v1/control_service.proto

/// Request to get the SNAP data plane details for the client to connect to.
#[derive(Clone, PartialEq, Default)]
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(default)]
pub struct GetSnapDataPlaneAddressRequest {}
impl ::core::fmt::Debug for GetSnapDataPlaneAddressRequest {
    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
        f.debug_struct("GetSnapDataPlaneAddressRequest").finish()
    }
}
impl GetSnapDataPlaneAddressRequest {
    /// Protobuf type URL for this message, for use with `Any::pack` and
    /// `Any::unpack_if`.
    ///
    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
    pub const TYPE_URL: &'static str = "type.googleapis.com/anapaya.snap.v1.GetSnapDataPlaneAddressRequest";
}
::buffa::impl_default_instance!(GetSnapDataPlaneAddressRequest);
impl ::buffa::MessageName for GetSnapDataPlaneAddressRequest {
    const PACKAGE: &'static str = "anapaya.snap.v1";
    const NAME: &'static str = "GetSnapDataPlaneAddressRequest";
    const FULL_NAME: &'static str = "anapaya.snap.v1.GetSnapDataPlaneAddressRequest";
    const TYPE_URL: &'static str = "type.googleapis.com/anapaya.snap.v1.GetSnapDataPlaneAddressRequest";
}
impl ::buffa::Message for GetSnapDataPlaneAddressRequest {
    /// Returns the total encoded size in bytes.
    ///
    /// The result is a `u32`; the protobuf specification requires all
    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
    /// compliant message will never overflow this type.
    #[allow(clippy::let_and_return)]
    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
        #[allow(unused_imports)]
        use ::buffa::Enumeration as _;
        let size = 0u32;
        size
    }
    fn write_to(
        &self,
        _cache: &mut ::buffa::SizeCache,
        _buf: &mut impl ::buffa::bytes::BufMut,
    ) {
        #[allow(unused_imports)]
        use ::buffa::Enumeration as _;
    }
    fn merge_field(
        &mut self,
        tag: ::buffa::encoding::Tag,
        buf: &mut impl ::buffa::bytes::Buf,
        ctx: ::buffa::DecodeContext<'_>,
    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
        #[allow(unused_imports)]
        use ::buffa::bytes::Buf as _;
        #[allow(unused_imports)]
        use ::buffa::Enumeration as _;
        match tag.field_number() {
            _ => {
                ::buffa::encoding::skip_field_depth(tag, buf, ctx.depth())?;
            }
        }
        ::core::result::Result::Ok(())
    }
    fn clear(&mut self) {}
}
impl ::buffa::json_helpers::ProtoElemJson for GetSnapDataPlaneAddressRequest {
    fn serialize_proto_json<S: ::serde::Serializer>(
        v: &Self,
        s: S,
    ) -> ::core::result::Result<S::Ok, S::Error> {
        ::serde::Serialize::serialize(v, s)
    }
    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
        d: D,
    ) -> ::core::result::Result<Self, D::Error> {
        <Self as ::serde::Deserialize>::deserialize(d)
    }
}
#[doc(hidden)]
pub const __GET_SNAP_DATA_PLANE_ADDRESS_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
    type_url: "type.googleapis.com/anapaya.snap.v1.GetSnapDataPlaneAddressRequest",
    to_json: ::buffa::type_registry::any_to_json::<GetSnapDataPlaneAddressRequest>,
    from_json: ::buffa::type_registry::any_from_json::<GetSnapDataPlaneAddressRequest>,
    is_wkt: false,
};
/// SNAP data plane response message.
#[derive(Clone, PartialEq, Default)]
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(default)]
pub struct GetSnapDataPlaneAddressResponse {
    /// The UDP endpoint (host:port) of the SNAP data plane.
    /// The host can either be an IP address or a hostname.
    ///
    /// Field 1: `address`
    #[serde(
        rename = "address",
        with = "::buffa::json_helpers::proto_string",
        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_str"
    )]
    pub address: ::buffa::alloc::string::String,
    /// The URL of the SNAPtun control plane API. This can be the same
    /// as the snap control plane URL.
    ///
    /// Field 2: `snap_tun_control_address`
    #[serde(
        rename = "snapTunControlAddress",
        alias = "snap_tun_control_address",
        skip_serializing_if = "::core::option::Option::is_none"
    )]
    pub snap_tun_control_address: ::core::option::Option<::buffa::alloc::string::String>,
    /// The static identity of the snaptun-ng server.
    ///
    /// Field 3: `snap_static_x25519`
    #[serde(
        rename = "snapStaticX25519",
        alias = "snap_static_x25519",
        with = "::buffa::json_helpers::opt_bytes",
        skip_serializing_if = "::core::option::Option::is_none"
    )]
    pub snap_static_x25519: ::core::option::Option<::buffa::alloc::vec::Vec<u8>>,
}
impl ::core::fmt::Debug for GetSnapDataPlaneAddressResponse {
    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
        f.debug_struct("GetSnapDataPlaneAddressResponse")
            .field("address", &self.address)
            .field("snap_tun_control_address", &self.snap_tun_control_address)
            .field("snap_static_x25519", &self.snap_static_x25519)
            .finish()
    }
}
impl GetSnapDataPlaneAddressResponse {
    /// Protobuf type URL for this message, for use with `Any::pack` and
    /// `Any::unpack_if`.
    ///
    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
    pub const TYPE_URL: &'static str = "type.googleapis.com/anapaya.snap.v1.GetSnapDataPlaneAddressResponse";
}
impl GetSnapDataPlaneAddressResponse {
    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
    #[inline]
    ///Sets [`Self::snap_tun_control_address`] to `Some(value)`, consuming and returning `self`.
    pub fn with_snap_tun_control_address(
        mut self,
        value: impl Into<::buffa::alloc::string::String>,
    ) -> Self {
        self.snap_tun_control_address = Some(value.into());
        self
    }
    #[must_use = "with_* setters return `self` by value; assign or chain the result"]
    #[inline]
    ///Sets [`Self::snap_static_x25519`] to `Some(value)`, consuming and returning `self`.
    pub fn with_snap_static_x25519(
        mut self,
        value: impl Into<::buffa::alloc::vec::Vec<u8>>,
    ) -> Self {
        self.snap_static_x25519 = Some(value.into());
        self
    }
}
::buffa::impl_default_instance!(GetSnapDataPlaneAddressResponse);
impl ::buffa::MessageName for GetSnapDataPlaneAddressResponse {
    const PACKAGE: &'static str = "anapaya.snap.v1";
    const NAME: &'static str = "GetSnapDataPlaneAddressResponse";
    const FULL_NAME: &'static str = "anapaya.snap.v1.GetSnapDataPlaneAddressResponse";
    const TYPE_URL: &'static str = "type.googleapis.com/anapaya.snap.v1.GetSnapDataPlaneAddressResponse";
}
impl ::buffa::Message for GetSnapDataPlaneAddressResponse {
    /// Returns the total encoded size in bytes.
    ///
    /// The result is a `u32`; the protobuf specification requires all
    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
    /// compliant message will never overflow this type.
    #[allow(clippy::let_and_return)]
    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
        #[allow(unused_imports)]
        use ::buffa::Enumeration as _;
        let mut size = 0u32;
        if !self.address.is_empty() {
            size += 1u32 + ::buffa::types::string_encoded_len(&self.address) as u32;
        }
        if let Some(ref v) = self.snap_tun_control_address {
            size += 1u32 + ::buffa::types::string_encoded_len(v) as u32;
        }
        if let Some(ref v) = self.snap_static_x25519 {
            size += 1u32 + ::buffa::types::bytes_encoded_len(v) as u32;
        }
        size
    }
    fn write_to(
        &self,
        _cache: &mut ::buffa::SizeCache,
        buf: &mut impl ::buffa::bytes::BufMut,
    ) {
        #[allow(unused_imports)]
        use ::buffa::Enumeration as _;
        if !self.address.is_empty() {
            ::buffa::types::put_string_field(1u32, &self.address, buf);
        }
        if let Some(ref v) = self.snap_tun_control_address {
            ::buffa::types::put_string_field(2u32, v, buf);
        }
        if let Some(ref v) = self.snap_static_x25519 {
            ::buffa::types::put_bytes_field(3u32, v, buf);
        }
    }
    fn merge_field(
        &mut self,
        tag: ::buffa::encoding::Tag,
        buf: &mut impl ::buffa::bytes::Buf,
        ctx: ::buffa::DecodeContext<'_>,
    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
        #[allow(unused_imports)]
        use ::buffa::bytes::Buf as _;
        #[allow(unused_imports)]
        use ::buffa::Enumeration as _;
        match tag.field_number() {
            1u32 => {
                ::buffa::encoding::check_wire_type(
                    tag,
                    ::buffa::encoding::WireType::LengthDelimited,
                )?;
                ::buffa::types::merge_string(&mut self.address, buf)?;
            }
            2u32 => {
                ::buffa::encoding::check_wire_type(
                    tag,
                    ::buffa::encoding::WireType::LengthDelimited,
                )?;
                ::buffa::types::merge_string(
                    self
                        .snap_tun_control_address
                        .get_or_insert_with(::buffa::alloc::string::String::new),
                    buf,
                )?;
            }
            3u32 => {
                ::buffa::encoding::check_wire_type(
                    tag,
                    ::buffa::encoding::WireType::LengthDelimited,
                )?;
                ::buffa::types::merge_bytes(
                    self
                        .snap_static_x25519
                        .get_or_insert_with(::buffa::alloc::vec::Vec::new),
                    buf,
                )?;
            }
            _ => {
                ::buffa::encoding::skip_field_depth(tag, buf, ctx.depth())?;
            }
        }
        ::core::result::Result::Ok(())
    }
    fn clear(&mut self) {
        self.address.clear();
        self.snap_tun_control_address = ::core::option::Option::None;
        self.snap_static_x25519 = ::core::option::Option::None;
    }
}
impl ::buffa::json_helpers::ProtoElemJson for GetSnapDataPlaneAddressResponse {
    fn serialize_proto_json<S: ::serde::Serializer>(
        v: &Self,
        s: S,
    ) -> ::core::result::Result<S::Ok, S::Error> {
        ::serde::Serialize::serialize(v, s)
    }
    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
        d: D,
    ) -> ::core::result::Result<Self, D::Error> {
        <Self as ::serde::Deserialize>::deserialize(d)
    }
}
#[doc(hidden)]
pub const __GET_SNAP_DATA_PLANE_ADDRESS_RESPONSE_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
    type_url: "type.googleapis.com/anapaya.snap.v1.GetSnapDataPlaneAddressResponse",
    to_json: ::buffa::type_registry::any_to_json::<GetSnapDataPlaneAddressResponse>,
    from_json: ::buffa::type_registry::any_from_json::<GetSnapDataPlaneAddressResponse>,
    is_wkt: false,
};
/// Request to register a static identity for a snaptun connection.
#[derive(Clone, PartialEq, Default)]
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(default)]
pub struct RegisterSnapTunIdentityRequest {
    /// The static public key of the client.
    ///
    /// Field 1: `initiator_static_x25519`
    #[serde(
        rename = "initiatorStaticX25519",
        alias = "initiator_static_x25519",
        with = "::buffa::json_helpers::bytes",
        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_bytes"
    )]
    pub initiator_static_x25519: ::buffa::alloc::vec::Vec<u8>,
    /// The clients pre shared key. This can be either 32 bytes or all 0 bytes.
    ///
    /// Field 2: `psk_share`
    #[serde(
        rename = "pskShare",
        alias = "psk_share",
        with = "::buffa::json_helpers::bytes",
        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_bytes"
    )]
    pub psk_share: ::buffa::alloc::vec::Vec<u8>,
}
impl ::core::fmt::Debug for RegisterSnapTunIdentityRequest {
    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
        f.debug_struct("RegisterSnapTunIdentityRequest")
            .field("initiator_static_x25519", &self.initiator_static_x25519)
            .field("psk_share", &self.psk_share)
            .finish()
    }
}
impl RegisterSnapTunIdentityRequest {
    /// Protobuf type URL for this message, for use with `Any::pack` and
    /// `Any::unpack_if`.
    ///
    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
    pub const TYPE_URL: &'static str = "type.googleapis.com/anapaya.snap.v1.RegisterSnapTunIdentityRequest";
}
::buffa::impl_default_instance!(RegisterSnapTunIdentityRequest);
impl ::buffa::MessageName for RegisterSnapTunIdentityRequest {
    const PACKAGE: &'static str = "anapaya.snap.v1";
    const NAME: &'static str = "RegisterSnapTunIdentityRequest";
    const FULL_NAME: &'static str = "anapaya.snap.v1.RegisterSnapTunIdentityRequest";
    const TYPE_URL: &'static str = "type.googleapis.com/anapaya.snap.v1.RegisterSnapTunIdentityRequest";
}
impl ::buffa::Message for RegisterSnapTunIdentityRequest {
    /// Returns the total encoded size in bytes.
    ///
    /// The result is a `u32`; the protobuf specification requires all
    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
    /// compliant message will never overflow this type.
    #[allow(clippy::let_and_return)]
    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
        #[allow(unused_imports)]
        use ::buffa::Enumeration as _;
        let mut size = 0u32;
        if !self.initiator_static_x25519.is_empty() {
            size
                += 1u32
                    + ::buffa::types::bytes_encoded_len(&self.initiator_static_x25519)
                        as u32;
        }
        if !self.psk_share.is_empty() {
            size += 1u32 + ::buffa::types::bytes_encoded_len(&self.psk_share) as u32;
        }
        size
    }
    fn write_to(
        &self,
        _cache: &mut ::buffa::SizeCache,
        buf: &mut impl ::buffa::bytes::BufMut,
    ) {
        #[allow(unused_imports)]
        use ::buffa::Enumeration as _;
        if !self.initiator_static_x25519.is_empty() {
            ::buffa::types::put_bytes_field(1u32, &self.initiator_static_x25519, buf);
        }
        if !self.psk_share.is_empty() {
            ::buffa::types::put_bytes_field(2u32, &self.psk_share, buf);
        }
    }
    fn merge_field(
        &mut self,
        tag: ::buffa::encoding::Tag,
        buf: &mut impl ::buffa::bytes::Buf,
        ctx: ::buffa::DecodeContext<'_>,
    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
        #[allow(unused_imports)]
        use ::buffa::bytes::Buf as _;
        #[allow(unused_imports)]
        use ::buffa::Enumeration as _;
        match tag.field_number() {
            1u32 => {
                ::buffa::encoding::check_wire_type(
                    tag,
                    ::buffa::encoding::WireType::LengthDelimited,
                )?;
                ::buffa::types::merge_bytes(&mut self.initiator_static_x25519, buf)?;
            }
            2u32 => {
                ::buffa::encoding::check_wire_type(
                    tag,
                    ::buffa::encoding::WireType::LengthDelimited,
                )?;
                ::buffa::types::merge_bytes(&mut self.psk_share, buf)?;
            }
            _ => {
                ::buffa::encoding::skip_field_depth(tag, buf, ctx.depth())?;
            }
        }
        ::core::result::Result::Ok(())
    }
    fn clear(&mut self) {
        self.initiator_static_x25519.clear();
        self.psk_share.clear();
    }
}
impl ::buffa::json_helpers::ProtoElemJson for RegisterSnapTunIdentityRequest {
    fn serialize_proto_json<S: ::serde::Serializer>(
        v: &Self,
        s: S,
    ) -> ::core::result::Result<S::Ok, S::Error> {
        ::serde::Serialize::serialize(v, s)
    }
    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
        d: D,
    ) -> ::core::result::Result<Self, D::Error> {
        <Self as ::serde::Deserialize>::deserialize(d)
    }
}
#[doc(hidden)]
pub const __REGISTER_SNAP_TUN_IDENTITY_REQUEST_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
    type_url: "type.googleapis.com/anapaya.snap.v1.RegisterSnapTunIdentityRequest",
    to_json: ::buffa::type_registry::any_to_json::<RegisterSnapTunIdentityRequest>,
    from_json: ::buffa::type_registry::any_from_json::<RegisterSnapTunIdentityRequest>,
    is_wkt: false,
};
/// Snap register identity response.
#[derive(Clone, PartialEq, Default)]
#[derive(::serde::Serialize, ::serde::Deserialize)]
#[serde(default)]
pub struct RegisterSnapTunIdentityResponse {
    /// The servers pre shared key. This can be either 32 bytes or all 0 bytes.
    ///
    /// Field 1: `psk_share`
    #[serde(
        rename = "pskShare",
        alias = "psk_share",
        with = "::buffa::json_helpers::bytes",
        skip_serializing_if = "::buffa::json_helpers::skip_if::is_empty_bytes"
    )]
    pub psk_share: ::buffa::alloc::vec::Vec<u8>,
}
impl ::core::fmt::Debug for RegisterSnapTunIdentityResponse {
    fn fmt(&self, f: &mut ::core::fmt::Formatter<'_>) -> ::core::fmt::Result {
        f.debug_struct("RegisterSnapTunIdentityResponse")
            .field("psk_share", &self.psk_share)
            .finish()
    }
}
impl RegisterSnapTunIdentityResponse {
    /// Protobuf type URL for this message, for use with `Any::pack` and
    /// `Any::unpack_if`.
    ///
    /// Format: `type.googleapis.com/<fully.qualified.TypeName>`
    pub const TYPE_URL: &'static str = "type.googleapis.com/anapaya.snap.v1.RegisterSnapTunIdentityResponse";
}
::buffa::impl_default_instance!(RegisterSnapTunIdentityResponse);
impl ::buffa::MessageName for RegisterSnapTunIdentityResponse {
    const PACKAGE: &'static str = "anapaya.snap.v1";
    const NAME: &'static str = "RegisterSnapTunIdentityResponse";
    const FULL_NAME: &'static str = "anapaya.snap.v1.RegisterSnapTunIdentityResponse";
    const TYPE_URL: &'static str = "type.googleapis.com/anapaya.snap.v1.RegisterSnapTunIdentityResponse";
}
impl ::buffa::Message for RegisterSnapTunIdentityResponse {
    /// Returns the total encoded size in bytes.
    ///
    /// The result is a `u32`; the protobuf specification requires all
    /// messages to fit within 2 GiB (2,147,483,647 bytes), so a
    /// compliant message will never overflow this type.
    #[allow(clippy::let_and_return)]
    fn compute_size(&self, _cache: &mut ::buffa::SizeCache) -> u32 {
        #[allow(unused_imports)]
        use ::buffa::Enumeration as _;
        let mut size = 0u32;
        if !self.psk_share.is_empty() {
            size += 1u32 + ::buffa::types::bytes_encoded_len(&self.psk_share) as u32;
        }
        size
    }
    fn write_to(
        &self,
        _cache: &mut ::buffa::SizeCache,
        buf: &mut impl ::buffa::bytes::BufMut,
    ) {
        #[allow(unused_imports)]
        use ::buffa::Enumeration as _;
        if !self.psk_share.is_empty() {
            ::buffa::types::put_bytes_field(1u32, &self.psk_share, buf);
        }
    }
    fn merge_field(
        &mut self,
        tag: ::buffa::encoding::Tag,
        buf: &mut impl ::buffa::bytes::Buf,
        ctx: ::buffa::DecodeContext<'_>,
    ) -> ::core::result::Result<(), ::buffa::DecodeError> {
        #[allow(unused_imports)]
        use ::buffa::bytes::Buf as _;
        #[allow(unused_imports)]
        use ::buffa::Enumeration as _;
        match tag.field_number() {
            1u32 => {
                ::buffa::encoding::check_wire_type(
                    tag,
                    ::buffa::encoding::WireType::LengthDelimited,
                )?;
                ::buffa::types::merge_bytes(&mut self.psk_share, buf)?;
            }
            _ => {
                ::buffa::encoding::skip_field_depth(tag, buf, ctx.depth())?;
            }
        }
        ::core::result::Result::Ok(())
    }
    fn clear(&mut self) {
        self.psk_share.clear();
    }
}
impl ::buffa::json_helpers::ProtoElemJson for RegisterSnapTunIdentityResponse {
    fn serialize_proto_json<S: ::serde::Serializer>(
        v: &Self,
        s: S,
    ) -> ::core::result::Result<S::Ok, S::Error> {
        ::serde::Serialize::serialize(v, s)
    }
    fn deserialize_proto_json<'de, D: ::serde::Deserializer<'de>>(
        d: D,
    ) -> ::core::result::Result<Self, D::Error> {
        <Self as ::serde::Deserialize>::deserialize(d)
    }
}
#[doc(hidden)]
pub const __REGISTER_SNAP_TUN_IDENTITY_RESPONSE_JSON_ANY: ::buffa::type_registry::JsonAnyEntry = ::buffa::type_registry::JsonAnyEntry {
    type_url: "type.googleapis.com/anapaya.snap.v1.RegisterSnapTunIdentityResponse",
    to_json: ::buffa::type_registry::any_to_json::<RegisterSnapTunIdentityResponse>,
    from_json: ::buffa::type_registry::any_from_json::<RegisterSnapTunIdentityResponse>,
    is_wkt: false,
};