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

#ifndef ENVOY_TYPE_HTTP_V3_PATH_TRANSFORMATION_PROTO_UPB_H_
#define ENVOY_TYPE_HTTP_V3_PATH_TRANSFORMATION_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_type_http_v3_PathTransformation;
struct envoy_type_http_v3_PathTransformation_Operation;
struct envoy_type_http_v3_PathTransformation_Operation_NormalizePathRFC3986;
struct envoy_type_http_v3_PathTransformation_Operation_MergeSlashes;
typedef struct envoy_type_http_v3_PathTransformation envoy_type_http_v3_PathTransformation;
typedef struct envoy_type_http_v3_PathTransformation_Operation envoy_type_http_v3_PathTransformation_Operation;
typedef struct envoy_type_http_v3_PathTransformation_Operation_NormalizePathRFC3986 envoy_type_http_v3_PathTransformation_Operation_NormalizePathRFC3986;
typedef struct envoy_type_http_v3_PathTransformation_Operation_MergeSlashes envoy_type_http_v3_PathTransformation_Operation_MergeSlashes;
extern const upb_msglayout envoy_type_http_v3_PathTransformation_msginit;
extern const upb_msglayout envoy_type_http_v3_PathTransformation_Operation_msginit;
extern const upb_msglayout envoy_type_http_v3_PathTransformation_Operation_NormalizePathRFC3986_msginit;
extern const upb_msglayout envoy_type_http_v3_PathTransformation_Operation_MergeSlashes_msginit;


/* envoy.type.http.v3.PathTransformation */

UPB_INLINE envoy_type_http_v3_PathTransformation *envoy_type_http_v3_PathTransformation_new(upb_arena *arena) {
  return (envoy_type_http_v3_PathTransformation *)_upb_msg_new(&envoy_type_http_v3_PathTransformation_msginit, arena);
}
UPB_INLINE envoy_type_http_v3_PathTransformation *envoy_type_http_v3_PathTransformation_parse(const char *buf, size_t size,
                        upb_arena *arena) {
  envoy_type_http_v3_PathTransformation *ret = envoy_type_http_v3_PathTransformation_new(arena);
  if (!ret) return NULL;
  if (!upb_decode(buf, size, ret, &envoy_type_http_v3_PathTransformation_msginit, arena)) return NULL;
  return ret;
}
UPB_INLINE envoy_type_http_v3_PathTransformation *envoy_type_http_v3_PathTransformation_parse_ex(const char *buf, size_t size,
                           const upb_extreg *extreg, int options,
                           upb_arena *arena) {
  envoy_type_http_v3_PathTransformation *ret = envoy_type_http_v3_PathTransformation_new(arena);
  if (!ret) return NULL;
  if (!_upb_decode(buf, size, ret, &envoy_type_http_v3_PathTransformation_msginit, extreg, options, arena)) {
    return NULL;
  }
  return ret;
}
UPB_INLINE char *envoy_type_http_v3_PathTransformation_serialize(const envoy_type_http_v3_PathTransformation *msg, upb_arena *arena, size_t *len) {
  return upb_encode(msg, &envoy_type_http_v3_PathTransformation_msginit, arena, len);
}

UPB_INLINE bool envoy_type_http_v3_PathTransformation_has_operations(const envoy_type_http_v3_PathTransformation *msg) { return _upb_has_submsg_nohasbit(msg, UPB_SIZE(0, 0)); }
UPB_INLINE const envoy_type_http_v3_PathTransformation_Operation* const* envoy_type_http_v3_PathTransformation_operations(const envoy_type_http_v3_PathTransformation *msg, size_t *len) { return (const envoy_type_http_v3_PathTransformation_Operation* const*)_upb_array_accessor(msg, UPB_SIZE(0, 0), len); }

