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

#ifndef ENVOY_ADMIN_V3_CERTS_PROTO_UPB_H_
#define ENVOY_ADMIN_V3_CERTS_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_admin_v3_Certificates;
struct envoy_admin_v3_Certificate;
struct envoy_admin_v3_CertificateDetails;
struct envoy_admin_v3_CertificateDetails_OcspDetails;
struct envoy_admin_v3_SubjectAlternateName;
typedef struct envoy_admin_v3_Certificates envoy_admin_v3_Certificates;
typedef struct envoy_admin_v3_Certificate envoy_admin_v3_Certificate;
typedef struct envoy_admin_v3_CertificateDetails envoy_admin_v3_CertificateDetails;
typedef struct envoy_admin_v3_CertificateDetails_OcspDetails envoy_admin_v3_CertificateDetails_OcspDetails;
typedef struct envoy_admin_v3_SubjectAlternateName envoy_admin_v3_SubjectAlternateName;
extern const upb_MiniTable envoy_admin_v3_Certificates_msginit;
extern const upb_MiniTable envoy_admin_v3_Certificate_msginit;
extern const upb_MiniTable envoy_admin_v3_CertificateDetails_msginit;
extern const upb_MiniTable envoy_admin_v3_CertificateDetails_OcspDetails_msginit;
extern const upb_MiniTable envoy_admin_v3_SubjectAlternateName_msginit;
struct google_protobuf_Timestamp;
extern const upb_MiniTable google_protobuf_Timestamp_msginit;



/* envoy.admin.v3.Certificates */

UPB_INLINE envoy_admin_v3_Certificates* envoy_admin_v3_Certificates_new(upb_Arena* arena) {
  return (envoy_admin_v3_Certificates*)_upb_Message_New(&envoy_admin_v3_Certificates_msginit, arena);
}
UPB_INLINE envoy_admin_v3_Certificates* envoy_admin_v3_Certificates_parse(const char* buf, size_t size, upb_Arena* arena) {
  envoy_admin_v3_Certificates* ret = envoy_admin_v3_Certificates_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, &envoy_admin_v3_Certificates_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE envoy_admin_v3_Certificates* envoy_admin_v3_Certificates_parse_ex(const char* buf, size_t size,
                           const upb_ExtensionRegistry* extreg,
                           int options, upb_Arena* arena) {
  envoy_admin_v3_Certificates* ret = envoy_admin_v3_Certificates_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, &envoy_admin_v3_Certificates_msginit, extreg, options, arena) !=
      kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE char* envoy_admin_v3_Certificates_serialize(const envoy_admin_v3_Certificates* msg, upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, &envoy_admin_v3_Certificates_msginit, 0, arena, &ptr, len);
  return ptr;
}
UPB_INLINE char* envoy_admin_v3_Certificates_serialize_ex(const envoy_admin_v3_Certificates* msg, int options,
                                 upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, &envoy_admin_v3_Certificates_msginit, options, arena, &ptr, len);
  return ptr;
}
UPB_INLINE bool envoy_admin_v3_Certificates_has_certificates(const envoy_admin_v3_Certificates* msg) {
  return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0));
}
UPB_INLINE void envoy_admin_v3_Certificates_clear_certificates(const envoy_admin_v3_Certificates* msg) {
  _upb_array_detach(msg, UPB_SIZE(0, 0));
}
UPB_INLINE const envoy_admin_v3_Certificate* const* envoy_admin_v3_Certificates_certificates(const envoy_admin_v3_Certificates* msg, size_t* len) {
  return (const envoy_admin_v3_Certificate* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len);
}

