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

#ifndef GOOGLE_TYPE_EXPR_PROTO_UPB_H_
#define GOOGLE_TYPE_EXPR_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 google_type_Expr;
typedef struct google_type_Expr google_type_Expr;
extern const upb_MiniTable google_type_Expr_msginit;



/* google.type.Expr */

UPB_INLINE google_type_Expr* google_type_Expr_new(upb_Arena* arena) {
  return (google_type_Expr*)_upb_Message_New(&google_type_Expr_msginit, arena);
}
UPB_INLINE google_type_Expr* google_type_Expr_parse(const char* buf, size_t size, upb_Arena* arena) {
  google_type_Expr* ret = google_type_Expr_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, &google_type_Expr_msginit, NULL, 0, arena) != kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE google_type_Expr* google_type_Expr_parse_ex(const char* buf, size_t size,
                           const upb_ExtensionRegistry* extreg,
                           int options, upb_Arena* arena) {
  google_type_Expr* ret = google_type_Expr_new(arena);
  if (!ret) return NULL;
  if (upb_Decode(buf, size, ret, &google_type_Expr_msginit, extreg, options, arena) !=
      kUpb_DecodeStatus_Ok) {
    return NULL;
  }
  return ret;
}
UPB_INLINE char* google_type_Expr_serialize(const google_type_Expr* msg, upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, &google_type_Expr_msginit, 0, arena, &ptr, len);
  return ptr;
}
UPB_INLINE char* google_type_Expr_serialize_ex(const google_type_Expr* msg, int options,
                                 upb_Arena* arena, size_t* len) {
  char* ptr;
  (void)upb_Encode(msg, &google_type_Expr_msginit, options, arena, &ptr, len);
  return ptr;
}
UPB_INLINE void google_type_Expr_clear_expression(const google_type_Expr* msg) {
  *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0);
}
UPB_INLINE upb_StringView google_type_Expr_expression(const google_type_Expr* msg) {
  return *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_StringView);
}
UPB_INLINE void google_type_Expr_clear_title(const google_type_Expr* msg) {
  *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0);
}
UPB_INLINE upb_StringView google_type_Expr_title(const google_type_Expr* msg) {
  return *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_StringView);
}
UPB_INLINE void google_type_Expr_clear_description(const google_type_Expr* msg) {
  *UPB_PTR_AT(msg, UPB_SIZE(16, 32), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0);
}
UPB_INLINE upb_StringView google_type_Expr_description(const google_type_Expr* msg) {
  return *UPB_PTR_AT(msg, UPB_SIZE(16, 32), upb_StringView);
}
UPB_INLINE void google_type_Expr_clear_location(const google_type_Expr* msg) {
  *UPB_PTR_AT(msg, UPB_SIZE(24, 48), upb_StringView) = upb_StringView_FromDataAndSize(NULL, 0);
}
UPB_INLINE upb_StringView google_type_Expr_location(const google_type_Expr* msg) {
  return *UPB_PTR_AT(msg, UPB_SIZE(24, 48), upb_StringView);
}

UPB_INLINE void google_type_Expr_set_expression(google_type_Expr *msg, upb_StringView value) {
  *UPB_PTR_AT(msg, UPB_SIZE(0, 0), upb_StringView) = value;
}
UPB_INLINE void google_type_Expr_set_title(google_type_Expr *msg, upb_StringView value) {
  *UPB_PTR_AT(msg, UPB_SIZE(8, 16), upb_StringView) = value;
}
UPB_INLINE void google_type_Expr_set_description(google_type_Expr *msg, upb_StringView value) {
  *UPB_PTR_AT(msg, UPB_SIZE(16, 32), upb_StringView) = value;
}
UPB_INLINE void google_type_Expr_set_location(google_type_Expr *msg, upb_StringView value) {
  *UPB_PTR_AT(msg, UPB_SIZE(24, 48), upb_StringView) = value;
}

extern const upb_MiniTable_File google_type_expr_proto_upb_file_layout;

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

#include "upb/port_undef.inc"

#endif  /* GOOGLE_TYPE_EXPR_PROTO_UPB_H_ */
