text:
/* This file was generated by upbc (the upb compiler) from the input
 * file:
 *
 *     envoy/extensions/transport_sockets/tls/v3/common.proto
 *
 * Do not edit -- your changes will be discarded when the file is
 * regenerated. */

#ifndef ENVOY_EXTENSIONS_TRANSPORT_SOCKETS_TLS_V3_COMMON_PROTO_UPB_H_
#define ENVOY_EXTENSIONS_TRANSPORT_SOCKETS_TLS_V3_COMMON_PROTO_UPB_H_

#include "upb/msg_internal.h"
#include "upb/decode.h"
#include "upb/decode_fast.h"
#include "upb/encode.h"

#include "upb/port_def.inc"

#ifdef __cplusplus
extern "C" {
#endif

struct envoy_extensions_transport_sockets_tls_v3_TlsParameters;
struct envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider;
struct envoy_extensions_transport_sockets_tls_v3_TlsCertificate;
struct envoy_extensions_transport_sockets_tls_v3_TlsSessionTicketKeys;
struct envoy_extensions_transport_sockets_tls_v3_CertificateProviderPluginInstance;
struct envoy_extensions_transport_sockets_tls_v3_SubjectAltNameMatcher;
struct envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext;
typedef struct envoy_extensions_transport_sockets_tls_v3_TlsParameters envoy_extensions_transport_sockets_tls_v3_TlsParameters;
typedef struct envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider;
typedef struct envoy_extensions_transport_sockets_tls_v3_TlsCertificate envoy_extensions_transport_sockets_tls_v3_TlsCertificate;
typedef struct envoy_extensions_transport_sockets_tls_v3_TlsSessionTicketKeys envoy_extensions_transport_sockets_tls_v3_TlsSessionTicketKeys;
typedef struct envoy_extensions_transport_sockets_tls_v3_CertificateProviderPluginInstance envoy_extensions_transport_sockets_tls_v3_CertificateProviderPluginInstance;
typedef struct envoy_extensions_transport_sockets_tls_v3_SubjectAltNameMatcher envoy_extensions_transport_sockets_tls_v3_SubjectAltNameMatcher;
typedef struct envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext;
extern const upb_MiniTable envoy_extensions_transport_sockets_tls_v3_TlsParameters_msginit;
extern const upb_MiniTable envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider_msginit;
extern const upb_MiniTable envoy_extensions_transport_sockets_tls_v3_TlsCertificate_msginit;
extern const upb_MiniTable envoy_extensions_transport_sockets_tls_v3_TlsSessionTicketKeys_msginit;
extern const upb_MiniTable envoy_extensions_transport_sockets_tls_v3_CertificateProviderPluginInstance_msginit;
extern const upb_MiniTable envoy_extensions_transport_sockets_tls_v3_SubjectAltNameMatcher_msginit;
extern const upb_MiniTable envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_msginit;
struct envoy_config_core_v3_DataSource;
struct envoy_config_core_v3_TypedExtensionConfig;
struct envoy_config_core_v3_WatchedDirectory;
struct envoy_type_matcher_v3_StringMatcher;
struct google_protobuf_Any;
struct google_protobuf_BoolValue;
struct google_protobuf_UInt32Value;
extern const upb_MiniTable envoy_config_core_v3_DataSource_msginit;
extern const upb_MiniTable envoy_config_core_v3_TypedExtensionConfig_msginit;
extern const upb_MiniTable envoy_config_core_v3_WatchedDirectory_msginit;
extern const upb_MiniTable envoy_type_matcher_v3_StringMatcher_msginit;
extern const upb_MiniTable google_protobuf_Any_msginit;
extern const upb_MiniTable google_protobuf_BoolValue_msginit;
extern const upb_MiniTable google_protobuf_UInt32Value_msginit;

typedef enum {
  envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_VERIFY_TRUST_CHAIN = 0,
  envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_ACCEPT_UNTRUSTED = 1
} envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_TrustChainVerification;

typedef enum {
  envoy_extensions_transport_sockets_tls_v3_SubjectAltNameMatcher_SAN_TYPE_UNSPECIFIED = 0,
  envoy_extensions_transport_sockets_tls_v3_SubjectAltNameMatcher_EMAIL = 1,
  envoy_extensions_transport_sockets_tls_v3_SubjectAltNameMatcher_DNS = 2,
  envoy_extensions_transport_sockets_tls_v3_SubjectAltNameMatcher_URI = 3,
  envoy_extensions_transport_sockets_tls_v3_SubjectAltNameMatcher_IP_ADDRESS = 4
} envoy_extensions_transport_sockets_tls_v3_SubjectAltNameMatcher_SanType;

typedef enum {
  envoy_extensions_transport_sockets_tls_v3_TlsParameters_TLS_AUTO = 0,
  envoy_extensions_transport_sockets_tls_v3_TlsParameters_TLSv1_0 = 1,
  envoy_extensions_transport_sockets_tls_v3_TlsParameters_TLSv1_1 = 2,
  envoy_extensions_transport_sockets_tls_v3_TlsParameters_TLSv1_2 = 3,
  envoy_extensions_transport_sockets_tls_v3_TlsParameters_TLSv1_3 = 4
} envoy_extensions_transport_sockets_tls_v3_TlsParameters_TlsProtocol;

/* envoy.extensions.transport_sockets.tls.v3.TlsParameters */

UPB_INLINE envoy_extensions_transport_sockets_tls_v3_TlsParameters* envoy_extensions_transport_sockets_tls_v3_TlsParameters_new(upb_Arena* arena) {
  return (envoy_extensions_transport_sockets_tls_v3_TlsParameters*)_upb_Message_New(&envoy_extensions_transport_sockets_tls_v3_TlsParameters_msginit, arena);
}
UPB_INLINE envoy_extensions_transport_sockets_tls_v3_TlsParameters* envoy_extensions_transport_sockets_tls_v3_TlsParameters_parse(const char* buf, size_t size, upb_Arena* arena) {
  envoy_extensions_transport_sockets_tls_v3_TlsParameters* ret = envoy_extensions_transport_sockets_tls_v3_TlsParameters_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, &envoy_extensions_transport_sockets_tls_v3_TlsParameters_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE envoy_extensions_transport_sockets_tls_v3_TlsParameters* envoy_extensions_transport_sockets_tls_v3_TlsParameters_parse_ex(const char* buf, size_t size,
                           const upb_ExtensionRegistry* extreg,
                           int options, upb_Arena* arena) {
  envoy_extensions_transport_sockets_tls_v3_TlsParameters* ret = envoy_extensions_transport_sockets_tls_v3_TlsParameters_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, &envoy_extensions_transport_sockets_tls_v3_TlsParameters_msginit, extreg, options, arena) !=
      kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE char* envoy_extensions_transport_sockets_tls_v3_TlsParameters_serialize(const envoy_extensions_transport_sockets_tls_v3_TlsParameters* msg, upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, &envoy_extensions_transport_sockets_tls_v3_TlsParameters_msginit, 0, arena, &ptr, len);
  return ptr;
}
UPB_INLINE char* envoy_extensions_transport_sockets_tls_v3_TlsParameters_serialize_ex(const envoy_extensions_transport_sockets_tls_v3_TlsParameters* msg, int options,
                                 upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, &envoy_extensions_transport_sockets_tls_v3_TlsParameters_msginit, options, arena, &ptr, len);
  return ptr;
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_TlsParameters_clear_tls_minimum_protocol_version(const envoy_extensions_transport_sockets_tls_v3_TlsParameters* msg) {
  *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = 0;
}
UPB_INLINE int32_t envoy_extensions_transport_sockets_tls_v3_TlsParameters_tls_minimum_protocol_version(const envoy_extensions_transport_sockets_tls_v3_TlsParameters* msg) {
  return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t);
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_TlsParameters_clear_tls_maximum_protocol_version(const envoy_extensions_transport_sockets_tls_v3_TlsParameters* msg) {
  *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = 0;
}
UPB_INLINE int32_t envoy_extensions_transport_sockets_tls_v3_TlsParameters_tls_maximum_protocol_version(const envoy_extensions_transport_sockets_tls_v3_TlsParameters* msg) {
  return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t);
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_TlsParameters_clear_cipher_suites(const envoy_extensions_transport_sockets_tls_v3_TlsParameters* msg) {
  _upb_array_detach(msg, UPB_SIZE(8, 8));
}
UPB_INLINE upb_StringView const* envoy_extensions_transport_sockets_tls_v3_TlsParameters_cipher_suites(const envoy_extensions_transport_sockets_tls_v3_TlsParameters* msg, size_t* len) {
  return (upb_StringView const*)_upb_array_accessor(msg, UPB_SIZE(8, 8), len);
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_TlsParameters_clear_ecdh_curves(const envoy_extensions_transport_sockets_tls_v3_TlsParameters* msg) {
  _upb_array_detach(msg, UPB_SIZE(12, 16));
}
UPB_INLINE upb_StringView const* envoy_extensions_transport_sockets_tls_v3_TlsParameters_ecdh_curves(const envoy_extensions_transport_sockets_tls_v3_TlsParameters* msg, size_t* len) {
  return (upb_StringView const*)_upb_array_accessor(msg, UPB_SIZE(12, 16), len);
}

UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_TlsParameters_set_tls_minimum_protocol_version(envoy_extensions_transport_sockets_tls_v3_TlsParameters *msg, int32_t value) {
  *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value;
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_TlsParameters_set_tls_maximum_protocol_version(envoy_extensions_transport_sockets_tls_v3_TlsParameters *msg, int32_t value) {
  *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value;
}
UPB_INLINE upb_StringView* envoy_extensions_transport_sockets_tls_v3_TlsParameters_mutable_cipher_suites(envoy_extensions_transport_sockets_tls_v3_TlsParameters* msg, size_t* len) {
  return (upb_StringView*)_upb_array_mutable_accessor(msg, UPB_SIZE(8, 8), len);
}
UPB_INLINE upb_StringView* envoy_extensions_transport_sockets_tls_v3_TlsParameters_resize_cipher_suites(envoy_extensions_transport_sockets_tls_v3_TlsParameters* msg, size_t len, upb_Arena* arena) {
  return (upb_StringView*)_upb_Array_Resize_accessor2(msg, UPB_SIZE(8, 8), len, UPB_SIZE(3, 4), arena);
}
UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_TlsParameters_add_cipher_suites(envoy_extensions_transport_sockets_tls_v3_TlsParameters* msg, upb_StringView val, upb_Arena* arena) {
  return _upb_Array_Append_accessor2(msg, UPB_SIZE(8, 8), UPB_SIZE(3, 4), &val, arena);
}
UPB_INLINE upb_StringView* envoy_extensions_transport_sockets_tls_v3_TlsParameters_mutable_ecdh_curves(envoy_extensions_transport_sockets_tls_v3_TlsParameters* msg, size_t* len) {
  return (upb_StringView*)_upb_array_mutable_accessor(msg, UPB_SIZE(12, 16), len);
}
UPB_INLINE upb_StringView* envoy_extensions_transport_sockets_tls_v3_TlsParameters_resize_ecdh_curves(envoy_extensions_transport_sockets_tls_v3_TlsParameters* msg, size_t len, upb_Arena* arena) {
  return (upb_StringView*)_upb_Array_Resize_accessor2(msg, UPB_SIZE(12, 16), len, UPB_SIZE(3, 4), arena);
}
UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_TlsParameters_add_ecdh_curves(envoy_extensions_transport_sockets_tls_v3_TlsParameters* msg, upb_StringView val, upb_Arena* arena) {
  return _upb_Array_Append_accessor2(msg, UPB_SIZE(12, 16), UPB_SIZE(3, 4), &val, arena);
}

/* envoy.extensions.transport_sockets.tls.v3.PrivateKeyProvider */

UPB_INLINE envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider* envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider_new(upb_Arena* arena) {
  return (envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider*)_upb_Message_New(&envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider_msginit, arena);
}
UPB_INLINE envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider* envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider_parse(const char* buf, size_t size, upb_Arena* arena) {
  envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider* ret = envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, &envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider* envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider_parse_ex(const char* buf, size_t size,
                           const upb_ExtensionRegistry* extreg,
                           int options, upb_Arena* arena) {
  envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider* ret = envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, &envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider_msginit, extreg, options, arena) !=
      kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE char* envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider_serialize(const envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider* msg, upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, &envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider_msginit, 0, arena, &ptr, len);
  return ptr;
}
UPB_INLINE char* envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider_serialize_ex(const envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider* msg, int options,
                                 upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, &envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider_msginit, options, arena, &ptr, len);
  return ptr;
}
typedef enum {
  envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider_config_type_typed_config = 3,
  envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider_config_type_NOT_SET = 0
} envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider_config_type_oneofcases;
UPB_INLINE envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider_config_type_oneofcases envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider_config_type_case(const envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider* msg) {
  return (envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider_config_type_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t);
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider_clear_provider_name(const envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider* msg) {
  *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0);
}
UPB_INLINE upb_StringView envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider_provider_name(const envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider* msg) {
  return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView);
}
UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider_has_typed_config(const envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider* msg) {
  return _upb_getoneofcase(msg, UPB_SIZE(0, 0)) == 3;
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider_clear_typed_config(const envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider* msg) {
  UPB_WRITE_ONEOF(msg, struct google_protobuf_Any*, UPB_SIZE(12, 24), 0, UPB_SIZE(0, 0), envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider_config_type_NOT_SET);
}
UPB_INLINE const struct google_protobuf_Any* envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider_typed_config(const envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider* msg) {
  return UPB_READ_ONEOF(msg, const struct google_protobuf_Any*, UPB_SIZE(12, 24), UPB_SIZE(0, 0), 3, NULL);
}

UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider_set_provider_name(envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider *msg, upb_StringView value) {
  *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView) = value;
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider_set_typed_config(envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider *msg, struct google_protobuf_Any* value) {
  UPB_WRITE_ONEOF(msg, struct google_protobuf_Any*, UPB_SIZE(12, 24), value, UPB_SIZE(0, 0), 3);
}
UPB_INLINE struct google_protobuf_Any* envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider_mutable_typed_config(envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider* msg, upb_Arena* arena) {
  struct google_protobuf_Any* sub = (struct google_protobuf_Any*)envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider_typed_config(msg);
  if (sub == NULL) {
    sub = (struct google_protobuf_Any*)_upb_Message_New(&google_protobuf_Any_msginit, arena);
    if (!sub) return NULL;
    envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider_set_typed_config(msg, sub);
  }
  return sub;
}

/* envoy.extensions.transport_sockets.tls.v3.TlsCertificate */

UPB_INLINE envoy_extensions_transport_sockets_tls_v3_TlsCertificate* envoy_extensions_transport_sockets_tls_v3_TlsCertificate_new(upb_Arena* arena) {
  return (envoy_extensions_transport_sockets_tls_v3_TlsCertificate*)_upb_Message_New(&envoy_extensions_transport_sockets_tls_v3_TlsCertificate_msginit, arena);
}
UPB_INLINE envoy_extensions_transport_sockets_tls_v3_TlsCertificate* envoy_extensions_transport_sockets_tls_v3_TlsCertificate_parse(const char* buf, size_t size, upb_Arena* arena) {
  envoy_extensions_transport_sockets_tls_v3_TlsCertificate* ret = envoy_extensions_transport_sockets_tls_v3_TlsCertificate_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, &envoy_extensions_transport_sockets_tls_v3_TlsCertificate_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE envoy_extensions_transport_sockets_tls_v3_TlsCertificate* envoy_extensions_transport_sockets_tls_v3_TlsCertificate_parse_ex(const char* buf, size_t size,
                           const upb_ExtensionRegistry* extreg,
                           int options, upb_Arena* arena) {
  envoy_extensions_transport_sockets_tls_v3_TlsCertificate* ret = envoy_extensions_transport_sockets_tls_v3_TlsCertificate_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, &envoy_extensions_transport_sockets_tls_v3_TlsCertificate_msginit, extreg, options, arena) !=
      kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE char* envoy_extensions_transport_sockets_tls_v3_TlsCertificate_serialize(const envoy_extensions_transport_sockets_tls_v3_TlsCertificate* msg, upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, &envoy_extensions_transport_sockets_tls_v3_TlsCertificate_msginit, 0, arena, &ptr, len);
  return ptr;
}
UPB_INLINE char* envoy_extensions_transport_sockets_tls_v3_TlsCertificate_serialize_ex(const envoy_extensions_transport_sockets_tls_v3_TlsCertificate* msg, int options,
                                 upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, &envoy_extensions_transport_sockets_tls_v3_TlsCertificate_msginit, options, arena, &ptr, len);
  return ptr;
}
UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_TlsCertificate_has_certificate_chain(const envoy_extensions_transport_sockets_tls_v3_TlsCertificate* msg) {
  return _upb_hasbit(msg, 1);
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_TlsCertificate_clear_certificate_chain(const envoy_extensions_transport_sockets_tls_v3_TlsCertificate* msg) {
  *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const upb_Message*) = NULL;
}
UPB_INLINE const struct envoy_config_core_v3_DataSource* envoy_extensions_transport_sockets_tls_v3_TlsCertificate_certificate_chain(const envoy_extensions_transport_sockets_tls_v3_TlsCertificate* msg) {
  return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct envoy_config_core_v3_DataSource*);
}
UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_TlsCertificate_has_private_key(const envoy_extensions_transport_sockets_tls_v3_TlsCertificate* msg) {
  return _upb_hasbit(msg, 2);
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_TlsCertificate_clear_private_key(const envoy_extensions_transport_sockets_tls_v3_TlsCertificate* msg) {
  *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const upb_Message*) = NULL;
}
UPB_INLINE const struct envoy_config_core_v3_DataSource* envoy_extensions_transport_sockets_tls_v3_TlsCertificate_private_key(const envoy_extensions_transport_sockets_tls_v3_TlsCertificate* msg) {
  return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct envoy_config_core_v3_DataSource*);
}
UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_TlsCertificate_has_password(const envoy_extensions_transport_sockets_tls_v3_TlsCertificate* msg) {
  return _upb_hasbit(msg, 3);
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_TlsCertificate_clear_password(const envoy_extensions_transport_sockets_tls_v3_TlsCertificate* msg) {
  *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const upb_Message*) = NULL;
}
UPB_INLINE const struct envoy_config_core_v3_DataSource* envoy_extensions_transport_sockets_tls_v3_TlsCertificate_password(const envoy_extensions_transport_sockets_tls_v3_TlsCertificate* msg) {
  return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), const struct envoy_config_core_v3_DataSource*);
}
UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_TlsCertificate_has_ocsp_staple(const envoy_extensions_transport_sockets_tls_v3_TlsCertificate* msg) {
  return _upb_hasbit(msg, 4);
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_TlsCertificate_clear_ocsp_staple(const envoy_extensions_transport_sockets_tls_v3_TlsCertificate* msg) {
  *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const upb_Message*) = NULL;
}
UPB_INLINE const struct envoy_config_core_v3_DataSource* envoy_extensions_transport_sockets_tls_v3_TlsCertificate_ocsp_staple(const envoy_extensions_transport_sockets_tls_v3_TlsCertificate* msg) {
  return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), const struct envoy_config_core_v3_DataSource*);
}
UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_TlsCertificate_has_signed_certificate_timestamp(const envoy_extensions_transport_sockets_tls_v3_TlsCertificate* msg) {
  return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 40));
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_TlsCertificate_clear_signed_certificate_timestamp(const envoy_extensions_transport_sockets_tls_v3_TlsCertificate* msg) {
  _upb_array_detach(msg, UPB_SIZE(20, 40));
}
UPB_INLINE const struct envoy_config_core_v3_DataSource* const* envoy_extensions_transport_sockets_tls_v3_TlsCertificate_signed_certificate_timestamp(const envoy_extensions_transport_sockets_tls_v3_TlsCertificate* msg, size_t* len) {
  return (const struct envoy_config_core_v3_DataSource* const*)_upb_array_accessor(msg, UPB_SIZE(20, 40), len);
}
UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_TlsCertificate_has_private_key_provider(const envoy_extensions_transport_sockets_tls_v3_TlsCertificate* msg) {
  return _upb_hasbit(msg, 5);
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_TlsCertificate_clear_private_key_provider(const envoy_extensions_transport_sockets_tls_v3_TlsCertificate* msg) {
  *UPB_PTR_AT(msg, UPB_SIZE(24, 48), const upb_Message*) = NULL;
}
UPB_INLINE const envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider* envoy_extensions_transport_sockets_tls_v3_TlsCertificate_private_key_provider(const envoy_extensions_transport_sockets_tls_v3_TlsCertificate* msg) {
  return *UPB_PTR_AT(msg, UPB_SIZE(24, 48), const envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider*);
}
UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_TlsCertificate_has_watched_directory(const envoy_extensions_transport_sockets_tls_v3_TlsCertificate* msg) {
  return _upb_hasbit(msg, 6);
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_TlsCertificate_clear_watched_directory(const envoy_extensions_transport_sockets_tls_v3_TlsCertificate* msg) {
  *UPB_PTR_AT(msg, UPB_SIZE(28, 56), const upb_Message*) = NULL;
}
UPB_INLINE const struct envoy_config_core_v3_WatchedDirectory* envoy_extensions_transport_sockets_tls_v3_TlsCertificate_watched_directory(const envoy_extensions_transport_sockets_tls_v3_TlsCertificate* msg) {
  return *UPB_PTR_AT(msg, UPB_SIZE(28, 56), const struct envoy_config_core_v3_WatchedDirectory*);
}
UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_TlsCertificate_has_pkcs12(const envoy_extensions_transport_sockets_tls_v3_TlsCertificate* msg) {
  return _upb_hasbit(msg, 7);
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_TlsCertificate_clear_pkcs12(const envoy_extensions_transport_sockets_tls_v3_TlsCertificate* msg) {
  *UPB_PTR_AT(msg, UPB_SIZE(32, 64), const upb_Message*) = NULL;
}
UPB_INLINE const struct envoy_config_core_v3_DataSource* envoy_extensions_transport_sockets_tls_v3_TlsCertificate_pkcs12(const envoy_extensions_transport_sockets_tls_v3_TlsCertificate* msg) {
  return *UPB_PTR_AT(msg, UPB_SIZE(32, 64), const struct envoy_config_core_v3_DataSource*);
}

UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_TlsCertificate_set_certificate_chain(envoy_extensions_transport_sockets_tls_v3_TlsCertificate *msg, struct envoy_config_core_v3_DataSource* value) {
  _upb_sethas(msg, 1);
  *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct envoy_config_core_v3_DataSource*) = value;
}
UPB_INLINE struct envoy_config_core_v3_DataSource* envoy_extensions_transport_sockets_tls_v3_TlsCertificate_mutable_certificate_chain(envoy_extensions_transport_sockets_tls_v3_TlsCertificate* msg, upb_Arena* arena) {
  struct envoy_config_core_v3_DataSource* sub = (struct envoy_config_core_v3_DataSource*)envoy_extensions_transport_sockets_tls_v3_TlsCertificate_certificate_chain(msg);
  if (sub == NULL) {
    sub = (struct envoy_config_core_v3_DataSource*)_upb_Message_New(&envoy_config_core_v3_DataSource_msginit, arena);
    if (!sub) return NULL;
    envoy_extensions_transport_sockets_tls_v3_TlsCertificate_set_certificate_chain(msg, sub);
  }
  return sub;
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_TlsCertificate_set_private_key(envoy_extensions_transport_sockets_tls_v3_TlsCertificate *msg, struct envoy_config_core_v3_DataSource* value) {
  _upb_sethas(msg, 2);
  *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct envoy_config_core_v3_DataSource*) = value;
}
UPB_INLINE struct envoy_config_core_v3_DataSource* envoy_extensions_transport_sockets_tls_v3_TlsCertificate_mutable_private_key(envoy_extensions_transport_sockets_tls_v3_TlsCertificate* msg, upb_Arena* arena) {
  struct envoy_config_core_v3_DataSource* sub = (struct envoy_config_core_v3_DataSource*)envoy_extensions_transport_sockets_tls_v3_TlsCertificate_private_key(msg);
  if (sub == NULL) {
    sub = (struct envoy_config_core_v3_DataSource*)_upb_Message_New(&envoy_config_core_v3_DataSource_msginit, arena);
    if (!sub) return NULL;
    envoy_extensions_transport_sockets_tls_v3_TlsCertificate_set_private_key(msg, sub);
  }
  return sub;
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_TlsCertificate_set_password(envoy_extensions_transport_sockets_tls_v3_TlsCertificate *msg, struct envoy_config_core_v3_DataSource* value) {
  _upb_sethas(msg, 3);
  *UPB_PTR_AT(msg, UPB_SIZE(12, 24), struct envoy_config_core_v3_DataSource*) = value;
}
UPB_INLINE struct envoy_config_core_v3_DataSource* envoy_extensions_transport_sockets_tls_v3_TlsCertificate_mutable_password(envoy_extensions_transport_sockets_tls_v3_TlsCertificate* msg, upb_Arena* arena) {
  struct envoy_config_core_v3_DataSource* sub = (struct envoy_config_core_v3_DataSource*)envoy_extensions_transport_sockets_tls_v3_TlsCertificate_password(msg);
  if (sub == NULL) {
    sub = (struct envoy_config_core_v3_DataSource*)_upb_Message_New(&envoy_config_core_v3_DataSource_msginit, arena);
    if (!sub) return NULL;
    envoy_extensions_transport_sockets_tls_v3_TlsCertificate_set_password(msg, sub);
  }
  return sub;
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_TlsCertificate_set_ocsp_staple(envoy_extensions_transport_sockets_tls_v3_TlsCertificate *msg, struct envoy_config_core_v3_DataSource* value) {
  _upb_sethas(msg, 4);
  *UPB_PTR_AT(msg, UPB_SIZE(16, 32), struct envoy_config_core_v3_DataSource*) = value;
}
UPB_INLINE struct envoy_config_core_v3_DataSource* envoy_extensions_transport_sockets_tls_v3_TlsCertificate_mutable_ocsp_staple(envoy_extensions_transport_sockets_tls_v3_TlsCertificate* msg, upb_Arena* arena) {
  struct envoy_config_core_v3_DataSource* sub = (struct envoy_config_core_v3_DataSource*)envoy_extensions_transport_sockets_tls_v3_TlsCertificate_ocsp_staple(msg);
  if (sub == NULL) {
    sub = (struct envoy_config_core_v3_DataSource*)_upb_Message_New(&envoy_config_core_v3_DataSource_msginit, arena);
    if (!sub) return NULL;
    envoy_extensions_transport_sockets_tls_v3_TlsCertificate_set_ocsp_staple(msg, sub);
  }
  return sub;
}
UPB_INLINE struct envoy_config_core_v3_DataSource** envoy_extensions_transport_sockets_tls_v3_TlsCertificate_mutable_signed_certificate_timestamp(envoy_extensions_transport_sockets_tls_v3_TlsCertificate* msg, size_t* len) {
  return (struct envoy_config_core_v3_DataSource**)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 40), len);
}
UPB_INLINE struct envoy_config_core_v3_DataSource** envoy_extensions_transport_sockets_tls_v3_TlsCertificate_resize_signed_certificate_timestamp(envoy_extensions_transport_sockets_tls_v3_TlsCertificate* msg, size_t len, upb_Arena* arena) {
  return (struct envoy_config_core_v3_DataSource**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(20, 40), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_core_v3_DataSource* envoy_extensions_transport_sockets_tls_v3_TlsCertificate_add_signed_certificate_timestamp(envoy_extensions_transport_sockets_tls_v3_TlsCertificate* msg, upb_Arena* arena) {
  struct envoy_config_core_v3_DataSource* sub = (struct envoy_config_core_v3_DataSource*)_upb_Message_New(&envoy_config_core_v3_DataSource_msginit, arena);
  bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(20, 40), UPB_SIZE(2, 3), &sub, arena);
  if (!ok) return NULL;
  return sub;
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_TlsCertificate_set_private_key_provider(envoy_extensions_transport_sockets_tls_v3_TlsCertificate *msg, envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider* value) {
  _upb_sethas(msg, 5);
  *UPB_PTR_AT(msg, UPB_SIZE(24, 48), envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider*) = value;
}
UPB_INLINE struct envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider* envoy_extensions_transport_sockets_tls_v3_TlsCertificate_mutable_private_key_provider(envoy_extensions_transport_sockets_tls_v3_TlsCertificate* msg, upb_Arena* arena) {
  struct envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider* sub = (struct envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider*)envoy_extensions_transport_sockets_tls_v3_TlsCertificate_private_key_provider(msg);
  if (sub == NULL) {
    sub = (struct envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider*)_upb_Message_New(&envoy_extensions_transport_sockets_tls_v3_PrivateKeyProvider_msginit, arena);
    if (!sub) return NULL;
    envoy_extensions_transport_sockets_tls_v3_TlsCertificate_set_private_key_provider(msg, sub);
  }
  return sub;
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_TlsCertificate_set_watched_directory(envoy_extensions_transport_sockets_tls_v3_TlsCertificate *msg, struct envoy_config_core_v3_WatchedDirectory* value) {
  _upb_sethas(msg, 6);
  *UPB_PTR_AT(msg, UPB_SIZE(28, 56), struct envoy_config_core_v3_WatchedDirectory*) = value;
}
UPB_INLINE struct envoy_config_core_v3_WatchedDirectory* envoy_extensions_transport_sockets_tls_v3_TlsCertificate_mutable_watched_directory(envoy_extensions_transport_sockets_tls_v3_TlsCertificate* msg, upb_Arena* arena) {
  struct envoy_config_core_v3_WatchedDirectory* sub = (struct envoy_config_core_v3_WatchedDirectory*)envoy_extensions_transport_sockets_tls_v3_TlsCertificate_watched_directory(msg);
  if (sub == NULL) {
    sub = (struct envoy_config_core_v3_WatchedDirectory*)_upb_Message_New(&envoy_config_core_v3_WatchedDirectory_msginit, arena);
    if (!sub) return NULL;
    envoy_extensions_transport_sockets_tls_v3_TlsCertificate_set_watched_directory(msg, sub);
  }
  return sub;
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_TlsCertificate_set_pkcs12(envoy_extensions_transport_sockets_tls_v3_TlsCertificate *msg, struct envoy_config_core_v3_DataSource* value) {
  _upb_sethas(msg, 7);
  *UPB_PTR_AT(msg, UPB_SIZE(32, 64), struct envoy_config_core_v3_DataSource*) = value;
}
UPB_INLINE struct envoy_config_core_v3_DataSource* envoy_extensions_transport_sockets_tls_v3_TlsCertificate_mutable_pkcs12(envoy_extensions_transport_sockets_tls_v3_TlsCertificate* msg, upb_Arena* arena) {
  struct envoy_config_core_v3_DataSource* sub = (struct envoy_config_core_v3_DataSource*)envoy_extensions_transport_sockets_tls_v3_TlsCertificate_pkcs12(msg);
  if (sub == NULL) {
    sub = (struct envoy_config_core_v3_DataSource*)_upb_Message_New(&envoy_config_core_v3_DataSource_msginit, arena);
    if (!sub) return NULL;
    envoy_extensions_transport_sockets_tls_v3_TlsCertificate_set_pkcs12(msg, sub);
  }
  return sub;
}

/* envoy.extensions.transport_sockets.tls.v3.TlsSessionTicketKeys */

UPB_INLINE envoy_extensions_transport_sockets_tls_v3_TlsSessionTicketKeys* envoy_extensions_transport_sockets_tls_v3_TlsSessionTicketKeys_new(upb_Arena* arena) {
  return (envoy_extensions_transport_sockets_tls_v3_TlsSessionTicketKeys*)_upb_Message_New(&envoy_extensions_transport_sockets_tls_v3_TlsSessionTicketKeys_msginit, arena);
}
UPB_INLINE envoy_extensions_transport_sockets_tls_v3_TlsSessionTicketKeys* envoy_extensions_transport_sockets_tls_v3_TlsSessionTicketKeys_parse(const char* buf, size_t size, upb_Arena* arena) {
  envoy_extensions_transport_sockets_tls_v3_TlsSessionTicketKeys* ret = envoy_extensions_transport_sockets_tls_v3_TlsSessionTicketKeys_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, &envoy_extensions_transport_sockets_tls_v3_TlsSessionTicketKeys_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE envoy_extensions_transport_sockets_tls_v3_TlsSessionTicketKeys* envoy_extensions_transport_sockets_tls_v3_TlsSessionTicketKeys_parse_ex(const char* buf, size_t size,
                           const upb_ExtensionRegistry* extreg,
                           int options, upb_Arena* arena) {
  envoy_extensions_transport_sockets_tls_v3_TlsSessionTicketKeys* ret = envoy_extensions_transport_sockets_tls_v3_TlsSessionTicketKeys_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, &envoy_extensions_transport_sockets_tls_v3_TlsSessionTicketKeys_msginit, extreg, options, arena) !=
      kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE char* envoy_extensions_transport_sockets_tls_v3_TlsSessionTicketKeys_serialize(const envoy_extensions_transport_sockets_tls_v3_TlsSessionTicketKeys* msg, upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, &envoy_extensions_transport_sockets_tls_v3_TlsSessionTicketKeys_msginit, 0, arena, &ptr, len);
  return ptr;
}
UPB_INLINE char* envoy_extensions_transport_sockets_tls_v3_TlsSessionTicketKeys_serialize_ex(const envoy_extensions_transport_sockets_tls_v3_TlsSessionTicketKeys* msg, int options,
                                 upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, &envoy_extensions_transport_sockets_tls_v3_TlsSessionTicketKeys_msginit, options, arena, &ptr, len);
  return ptr;
}
UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_TlsSessionTicketKeys_has_keys(const envoy_extensions_transport_sockets_tls_v3_TlsSessionTicketKeys* msg) {
  return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0));
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_TlsSessionTicketKeys_clear_keys(const envoy_extensions_transport_sockets_tls_v3_TlsSessionTicketKeys* msg) {
  _upb_array_detach(msg, UPB_SIZE(0, 0));
}
UPB_INLINE const struct envoy_config_core_v3_DataSource* const* envoy_extensions_transport_sockets_tls_v3_TlsSessionTicketKeys_keys(const envoy_extensions_transport_sockets_tls_v3_TlsSessionTicketKeys* msg, size_t* len) {
  return (const struct envoy_config_core_v3_DataSource* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len);
}

UPB_INLINE struct envoy_config_core_v3_DataSource** envoy_extensions_transport_sockets_tls_v3_TlsSessionTicketKeys_mutable_keys(envoy_extensions_transport_sockets_tls_v3_TlsSessionTicketKeys* msg, size_t* len) {
  return (struct envoy_config_core_v3_DataSource**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
}
UPB_INLINE struct envoy_config_core_v3_DataSource** envoy_extensions_transport_sockets_tls_v3_TlsSessionTicketKeys_resize_keys(envoy_extensions_transport_sockets_tls_v3_TlsSessionTicketKeys* msg, size_t len, upb_Arena* arena) {
  return (struct envoy_config_core_v3_DataSource**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(0, 0), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_config_core_v3_DataSource* envoy_extensions_transport_sockets_tls_v3_TlsSessionTicketKeys_add_keys(envoy_extensions_transport_sockets_tls_v3_TlsSessionTicketKeys* msg, upb_Arena* arena) {
  struct envoy_config_core_v3_DataSource* sub = (struct envoy_config_core_v3_DataSource*)_upb_Message_New(&envoy_config_core_v3_DataSource_msginit, arena);
  bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(0, 0), UPB_SIZE(2, 3), &sub, arena);
  if (!ok) return NULL;
  return sub;
}

/* envoy.extensions.transport_sockets.tls.v3.CertificateProviderPluginInstance */

UPB_INLINE envoy_extensions_transport_sockets_tls_v3_CertificateProviderPluginInstance* envoy_extensions_transport_sockets_tls_v3_CertificateProviderPluginInstance_new(upb_Arena* arena) {
  return (envoy_extensions_transport_sockets_tls_v3_CertificateProviderPluginInstance*)_upb_Message_New(&envoy_extensions_transport_sockets_tls_v3_CertificateProviderPluginInstance_msginit, arena);
}
UPB_INLINE envoy_extensions_transport_sockets_tls_v3_CertificateProviderPluginInstance* envoy_extensions_transport_sockets_tls_v3_CertificateProviderPluginInstance_parse(const char* buf, size_t size, upb_Arena* arena) {
  envoy_extensions_transport_sockets_tls_v3_CertificateProviderPluginInstance* ret = envoy_extensions_transport_sockets_tls_v3_CertificateProviderPluginInstance_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, &envoy_extensions_transport_sockets_tls_v3_CertificateProviderPluginInstance_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE envoy_extensions_transport_sockets_tls_v3_CertificateProviderPluginInstance* envoy_extensions_transport_sockets_tls_v3_CertificateProviderPluginInstance_parse_ex(const char* buf, size_t size,
                           const upb_ExtensionRegistry* extreg,
                           int options, upb_Arena* arena) {
  envoy_extensions_transport_sockets_tls_v3_CertificateProviderPluginInstance* ret = envoy_extensions_transport_sockets_tls_v3_CertificateProviderPluginInstance_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, &envoy_extensions_transport_sockets_tls_v3_CertificateProviderPluginInstance_msginit, extreg, options, arena) !=
      kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE char* envoy_extensions_transport_sockets_tls_v3_CertificateProviderPluginInstance_serialize(const envoy_extensions_transport_sockets_tls_v3_CertificateProviderPluginInstance* msg, upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, &envoy_extensions_transport_sockets_tls_v3_CertificateProviderPluginInstance_msginit, 0, arena, &ptr, len);
  return ptr;
}
UPB_INLINE char* envoy_extensions_transport_sockets_tls_v3_CertificateProviderPluginInstance_serialize_ex(const envoy_extensions_transport_sockets_tls_v3_CertificateProviderPluginInstance* msg, int options,
                                 upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, &envoy_extensions_transport_sockets_tls_v3_CertificateProviderPluginInstance_msginit, options, arena, &ptr, len);
  return ptr;
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_CertificateProviderPluginInstance_clear_instance_name(const envoy_extensions_transport_sockets_tls_v3_CertificateProviderPluginInstance* msg) {
  *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0);
}
UPB_INLINE upb_StringView envoy_extensions_transport_sockets_tls_v3_CertificateProviderPluginInstance_instance_name(const envoy_extensions_transport_sockets_tls_v3_CertificateProviderPluginInstance* msg) {
  return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_StringView);
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_CertificateProviderPluginInstance_clear_certificate_name(const envoy_extensions_transport_sockets_tls_v3_CertificateProviderPluginInstance* msg) {
  *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0);
}
UPB_INLINE upb_StringView envoy_extensions_transport_sockets_tls_v3_CertificateProviderPluginInstance_certificate_name(const envoy_extensions_transport_sockets_tls_v3_CertificateProviderPluginInstance* msg) {
  return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_StringView);
}

UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_CertificateProviderPluginInstance_set_instance_name(envoy_extensions_transport_sockets_tls_v3_CertificateProviderPluginInstance *msg, upb_StringView value) {
  *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_StringView) = value;
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_CertificateProviderPluginInstance_set_certificate_name(envoy_extensions_transport_sockets_tls_v3_CertificateProviderPluginInstance *msg, upb_StringView value) {
  *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_StringView) = value;
}

/* envoy.extensions.transport_sockets.tls.v3.SubjectAltNameMatcher */

UPB_INLINE envoy_extensions_transport_sockets_tls_v3_SubjectAltNameMatcher* envoy_extensions_transport_sockets_tls_v3_SubjectAltNameMatcher_new(upb_Arena* arena) {
  return (envoy_extensions_transport_sockets_tls_v3_SubjectAltNameMatcher*)_upb_Message_New(&envoy_extensions_transport_sockets_tls_v3_SubjectAltNameMatcher_msginit, arena);
}
UPB_INLINE envoy_extensions_transport_sockets_tls_v3_SubjectAltNameMatcher* envoy_extensions_transport_sockets_tls_v3_SubjectAltNameMatcher_parse(const char* buf, size_t size, upb_Arena* arena) {
  envoy_extensions_transport_sockets_tls_v3_SubjectAltNameMatcher* ret = envoy_extensions_transport_sockets_tls_v3_SubjectAltNameMatcher_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, &envoy_extensions_transport_sockets_tls_v3_SubjectAltNameMatcher_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE envoy_extensions_transport_sockets_tls_v3_SubjectAltNameMatcher* envoy_extensions_transport_sockets_tls_v3_SubjectAltNameMatcher_parse_ex(const char* buf, size_t size,
                           const upb_ExtensionRegistry* extreg,
                           int options, upb_Arena* arena) {
  envoy_extensions_transport_sockets_tls_v3_SubjectAltNameMatcher* ret = envoy_extensions_transport_sockets_tls_v3_SubjectAltNameMatcher_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, &envoy_extensions_transport_sockets_tls_v3_SubjectAltNameMatcher_msginit, extreg, options, arena) !=
      kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE char* envoy_extensions_transport_sockets_tls_v3_SubjectAltNameMatcher_serialize(const envoy_extensions_transport_sockets_tls_v3_SubjectAltNameMatcher* msg, upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, &envoy_extensions_transport_sockets_tls_v3_SubjectAltNameMatcher_msginit, 0, arena, &ptr, len);
  return ptr;
}
UPB_INLINE char* envoy_extensions_transport_sockets_tls_v3_SubjectAltNameMatcher_serialize_ex(const envoy_extensions_transport_sockets_tls_v3_SubjectAltNameMatcher* msg, int options,
                                 upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, &envoy_extensions_transport_sockets_tls_v3_SubjectAltNameMatcher_msginit, options, arena, &ptr, len);
  return ptr;
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_SubjectAltNameMatcher_clear_san_type(const envoy_extensions_transport_sockets_tls_v3_SubjectAltNameMatcher* msg) {
  *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = 0;
}
UPB_INLINE int32_t envoy_extensions_transport_sockets_tls_v3_SubjectAltNameMatcher_san_type(const envoy_extensions_transport_sockets_tls_v3_SubjectAltNameMatcher* msg) {
  return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t);
}
UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_SubjectAltNameMatcher_has_matcher(const envoy_extensions_transport_sockets_tls_v3_SubjectAltNameMatcher* msg) {
  return _upb_hasbit(msg, 1);
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_SubjectAltNameMatcher_clear_matcher(const envoy_extensions_transport_sockets_tls_v3_SubjectAltNameMatcher* msg) {
  *UPB_PTR_AT(msg, UPB_SIZE(8, 8), const upb_Message*) = NULL;
}
UPB_INLINE const struct envoy_type_matcher_v3_StringMatcher* envoy_extensions_transport_sockets_tls_v3_SubjectAltNameMatcher_matcher(const envoy_extensions_transport_sockets_tls_v3_SubjectAltNameMatcher* msg) {
  return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), const struct envoy_type_matcher_v3_StringMatcher*);
}

UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_SubjectAltNameMatcher_set_san_type(envoy_extensions_transport_sockets_tls_v3_SubjectAltNameMatcher *msg, int32_t value) {
  *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value;
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_SubjectAltNameMatcher_set_matcher(envoy_extensions_transport_sockets_tls_v3_SubjectAltNameMatcher *msg, struct envoy_type_matcher_v3_StringMatcher* value) {
  _upb_sethas(msg, 1);
  *UPB_PTR_AT(msg, UPB_SIZE(8, 8), struct envoy_type_matcher_v3_StringMatcher*) = value;
}
UPB_INLINE struct envoy_type_matcher_v3_StringMatcher* envoy_extensions_transport_sockets_tls_v3_SubjectAltNameMatcher_mutable_matcher(envoy_extensions_transport_sockets_tls_v3_SubjectAltNameMatcher* msg, upb_Arena* arena) {
  struct envoy_type_matcher_v3_StringMatcher* sub = (struct envoy_type_matcher_v3_StringMatcher*)envoy_extensions_transport_sockets_tls_v3_SubjectAltNameMatcher_matcher(msg);
  if (sub == NULL) {
    sub = (struct envoy_type_matcher_v3_StringMatcher*)_upb_Message_New(&envoy_type_matcher_v3_StringMatcher_msginit, arena);
    if (!sub) return NULL;
    envoy_extensions_transport_sockets_tls_v3_SubjectAltNameMatcher_set_matcher(msg, sub);
  }
  return sub;
}

/* envoy.extensions.transport_sockets.tls.v3.CertificateValidationContext */

UPB_INLINE envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext* envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_new(upb_Arena* arena) {
  return (envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext*)_upb_Message_New(&envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_msginit, arena);
}
UPB_INLINE envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext* envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_parse(const char* buf, size_t size, upb_Arena* arena) {
  envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext* ret = envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, &envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext* envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_parse_ex(const char* buf, size_t size,
                           const upb_ExtensionRegistry* extreg,
                           int options, upb_Arena* arena) {
  envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext* ret = envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, &envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_msginit, extreg, options, arena) !=
      kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE char* envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_serialize(const envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext* msg, upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, &envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_msginit, 0, arena, &ptr, len);
  return ptr;
}
UPB_INLINE char* envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_serialize_ex(const envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext* msg, int options,
                                 upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, &envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_msginit, options, arena, &ptr, len);
  return ptr;
}
UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_has_trusted_ca(const envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext* msg) {
  return _upb_hasbit(msg, 1);
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_clear_trusted_ca(const envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext* msg) {
  *UPB_PTR_AT(msg, UPB_SIZE(12, 16), const upb_Message*) = NULL;
}
UPB_INLINE const struct envoy_config_core_v3_DataSource* envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_trusted_ca(const envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext* msg) {
  return *UPB_PTR_AT(msg, UPB_SIZE(12, 16), const struct envoy_config_core_v3_DataSource*);
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_clear_verify_certificate_hash(const envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext* msg) {
  _upb_array_detach(msg, UPB_SIZE(16, 24));
}
UPB_INLINE upb_StringView const* envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_verify_certificate_hash(const envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext* msg, size_t* len) {
  return (upb_StringView const*)_upb_array_accessor(msg, UPB_SIZE(16, 24), len);
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_clear_verify_certificate_spki(const envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext* msg) {
  _upb_array_detach(msg, UPB_SIZE(20, 32));
}
UPB_INLINE upb_StringView const* envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_verify_certificate_spki(const envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext* msg, size_t* len) {
  return (upb_StringView const*)_upb_array_accessor(msg, UPB_SIZE(20, 32), len);
}
UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_has_require_signed_certificate_timestamp(const envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext* msg) {
  return _upb_hasbit(msg, 2);
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_clear_require_signed_certificate_timestamp(const envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext* msg) {
  *UPB_PTR_AT(msg, UPB_SIZE(24, 40), const upb_Message*) = NULL;
}
UPB_INLINE const struct google_protobuf_BoolValue* envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_require_signed_certificate_timestamp(const envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext* msg) {
  return *UPB_PTR_AT(msg, UPB_SIZE(24, 40), const struct google_protobuf_BoolValue*);
}
UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_has_crl(const envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext* msg) {
  return _upb_hasbit(msg, 3);
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_clear_crl(const envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext* msg) {
  *UPB_PTR_AT(msg, UPB_SIZE(28, 48), const upb_Message*) = NULL;
}
UPB_INLINE const struct envoy_config_core_v3_DataSource* envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_crl(const envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext* msg) {
  return *UPB_PTR_AT(msg, UPB_SIZE(28, 48), const struct envoy_config_core_v3_DataSource*);
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_clear_allow_expired_certificate(const envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext* msg) {
  *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = 0;
}
UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_allow_expired_certificate(const envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext* msg) {
  return *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool);
}
UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_has_match_subject_alt_names(const envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext* msg) {
  return _upb_has_submsg_nohasbit(msg, UPB_SIZE(32, 56));
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_clear_match_subject_alt_names(const envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext* msg) {
  _upb_array_detach(msg, UPB_SIZE(32, 56));
}
UPB_INLINE const struct envoy_type_matcher_v3_StringMatcher* const* envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_match_subject_alt_names(const envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext* msg, size_t* len) {
  return (const struct envoy_type_matcher_v3_StringMatcher* const*)_upb_array_accessor(msg, UPB_SIZE(32, 56), len);
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_clear_trust_chain_verification(const envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext* msg) {
  *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = 0;
}
UPB_INLINE int32_t envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_trust_chain_verification(const envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext* msg) {
  return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t);
}
UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_has_watched_directory(const envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext* msg) {
  return _upb_hasbit(msg, 4);
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_clear_watched_directory(const envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext* msg) {
  *UPB_PTR_AT(msg, UPB_SIZE(36, 64), const upb_Message*) = NULL;
}
UPB_INLINE const struct envoy_config_core_v3_WatchedDirectory* envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_watched_directory(const envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext* msg) {
  return *UPB_PTR_AT(msg, UPB_SIZE(36, 64), const struct envoy_config_core_v3_WatchedDirectory*);
}
UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_has_custom_validator_config(const envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext* msg) {
  return _upb_hasbit(msg, 5);
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_clear_custom_validator_config(const envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext* msg) {
  *UPB_PTR_AT(msg, UPB_SIZE(40, 72), const upb_Message*) = NULL;
}
UPB_INLINE const struct envoy_config_core_v3_TypedExtensionConfig* envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_custom_validator_config(const envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext* msg) {
  return *UPB_PTR_AT(msg, UPB_SIZE(40, 72), const struct envoy_config_core_v3_TypedExtensionConfig*);
}
UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_has_ca_certificate_provider_instance(const envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext* msg) {
  return _upb_hasbit(msg, 6);
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_clear_ca_certificate_provider_instance(const envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext* msg) {
  *UPB_PTR_AT(msg, UPB_SIZE(44, 80), const upb_Message*) = NULL;
}
UPB_INLINE const envoy_extensions_transport_sockets_tls_v3_CertificateProviderPluginInstance* envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_ca_certificate_provider_instance(const envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext* msg) {
  return *UPB_PTR_AT(msg, UPB_SIZE(44, 80), const envoy_extensions_transport_sockets_tls_v3_CertificateProviderPluginInstance*);
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_clear_only_verify_leaf_cert_crl(const envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext* msg) {
  *UPB_PTR_AT(msg, UPB_SIZE(8, 8), bool) = 0;
}
UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_only_verify_leaf_cert_crl(const envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext* msg) {
  return *UPB_PTR_AT(msg, UPB_SIZE(8, 8), bool);
}
UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_has_match_typed_subject_alt_names(const envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext* msg) {
  return _upb_has_submsg_nohasbit(msg, UPB_SIZE(48, 88));
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_clear_match_typed_subject_alt_names(const envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext* msg) {
  _upb_array_detach(msg, UPB_SIZE(48, 88));
}
UPB_INLINE const envoy_extensions_transport_sockets_tls_v3_SubjectAltNameMatcher* const* envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_match_typed_subject_alt_names(const envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext* msg, size_t* len) {
  return (const envoy_extensions_transport_sockets_tls_v3_SubjectAltNameMatcher* const*)_upb_array_accessor(msg, UPB_SIZE(48, 88), len);
}
UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_has_max_verify_depth(const envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext* msg) {
  return _upb_hasbit(msg, 7);
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_clear_max_verify_depth(const envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext* msg) {
  *UPB_PTR_AT(msg, UPB_SIZE(52, 96), const upb_Message*) = NULL;
}
UPB_INLINE const struct google_protobuf_UInt32Value* envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_max_verify_depth(const envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext* msg) {
  return *UPB_PTR_AT(msg, UPB_SIZE(52, 96), const struct google_protobuf_UInt32Value*);
}

UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_set_trusted_ca(envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext *msg, struct envoy_config_core_v3_DataSource* value) {
  _upb_sethas(msg, 1);
  *UPB_PTR_AT(msg, UPB_SIZE(12, 16), struct envoy_config_core_v3_DataSource*) = value;
}
UPB_INLINE struct envoy_config_core_v3_DataSource* envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_mutable_trusted_ca(envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext* msg, upb_Arena* arena) {
  struct envoy_config_core_v3_DataSource* sub = (struct envoy_config_core_v3_DataSource*)envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_trusted_ca(msg);
  if (sub == NULL) {
    sub = (struct envoy_config_core_v3_DataSource*)_upb_Message_New(&envoy_config_core_v3_DataSource_msginit, arena);
    if (!sub) return NULL;
    envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_set_trusted_ca(msg, sub);
  }
  return sub;
}
UPB_INLINE upb_StringView* envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_mutable_verify_certificate_hash(envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext* msg, size_t* len) {
  return (upb_StringView*)_upb_array_mutable_accessor(msg, UPB_SIZE(16, 24), len);
}
UPB_INLINE upb_StringView* envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_resize_verify_certificate_hash(envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext* msg, size_t len, upb_Arena* arena) {
  return (upb_StringView*)_upb_Array_Resize_accessor2(msg, UPB_SIZE(16, 24), len, UPB_SIZE(3, 4), arena);
}
UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_add_verify_certificate_hash(envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext* msg, upb_StringView val, upb_Arena* arena) {
  return _upb_Array_Append_accessor2(msg, UPB_SIZE(16, 24), UPB_SIZE(3, 4), &val, arena);
}
UPB_INLINE upb_StringView* envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_mutable_verify_certificate_spki(envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext* msg, size_t* len) {
  return (upb_StringView*)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 32), len);
}
UPB_INLINE upb_StringView* envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_resize_verify_certificate_spki(envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext* msg, size_t len, upb_Arena* arena) {
  return (upb_StringView*)_upb_Array_Resize_accessor2(msg, UPB_SIZE(20, 32), len, UPB_SIZE(3, 4), arena);
}
UPB_INLINE bool envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_add_verify_certificate_spki(envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext* msg, upb_StringView val, upb_Arena* arena) {
  return _upb_Array_Append_accessor2(msg, UPB_SIZE(20, 32), UPB_SIZE(3, 4), &val, arena);
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_set_require_signed_certificate_timestamp(envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext *msg, struct google_protobuf_BoolValue* value) {
  _upb_sethas(msg, 2);
  *UPB_PTR_AT(msg, UPB_SIZE(24, 40), struct google_protobuf_BoolValue*) = value;
}
UPB_INLINE struct google_protobuf_BoolValue* envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_mutable_require_signed_certificate_timestamp(envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext* msg, upb_Arena* arena) {
  struct google_protobuf_BoolValue* sub = (struct google_protobuf_BoolValue*)envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_require_signed_certificate_timestamp(msg);
  if (sub == NULL) {
    sub = (struct google_protobuf_BoolValue*)_upb_Message_New(&google_protobuf_BoolValue_msginit, arena);
    if (!sub) return NULL;
    envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_set_require_signed_certificate_timestamp(msg, sub);
  }
  return sub;
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_set_crl(envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext *msg, struct envoy_config_core_v3_DataSource* value) {
  _upb_sethas(msg, 3);
  *UPB_PTR_AT(msg, UPB_SIZE(28, 48), struct envoy_config_core_v3_DataSource*) = value;
}
UPB_INLINE struct envoy_config_core_v3_DataSource* envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_mutable_crl(envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext* msg, upb_Arena* arena) {
  struct envoy_config_core_v3_DataSource* sub = (struct envoy_config_core_v3_DataSource*)envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_crl(msg);
  if (sub == NULL) {
    sub = (struct envoy_config_core_v3_DataSource*)_upb_Message_New(&envoy_config_core_v3_DataSource_msginit, arena);
    if (!sub) return NULL;
    envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_set_crl(msg, sub);
  }
  return sub;
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_set_allow_expired_certificate(envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext *msg, bool value) {
  *UPB_PTR_AT(msg, UPB_SIZE(1, 1), bool) = value;
}
UPB_INLINE struct envoy_type_matcher_v3_StringMatcher** envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_mutable_match_subject_alt_names(envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext* msg, size_t* len) {
  return (struct envoy_type_matcher_v3_StringMatcher**)_upb_array_mutable_accessor(msg, UPB_SIZE(32, 56), len);
}
UPB_INLINE struct envoy_type_matcher_v3_StringMatcher** envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_resize_match_subject_alt_names(envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext* msg, size_t len, upb_Arena* arena) {
  return (struct envoy_type_matcher_v3_StringMatcher**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(32, 56), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_type_matcher_v3_StringMatcher* envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_add_match_subject_alt_names(envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext* msg, upb_Arena* arena) {
  struct envoy_type_matcher_v3_StringMatcher* sub = (struct envoy_type_matcher_v3_StringMatcher*)_upb_Message_New(&envoy_type_matcher_v3_StringMatcher_msginit, arena);
  bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(32, 56), UPB_SIZE(2, 3), &sub, arena);
  if (!ok) return NULL;
  return sub;
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_set_trust_chain_verification(envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext *msg, int32_t value) {
  *UPB_PTR_AT(msg, UPB_SIZE(4, 4), int32_t) = value;
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_set_watched_directory(envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext *msg, struct envoy_config_core_v3_WatchedDirectory* value) {
  _upb_sethas(msg, 4);
  *UPB_PTR_AT(msg, UPB_SIZE(36, 64), struct envoy_config_core_v3_WatchedDirectory*) = value;
}
UPB_INLINE struct envoy_config_core_v3_WatchedDirectory* envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_mutable_watched_directory(envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext* msg, upb_Arena* arena) {
  struct envoy_config_core_v3_WatchedDirectory* sub = (struct envoy_config_core_v3_WatchedDirectory*)envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_watched_directory(msg);
  if (sub == NULL) {
    sub = (struct envoy_config_core_v3_WatchedDirectory*)_upb_Message_New(&envoy_config_core_v3_WatchedDirectory_msginit, arena);
    if (!sub) return NULL;
    envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_set_watched_directory(msg, sub);
  }
  return sub;
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_set_custom_validator_config(envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext *msg, struct envoy_config_core_v3_TypedExtensionConfig* value) {
  _upb_sethas(msg, 5);
  *UPB_PTR_AT(msg, UPB_SIZE(40, 72), struct envoy_config_core_v3_TypedExtensionConfig*) = value;
}
UPB_INLINE struct envoy_config_core_v3_TypedExtensionConfig* envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_mutable_custom_validator_config(envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext* msg, upb_Arena* arena) {
  struct envoy_config_core_v3_TypedExtensionConfig* sub = (struct envoy_config_core_v3_TypedExtensionConfig*)envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_custom_validator_config(msg);
  if (sub == NULL) {
    sub = (struct envoy_config_core_v3_TypedExtensionConfig*)_upb_Message_New(&envoy_config_core_v3_TypedExtensionConfig_msginit, arena);
    if (!sub) return NULL;
    envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_set_custom_validator_config(msg, sub);
  }
  return sub;
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_set_ca_certificate_provider_instance(envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext *msg, envoy_extensions_transport_sockets_tls_v3_CertificateProviderPluginInstance* value) {
  _upb_sethas(msg, 6);
  *UPB_PTR_AT(msg, UPB_SIZE(44, 80), envoy_extensions_transport_sockets_tls_v3_CertificateProviderPluginInstance*) = value;
}
UPB_INLINE struct envoy_extensions_transport_sockets_tls_v3_CertificateProviderPluginInstance* envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_mutable_ca_certificate_provider_instance(envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext* msg, upb_Arena* arena) {
  struct envoy_extensions_transport_sockets_tls_v3_CertificateProviderPluginInstance* sub = (struct envoy_extensions_transport_sockets_tls_v3_CertificateProviderPluginInstance*)envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_ca_certificate_provider_instance(msg);
  if (sub == NULL) {
    sub = (struct envoy_extensions_transport_sockets_tls_v3_CertificateProviderPluginInstance*)_upb_Message_New(&envoy_extensions_transport_sockets_tls_v3_CertificateProviderPluginInstance_msginit, arena);
    if (!sub) return NULL;
    envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_set_ca_certificate_provider_instance(msg, sub);
  }
  return sub;
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_set_only_verify_leaf_cert_crl(envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext *msg, bool value) {
  *UPB_PTR_AT(msg, UPB_SIZE(8, 8), bool) = value;
}
UPB_INLINE envoy_extensions_transport_sockets_tls_v3_SubjectAltNameMatcher** envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_mutable_match_typed_subject_alt_names(envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext* msg, size_t* len) {
  return (envoy_extensions_transport_sockets_tls_v3_SubjectAltNameMatcher**)_upb_array_mutable_accessor(msg, UPB_SIZE(48, 88), len);
}
UPB_INLINE envoy_extensions_transport_sockets_tls_v3_SubjectAltNameMatcher** envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_resize_match_typed_subject_alt_names(envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext* msg, size_t len, upb_Arena* arena) {
  return (envoy_extensions_transport_sockets_tls_v3_SubjectAltNameMatcher**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(48, 88), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_extensions_transport_sockets_tls_v3_SubjectAltNameMatcher* envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_add_match_typed_subject_alt_names(envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext* msg, upb_Arena* arena) {
  struct envoy_extensions_transport_sockets_tls_v3_SubjectAltNameMatcher* sub = (struct envoy_extensions_transport_sockets_tls_v3_SubjectAltNameMatcher*)_upb_Message_New(&envoy_extensions_transport_sockets_tls_v3_SubjectAltNameMatcher_msginit, arena);
  bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(48, 88), UPB_SIZE(2, 3), &sub, arena);
  if (!ok) return NULL;
  return sub;
}
UPB_INLINE void envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_set_max_verify_depth(envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext *msg, struct google_protobuf_UInt32Value* value) {
  _upb_sethas(msg, 7);
  *UPB_PTR_AT(msg, UPB_SIZE(52, 96), struct google_protobuf_UInt32Value*) = value;
}
UPB_INLINE struct google_protobuf_UInt32Value* envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_mutable_max_verify_depth(envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext* msg, upb_Arena* arena) {
  struct google_protobuf_UInt32Value* sub = (struct google_protobuf_UInt32Value*)envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_max_verify_depth(msg);
  if (sub == NULL) {
    sub = (struct google_protobuf_UInt32Value*)_upb_Message_New(&google_protobuf_UInt32Value_msginit, arena);
    if (!sub) return NULL;
    envoy_extensions_transport_sockets_tls_v3_CertificateValidationContext_set_max_verify_depth(msg, sub);
  }
  return sub;
}

extern const upb_MiniTable_File envoy_extensions_transport_sockets_tls_v3_common_proto_upb_file_layout;

#ifdef __cplusplus
}  /* extern "C" */
#endif

#include "upb/port_undef.inc"

#endif  /* ENVOY_EXTENSIONS_TRANSPORT_SOCKETS_TLS_V3_COMMON_PROTO_UPB_H_ */


text:
from django.conf.urls import patterns, include, url
from django.conf import settings
from django.contrib import admin

from django.shortcuts import redirect

admin.autodiscover()

urlpatterns = [
    url(r'^$', lambda request : redirect("standard_list")),
    url(r'^list/', include('search_listview.tests.urls')),
    url(r'^admin/', include(admin.site.urls)),
]

# debug toolbar for dev
if settings.DEBUG and 'debug_toolbar'in settings.INSTALLED_APPS:
    import debug_toolbar
    urlpatterns += [
        url(r'^__debug__/', include(debug_toolbar.urls)),
    ]

redpajama_set_name: RedPajamaGithub


text:
	Documents

	Upload
	Download
	Delete

		<?php if(isset($error)){
			echo $error;
		}
		?>

		<?php echo form_open_multipart('document/do_upload');?>

		<input type="file" name="userfile" size="20" />

		<input type="submit" value="Upload" />
		</form>


text:
package org.assertj.core.internal;

import static java.lang.Character.*;

import static org.assertj.core.error.ShouldBeLowerCase.shouldBeLowerCase;
import static org.assertj.core.error.ShouldBeUpperCase.shouldBeUpperCase;

import org.assertj.core.api.AssertionInfo;
import org.assertj.core.util.VisibleForTesting;

/**
 * Reusable assertions for <code>{@link Character}</code>s.
 *
 * @author Alex Ruiz
 * @author Joel Costigliola
 */
public class Characters extends Comparables {

  private static final Characters INSTANCE = new Characters();

  /**
   * Returns the singleton instance of this class.
   * @return the singleton instance of this class.
   */
  public static Characters instance() {
    return INSTANCE;
  }

  @VisibleForTesting
  Characters() {
    super();
  }

  public Characters(ComparisonStrategy comparisonStrategy) {
    super(comparisonStrategy);
  }

  /**
   * Asserts that the actual value is a lowercase character.
   * @param info contains information about the assertion.
   * @param actual the actual value.
   * @throws AssertionError if the actual value is {@code null}.
   * @throws AssertionError if the actual value is not a lowercase character.
   */
  public void assertLowerCase(AssertionInfo info, Character actual) {
    assertNotNull(info, actual);
    if (isLowerCase(actual)) return;
    throw failures.failure(info, shouldBeLowerCase(actual));
  }

  /**
   * Asserts that the actual value is a uppercase character.
   * @param info contains information about the assertion.
   * @param actual the actual value.
   * @throws AssertionError if the actual value is {@code null}.
   * @throws AssertionError if the actual value is not a uppercase character.
   */
  public void assertUpperCase(AssertionInfo info, Character actual) {
    assertNotNull(info, actual);
    if (isUpperCase(actual)) return;
    throw failures.failure(info, shouldBeUpperCase(actual));
  }
}


text:
#ifndef WEBRTC_VOICE_ENGINE_VOE_RTP_RTCP_IMPL_H
#define WEBRTC_VOICE_ENGINE_VOE_RTP_RTCP_IMPL_H

#include "voe_rtp_rtcp.h"

#include "ref_count.h"
#include "shared_data.h"

namespace webrtc {

class VoERTP_RTCPImpl : public virtual voe::SharedData,
                        public VoERTP_RTCP,
                        public voe::RefCount
{
public:

    virtual int Release();
    // Registration of observers for RTP and RTCP callbacks
    virtual int RegisterRTPObserver(int channel, VoERTPObserver& observer);

    virtual int DeRegisterRTPObserver(int channel);

    virtual int RegisterRTCPObserver(int channel, VoERTCPObserver& observer);

    virtual int DeRegisterRTCPObserver(int channel);

    // RTCP
    virtual int SetRTCPStatus(int channel, bool enable);

    virtual int GetRTCPStatus(int channel, bool& enabled);

    virtual int SetRTCP_CNAME(int channel, const char cName[256]);

    virtual int GetRTCP_CNAME(int channel, char cName[256]);

    virtual int GetRemoteRTCP_CNAME(int channel, char cName[256]);

    virtual int GetRemoteRTCPData(int channel,
                                  unsigned int& NTPHigh,
                                  unsigned int& NTPLow,
                                  unsigned int& timestamp,
                                  unsigned int& playoutTimestamp,
                                  unsigned int* jitter = NULL,
                                  unsigned short* fractionLost = NULL);

    virtual int SendApplicationDefinedRTCPPacket(
        int channel,
        const unsigned char subType,
        unsigned int name,
        const char* data,
        unsigned short dataLengthInBytes);

    // SSRC
    virtual int SetLocalSSRC(int channel, unsigned int ssrc);

    virtual int GetLocalSSRC(int channel, unsigned int& ssrc);

    virtual int GetRemoteSSRC(int channel, unsigned int& ssrc);

    // RTP Header Extension for Client-to-Mixer Audio Level Indication
    virtual int SetRTPAudioLevelIndicationStatus(int channel,
                                                 bool enable,
                                                 unsigned char ID);

    virtual int GetRTPAudioLevelIndicationStatus(int channel,
                                                 bool& enabled,
                                                 unsigned char& ID);

    // CSRC
    virtual int GetRemoteCSRCs(int channel, unsigned int arrCSRC[15]);

    // Statistics
    virtual int GetRTPStatistics(int channel,
                                 unsigned int& averageJitterMs,
                                 unsigned int& maxJitterMs,
                                 unsigned int& discardedPackets);

    virtual int GetRTCPStatistics(int channel, CallStatistics& stats);

    // RTP keepalive mechanism (maintains NAT mappings associated to RTP flows)
    virtual int SetRTPKeepaliveStatus(int channel,
                                      bool enable,
                                      unsigned char unknownPayloadType,
                                      int deltaTransmitTimeSeconds = 15);

    virtual int GetRTPKeepaliveStatus(int channel,
                                      bool& enabled,
                                      unsigned char& unknownPayloadType,
                                      int& deltaTransmitTimeSeconds);

    // FEC
    virtual int SetFECStatus(int channel,
                             bool enable,
                             int redPayloadtype = -1);

    virtual int GetFECStatus(int channel, bool& enabled, int& redPayloadtype);

    // Store RTP and RTCP packets and dump to file (compatible with rtpplay)
    virtual int StartRTPDump(int channel,
                             const char fileNameUTF8[1024],
                             RTPDirections direction = kRtpIncoming);

    virtual int StopRTPDump(int channel,
                            RTPDirections direction = kRtpIncoming);

    virtual int RTPDumpIsActive(int channel,
                                RTPDirections direction = kRtpIncoming);

    // Insert (and transmits) extra RTP packet into active RTP audio stream
    virtual int InsertExtraRTPPacket(int channel,
                                     unsigned char payloadType,
                                     bool markerBit,
                                     const char* payloadData,
                                     unsigned short payloadSize);

protected:
    VoERTP_RTCPImpl();
    virtual ~VoERTP_RTCPImpl();
};

}  // namespace webrtc

#endif    // WEBRTC_VOICE_ENGINE_VOE_RTP_RTCP_IMPL_H


text:
package com.netsteadfast.greenstep.util;

import java.io.File;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;

import org.apache.commons.lang3.StringUtils;
import org.apache.log4j.Logger;

import com.netsteadfast.greenstep.base.AppContext;
import com.netsteadfast.greenstep.base.Constants;
import com.netsteadfast.greenstep.base.exception.ControllerException;
import com.netsteadfast.greenstep.base.exception.ServiceException;
import com.netsteadfast.greenstep.base.model.DefaultResult;
import com.netsteadfast.greenstep.base.model.PageOf;
import com.netsteadfast.greenstep.base.model.SearchValue;
import com.netsteadfast.greenstep.base.model.YesNo;
import com.netsteadfast.greenstep.model.FormResultType;
import com.netsteadfast.greenstep.po.hbm.TbSysForm;
import com.netsteadfast.greenstep.po.hbm.TbSysFormMethod;
import com.netsteadfast.greenstep.po.hbm.TbSysFormTemplate;
import com.netsteadfast.greenstep.service.ISysFormMethodService;
import com.netsteadfast.greenstep.service.ISysFormService;
import com.netsteadfast.greenstep.service.ISysFormTemplateService;
import com.netsteadfast.greenstep.vo.SysFormMethodVO;
import com.netsteadfast.greenstep.vo.SysFormTemplateVO;
import com.netsteadfast.greenstep.vo.SysFormVO;

@SuppressWarnings("unchecked")
public class SystemFormUtils {
	protected static Logger logger=Logger.getLogger(SystemFormUtils.class);
	private static final String FORM_PAGE_PATH = "pages/sys-form-pages/";
	private static ISysFormMethodService<SysFormMethodVO, TbSysFormMethod, String> sysFormMethodService;
	private static ISysFormService<SysFormVO, TbSysForm, String> sysFormService;
	private static ISysFormTemplateService<SysFormTemplateVO, TbSysFormTemplate, String> sysFormTemplateService;

	public SystemFormUtils() {
		super();
	}

	static {
		sysFormMethodService = (ISysFormMethodService<SysFormMethodVO, TbSysFormMethod, String>)
				AppContext.getBean("core.service.SysFormMethodService");
		sysFormService = (ISysFormService<SysFormVO, TbSysForm, String>)
				AppContext.getBean("core.service.SysFormService");
		sysFormTemplateService = (ISysFormTemplateService<SysFormTemplateVO, TbSysFormTemplate, String>)
				AppContext.getBean("core.service.SysFormTemplateService");
	}

	public static SysFormMethodVO findFormMethod(String formId, String methodName) throws ServiceException, Exception {
		SysFormMethodVO formMethod = new SysFormMethodVO();
		formMethod.setFormId( formId );
		formMethod.setName( methodName );
		DefaultResult<SysFormMethodVO> result = sysFormMethodService.findByUK(formMethod);
		if (result.getValue()==null) {
			throw new ServiceException(result.getSystemMessage().getValue());
		}
		formMethod = result.getValue();
		return formMethod;
	}

	public static SysFormVO findForm(String formId) throws ServiceException, Exception {
		SysFormVO form = new SysFormVO();
		form.setFormId( formId );
		DefaultResult<SysFormVO> result = sysFormService.findByUK(form);
		if (result.getValue()==null) {
			throw new ServiceException(result.getSystemMessage().getValue());
		}
		form = result.getValue();
		return form;
	}

	public static SysFormTemplateVO findTemplate(String templateId) throws ServiceException, Exception {
		SysFormTemplateVO template = new SysFormTemplateVO();
		template.setTplId( templateId );
		DefaultResult<SysFormTemplateVO> result = sysFormTemplateService.findByUK(template);
		if (result.getValue()==null) {
			throw new ServiceException(result.getSystemMessage().getValue());
		}
		template = result.getValue();
		//this.writePage(template);
		return template;
	}

	public static boolean getEnableTemplateFileReWriteAlways() {
		if (YesNo.YES.equals(SystemSettingConfigureUtils.getSysFormTemplateFileRewriteValue())) {
			return true;
		}
		return false;
	}

	private static Map<String, Object> getParameters(SysFormMethodVO formMethod, Object actionObj,
			Map<String, Object> actionDatas, PageOf pageOf, SearchValue searchValue, List<Map<String, String>> items,
			Map<String, String> fields, List<String> fieldsId, Map<String, String> fieldsMessage) throws Exception {

		Map<String, Object> paramMap = new HashMap<String, Object>();
		paramMap.put("formMethodObj", formMethod);
		paramMap.put("form_id", formMethod.getFormId());
		paramMap.put("form_method", formMethod.getName());
		paramMap.put("actionObj", actionObj);
		paramMap.put("datas", actionDatas);
		paramMap.put("pageOf", pageOf);
		paramMap.put("searchValue", searchValue);
		paramMap.put("items", items);
		paramMap.put("fields", fields);
		paramMap.put("fieldsId", fieldsId);
		paramMap.put("fieldsMessage", fieldsMessage);
		return paramMap;
	}

	public static void writePage(SysFormTemplateVO template, HttpServletRequest request) throws Exception {
		String pageFileFullPath = request.getSession().getServletContext().getRealPath("/");
		pageFileFullPath += FORM_PAGE_PATH + template.getFileName();
		if ( !FSUtils.writeStr2(pageFileFullPath, new String(template.getContent(), Constants.BASE_ENCODING) ) ) {
			throw new Exception("create page file error.");
		}
		logger.info("write template file: " + pageFileFullPath);
	}

	public static void writePage2(TbSysFormTemplate template, HttpServletRequest request) throws Exception {
		String pageFileFullPath = request.getSession().getServletContext().getRealPath("/");
		pageFileFullPath += FORM_PAGE_PATH + template.getFileName();
		if ( !FSUtils.writeStr2(pageFileFullPath, new String(template.getContent(), Constants.BASE_ENCODING) ) ) {
			throw new Exception("create page file error.");
		}
		logger.info("write template file: " + pageFileFullPath);
	}

	public static Map<String, String> processExpression(SysFormMethodVO formMethod, Object actionObj,
			Map<String, Object> actionDatas, PageOf pageOf, SearchValue searchValue, List<Map<String, String>> items,
			Map<String, String> fields, List<String> fieldsId, Map<String, String> fieldsMessage,
			HttpServletRequest request) throws ControllerException, ServiceException, Exception {

		Map<String, String> resultMap = new HashMap<String, String>();
		SysFormVO form = findForm( formMethod.getFormId() );
		String expression = new String(formMethod.getExpression(), Constants.BASE_ENCODING);
		Map<String, Object> paramMap = getParameters(
				formMethod, actionObj, actionDatas, pageOf, searchValue, items, fields, fieldsId, fieldsMessage);
		ScriptExpressionUtils.execute(
				formMethod.getType(),
				expression,
				null,
				paramMap);
		if (FormResultType.DEFAULT.equals(formMethod.getResultType())) {
			SysFormTemplateVO template = findTemplate( form.getTemplateId() );
			setViewPage(resultMap, FORM_PAGE_PATH + template.getFileName());
			String pageFileFullPath = request.getSession().getServletContext().getRealPath("/");
			pageFileFullPath += FORM_PAGE_PATH + template.getFileName();
			File file = new File(pageFileFullPath);
			if ( !file.exists() || getEnableTemplateFileReWriteAlways() ) {
				if ( !file.exists() ) {
					logger.warn("no template file: " + pageFileFullPath);
				}
				file = null;
				writePage(template, request);
			}
			file = null;
		}
		if (FormResultType.JSON.equals(formMethod.getResultType())) {
			setJsonValue(
					resultMap,
					(String)( (Map<String, Object>)paramMap.get("datas") ).get("jsonMessage"),
					(String)( (Map<String, Object>)paramMap.get("datas") ).get("jsonSuccess"));
		}
		if (FormResultType.REDIRECT.equals(formMethod.getResultType())) {
			setRedirectUrl(resultMap, (String)( (Map<String, Object>)paramMap.get("datas") ).get("redirectUrl"));
		}
		return resultMap;
	}

	public static void deploy( HttpServletRequest request ) throws Exception {
		logger.info("begin deploy...");
		List<TbSysFormTemplate> templates = sysFormTemplateService.findListByParams(null);
		if ( templates == null ) {
			return;
		}
		for (TbSysFormTemplate template : templates) {
			writePage2(template, request);
		}
		logger.info("end...");
	}

	public static void setViewPage(Map<String, String> resultMap, String viewPage) {
		resultMap.put("viewPage", viewPage);
	}

	public static String getViewPage(Map<String, String> resultMap) {
		return StringUtils.defaultString( resultMap.get("viewPage") );
	}

	public static void setJsonValue(Map<String, String> resultMap, String message, String success) {
		resultMap.put("message", message);
		resultMap.put("success", success);
	}

	public static String getJsonMessage(Map<String, String> resultMap) {
		return StringUtils.defaultString( resultMap.get("message") );
	}

	public static String getJsonSuccess(Map<String, String> resultMap) {
		return StringUtils.defaultString( resultMap.get("success") );
	}

	public static void setRedirectUrl(Map<String, String> resultMap, String url) {
		resultMap.put("url", url);
	}

	public static String getRedirectUrl(Map<String, String> resultMap) {
		String url = resultMap.get("url");
		return ( !StringUtils.isBlank(url) ? url : "/pages/system/blank.jsp" );
	}

}


text:
<!doctype html>

		<meta charset="utf-8">

		<title>Let's Learn Responsive Web Design</title>

		<meta name="description" content="A primer for Responsive Web Design">
		<meta name="author" content="Derek Briggs and Jared Faris">

		<meta name="apple-mobile-web-app-capable" content="yes" />
		<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />

		<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no, minimal-ui">

		<link rel="stylesheet" href="css/reveal.css">
		<link rel="stylesheet" href="css/theme/black.css" id="theme">

		<link rel="stylesheet" href="lib/css/zenburn.css">

		<link rel="stylesheet" href="css/custom.css">

Let's Learn
Responsive Web Design

						Derek Briggs - Jared Faris

Download: bit.ly/CPLRWD

Today's Topics

Brief bios

Target audience

Mobile landscape

Browser tools

CSS basics

RWD design/dev process

Using the Bootstrap grid

Performance, bandwidth, etc

Questions

About Us

Target Audience

Mobile landscape

Options

Native

Mobile Web (m.)

Hybrid

RWD

Native

+ Fast

+ Fully access to all available features

- Requires specialized skills

- Cost of maintaining each app in addition to main site

Mobile Web

http://m. sites

+ Doesn't affect existing apps

+ Cheaper than a rewrite

+ Can work across browsers

- Dramatically different user experience

- Cost of maintaining two web sites

Hybrid

Xamarin, Cordova, etc.

+ Leverages skills your team already has

+ Access to most device features

+ Can work across browsers

- May have performance penalties

- May incur licensing costs

RWD

+ Leverages skills your team already has

+ Can work across browsers

+ No licensing costs

- Limited and varying access to device features

- May be difficult to implement on existing sites

What is this RWD?

Modern web design

Building sites that respond to each device

Finding/fixing where designs break down

Creating a consistent experience across devices

Example

						http://www.bostonglobe.com

Browser Tools

Today, use Chrome

There's an entire session dedicated to F12 tools across all browsers if you're interested.

HTML Inspection

This is the section you're probably most familiar with if you write HTML/CSS

Hopefully there are still a few tips I can provide you with that add value

Dev Tools - HTML

Search

Insert

Delete

Edit as HTML

Edit this list

1

2

4 needs deleted

4

Search for me

6 edit html

Copying/Dragging

I should be first

I should be third

I should be second

There should be two of me

Dev Tools - CSS

Editing styles

You can't see me

But you can see me

Box Model manipulation

This may be really hard to read

because it's all squished together

so maybe you should consider padding.

I mean seriously, that's a lot of

text, all in one really dense block.

Tracing Computed Styles

									I should be blue.

Finding Your Changes

What does it look like on mobile?

View A Real Site

						http://www.bostonglobe.com

CSS basics

CSS Reset/Normalize

Box Model

Positioning

Media Queries

What is a Responsive Grid?

What are breakpoints?

Set breakpoints when the design breaks - not when the device changes

Responsive Viewport Meta Tag

<meta name="viewport" content="width=device-width">

Lets Build.

CSS Hands-On

Open the "CSS-Basics" folder

Designing RWD Sites

Building new designs

Retrofitting old designs

Building New Designs

Hint: This is a good time to ask questions

Retrofitting old designs

Find out how badly it breaks

Look for logical breakpoints

You won't catch all of them but the goal is to figure out how badly off your site is.

Estimate the effort

How much work to bolt on RWD styles?

How much work to rebuild the UI over your existing app?

*If* the effort is minimal...

Tackle it desktop first

Start by resizing your browser down and fixing the breakpoints with media queries.

Be sure to test with real devices. Does touch work?

						Sorry, we didn't actually do this for the Apple site.

Intro to Bootstrap

What is Bootstrap?

Responsive grid

Stylized buttons, inputs, etc

Responsive/adaptive components

Bootstrap Grid

Container - Starts the Bootstrap grid

Row - Horizontal group of columns

Column - A slice of a column where you put content

Columns get sizes applied to respond to browser sizes

Bootstrap Column Sizing

Bootstrap grids have 12 columns

Bootstrap columns have a screen size label and column #

Example:

col-md-4

col-xs-2

col-lg-12

Bootstrap Controls

						http://getbootstrap.com/css/

Bootstrap Grid Hands-On

Open the "Bootstrap" folder

RWD Site Hands-On

Open the "Responsive" folder

Retrofitting Hands-On

Open the "Retrofitting" folder.

Performance, bandwidth, etc

Example Site

						http://f12talk.azurewebsites.net/

27MB site...ouch. Throttle your bandwidth and try it out.

Questions


text:
package main.scala.overlapping.timeSeriesOld

/**
 * Created by Francois Belletti on 9/24/15.
 */
case class ModelSize(lookBack: Int, lookAhead: Int)


text:
package com.github.sormuras.listing.unit;

import static org.junit.jupiter.api.Assertions.assertEquals;

import com.github.sormuras.listing.Listable;
import com.github.sormuras.listing.Tests;
import com.github.sormuras.listing.type.ClassType;
import com.github.sormuras.listing.type.JavaType;
import java.lang.annotation.ElementType;
import javax.lang.model.element.Modifier;
import org.junit.jupiter.api.Test;

class EnumDeclarationTest {

  @Test
  void empty() {
    ClassDeclaration declaration = new EnumDeclaration();
    declaration.setName("Empty");
    assertEquals("enum Empty {\n}\n", declaration.list());
  }

  @Test
  void everything() {
    EnumDeclaration declaration = new EnumDeclaration();
    declaration.setName("Everything");
    declaration.addInterface(JavaType.of(Runnable.class));
    assertEquals("enum Everything implements java.lang.Runnable {\n}\n", declaration.list());
    declaration.addInterface(ClassType.of(Comparable.class, Byte.class));
    assertEquals(
        "enum Everything implements java.lang.Runnable, java.lang.Comparable<java.lang.Byte> {\n}\n",
        declaration.list());
    declaration.getInterfaces().clear();
    declaration.declareConstant("A");
    assertEquals("enum Everything {\n\n  A\n}\n", declaration.list());
    declaration.declareConstant("B", Listable.IDENTITY).addAnnotation(Deprecated.class);
    NormalClassDeclaration cbody = new NormalClassDeclaration();
    MethodDeclaration toString = cbody.declareMethod(String.class, "toString");
    toString.addStatement("return \"c\" + i");
    toString.addModifier(Modifier.PUBLIC);
    declaration.declareConstant("C", l -> l.add("123"), cbody);
    declaration.declareField(int.class, "i");
    declaration.declareConstructor().addStatement("this(0)");
    MethodDeclaration ctor = declaration.declareConstructor();
    ctor.addParameter(int.class, "i");
    ctor.addStatement("this.i = i");
    Tests.assertEquals(getClass(), "everything", declaration);
  }

  @Test
  void target() {
    assertEquals(ElementType.TYPE, new EnumDeclaration().getAnnotationTarget());
  }
}


text:
@*
 * Copyright 2022 HM Revenue & Customs
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *     http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 *@

@import forms.Form2
@import include._
@import forms2._
@import config.{ ApplicationConfig}

@this(main: include.main)

@(f: Form2[_], edit: Boolean)(implicit request: Request[_],m:Messages, lang: Lang, appConfig: ApplicationConfig)

@header = {
    @components.back_link()
    @errorSummary(f)
}

@supportingContent = { <p>@Messages("msb.branchesoragents.intro")</p> }

@main(
    title = Messages("msb.branchesoragents.title") + " - " + Messages("summary.msb"),
    heading = header
) {

    @form(f, controllers.msb.routes.BranchesOrAgentsController.post(edit)) {

        @fieldsetWithErrorGroup(
            f = f("hasCountries"),
            heading = "msb.branchesoragents.title",
            section = "summary.msb",
            supportingContent = supportingContent,
            panel = false,
            classes = Seq("inline")
        ) {
            @radio(
                f = f("hasCountries"),
                labelText = "lbl.yes",
                value = "true"
            )
            @radio(
                f = f("hasCountries"),
                labelText = "lbl.no",
                value = "false"
            )
        }

        @submit(edit)
    }
}