UPB_INLINE envoy_admin_v3_Certificate** envoy_admin_v3_Certificates_mutable_certificates(envoy_admin_v3_Certificates* msg, size_t* len) {
  return (envoy_admin_v3_Certificate**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
}
UPB_INLINE envoy_admin_v3_Certificate** envoy_admin_v3_Certificates_resize_certificates(envoy_admin_v3_Certificates* msg, size_t len, upb_Arena* arena) {
  return (envoy_admin_v3_Certificate**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(0, 0), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_admin_v3_Certificate* envoy_admin_v3_Certificates_add_certificates(envoy_admin_v3_Certificates* msg, upb_Arena* arena) {
  struct envoy_admin_v3_Certificate* sub = (struct envoy_admin_v3_Certificate*)_upb_Message_New(&envoy_admin_v3_Certificate_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.admin.v3.Certificate */

UPB_INLINE envoy_admin_v3_Certificate* envoy_admin_v3_Certificate_new(upb_Arena* arena) {
  return (envoy_admin_v3_Certificate*)_upb_Message_New(&envoy_admin_v3_Certificate_msginit, arena);
}
UPB_INLINE envoy_admin_v3_Certificate* envoy_admin_v3_Certificate_parse(const char* buf, size_t size, upb_Arena* arena) {
  envoy_admin_v3_Certificate* ret = envoy_admin_v3_Certificate_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, &envoy_admin_v3_Certificate_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE envoy_admin_v3_Certificate* envoy_admin_v3_Certificate_parse_ex(const char* buf, size_t size,
                           const upb_ExtensionRegistry* extreg,
                           int options, upb_Arena* arena) {
  envoy_admin_v3_Certificate* ret = envoy_admin_v3_Certificate_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, &envoy_admin_v3_Certificate_msginit, extreg, options, arena) !=
      kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE char* envoy_admin_v3_Certificate_serialize(const envoy_admin_v3_Certificate* msg, upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, &envoy_admin_v3_Certificate_msginit, 0, arena, &ptr, len);
  return ptr;
}
UPB_INLINE char* envoy_admin_v3_Certificate_serialize_ex(const envoy_admin_v3_Certificate* msg, int options,
                                 upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, &envoy_admin_v3_Certificate_msginit, options, arena, &ptr, len);
  return ptr;
}
UPB_INLINE bool envoy_admin_v3_Certificate_has_ca_cert(const envoy_admin_v3_Certificate* msg) {
  return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0));
}
UPB_INLINE void envoy_admin_v3_Certificate_clear_ca_cert(const envoy_admin_v3_Certificate* msg) {
  _upb_array_detach(msg, UPB_SIZE(0, 0));
}
UPB_INLINE const envoy_admin_v3_CertificateDetails* const* envoy_admin_v3_Certificate_ca_cert(const envoy_admin_v3_Certificate* msg, size_t* len) {
  return (const envoy_admin_v3_CertificateDetails* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len);
}
UPB_INLINE bool envoy_admin_v3_Certificate_has_cert_chain(const envoy_admin_v3_Certificate* msg) {
  return _upb_has_submsg_nohasbit(msg, UPB_SIZE(4, 8));
}
UPB_INLINE void envoy_admin_v3_Certificate_clear_cert_chain(const envoy_admin_v3_Certificate* msg) {
  _upb_array_detach(msg, UPB_SIZE(4, 8));
}
UPB_INLINE const envoy_admin_v3_CertificateDetails* const* envoy_admin_v3_Certificate_cert_chain(const envoy_admin_v3_Certificate* msg, size_t* len) {
  return (const envoy_admin_v3_CertificateDetails* const*)_upb_array_accessor(msg, UPB_SIZE(4, 8), len);
}

UPB_INLINE envoy_admin_v3_CertificateDetails** envoy_admin_v3_Certificate_mutable_ca_cert(envoy_admin_v3_Certificate* msg, size_t* len) {
  return (envoy_admin_v3_CertificateDetails**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
}
UPB_INLINE envoy_admin_v3_CertificateDetails** envoy_admin_v3_Certificate_resize_ca_cert(envoy_admin_v3_Certificate* msg, size_t len, upb_Arena* arena) {
  return (envoy_admin_v3_CertificateDetails**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(0, 0), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_admin_v3_CertificateDetails* envoy_admin_v3_Certificate_add_ca_cert(envoy_admin_v3_Certificate* msg, upb_Arena* arena) {
  struct envoy_admin_v3_CertificateDetails* sub = (struct envoy_admin_v3_CertificateDetails*)_upb_Message_New(&envoy_admin_v3_CertificateDetails_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;
}
UPB_INLINE envoy_admin_v3_CertificateDetails** envoy_admin_v3_Certificate_mutable_cert_chain(envoy_admin_v3_Certificate* msg, size_t* len) {
  return (envoy_admin_v3_CertificateDetails**)_upb_array_mutable_accessor(msg, UPB_SIZE(4, 8), len);
}
UPB_INLINE envoy_admin_v3_CertificateDetails** envoy_admin_v3_Certificate_resize_cert_chain(envoy_admin_v3_Certificate* msg, size_t len, upb_Arena* arena) {
  return (envoy_admin_v3_CertificateDetails**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(4, 8), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_admin_v3_CertificateDetails* envoy_admin_v3_Certificate_add_cert_chain(envoy_admin_v3_Certificate* msg, upb_Arena* arena) {
  struct envoy_admin_v3_CertificateDetails* sub = (struct envoy_admin_v3_CertificateDetails*)_upb_Message_New(&envoy_admin_v3_CertificateDetails_msginit, arena);
  bool ok = _upb_Array_Append_accessor2(msg, UPB_SIZE(4, 8), UPB_SIZE(2, 3), &sub, arena);
  if (!ok) return NULL;
  return sub;
}

/* envoy.admin.v3.CertificateDetails */

UPB_INLINE envoy_admin_v3_CertificateDetails* envoy_admin_v3_CertificateDetails_new(upb_Arena* arena) {
  return (envoy_admin_v3_CertificateDetails*)_upb_Message_New(&envoy_admin_v3_CertificateDetails_msginit, arena);
}
UPB_INLINE envoy_admin_v3_CertificateDetails* envoy_admin_v3_CertificateDetails_parse(const char* buf, size_t size, upb_Arena* arena) {
  envoy_admin_v3_CertificateDetails* ret = envoy_admin_v3_CertificateDetails_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, &envoy_admin_v3_CertificateDetails_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE envoy_admin_v3_CertificateDetails* envoy_admin_v3_CertificateDetails_parse_ex(const char* buf, size_t size,
                           const upb_ExtensionRegistry* extreg,
                           int options, upb_Arena* arena) {
  envoy_admin_v3_CertificateDetails* ret = envoy_admin_v3_CertificateDetails_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, &envoy_admin_v3_CertificateDetails_msginit, extreg, options, arena) !=
      kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE char* envoy_admin_v3_CertificateDetails_serialize(const envoy_admin_v3_CertificateDetails* msg, upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, &envoy_admin_v3_CertificateDetails_msginit, 0, arena, &ptr, len);
  return ptr;
}
UPB_INLINE char* envoy_admin_v3_CertificateDetails_serialize_ex(const envoy_admin_v3_CertificateDetails* msg, int options,
                                 upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, &envoy_admin_v3_CertificateDetails_msginit, options, arena, &ptr, len);
  return ptr;
}
UPB_INLINE void envoy_admin_v3_CertificateDetails_clear_path(const envoy_admin_v3_CertificateDetails* msg) {
  *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0);
}
UPB_INLINE upb_StringView envoy_admin_v3_CertificateDetails_path(const envoy_admin_v3_CertificateDetails* msg) {
  return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView);
}
UPB_INLINE void envoy_admin_v3_CertificateDetails_clear_serial_number(const envoy_admin_v3_CertificateDetails* msg) {
  *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0);
}
UPB_INLINE upb_StringView envoy_admin_v3_CertificateDetails_serial_number(const envoy_admin_v3_CertificateDetails* msg) {
  return *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_StringView);
}
UPB_INLINE bool envoy_admin_v3_CertificateDetails_has_subject_alt_names(const envoy_admin_v3_CertificateDetails* msg) {
  return _upb_has_submsg_nohasbit(msg, UPB_SIZE(20, 40));
}
UPB_INLINE void envoy_admin_v3_CertificateDetails_clear_subject_alt_names(const envoy_admin_v3_CertificateDetails* msg) {
  _upb_array_detach(msg, UPB_SIZE(20, 40));
}
UPB_INLINE const envoy_admin_v3_SubjectAlternateName* const* envoy_admin_v3_CertificateDetails_subject_alt_names(const envoy_admin_v3_CertificateDetails* msg, size_t* len) {
  return (const envoy_admin_v3_SubjectAlternateName* const*)_upb_array_accessor(msg, UPB_SIZE(20, 40), len);
}
UPB_INLINE void envoy_admin_v3_CertificateDetails_clear_days_until_expiration(const envoy_admin_v3_CertificateDetails* msg) {
  *UPB_PTR_AT(msg, UPB_SIZE(40, 72), uint64_t) = 0;
}
UPB_INLINE uint64_t envoy_admin_v3_CertificateDetails_days_until_expiration(const envoy_admin_v3_CertificateDetails* msg) {
  return *UPB_PTR_AT(msg, UPB_SIZE(40, 72), uint64_t);
}
UPB_INLINE bool envoy_admin_v3_CertificateDetails_has_valid_from(const envoy_admin_v3_CertificateDetails* msg) {
  return _upb_hasbit(msg, 1);
}
UPB_INLINE void envoy_admin_v3_CertificateDetails_clear_valid_from(const envoy_admin_v3_CertificateDetails* msg) {
  *UPB_PTR_AT(msg, UPB_SIZE(24, 48), const upb_Message*) = NULL;
}
UPB_INLINE const struct google_protobuf_Timestamp* envoy_admin_v3_CertificateDetails_valid_from(const envoy_admin_v3_CertificateDetails* msg) {
  return *UPB_PTR_AT(msg, UPB_SIZE(24, 48), const struct google_protobuf_Timestamp*);
}
UPB_INLINE bool envoy_admin_v3_CertificateDetails_has_expiration_time(const envoy_admin_v3_CertificateDetails* msg) {
  return _upb_hasbit(msg, 2);
}
UPB_INLINE void envoy_admin_v3_CertificateDetails_clear_expiration_time(const envoy_admin_v3_CertificateDetails* msg) {
  *UPB_PTR_AT(msg, UPB_SIZE(28, 56), const upb_Message*) = NULL;
}
UPB_INLINE const struct google_protobuf_Timestamp* envoy_admin_v3_CertificateDetails_expiration_time(const envoy_admin_v3_CertificateDetails* msg) {
  return *UPB_PTR_AT(msg, UPB_SIZE(28, 56), const struct google_protobuf_Timestamp*);
}
UPB_INLINE bool envoy_admin_v3_CertificateDetails_has_ocsp_details(const envoy_admin_v3_CertificateDetails* msg) {
  return _upb_hasbit(msg, 3);
}
UPB_INLINE void envoy_admin_v3_CertificateDetails_clear_ocsp_details(const envoy_admin_v3_CertificateDetails* msg) {
  *UPB_PTR_AT(msg, UPB_SIZE(32, 64), const upb_Message*) = NULL;
}
UPB_INLINE const envoy_admin_v3_CertificateDetails_OcspDetails* envoy_admin_v3_CertificateDetails_ocsp_details(const envoy_admin_v3_CertificateDetails* msg) {
  return *UPB_PTR_AT(msg, UPB_SIZE(32, 64), const envoy_admin_v3_CertificateDetails_OcspDetails*);
}

UPB_INLINE void envoy_admin_v3_CertificateDetails_set_path(envoy_admin_v3_CertificateDetails *msg, upb_StringView value) {
  *UPB_PTR_AT(msg, UPB_SIZE(4, 8), upb_StringView) = value;
}
UPB_INLINE void envoy_admin_v3_CertificateDetails_set_serial_number(envoy_admin_v3_CertificateDetails *msg, upb_StringView value) {
  *UPB_PTR_AT(msg, UPB_SIZE(12, 24), upb_StringView) = value;
}
UPB_INLINE envoy_admin_v3_SubjectAlternateName** envoy_admin_v3_CertificateDetails_mutable_subject_alt_names(envoy_admin_v3_CertificateDetails* msg, size_t* len) {
  return (envoy_admin_v3_SubjectAlternateName**)_upb_array_mutable_accessor(msg, UPB_SIZE(20, 40), len);
}
UPB_INLINE envoy_admin_v3_SubjectAlternateName** envoy_admin_v3_CertificateDetails_resize_subject_alt_names(envoy_admin_v3_CertificateDetails* msg, size_t len, upb_Arena* arena) {
  return (envoy_admin_v3_SubjectAlternateName**)_upb_Array_Resize_accessor2(msg, UPB_SIZE(20, 40), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_admin_v3_SubjectAlternateName* envoy_admin_v3_CertificateDetails_add_subject_alt_names(envoy_admin_v3_CertificateDetails* msg, upb_Arena* arena) {
  struct envoy_admin_v3_SubjectAlternateName* sub = (struct envoy_admin_v3_SubjectAlternateName*)_upb_Message_New(&envoy_admin_v3_SubjectAlternateName_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_admin_v3_CertificateDetails_set_days_until_expiration(envoy_admin_v3_CertificateDetails *msg, uint64_t value) {
  *UPB_PTR_AT(msg, UPB_SIZE(40, 72), uint64_t) = value;
}
UPB_INLINE void envoy_admin_v3_CertificateDetails_set_valid_from(envoy_admin_v3_CertificateDetails *msg, struct google_protobuf_Timestamp* value) {
  _upb_sethas(msg, 1);
  *UPB_PTR_AT(msg, UPB_SIZE(24, 48), struct google_protobuf_Timestamp*) = value;
}
UPB_INLINE struct google_protobuf_Timestamp* envoy_admin_v3_CertificateDetails_mutable_valid_from(envoy_admin_v3_CertificateDetails* msg, upb_Arena* arena) {
  struct google_protobuf_Timestamp* sub = (struct google_protobuf_Timestamp*)envoy_admin_v3_CertificateDetails_valid_from(msg);
  if (sub == NULL) {
    sub = (struct google_protobuf_Timestamp*)_upb_Message_New(&google_protobuf_Timestamp_msginit, arena);
    if (!sub) return NULL;
    envoy_admin_v3_CertificateDetails_set_valid_from(msg, sub);
  }
  return sub;
}
UPB_INLINE void envoy_admin_v3_CertificateDetails_set_expiration_time(envoy_admin_v3_CertificateDetails *msg, struct google_protobuf_Timestamp* value) {
  _upb_sethas(msg, 2);
  *UPB_PTR_AT(msg, UPB_SIZE(28, 56), struct google_protobuf_Timestamp*) = value;
}
UPB_INLINE struct google_protobuf_Timestamp* envoy_admin_v3_CertificateDetails_mutable_expiration_time(envoy_admin_v3_CertificateDetails* msg, upb_Arena* arena) {
  struct google_protobuf_Timestamp* sub = (struct google_protobuf_Timestamp*)envoy_admin_v3_CertificateDetails_expiration_time(msg);
  if (sub == NULL) {
    sub = (struct google_protobuf_Timestamp*)_upb_Message_New(&google_protobuf_Timestamp_msginit, arena);
    if (!sub) return NULL;
    envoy_admin_v3_CertificateDetails_set_expiration_time(msg, sub);
  }
  return sub;
}
UPB_INLINE void envoy_admin_v3_CertificateDetails_set_ocsp_details(envoy_admin_v3_CertificateDetails *msg, envoy_admin_v3_CertificateDetails_OcspDetails* value) {
  _upb_sethas(msg, 3);
  *UPB_PTR_AT(msg, UPB_SIZE(32, 64), envoy_admin_v3_CertificateDetails_OcspDetails*) = value;
}
UPB_INLINE struct envoy_admin_v3_CertificateDetails_OcspDetails* envoy_admin_v3_CertificateDetails_mutable_ocsp_details(envoy_admin_v3_CertificateDetails* msg, upb_Arena* arena) {
  struct envoy_admin_v3_CertificateDetails_OcspDetails* sub = (struct envoy_admin_v3_CertificateDetails_OcspDetails*)envoy_admin_v3_CertificateDetails_ocsp_details(msg);
  if (sub == NULL) {
    sub = (struct envoy_admin_v3_CertificateDetails_OcspDetails*)_upb_Message_New(&envoy_admin_v3_CertificateDetails_OcspDetails_msginit, arena);
    if (!sub) return NULL;
    envoy_admin_v3_CertificateDetails_set_ocsp_details(msg, sub);
  }
  return sub;
}

/* envoy.admin.v3.CertificateDetails.OcspDetails */

UPB_INLINE envoy_admin_v3_CertificateDetails_OcspDetails* envoy_admin_v3_CertificateDetails_OcspDetails_new(upb_Arena* arena) {
  return (envoy_admin_v3_CertificateDetails_OcspDetails*)_upb_Message_New(&envoy_admin_v3_CertificateDetails_OcspDetails_msginit, arena);
}
UPB_INLINE envoy_admin_v3_CertificateDetails_OcspDetails* envoy_admin_v3_CertificateDetails_OcspDetails_parse(const char* buf, size_t size, upb_Arena* arena) {
  envoy_admin_v3_CertificateDetails_OcspDetails* ret = envoy_admin_v3_CertificateDetails_OcspDetails_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, &envoy_admin_v3_CertificateDetails_OcspDetails_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE envoy_admin_v3_CertificateDetails_OcspDetails* envoy_admin_v3_CertificateDetails_OcspDetails_parse_ex(const char* buf, size_t size,
                           const upb_ExtensionRegistry* extreg,
                           int options, upb_Arena* arena) {
  envoy_admin_v3_CertificateDetails_OcspDetails* ret = envoy_admin_v3_CertificateDetails_OcspDetails_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, &envoy_admin_v3_CertificateDetails_OcspDetails_msginit, extreg, options, arena) !=
      kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE char* envoy_admin_v3_CertificateDetails_OcspDetails_serialize(const envoy_admin_v3_CertificateDetails_OcspDetails* msg, upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, &envoy_admin_v3_CertificateDetails_OcspDetails_msginit, 0, arena, &ptr, len);
  return ptr;
}
UPB_INLINE char* envoy_admin_v3_CertificateDetails_OcspDetails_serialize_ex(const envoy_admin_v3_CertificateDetails_OcspDetails* msg, int options,
                                 upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, &envoy_admin_v3_CertificateDetails_OcspDetails_msginit, options, arena, &ptr, len);
  return ptr;
}
UPB_INLINE bool envoy_admin_v3_CertificateDetails_OcspDetails_has_valid_from(const envoy_admin_v3_CertificateDetails_OcspDetails* msg) {
  return _upb_hasbit(msg, 1);
}
UPB_INLINE void envoy_admin_v3_CertificateDetails_OcspDetails_clear_valid_from(const envoy_admin_v3_CertificateDetails_OcspDetails* msg) {
  *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const upb_Message*) = NULL;
}
UPB_INLINE const struct google_protobuf_Timestamp* envoy_admin_v3_CertificateDetails_OcspDetails_valid_from(const envoy_admin_v3_CertificateDetails_OcspDetails* msg) {
  return *UPB_PTR_AT(msg, UPB_SIZE(4, 8), const struct google_protobuf_Timestamp*);
}
UPB_INLINE bool envoy_admin_v3_CertificateDetails_OcspDetails_has_expiration(const envoy_admin_v3_CertificateDetails_OcspDetails* msg) {
  return _upb_hasbit(msg, 2);
}
UPB_INLINE void envoy_admin_v3_CertificateDetails_OcspDetails_clear_expiration(const envoy_admin_v3_CertificateDetails_OcspDetails* msg) {
  *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const upb_Message*) = NULL;
}
UPB_INLINE const struct google_protobuf_Timestamp* envoy_admin_v3_CertificateDetails_OcspDetails_expiration(const envoy_admin_v3_CertificateDetails_OcspDetails* msg) {
  return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), const struct google_protobuf_Timestamp*);
}

UPB_INLINE void envoy_admin_v3_CertificateDetails_OcspDetails_set_valid_from(envoy_admin_v3_CertificateDetails_OcspDetails *msg, struct google_protobuf_Timestamp* value) {
  _upb_sethas(msg, 1);
  *UPB_PTR_AT(msg, UPB_SIZE(4, 8), struct google_protobuf_Timestamp*) = value;
}
UPB_INLINE struct google_protobuf_Timestamp* envoy_admin_v3_CertificateDetails_OcspDetails_mutable_valid_from(envoy_admin_v3_CertificateDetails_OcspDetails* msg, upb_Arena* arena) {
  struct google_protobuf_Timestamp* sub = (struct google_protobuf_Timestamp*)envoy_admin_v3_CertificateDetails_OcspDetails_valid_from(msg);
  if (sub == NULL) {
    sub = (struct google_protobuf_Timestamp*)_upb_Message_New(&google_protobuf_Timestamp_msginit, arena);
    if (!sub) return NULL;
    envoy_admin_v3_CertificateDetails_OcspDetails_set_valid_from(msg, sub);
  }
  return sub;
}
UPB_INLINE void envoy_admin_v3_CertificateDetails_OcspDetails_set_expiration(envoy_admin_v3_CertificateDetails_OcspDetails *msg, struct google_protobuf_Timestamp* value) {
  _upb_sethas(msg, 2);
  *UPB_PTR_AT(msg, UPB_SIZE(8, 16), struct google_protobuf_Timestamp*) = value;
}
UPB_INLINE struct google_protobuf_Timestamp* envoy_admin_v3_CertificateDetails_OcspDetails_mutable_expiration(envoy_admin_v3_CertificateDetails_OcspDetails* msg, upb_Arena* arena) {
  struct google_protobuf_Timestamp* sub = (struct google_protobuf_Timestamp*)envoy_admin_v3_CertificateDetails_OcspDetails_expiration(msg);
  if (sub == NULL) {
    sub = (struct google_protobuf_Timestamp*)_upb_Message_New(&google_protobuf_Timestamp_msginit, arena);
    if (!sub) return NULL;
    envoy_admin_v3_CertificateDetails_OcspDetails_set_expiration(msg, sub);
  }
  return sub;
}

/* envoy.admin.v3.SubjectAlternateName */

UPB_INLINE envoy_admin_v3_SubjectAlternateName* envoy_admin_v3_SubjectAlternateName_new(upb_Arena* arena) {
  return (envoy_admin_v3_SubjectAlternateName*)_upb_Message_New(&envoy_admin_v3_SubjectAlternateName_msginit, arena);
}
UPB_INLINE envoy_admin_v3_SubjectAlternateName* envoy_admin_v3_SubjectAlternateName_parse(const char* buf, size_t size, upb_Arena* arena) {
  envoy_admin_v3_SubjectAlternateName* ret = envoy_admin_v3_SubjectAlternateName_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, &envoy_admin_v3_SubjectAlternateName_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE envoy_admin_v3_SubjectAlternateName* envoy_admin_v3_SubjectAlternateName_parse_ex(const char* buf, size_t size,
                           const upb_ExtensionRegistry* extreg,
                           int options, upb_Arena* arena) {
  envoy_admin_v3_SubjectAlternateName* ret = envoy_admin_v3_SubjectAlternateName_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, &envoy_admin_v3_SubjectAlternateName_msginit, extreg, options, arena) !=
      kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE char* envoy_admin_v3_SubjectAlternateName_serialize(const envoy_admin_v3_SubjectAlternateName* msg, upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, &envoy_admin_v3_SubjectAlternateName_msginit, 0, arena, &ptr, len);
  return ptr;
}
UPB_INLINE char* envoy_admin_v3_SubjectAlternateName_serialize_ex(const envoy_admin_v3_SubjectAlternateName* msg, int options,
                                 upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, &envoy_admin_v3_SubjectAlternateName_msginit, options, arena, &ptr, len);
  return ptr;
}
typedef enum {
  envoy_admin_v3_SubjectAlternateName_name_dns = 1,
  envoy_admin_v3_SubjectAlternateName_name_uri = 2,
  envoy_admin_v3_SubjectAlternateName_name_ip_address = 3,
  envoy_admin_v3_SubjectAlternateName_name_NOT_SET = 0
} envoy_admin_v3_SubjectAlternateName_name_oneofcases;
UPB_INLINE envoy_admin_v3_SubjectAlternateName_name_oneofcases envoy_admin_v3_SubjectAlternateName_name_case(const envoy_admin_v3_SubjectAlternateName* msg) {
  return (envoy_admin_v3_SubjectAlternateName_name_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t);
}
UPB_INLINE bool envoy_admin_v3_SubjectAlternateName_has_dns(const envoy_admin_v3_SubjectAlternateName* msg) {
  return _upb_getoneofcase(msg, UPB_SIZE(0, 0)) == 1;
}
UPB_INLINE void envoy_admin_v3_SubjectAlternateName_clear_dns(const envoy_admin_v3_SubjectAlternateName* msg) {
  UPB_WRITE_ONEOF(msg, upb_StringView, UPB_SIZE(4, 8), upb_StringView_FromDataAndSize(NULL, 0), UPB_SIZE(0, 0), envoy_admin_v3_SubjectAlternateName_name_NOT_SET);
}
UPB_INLINE upb_StringView envoy_admin_v3_SubjectAlternateName_dns(const envoy_admin_v3_SubjectAlternateName* msg) {
  return UPB_READ_ONEOF(msg, upb_StringView, UPB_SIZE(4, 8), UPB_SIZE(0, 0), 1, upb_StringView_FromString(""));
}
UPB_INLINE bool envoy_admin_v3_SubjectAlternateName_has_uri(const envoy_admin_v3_SubjectAlternateName* msg) {
  return _upb_getoneofcase(msg, UPB_SIZE(0, 0)) == 2;
}
UPB_INLINE void envoy_admin_v3_SubjectAlternateName_clear_uri(const envoy_admin_v3_SubjectAlternateName* msg) {
  UPB_WRITE_ONEOF(msg, upb_StringView, UPB_SIZE(4, 8), upb_StringView_FromDataAndSize(NULL, 0), UPB_SIZE(0, 0), envoy_admin_v3_SubjectAlternateName_name_NOT_SET);
}
UPB_INLINE upb_StringView envoy_admin_v3_SubjectAlternateName_uri(const envoy_admin_v3_SubjectAlternateName* msg) {
  return UPB_READ_ONEOF(msg, upb_StringView, UPB_SIZE(4, 8), UPB_SIZE(0, 0), 2, upb_StringView_FromString(""));
}
UPB_INLINE bool envoy_admin_v3_SubjectAlternateName_has_ip_address(const envoy_admin_v3_SubjectAlternateName* msg) {
  return _upb_getoneofcase(msg, UPB_SIZE(0, 0)) == 3;
}
UPB_INLINE void envoy_admin_v3_SubjectAlternateName_clear_ip_address(const envoy_admin_v3_SubjectAlternateName* msg) {
  UPB_WRITE_ONEOF(msg, upb_StringView, UPB_SIZE(4, 8), upb_StringView_FromDataAndSize(NULL, 0), UPB_SIZE(0, 0), envoy_admin_v3_SubjectAlternateName_name_NOT_SET);
}
UPB_INLINE upb_StringView envoy_admin_v3_SubjectAlternateName_ip_address(const envoy_admin_v3_SubjectAlternateName* msg) {
  return UPB_READ_ONEOF(msg, upb_StringView, UPB_SIZE(4, 8), UPB_SIZE(0, 0), 3, upb_StringView_FromString(""));
}

UPB_INLINE void envoy_admin_v3_SubjectAlternateName_set_dns(envoy_admin_v3_SubjectAlternateName *msg, upb_StringView value) {
  UPB_WRITE_ONEOF(msg, upb_StringView, UPB_SIZE(4, 8), value, UPB_SIZE(0, 0), 1);
}
UPB_INLINE void envoy_admin_v3_SubjectAlternateName_set_uri(envoy_admin_v3_SubjectAlternateName *msg, upb_StringView value) {
  UPB_WRITE_ONEOF(msg, upb_StringView, UPB_SIZE(4, 8), value, UPB_SIZE(0, 0), 2);
}
UPB_INLINE void envoy_admin_v3_SubjectAlternateName_set_ip_address(envoy_admin_v3_SubjectAlternateName *msg, upb_StringView value) {
  UPB_WRITE_ONEOF(msg, upb_StringView, UPB_SIZE(4, 8), value, UPB_SIZE(0, 0), 3);
}

extern const upb_MiniTable_File envoy_admin_v3_certs_proto_upb_file_layout;

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

#include "upb/port_undef.inc"

#endif  /* ENVOY_ADMIN_V3_CERTS_PROTO_UPB_H_ */
