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

#ifndef XDS_ANNOTATIONS_V3_STATUS_PROTO_UPB_H_
#define XDS_ANNOTATIONS_V3_STATUS_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 xds_annotations_v3_FileStatusAnnotation;
struct xds_annotations_v3_MessageStatusAnnotation;
struct xds_annotations_v3_FieldStatusAnnotation;
struct xds_annotations_v3_StatusAnnotation;
typedef struct xds_annotations_v3_FileStatusAnnotation xds_annotations_v3_FileStatusAnnotation;
typedef struct xds_annotations_v3_MessageStatusAnnotation xds_annotations_v3_MessageStatusAnnotation;
typedef struct xds_annotations_v3_FieldStatusAnnotation xds_annotations_v3_FieldStatusAnnotation;
typedef struct xds_annotations_v3_StatusAnnotation xds_annotations_v3_StatusAnnotation;
extern const upb_msglayout xds_annotations_v3_FileStatusAnnotation_msginit;
extern const upb_msglayout xds_annotations_v3_MessageStatusAnnotation_msginit;
extern const upb_msglayout xds_annotations_v3_FieldStatusAnnotation_msginit;
extern const upb_msglayout xds_annotations_v3_StatusAnnotation_msginit;

typedef enum {
  xds_annotations_v3_UNKNOWN = 0,
  xds_annotations_v3_FROZEN = 1,
  xds_annotations_v3_ACTIVE = 2,
  xds_annotations_v3_NEXT_MAJOR_VERSION_CANDIDATE = 3
} xds_annotations_v3_PackageVersionStatus;


/* xds.annotations.v3.FileStatusAnnotation */

UPB_INLINE xds_annotations_v3_FileStatusAnnotation *xds_annotations_v3_FileStatusAnnotation_new(upb_arena *arena) {
  return (xds_annotations_v3_FileStatusAnnotation *)_upb_msg_new(&xds_annotations_v3_FileStatusAnnotation_msginit, arena);
}
UPB_INLINE xds_annotations_v3_FileStatusAnnotation *xds_annotations_v3_FileStatusAnnotation_parse(const char *buf, size_t size,
                        upb_arena *arena) {
  xds_annotations_v3_FileStatusAnnotation *ret = xds_annotations_v3_FileStatusAnnotation_new(arena);
  if (!ret) return NULL;
  if (!upb_decode(buf, size, ret, &xds_annotations_v3_FileStatusAnnotation_msginit, arena)) return NULL;
  return ret;
}
UPB_INLINE xds_annotations_v3_FileStatusAnnotation *xds_annotations_v3_FileStatusAnnotation_parse_ex(const char *buf, size_t size,
                           const upb_extreg *extreg, int options,
                           upb_arena *arena) {
  xds_annotations_v3_FileStatusAnnotation *ret = xds_annotations_v3_FileStatusAnnotation_new(arena);
  if (!ret) return NULL;
  if (!_upb_decode(buf, size, ret, &xds_annotations_v3_FileStatusAnnotation_msginit, extreg, options, arena)) {
    return NULL;
  }
  return ret;
}
UPB_INLINE char *xds_annotations_v3_FileStatusAnnotation_serialize(const xds_annotations_v3_FileStatusAnnotation *msg, upb_arena *arena, size_t *len) {
  return upb_encode(msg, &xds_annotations_v3_FileStatusAnnotation_msginit, arena, len);
}

UPB_INLINE bool xds_annotations_v3_FileStatusAnnotation_work_in_progress(const xds_annotations_v3_FileStatusAnnotation *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool); }

UPB_INLINE void xds_annotations_v3_FileStatusAnnotation_set_work_in_progress(xds_annotations_v3_FileStatusAnnotation *msg, bool value) {
  *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool) = value;
}

/* xds.annotations.v3.MessageStatusAnnotation */

UPB_INLINE xds_annotations_v3_MessageStatusAnnotation *xds_annotations_v3_MessageStatusAnnotation_new(upb_arena *arena) {
  return (xds_annotations_v3_MessageStatusAnnotation *)_upb_msg_new(&xds_annotations_v3_MessageStatusAnnotation_msginit, arena);
}
UPB_INLINE xds_annotations_v3_MessageStatusAnnotation *xds_annotations_v3_MessageStatusAnnotation_parse(const char *buf, size_t size,
                        upb_arena *arena) {
  xds_annotations_v3_MessageStatusAnnotation *ret = xds_annotations_v3_MessageStatusAnnotation_new(arena);
  if (!ret) return NULL;
  if (!upb_decode(buf, size, ret, &xds_annotations_v3_MessageStatusAnnotation_msginit, arena)) return NULL;
  return ret;
}
UPB_INLINE xds_annotations_v3_MessageStatusAnnotation *xds_annotations_v3_MessageStatusAnnotation_parse_ex(const char *buf, size_t size,
                           const upb_extreg *extreg, int options,
                           upb_arena *arena) {
  xds_annotations_v3_MessageStatusAnnotation *ret = xds_annotations_v3_MessageStatusAnnotation_new(arena);
  if (!ret) return NULL;
  if (!_upb_decode(buf, size, ret, &xds_annotations_v3_MessageStatusAnnotation_msginit, extreg, options, arena)) {
    return NULL;
  }
  return ret;
}
UPB_INLINE char *xds_annotations_v3_MessageStatusAnnotation_serialize(const xds_annotations_v3_MessageStatusAnnotation *msg, upb_arena *arena, size_t *len) {
  return upb_encode(msg, &xds_annotations_v3_MessageStatusAnnotation_msginit, arena, len);
}

