1
+ // automatically generated by the FlatBuffers compiler, do not modify
2
+
3
+ package io .objectbox .sync .server ;
4
+
5
+ import io .objectbox .flatbuffers .BaseVector ;
6
+ import io .objectbox .flatbuffers .BooleanVector ;
7
+ import io .objectbox .flatbuffers .ByteVector ;
8
+ import io .objectbox .flatbuffers .Constants ;
9
+ import io .objectbox .flatbuffers .DoubleVector ;
10
+ import io .objectbox .flatbuffers .FlatBufferBuilder ;
11
+ import io .objectbox .flatbuffers .FloatVector ;
12
+ import io .objectbox .flatbuffers .IntVector ;
13
+ import io .objectbox .flatbuffers .LongVector ;
14
+ import io .objectbox .flatbuffers .ShortVector ;
15
+ import io .objectbox .flatbuffers .StringVector ;
16
+ import io .objectbox .flatbuffers .Struct ;
17
+ import io .objectbox .flatbuffers .Table ;
18
+ import io .objectbox .flatbuffers .UnionVector ;
19
+ import java .nio .ByteBuffer ;
20
+ import java .nio .ByteOrder ;
21
+
22
+ @ SuppressWarnings ("unused" )
23
+ public final class JwtConfig extends Table {
24
+ public static void ValidateVersion () { Constants .FLATBUFFERS_23_5_26 (); }
25
+ public static JwtConfig getRootAsJwtConfig (ByteBuffer _bb ) { return getRootAsJwtConfig (_bb , new JwtConfig ()); }
26
+ public static JwtConfig getRootAsJwtConfig (ByteBuffer _bb , JwtConfig obj ) { _bb .order (ByteOrder .LITTLE_ENDIAN ); return (obj .__assign (_bb .getInt (_bb .position ()) + _bb .position (), _bb )); }
27
+ public void __init (int _i , ByteBuffer _bb ) { __reset (_i , _bb ); }
28
+ public JwtConfig __assign (int _i , ByteBuffer _bb ) { __init (_i , _bb ); return this ; }
29
+
30
+ /**
31
+ * URL to fetch the current public key used to verify JWT signatures.
32
+ */
33
+ public String publicKeyUrl () { int o = __offset (4 ); return o != 0 ? __string (o + bb_pos ) : null ; }
34
+ public ByteBuffer publicKeyUrlAsByteBuffer () { return __vector_as_bytebuffer (4 , 1 ); }
35
+ public ByteBuffer publicKeyUrlInByteBuffer (ByteBuffer _bb ) { return __vector_in_bytebuffer (_bb , 4 , 1 ); }
36
+ /**
37
+ * Fixed public key used to sign JWT tokens; e.g. for development purposes.
38
+ * Supply either publicKey or publicKeyUrl, but not both.
39
+ */
40
+ public String publicKey () { int o = __offset (6 ); return o != 0 ? __string (o + bb_pos ) : null ; }
41
+ public ByteBuffer publicKeyAsByteBuffer () { return __vector_as_bytebuffer (6 , 1 ); }
42
+ public ByteBuffer publicKeyInByteBuffer (ByteBuffer _bb ) { return __vector_in_bytebuffer (_bb , 6 , 1 ); }
43
+ /**
44
+ * Cache expiration time in seconds for the public key(s) fetched from publicKeyUrl.
45
+ * If absent or zero, the default is used.
46
+ */
47
+ public long publicKeyCacheExpirationSeconds () { int o = __offset (8 ); return o != 0 ? (long )bb .getInt (o + bb_pos ) & 0xFFFFFFFFL : 0L ; }
48
+ /**
49
+ * JWT claim "aud" (audience) used to verify JWT tokens.
50
+ */
51
+ public String claimAud () { int o = __offset (10 ); return o != 0 ? __string (o + bb_pos ) : null ; }
52
+ public ByteBuffer claimAudAsByteBuffer () { return __vector_as_bytebuffer (10 , 1 ); }
53
+ public ByteBuffer claimAudInByteBuffer (ByteBuffer _bb ) { return __vector_in_bytebuffer (_bb , 10 , 1 ); }
54
+ /**
55
+ * JWT claim "iss" (issuer) used to verify JWT tokens.
56
+ */
57
+ public String claimIss () { int o = __offset (12 ); return o != 0 ? __string (o + bb_pos ) : null ; }
58
+ public ByteBuffer claimIssAsByteBuffer () { return __vector_as_bytebuffer (12 , 1 ); }
59
+ public ByteBuffer claimIssInByteBuffer (ByteBuffer _bb ) { return __vector_in_bytebuffer (_bb , 12 , 1 ); }
60
+
61
+ public static int createJwtConfig (FlatBufferBuilder builder ,
62
+ int publicKeyUrlOffset ,
63
+ int publicKeyOffset ,
64
+ long publicKeyCacheExpirationSeconds ,
65
+ int claimAudOffset ,
66
+ int claimIssOffset ) {
67
+ builder .startTable (5 );
68
+ JwtConfig .addClaimIss (builder , claimIssOffset );
69
+ JwtConfig .addClaimAud (builder , claimAudOffset );
70
+ JwtConfig .addPublicKeyCacheExpirationSeconds (builder , publicKeyCacheExpirationSeconds );
71
+ JwtConfig .addPublicKey (builder , publicKeyOffset );
72
+ JwtConfig .addPublicKeyUrl (builder , publicKeyUrlOffset );
73
+ return JwtConfig .endJwtConfig (builder );
74
+ }
75
+
76
+ public static void startJwtConfig (FlatBufferBuilder builder ) { builder .startTable (5 ); }
77
+ public static void addPublicKeyUrl (FlatBufferBuilder builder , int publicKeyUrlOffset ) { builder .addOffset (0 , publicKeyUrlOffset , 0 ); }
78
+ public static void addPublicKey (FlatBufferBuilder builder , int publicKeyOffset ) { builder .addOffset (1 , publicKeyOffset , 0 ); }
79
+ public static void addPublicKeyCacheExpirationSeconds (FlatBufferBuilder builder , long publicKeyCacheExpirationSeconds ) { builder .addInt (2 , (int ) publicKeyCacheExpirationSeconds , (int ) 0L ); }
80
+ public static void addClaimAud (FlatBufferBuilder builder , int claimAudOffset ) { builder .addOffset (3 , claimAudOffset , 0 ); }
81
+ public static void addClaimIss (FlatBufferBuilder builder , int claimIssOffset ) { builder .addOffset (4 , claimIssOffset , 0 ); }
82
+ public static int endJwtConfig (FlatBufferBuilder builder ) {
83
+ int o = builder .endTable ();
84
+ return o ;
85
+ }
86
+
87
+ public static final class Vector extends BaseVector {
88
+ public Vector __assign (int _vector , int _element_size , ByteBuffer _bb ) { __reset (_vector , _element_size , _bb ); return this ; }
89
+
90
+ public JwtConfig get (int j ) { return get (new JwtConfig (), j ); }
91
+ public JwtConfig get (JwtConfig obj , int j ) { return obj .__assign (__indirect (__element (j ), bb ), bb ); }
92
+ }
93
+ }
0 commit comments