UPB_INLINE envoy_type_http_v3_PathTransformation_Operation** envoy_type_http_v3_PathTransformation_mutable_operations(envoy_type_http_v3_PathTransformation *msg, size_t *len) {
  return (envoy_type_http_v3_PathTransformation_Operation**)_upb_array_mutable_accessor(msg, UPB_SIZE(0, 0), len);
}
UPB_INLINE envoy_type_http_v3_PathTransformation_Operation** envoy_type_http_v3_PathTransformation_resize_operations(envoy_type_http_v3_PathTransformation *msg, size_t len, upb_arena *arena) {
  return (envoy_type_http_v3_PathTransformation_Operation**)_upb_array_resize_accessor2(msg, UPB_SIZE(0, 0), len, UPB_SIZE(2, 3), arena);
}
UPB_INLINE struct envoy_type_http_v3_PathTransformation_Operation* envoy_type_http_v3_PathTransformation_add_operations(envoy_type_http_v3_PathTransformation *msg, upb_arena *arena) {
  struct envoy_type_http_v3_PathTransformation_Operation* sub = (struct envoy_type_http_v3_PathTransformation_Operation*)_upb_msg_new(&envoy_type_http_v3_PathTransformation_Operation_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.type.http.v3.PathTransformation.Operation */

UPB_INLINE envoy_type_http_v3_PathTransformation_Operation *envoy_type_http_v3_PathTransformation_Operation_new(upb_arena *arena) {
  return (envoy_type_http_v3_PathTransformation_Operation *)_upb_msg_new(&envoy_type_http_v3_PathTransformation_Operation_msginit, arena);
}
UPB_INLINE envoy_type_http_v3_PathTransformation_Operation *envoy_type_http_v3_PathTransformation_Operation_parse(const char *buf, size_t size,
                        upb_arena *arena) {
  envoy_type_http_v3_PathTransformation_Operation *ret = envoy_type_http_v3_PathTransformation_Operation_new(arena);
  if (!ret) return NULL;
  if (!upb_decode(buf, size, ret, &envoy_type_http_v3_PathTransformation_Operation_msginit, arena)) return NULL;
  return ret;
}
UPB_INLINE envoy_type_http_v3_PathTransformation_Operation *envoy_type_http_v3_PathTransformation_Operation_parse_ex(const char *buf, size_t size,
                           const upb_extreg *extreg, int options,
                           upb_arena *arena) {
  envoy_type_http_v3_PathTransformation_Operation *ret = envoy_type_http_v3_PathTransformation_Operation_new(arena);
  if (!ret) return NULL;
  if (!_upb_decode(buf, size, ret, &envoy_type_http_v3_PathTransformation_Operation_msginit, extreg, options, arena)) {
    return NULL;
  }
  return ret;
}
UPB_INLINE char *envoy_type_http_v3_PathTransformation_Operation_serialize(const envoy_type_http_v3_PathTransformation_Operation *msg, upb_arena *arena, size_t *len) {
  return upb_encode(msg, &envoy_type_http_v3_PathTransformation_Operation_msginit, arena, len);
}

typedef enum {
  envoy_type_http_v3_PathTransformation_Operation_operation_specifier_normalize_path_rfc_3986 = 2,
  envoy_type_http_v3_PathTransformation_Operation_operation_specifier_merge_slashes = 3,
  envoy_type_http_v3_PathTransformation_Operation_operation_specifier_NOT_SET = 0
} envoy_type_http_v3_PathTransformation_Operation_operation_specifier_oneofcases;
UPB_INLINE envoy_type_http_v3_PathTransformation_Operation_operation_specifier_oneofcases envoy_type_http_v3_PathTransformation_Operation_operation_specifier_case(const envoy_type_http_v3_PathTransformation_Operation* msg) { return (envoy_type_http_v3_PathTransformation_Operation_operation_specifier_oneofcases)*UPB_PTR_AT(msg, UPB_SIZE(4, 8), int32_t); }

UPB_INLINE bool envoy_type_http_v3_PathTransformation_Operation_has_normalize_path_rfc_3986(const envoy_type_http_v3_PathTransformation_Operation *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 2; }
UPB_INLINE const envoy_type_http_v3_PathTransformation_Operation_NormalizePathRFC3986* envoy_type_http_v3_PathTransformation_Operation_normalize_path_rfc_3986(const envoy_type_http_v3_PathTransformation_Operation *msg) { return UPB_READ_ONEOF(msg, const envoy_type_http_v3_PathTransformation_Operation_NormalizePathRFC3986*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 2, NULL); }
UPB_INLINE bool envoy_type_http_v3_PathTransformation_Operation_has_merge_slashes(const envoy_type_http_v3_PathTransformation_Operation *msg) { return _upb_getoneofcase(msg, UPB_SIZE(4, 8)) == 3; }
UPB_INLINE const envoy_type_http_v3_PathTransformation_Operation_MergeSlashes* envoy_type_http_v3_PathTransformation_Operation_merge_slashes(const envoy_type_http_v3_PathTransformation_Operation *msg) { return UPB_READ_ONEOF(msg, const envoy_type_http_v3_PathTransformation_Operation_MergeSlashes*, UPB_SIZE(0, 0), UPB_SIZE(4, 8), 3, NULL); }

UPB_INLINE void envoy_type_http_v3_PathTransformation_Operation_set_normalize_path_rfc_3986(envoy_type_http_v3_PathTransformation_Operation *msg, envoy_type_http_v3_PathTransformation_Operation_NormalizePathRFC3986* value) {
  UPB_WRITE_ONEOF(msg, envoy_type_http_v3_PathTransformation_Operation_NormalizePathRFC3986*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 2);
}
UPB_INLINE struct envoy_type_http_v3_PathTransformation_Operation_NormalizePathRFC3986* envoy_type_http_v3_PathTransformation_Operation_mutable_normalize_path_rfc_3986(envoy_type_http_v3_PathTransformation_Operation *msg, upb_arena *arena) {
  struct envoy_type_http_v3_PathTransformation_Operation_NormalizePathRFC3986* sub = (struct envoy_type_http_v3_PathTransformation_Operation_NormalizePathRFC3986*)envoy_type_http_v3_PathTransformation_Operation_normalize_path_rfc_3986(msg);
  if (sub == NULL) {
    sub = (struct envoy_type_http_v3_PathTransformation_Operation_NormalizePathRFC3986*)_upb_msg_new(&envoy_type_http_v3_PathTransformation_Operation_NormalizePathRFC3986_msginit, arena);
    if (!sub) return NULL;
    envoy_type_http_v3_PathTransformation_Operation_set_normalize_path_rfc_3986(msg, sub);
  }
  return sub;
}
UPB_INLINE void envoy_type_http_v3_PathTransformation_Operation_set_merge_slashes(envoy_type_http_v3_PathTransformation_Operation *msg, envoy_type_http_v3_PathTransformation_Operation_MergeSlashes* value) {
  UPB_WRITE_ONEOF(msg, envoy_type_http_v3_PathTransformation_Operation_MergeSlashes*, UPB_SIZE(0, 0), value, UPB_SIZE(4, 8), 3);
}
UPB_INLINE struct envoy_type_http_v3_PathTransformation_Operation_MergeSlashes* envoy_type_http_v3_PathTransformation_Operation_mutable_merge_slashes(envoy_type_http_v3_PathTransformation_Operation *msg, upb_arena *arena) {
  struct envoy_type_http_v3_PathTransformation_Operation_MergeSlashes* sub = (struct envoy_type_http_v3_PathTransformation_Operation_MergeSlashes*)envoy_type_http_v3_PathTransformation_Operation_merge_slashes(msg);
  if (sub == NULL) {
    sub = (struct envoy_type_http_v3_PathTransformation_Operation_MergeSlashes*)_upb_msg_new(&envoy_type_http_v3_PathTransformation_Operation_MergeSlashes_msginit, arena);
    if (!sub) return NULL;
    envoy_type_http_v3_PathTransformation_Operation_set_merge_slashes(msg, sub);
  }
  return sub;
}

/* envoy.type.http.v3.PathTransformation.Operation.NormalizePathRFC3986 */

UPB_INLINE envoy_type_http_v3_PathTransformation_Operation_NormalizePathRFC3986 *envoy_type_http_v3_PathTransformation_Operation_NormalizePathRFC3986_new(upb_arena *arena) {
  return (envoy_type_http_v3_PathTransformation_Operation_NormalizePathRFC3986 *)_upb_msg_new(&envoy_type_http_v3_PathTransformation_Operation_NormalizePathRFC3986_msginit, arena);
}
UPB_INLINE envoy_type_http_v3_PathTransformation_Operation_NormalizePathRFC3986 *envoy_type_http_v3_PathTransformation_Operation_NormalizePathRFC3986_parse(const char *buf, size_t size,
                        upb_arena *arena) {
  envoy_type_http_v3_PathTransformation_Operation_NormalizePathRFC3986 *ret = envoy_type_http_v3_PathTransformation_Operation_NormalizePathRFC3986_new(arena);
  if (!ret) return NULL;
  if (!upb_decode(buf, size, ret, &envoy_type_http_v3_PathTransformation_Operation_NormalizePathRFC3986_msginit, arena)) return NULL;
  return ret;
}
UPB_INLINE envoy_type_http_v3_PathTransformation_Operation_NormalizePathRFC3986 *envoy_type_http_v3_PathTransformation_Operation_NormalizePathRFC3986_parse_ex(const char *buf, size_t size,
                           const upb_extreg *extreg, int options,
                           upb_arena *arena) {
  envoy_type_http_v3_PathTransformation_Operation_NormalizePathRFC3986 *ret = envoy_type_http_v3_PathTransformation_Operation_NormalizePathRFC3986_new(arena);
  if (!ret) return NULL;
  if (!_upb_decode(buf, size, ret, &envoy_type_http_v3_PathTransformation_Operation_NormalizePathRFC3986_msginit, extreg, options, arena)) {
    return NULL;
  }
  return ret;
}
UPB_INLINE char *envoy_type_http_v3_PathTransformation_Operation_NormalizePathRFC3986_serialize(const envoy_type_http_v3_PathTransformation_Operation_NormalizePathRFC3986 *msg, upb_arena *arena, size_t *len) {
  return upb_encode(msg, &envoy_type_http_v3_PathTransformation_Operation_NormalizePathRFC3986_msginit, arena, len);
}



/* envoy.type.http.v3.PathTransformation.Operation.MergeSlashes */

UPB_INLINE envoy_type_http_v3_PathTransformation_Operation_MergeSlashes *envoy_type_http_v3_PathTransformation_Operation_MergeSlashes_new(upb_arena *arena) {
  return (envoy_type_http_v3_PathTransformation_Operation_MergeSlashes *)_upb_msg_new(&envoy_type_http_v3_PathTransformation_Operation_MergeSlashes_msginit, arena);
}
UPB_INLINE envoy_type_http_v3_PathTransformation_Operation_MergeSlashes *envoy_type_http_v3_PathTransformation_Operation_MergeSlashes_parse(const char *buf, size_t size,
                        upb_arena *arena) {
  envoy_type_http_v3_PathTransformation_Operation_MergeSlashes *ret = envoy_type_http_v3_PathTransformation_Operation_MergeSlashes_new(arena);
  if (!ret) return NULL;
  if (!upb_decode(buf, size, ret, &envoy_type_http_v3_PathTransformation_Operation_MergeSlashes_msginit, arena)) return NULL;
  return ret;
}
UPB_INLINE envoy_type_http_v3_PathTransformation_Operation_MergeSlashes *envoy_type_http_v3_PathTransformation_Operation_MergeSlashes_parse_ex(const char *buf, size_t size,
                           const upb_extreg *extreg, int options,
                           upb_arena *arena) {
  envoy_type_http_v3_PathTransformation_Operation_MergeSlashes *ret = envoy_type_http_v3_PathTransformation_Operation_MergeSlashes_new(arena);
  if (!ret) return NULL;
  if (!_upb_decode(buf, size, ret, &envoy_type_http_v3_PathTransformation_Operation_MergeSlashes_msginit, extreg, options, arena)) {
    return NULL;
  }
  return ret;
}
UPB_INLINE char *envoy_type_http_v3_PathTransformation_Operation_MergeSlashes_serialize(const envoy_type_http_v3_PathTransformation_Operation_MergeSlashes *msg, upb_arena *arena, size_t *len) {
  return upb_encode(msg, &envoy_type_http_v3_PathTransformation_Operation_MergeSlashes_msginit, arena, len);
}



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

#include "upb/port_undef.inc"

#endif  /* ENVOY_TYPE_HTTP_V3_PATH_TRANSFORMATION_PROTO_UPB_H_ */