UPB_INLINE bool xds_annotations_v3_MessageStatusAnnotation_work_in_progress(const xds_annotations_v3_MessageStatusAnnotation *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool); }

UPB_INLINE void xds_annotations_v3_MessageStatusAnnotation_set_work_in_progress(xds_annotations_v3_MessageStatusAnnotation *msg, bool value) {
  *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool) = value;
}

/* xds.annotations.v3.FieldStatusAnnotation */

UPB_INLINE xds_annotations_v3_FieldStatusAnnotation *xds_annotations_v3_FieldStatusAnnotation_new(upb_arena *arena) {
  return (xds_annotations_v3_FieldStatusAnnotation *)_upb_msg_new(&xds_annotations_v3_FieldStatusAnnotation_msginit, arena);
}
UPB_INLINE xds_annotations_v3_FieldStatusAnnotation *xds_annotations_v3_FieldStatusAnnotation_parse(const char *buf, size_t size,
                        upb_arena *arena) {
  xds_annotations_v3_FieldStatusAnnotation *ret = xds_annotations_v3_FieldStatusAnnotation_new(arena);
  if (!ret) return NULL;
  if (!upb_decode(buf, size, ret, &xds_annotations_v3_FieldStatusAnnotation_msginit, arena)) return NULL;
  return ret;
}
UPB_INLINE xds_annotations_v3_FieldStatusAnnotation *xds_annotations_v3_FieldStatusAnnotation_parse_ex(const char *buf, size_t size,
                           const upb_extreg *extreg, int options,
                           upb_arena *arena) {
  xds_annotations_v3_FieldStatusAnnotation *ret = xds_annotations_v3_FieldStatusAnnotation_new(arena);
  if (!ret) return NULL;
  if (!_upb_decode(buf, size, ret, &xds_annotations_v3_FieldStatusAnnotation_msginit, extreg, options, arena)) {
    return NULL;
  }
  return ret;
}
UPB_INLINE char *xds_annotations_v3_FieldStatusAnnotation_serialize(const xds_annotations_v3_FieldStatusAnnotation *msg, upb_arena *arena, size_t *len) {
  return upb_encode(msg, &xds_annotations_v3_FieldStatusAnnotation_msginit, arena, len);
}

UPB_INLINE bool xds_annotations_v3_FieldStatusAnnotation_work_in_progress(const xds_annotations_v3_FieldStatusAnnotation *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool); }

UPB_INLINE void xds_annotations_v3_FieldStatusAnnotation_set_work_in_progress(xds_annotations_v3_FieldStatusAnnotation *msg, bool value) {
  *UPB_PTR_AT(msg, UPB_SIZE(0, 0), bool) = value;
}

/* xds.annotations.v3.StatusAnnotation */

UPB_INLINE xds_annotations_v3_StatusAnnotation *xds_annotations_v3_StatusAnnotation_new(upb_arena *arena) {
  return (xds_annotations_v3_StatusAnnotation *)_upb_msg_new(&xds_annotations_v3_StatusAnnotation_msginit, arena);
}
UPB_INLINE xds_annotations_v3_StatusAnnotation *xds_annotations_v3_StatusAnnotation_parse(const char *buf, size_t size,
                        upb_arena *arena) {
  xds_annotations_v3_StatusAnnotation *ret = xds_annotations_v3_StatusAnnotation_new(arena);
  if (!ret) return NULL;
  if (!upb_decode(buf, size, ret, &xds_annotations_v3_StatusAnnotation_msginit, arena)) return NULL;
  return ret;
}
UPB_INLINE xds_annotations_v3_StatusAnnotation *xds_annotations_v3_StatusAnnotation_parse_ex(const char *buf, size_t size,
                           const upb_extreg *extreg, int options,
                           upb_arena *arena) {
  xds_annotations_v3_StatusAnnotation *ret = xds_annotations_v3_StatusAnnotation_new(arena);
  if (!ret) return NULL;
  if (!_upb_decode(buf, size, ret, &xds_annotations_v3_StatusAnnotation_msginit, extreg, options, arena)) {
    return NULL;
  }
  return ret;
}
UPB_INLINE char *xds_annotations_v3_StatusAnnotation_serialize(const xds_annotations_v3_StatusAnnotation *msg, upb_arena *arena, size_t *len) {
  return upb_encode(msg, &xds_annotations_v3_StatusAnnotation_msginit, arena, len);
}

UPB_INLINE bool xds_annotations_v3_StatusAnnotation_work_in_progress(const xds_annotations_v3_StatusAnnotation *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(4, 4), bool); }
UPB_INLINE int32_t xds_annotations_v3_StatusAnnotation_package_version_status(const xds_annotations_v3_StatusAnnotation *msg) { return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t); }

UPB_INLINE void xds_annotations_v3_StatusAnnotation_set_work_in_progress(xds_annotations_v3_StatusAnnotation *msg, bool value) {
  *UPB_PTR_AT(msg, UPB_SIZE(4, 4), bool) = value;
}
UPB_INLINE void xds_annotations_v3_StatusAnnotation_set_package_version_status(xds_annotations_v3_StatusAnnotation *msg, int32_t value) {
  *UPB_PTR_AT(msg, UPB_SIZE(0, 0), int32_t) = value;
}

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

#include "upb/port_undef.inc"

#endif  /* XDS_ANNOTATIONS_V3_STATUS_PROTO_UPB_H_ */
