// Code generated by protoc-gen-microweb. DO NOT EDIT.
// source: v0.proto

package v0

import (
	"encoding/json"
	"net/http"

	"github.com/go-chi/chi/v5"
	"github.com/go-chi/render"
	merrors "go-micro.dev/v4/errors"
	"google.golang.org/protobuf/encoding/protojson"

	ptypesempty "github.com/golang/protobuf/ptypes/empty"
)

type webBundleServiceHandler struct {
	r chi.Router
	h BundleServiceHandler
}

func (h *webBundleServiceHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
	h.r.ServeHTTP(w, r)
}

func (h *webBundleServiceHandler) SaveBundle(w http.ResponseWriter, r *http.Request) {
	req := &SaveBundleRequest{}
	resp := &SaveBundleResponse{}

	if err := json.NewDecoder(r.Body).Decode(&req); err != nil {
		http.Error(w, err.Error(), http.StatusPreconditionFailed)
		return
	}

	if err := h.h.SaveBundle(
		r.Context(),
		req,
		resp,
	); err != nil {
		if merr, ok := merrors.As(err); ok && merr.Code == http.StatusNotFound {
			http.Error(w, err.Error(), http.StatusNotFound)
		} else {
			http.Error(w, err.Error(), http.StatusBadRequest)
		}
		return
	}

	render.Status(r, http.StatusCreated)
	render.JSON(w, r, resp)
}

func (h *webBundleServiceHandler) GetBundle(w http.ResponseWriter, r *http.Request) {
	req := &GetBundleRequest{}
	resp := &GetBundleResponse{}

	if err := json.NewDecoder(r.Body).Decode(&req); err != nil {
		http.Error(w, err.Error(), http.StatusPreconditionFailed)
		return
	}

	if err := h.h.GetBundle(
		r.Context(),
		req,
		resp,
	); err != nil {
		if merr, ok := merrors.As(err); ok && merr.Code == http.StatusNotFound {
			http.Error(w, err.Error(), http.StatusNotFound)
		} else {
			http.Error(w, err.Error(), http.StatusBadRequest)
		}
		return
	}

	render.Status(r, http.StatusCreated)
	render.JSON(w, r, resp)
}

func (h *webBundleServiceHandler) ListBundles(w http.ResponseWriter, r *http.Request) {
	req := &ListBundlesRequest{}
	resp := &ListBundlesResponse{}

	if err := json.NewDecoder(r.Body).Decode(&req); err != nil {
		http.Error(w, err.Error(), http.StatusPreconditionFailed)
		return
	}

	if err := h.h.ListBundles(
		r.Context(),
		req,
		resp,
	); err != nil {
		if merr, ok := merrors.As(err); ok && merr.Code == http.StatusNotFound {
			http.Error(w, err.Error(), http.StatusNotFound)
		} else {
			http.Error(w, err.Error(), http.StatusBadRequest)
		}
		return
	}

	render.Status(r, http.StatusCreated)
	render.JSON(w, r, resp)
}

func (h *webBundleServiceHandler) AddSettingToBundle(w http.ResponseWriter, r *http.Request) {
	req := &AddSettingToBundleRequest{}
	resp := &AddSettingToBundleResponse{}

	if err := json.NewDecoder(r.Body).Decode(&req); err != nil {
		http.Error(w, err.Error(), http.StatusPreconditionFailed)
		return
	}

	if err := h.h.AddSettingToBundle(
		r.Context(),
		req,
		resp,
	); err != nil {
		if merr, ok := merrors.As(err); ok && merr.Code == http.StatusNotFound {
			http.Error(w, err.Error(), http.StatusNotFound)
		} else {
			http.Error(w, err.Error(), http.StatusBadRequest)
		}
		return
	}

	render.Status(r, http.StatusCreated)
	render.JSON(w, r, resp)
}

func (h *webBundleServiceHandler) RemoveSettingFromBundle(w http.ResponseWriter, r *http.Request) {
	req := &RemoveSettingFromBundleRequest{}
	resp := &ptypesempty.Empty{}

	if err := json.NewDecoder(r.Body).Decode(&req); err != nil {
		http.Error(w, err.Error(), http.StatusPreconditionFailed)
		return
	}

	if err := h.h.RemoveSettingFromBundle(
		r.Context(),
		req,
		resp,
	); err != nil {
		if merr, ok := merrors.As(err); ok && merr.Code == http.StatusNotFound {
			http.Error(w, err.Error(), http.StatusNotFound)
		} else {
			http.Error(w, err.Error(), http.StatusBadRequest)
		}
		return
	}

	render.Status(r, http.StatusNoContent)
	render.NoContent(w, r)
}

func RegisterBundleServiceWeb(r chi.Router, i BundleServiceHandler, middlewares ...func(http.Handler) http.Handler) {
	handler := &webBundleServiceHandler{
		r: r,
		h: i,
	}

	r.MethodFunc("POST", "/api/v0/settings/bundle-save", handler.SaveBundle)
	r.MethodFunc("POST", "/api/v0/settings/bundle-get", handler.GetBundle)
	r.MethodFunc("POST", "/api/v0/settings/bundles-list", handler.ListBundles)
	r.MethodFunc("POST", "/api/v0/settings/bundles-add-setting", handler.AddSettingToBundle)
	r.MethodFunc("POST", "/api/v0/settings/bundles-remove-setting", handler.RemoveSettingFromBundle)
}

type webValueServiceHandler struct {
	r chi.Router
	h ValueServiceHandler
}

func (h *webValueServiceHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
	h.r.ServeHTTP(w, r)
}

func (h *webValueServiceHandler) SaveValue(w http.ResponseWriter, r *http.Request) {
	req := &SaveValueRequest{}
	resp := &SaveValueResponse{}

	if err := json.NewDecoder(r.Body).Decode(&req); err != nil {
		http.Error(w, err.Error(), http.StatusPreconditionFailed)
		return
	}

	if err := h.h.SaveValue(
		r.Context(),
		req,
		resp,
	); err != nil {
		if merr, ok := merrors.As(err); ok && merr.Code == http.StatusNotFound {
			http.Error(w, err.Error(), http.StatusNotFound)
		} else {
			http.Error(w, err.Error(), http.StatusBadRequest)
		}
		return
	}

	render.Status(r, http.StatusCreated)
	render.JSON(w, r, resp)
}

func (h *webValueServiceHandler) GetValue(w http.ResponseWriter, r *http.Request) {
	req := &GetValueRequest{}
	resp := &GetValueResponse{}

	if err := json.NewDecoder(r.Body).Decode(&req); err != nil {
		http.Error(w, err.Error(), http.StatusPreconditionFailed)
		return
	}

	if err := h.h.GetValue(
		r.Context(),
		req,
		resp,
	); err != nil {
		if merr, ok := merrors.As(err); ok && merr.Code == http.StatusNotFound {
			http.Error(w, err.Error(), http.StatusNotFound)
		} else {
			http.Error(w, err.Error(), http.StatusBadRequest)
		}
		return
	}

	render.Status(r, http.StatusCreated)
	render.JSON(w, r, resp)
}

func (h *webValueServiceHandler) ListValues(w http.ResponseWriter, r *http.Request) {
	req := &ListValuesRequest{}
	resp := &ListValuesResponse{}

	if err := json.NewDecoder(r.Body).Decode(&req); err != nil {
		http.Error(w, err.Error(), http.StatusPreconditionFailed)
		return
	}

	if err := h.h.ListValues(
		r.Context(),
		req,
		resp,
	); err != nil {
		if merr, ok := merrors.As(err); ok && merr.Code == http.StatusNotFound {
			http.Error(w, err.Error(), http.StatusNotFound)
		} else {
			http.Error(w, err.Error(), http.StatusBadRequest)
		}
		return
	}

	render.Status(r, http.StatusCreated)
	render.JSON(w, r, resp)
}

func (h *webValueServiceHandler) GetValueByUniqueIdentifiers(w http.ResponseWriter, r *http.Request) {
	req := &GetValueByUniqueIdentifiersRequest{}
	resp := &GetValueResponse{}

	if err := json.NewDecoder(r.Body).Decode(&req); err != nil {
		http.Error(w, err.Error(), http.StatusPreconditionFailed)
		return
	}

	if err := h.h.GetValueByUniqueIdentifiers(
		r.Context(),
		req,
		resp,
	); err != nil {
		if merr, ok := merrors.As(err); ok && merr.Code == http.StatusNotFound {
			http.Error(w, err.Error(), http.StatusNotFound)
		} else {
			http.Error(w, err.Error(), http.StatusBadRequest)
		}
		return
	}

	render.Status(r, http.StatusCreated)
	render.JSON(w, r, resp)
}

func RegisterValueServiceWeb(r chi.Router, i ValueServiceHandler, middlewares ...func(http.Handler) http.Handler) {
	handler := &webValueServiceHandler{
		r: r,
		h: i,
	}

	r.MethodFunc("POST", "/api/v0/settings/values-save", handler.SaveValue)
	r.MethodFunc("POST", "/api/v0/settings/values-get", handler.GetValue)
	r.MethodFunc("POST", "/api/v0/settings/values-list", handler.ListValues)
	r.MethodFunc("POST", "/api/v0/settings/values-get-by-unique-identifiers", handler.GetValueByUniqueIdentifiers)
}

type webRoleServiceHandler struct {
	r chi.Router
	h RoleServiceHandler
}

func (h *webRoleServiceHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
	h.r.ServeHTTP(w, r)
}

func (h *webRoleServiceHandler) ListRoles(w http.ResponseWriter, r *http.Request) {
	req := &ListBundlesRequest{}
	resp := &ListBundlesResponse{}

	if err := json.NewDecoder(r.Body).Decode(&req); err != nil {
		http.Error(w, err.Error(), http.StatusPreconditionFailed)
		return
	}

	if err := h.h.ListRoles(
		r.Context(),
		req,
		resp,
	); err != nil {
		if merr, ok := merrors.As(err); ok && merr.Code == http.StatusNotFound {
			http.Error(w, err.Error(), http.StatusNotFound)
		} else {
			http.Error(w, err.Error(), http.StatusBadRequest)
		}
		return
	}

	render.Status(r, http.StatusCreated)
	render.JSON(w, r, resp)
}

func (h *webRoleServiceHandler) ListRoleAssignments(w http.ResponseWriter, r *http.Request) {
	req := &ListRoleAssignmentsRequest{}
	resp := &ListRoleAssignmentsResponse{}

	if err := json.NewDecoder(r.Body).Decode(&req); err != nil {
		http.Error(w, err.Error(), http.StatusPreconditionFailed)
		return
	}

	if err := h.h.ListRoleAssignments(
		r.Context(),
		req,
		resp,
	); err != nil {
		if merr, ok := merrors.As(err); ok && merr.Code == http.StatusNotFound {
			http.Error(w, err.Error(), http.StatusNotFound)
		} else {
			http.Error(w, err.Error(), http.StatusBadRequest)
		}
		return
	}

	render.Status(r, http.StatusCreated)
	render.JSON(w, r, resp)
}

func (h *webRoleServiceHandler) ListRoleAssignmentsFiltered(w http.ResponseWriter, r *http.Request) {
	req := &ListRoleAssignmentsFilteredRequest{}
	resp := &ListRoleAssignmentsResponse{}

	if err := json.NewDecoder(r.Body).Decode(&req); err != nil {
		http.Error(w, err.Error(), http.StatusPreconditionFailed)
		return
	}

	if err := h.h.ListRoleAssignmentsFiltered(
		r.Context(),
		req,
		resp,
	); err != nil {
		if merr, ok := merrors.As(err); ok && merr.Code == http.StatusNotFound {
			http.Error(w, err.Error(), http.StatusNotFound)
		} else {
			http.Error(w, err.Error(), http.StatusBadRequest)
		}
		return
	}

	render.Status(r, http.StatusCreated)
	render.JSON(w, r, resp)
}

func (h *webRoleServiceHandler) AssignRoleToUser(w http.ResponseWriter, r *http.Request) {
	req := &AssignRoleToUserRequest{}
	resp := &AssignRoleToUserResponse{}

	if err := json.NewDecoder(r.Body).Decode(&req); err != nil {
		http.Error(w, err.Error(), http.StatusPreconditionFailed)
		return
	}

	if err := h.h.AssignRoleToUser(
		r.Context(),
		req,
		resp,
	); err != nil {
		if merr, ok := merrors.As(err); ok && merr.Code == http.StatusNotFound {
			http.Error(w, err.Error(), http.StatusNotFound)
		} else {
			http.Error(w, err.Error(), http.StatusBadRequest)
		}
		return
	}

	render.Status(r, http.StatusCreated)
	render.JSON(w, r, resp)
}

func (h *webRoleServiceHandler) RemoveRoleFromUser(w http.ResponseWriter, r *http.Request) {
	req := &RemoveRoleFromUserRequest{}
	resp := &ptypesempty.Empty{}

	if err := json.NewDecoder(r.Body).Decode(&req); err != nil {
		http.Error(w, err.Error(), http.StatusPreconditionFailed)
		return
	}

	if err := h.h.RemoveRoleFromUser(
		r.Context(),
		req,
		resp,
	); err != nil {
		if merr, ok := merrors.As(err); ok && merr.Code == http.StatusNotFound {
			http.Error(w, err.Error(), http.StatusNotFound)
		} else {
			http.Error(w, err.Error(), http.StatusBadRequest)
		}
		return
	}

	render.Status(r, http.StatusNoContent)
	render.NoContent(w, r)
}

func RegisterRoleServiceWeb(r chi.Router, i RoleServiceHandler, middlewares ...func(http.Handler) http.Handler) {
	handler := &webRoleServiceHandler{
		r: r,
		h: i,
	}

	r.MethodFunc("POST", "/api/v0/settings/roles-list", handler.ListRoles)
	r.MethodFunc("POST", "/api/v0/settings/assignments-list", handler.ListRoleAssignments)
	r.MethodFunc("POST", "/api/v0/settings/assignments-list-filtered", handler.ListRoleAssignmentsFiltered)
	r.MethodFunc("POST", "/api/v0/settings/assignments-add", handler.AssignRoleToUser)
	r.MethodFunc("POST", "/api/v0/settings/assignments-remove", handler.RemoveRoleFromUser)
}

type webPermissionServiceHandler struct {
	r chi.Router
	h PermissionServiceHandler
}

func (h *webPermissionServiceHandler) ServeHTTP(w http.ResponseWriter, r *http.Request) {
	h.r.ServeHTTP(w, r)
}

func (h *webPermissionServiceHandler) ListPermissions(w http.ResponseWriter, r *http.Request) {
	req := &ListPermissionsRequest{}
	resp := &ListPermissionsResponse{}

	if err := json.NewDecoder(r.Body).Decode(&req); err != nil {
		http.Error(w, err.Error(), http.StatusPreconditionFailed)
		return
	}

	if err := h.h.ListPermissions(
		r.Context(),
		req,
		resp,
	); err != nil {
		if merr, ok := merrors.As(err); ok && merr.Code == http.StatusNotFound {
			http.Error(w, err.Error(), http.StatusNotFound)
		} else {
			http.Error(w, err.Error(), http.StatusBadRequest)
		}
		return
	}

	render.Status(r, http.StatusCreated)
	render.JSON(w, r, resp)
}

func (h *webPermissionServiceHandler) ListPermissionsByResource(w http.ResponseWriter, r *http.Request) {
	req := &ListPermissionsByResourceRequest{}
	resp := &ListPermissionsByResourceResponse{}

	if err := json.NewDecoder(r.Body).Decode(&req); err != nil {
		http.Error(w, err.Error(), http.StatusPreconditionFailed)
		return
	}

	if err := h.h.ListPermissionsByResource(
		r.Context(),
		req,
		resp,
	); err != nil {
		if merr, ok := merrors.As(err); ok && merr.Code == http.StatusNotFound {
			http.Error(w, err.Error(), http.StatusNotFound)
		} else {
			http.Error(w, err.Error(), http.StatusBadRequest)
		}
		return
	}

	render.Status(r, http.StatusCreated)
	render.JSON(w, r, resp)
}

func (h *webPermissionServiceHandler) GetPermissionByID(w http.ResponseWriter, r *http.Request) {
	req := &GetPermissionByIDRequest{}
	resp := &GetPermissionByIDResponse{}

	if err := json.NewDecoder(r.Body).Decode(&req); err != nil {
		http.Error(w, err.Error(), http.StatusPreconditionFailed)
		return
	}

	if err := h.h.GetPermissionByID(
		r.Context(),
		req,
		resp,
	); err != nil {
		if merr, ok := merrors.As(err); ok && merr.Code == http.StatusNotFound {
			http.Error(w, err.Error(), http.StatusNotFound)
		} else {
			http.Error(w, err.Error(), http.StatusBadRequest)
		}
		return
	}

	render.Status(r, http.StatusCreated)
	render.JSON(w, r, resp)
}

func RegisterPermissionServiceWeb(r chi.Router, i PermissionServiceHandler, middlewares ...func(http.Handler) http.Handler) {
	handler := &webPermissionServiceHandler{
		r: r,
		h: i,
	}

	r.MethodFunc("POST", "/api/v0/settings/permissions-list", handler.ListPermissions)
	r.MethodFunc("POST", "/api/v0/settings/permissions-list-by-resource", handler.ListPermissionsByResource)
	r.MethodFunc("POST", "/api/v0/settings/permissions-get-by-id", handler.GetPermissionByID)
}

// SaveBundleRequestJSONMarshaler describes the default protojson.Marshaler used by all
// instances of SaveBundleRequest. This struct is safe to replace or modify but
// should not be done so concurrently.
var SaveBundleRequestJSONMarshaler = protojson.MarshalOptions{}

// MarshalJSON satisfies the encoding/json Marshaler interface. This method
// uses the more correct protojson package to correctly marshal the message.
func (m *SaveBundleRequest) MarshalJSON() ([]byte, error) {
	if m == nil {
		return json.Marshal(nil)
	}

	return SaveBundleRequestJSONMarshaler.Marshal(m)
}

var _ json.Marshaler = (*SaveBundleRequest)(nil)

// SaveBundleRequestJSONUnmarshaler describes the default protojson.Unmarshaler used by all
// instances of SaveBundleRequest. This struct is safe to replace or modify but
// should not be done so concurrently.
var SaveBundleRequestJSONUnmarshaler = protojson.UnmarshalOptions{}

// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method
// uses the more correct protojson package to correctly unmarshal the message.
func (m *SaveBundleRequest) UnmarshalJSON(b []byte) error {
	return SaveBundleRequestJSONUnmarshaler.Unmarshal(b, m)
}

var _ json.Unmarshaler = (*SaveBundleRequest)(nil)

// SaveBundleResponseJSONMarshaler describes the default protojson.Marshaler used by all
// instances of SaveBundleResponse. This struct is safe to replace or modify but
// should not be done so concurrently.
var SaveBundleResponseJSONMarshaler = protojson.MarshalOptions{}

// MarshalJSON satisfies the encoding/json Marshaler interface. This method
// uses the more correct protojson package to correctly marshal the message.
func (m *SaveBundleResponse) MarshalJSON() ([]byte, error) {
	if m == nil {
		return json.Marshal(nil)
	}

	return SaveBundleResponseJSONMarshaler.Marshal(m)
}

var _ json.Marshaler = (*SaveBundleResponse)(nil)

// SaveBundleResponseJSONUnmarshaler describes the default protojson.Unmarshaler used by all
// instances of SaveBundleResponse. This struct is safe to replace or modify but
// should not be done so concurrently.
var SaveBundleResponseJSONUnmarshaler = protojson.UnmarshalOptions{}

// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method
// uses the more correct protojson package to correctly unmarshal the message.
func (m *SaveBundleResponse) UnmarshalJSON(b []byte) error {
	return SaveBundleResponseJSONUnmarshaler.Unmarshal(b, m)
}

var _ json.Unmarshaler = (*SaveBundleResponse)(nil)

// GetBundleRequestJSONMarshaler describes the default protojson.Marshaler used by all
// instances of GetBundleRequest. This struct is safe to replace or modify but
// should not be done so concurrently.
var GetBundleRequestJSONMarshaler = protojson.MarshalOptions{}

// MarshalJSON satisfies the encoding/json Marshaler interface. This method
// uses the more correct protojson package to correctly marshal the message.
func (m *GetBundleRequest) MarshalJSON() ([]byte, error) {
	if m == nil {
		return json.Marshal(nil)
	}

	return GetBundleRequestJSONMarshaler.Marshal(m)
}

var _ json.Marshaler = (*GetBundleRequest)(nil)

// GetBundleRequestJSONUnmarshaler describes the default protojson.Unmarshaler used by all
// instances of GetBundleRequest. This struct is safe to replace or modify but
// should not be done so concurrently.
var GetBundleRequestJSONUnmarshaler = protojson.UnmarshalOptions{}

// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method
// uses the more correct protojson package to correctly unmarshal the message.
func (m *GetBundleRequest) UnmarshalJSON(b []byte) error {
	return GetBundleRequestJSONUnmarshaler.Unmarshal(b, m)
}

var _ json.Unmarshaler = (*GetBundleRequest)(nil)

// GetBundleResponseJSONMarshaler describes the default protojson.Marshaler used by all
// instances of GetBundleResponse. This struct is safe to replace or modify but
// should not be done so concurrently.
var GetBundleResponseJSONMarshaler = protojson.MarshalOptions{}

// MarshalJSON satisfies the encoding/json Marshaler interface. This method
// uses the more correct protojson package to correctly marshal the message.
func (m *GetBundleResponse) MarshalJSON() ([]byte, error) {
	if m == nil {
		return json.Marshal(nil)
	}

	return GetBundleResponseJSONMarshaler.Marshal(m)
}

var _ json.Marshaler = (*GetBundleResponse)(nil)

// GetBundleResponseJSONUnmarshaler describes the default protojson.Unmarshaler used by all
// instances of GetBundleResponse. This struct is safe to replace or modify but
// should not be done so concurrently.
var GetBundleResponseJSONUnmarshaler = protojson.UnmarshalOptions{}

// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method
// uses the more correct protojson package to correctly unmarshal the message.
func (m *GetBundleResponse) UnmarshalJSON(b []byte) error {
	return GetBundleResponseJSONUnmarshaler.Unmarshal(b, m)
}

var _ json.Unmarshaler = (*GetBundleResponse)(nil)

// ListBundlesRequestJSONMarshaler describes the default protojson.Marshaler used by all
// instances of ListBundlesRequest. This struct is safe to replace or modify but
// should not be done so concurrently.
var ListBundlesRequestJSONMarshaler = protojson.MarshalOptions{}

// MarshalJSON satisfies the encoding/json Marshaler interface. This method
// uses the more correct protojson package to correctly marshal the message.
func (m *ListBundlesRequest) MarshalJSON() ([]byte, error) {
	if m == nil {
		return json.Marshal(nil)
	}

	return ListBundlesRequestJSONMarshaler.Marshal(m)
}

var _ json.Marshaler = (*ListBundlesRequest)(nil)

// ListBundlesRequestJSONUnmarshaler describes the default protojson.Unmarshaler used by all
// instances of ListBundlesRequest. This struct is safe to replace or modify but
// should not be done so concurrently.
var ListBundlesRequestJSONUnmarshaler = protojson.UnmarshalOptions{}

// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method
// uses the more correct protojson package to correctly unmarshal the message.
func (m *ListBundlesRequest) UnmarshalJSON(b []byte) error {
	return ListBundlesRequestJSONUnmarshaler.Unmarshal(b, m)
}

var _ json.Unmarshaler = (*ListBundlesRequest)(nil)

// ListBundlesResponseJSONMarshaler describes the default protojson.Marshaler used by all
// instances of ListBundlesResponse. This struct is safe to replace or modify but
// should not be done so concurrently.
var ListBundlesResponseJSONMarshaler = protojson.MarshalOptions{}

// MarshalJSON satisfies the encoding/json Marshaler interface. This method
// uses the more correct protojson package to correctly marshal the message.
func (m *ListBundlesResponse) MarshalJSON() ([]byte, error) {
	if m == nil {
		return json.Marshal(nil)
	}

	return ListBundlesResponseJSONMarshaler.Marshal(m)
}

var _ json.Marshaler = (*ListBundlesResponse)(nil)

// ListBundlesResponseJSONUnmarshaler describes the default protojson.Unmarshaler used by all
// instances of ListBundlesResponse. This struct is safe to replace or modify but
// should not be done so concurrently.
var ListBundlesResponseJSONUnmarshaler = protojson.UnmarshalOptions{}

// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method
// uses the more correct protojson package to correctly unmarshal the message.
func (m *ListBundlesResponse) UnmarshalJSON(b []byte) error {
	return ListBundlesResponseJSONUnmarshaler.Unmarshal(b, m)
}

var _ json.Unmarshaler = (*ListBundlesResponse)(nil)

// AddSettingToBundleRequestJSONMarshaler describes the default protojson.Marshaler used by all
// instances of AddSettingToBundleRequest. This struct is safe to replace or modify but
// should not be done so concurrently.
var AddSettingToBundleRequestJSONMarshaler = protojson.MarshalOptions{}

// MarshalJSON satisfies the encoding/json Marshaler interface. This method
// uses the more correct protojson package to correctly marshal the message.
func (m *AddSettingToBundleRequest) MarshalJSON() ([]byte, error) {
	if m == nil {
		return json.Marshal(nil)
	}

	return AddSettingToBundleRequestJSONMarshaler.Marshal(m)
}

var _ json.Marshaler = (*AddSettingToBundleRequest)(nil)

// AddSettingToBundleRequestJSONUnmarshaler describes the default protojson.Unmarshaler used by all
// instances of AddSettingToBundleRequest. This struct is safe to replace or modify but
// should not be done so concurrently.
var AddSettingToBundleRequestJSONUnmarshaler = protojson.UnmarshalOptions{}

// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method
// uses the more correct protojson package to correctly unmarshal the message.
func (m *AddSettingToBundleRequest) UnmarshalJSON(b []byte) error {
	return AddSettingToBundleRequestJSONUnmarshaler.Unmarshal(b, m)
}

var _ json.Unmarshaler = (*AddSettingToBundleRequest)(nil)

// AddSettingToBundleResponseJSONMarshaler describes the default protojson.Marshaler used by all
// instances of AddSettingToBundleResponse. This struct is safe to replace or modify but
// should not be done so concurrently.
var AddSettingToBundleResponseJSONMarshaler = protojson.MarshalOptions{}

// MarshalJSON satisfies the encoding/json Marshaler interface. This method
// uses the more correct protojson package to correctly marshal the message.
func (m *AddSettingToBundleResponse) MarshalJSON() ([]byte, error) {
	if m == nil {
		return json.Marshal(nil)
	}

	return AddSettingToBundleResponseJSONMarshaler.Marshal(m)
}

var _ json.Marshaler = (*AddSettingToBundleResponse)(nil)

// AddSettingToBundleResponseJSONUnmarshaler describes the default protojson.Unmarshaler used by all
// instances of AddSettingToBundleResponse. This struct is safe to replace or modify but
// should not be done so concurrently.
var AddSettingToBundleResponseJSONUnmarshaler = protojson.UnmarshalOptions{}

// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method
// uses the more correct protojson package to correctly unmarshal the message.
func (m *AddSettingToBundleResponse) UnmarshalJSON(b []byte) error {
	return AddSettingToBundleResponseJSONUnmarshaler.Unmarshal(b, m)
}

var _ json.Unmarshaler = (*AddSettingToBundleResponse)(nil)

// RemoveSettingFromBundleRequestJSONMarshaler describes the default protojson.Marshaler used by all
// instances of RemoveSettingFromBundleRequest. This struct is safe to replace or modify but
// should not be done so concurrently.
var RemoveSettingFromBundleRequestJSONMarshaler = protojson.MarshalOptions{}

// MarshalJSON satisfies the encoding/json Marshaler interface. This method
// uses the more correct protojson package to correctly marshal the message.
func (m *RemoveSettingFromBundleRequest) MarshalJSON() ([]byte, error) {
	if m == nil {
		return json.Marshal(nil)
	}

	return RemoveSettingFromBundleRequestJSONMarshaler.Marshal(m)
}

var _ json.Marshaler = (*RemoveSettingFromBundleRequest)(nil)

// RemoveSettingFromBundleRequestJSONUnmarshaler describes the default protojson.Unmarshaler used by all
// instances of RemoveSettingFromBundleRequest. This struct is safe to replace or modify but
// should not be done so concurrently.
var RemoveSettingFromBundleRequestJSONUnmarshaler = protojson.UnmarshalOptions{}

// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method
// uses the more correct protojson package to correctly unmarshal the message.
func (m *RemoveSettingFromBundleRequest) UnmarshalJSON(b []byte) error {
	return RemoveSettingFromBundleRequestJSONUnmarshaler.Unmarshal(b, m)
}

var _ json.Unmarshaler = (*RemoveSettingFromBundleRequest)(nil)

// SaveValueRequestJSONMarshaler describes the default protojson.Marshaler used by all
// instances of SaveValueRequest. This struct is safe to replace or modify but
// should not be done so concurrently.
var SaveValueRequestJSONMarshaler = protojson.MarshalOptions{}

// MarshalJSON satisfies the encoding/json Marshaler interface. This method
// uses the more correct protojson package to correctly marshal the message.
func (m *SaveValueRequest) MarshalJSON() ([]byte, error) {
	if m == nil {
		return json.Marshal(nil)
	}

	return SaveValueRequestJSONMarshaler.Marshal(m)
}

var _ json.Marshaler = (*SaveValueRequest)(nil)

// SaveValueRequestJSONUnmarshaler describes the default protojson.Unmarshaler used by all
// instances of SaveValueRequest. This struct is safe to replace or modify but
// should not be done so concurrently.
var SaveValueRequestJSONUnmarshaler = protojson.UnmarshalOptions{}

// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method
// uses the more correct protojson package to correctly unmarshal the message.
func (m *SaveValueRequest) UnmarshalJSON(b []byte) error {
	return SaveValueRequestJSONUnmarshaler.Unmarshal(b, m)
}

var _ json.Unmarshaler = (*SaveValueRequest)(nil)

// SaveValueResponseJSONMarshaler describes the default protojson.Marshaler used by all
// instances of SaveValueResponse. This struct is safe to replace or modify but
// should not be done so concurrently.
var SaveValueResponseJSONMarshaler = protojson.MarshalOptions{}

// MarshalJSON satisfies the encoding/json Marshaler interface. This method
// uses the more correct protojson package to correctly marshal the message.
func (m *SaveValueResponse) MarshalJSON() ([]byte, error) {
	if m == nil {
		return json.Marshal(nil)
	}

	return SaveValueResponseJSONMarshaler.Marshal(m)
}

var _ json.Marshaler = (*SaveValueResponse)(nil)

// SaveValueResponseJSONUnmarshaler describes the default protojson.Unmarshaler used by all
// instances of SaveValueResponse. This struct is safe to replace or modify but
// should not be done so concurrently.
var SaveValueResponseJSONUnmarshaler = protojson.UnmarshalOptions{}

// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method
// uses the more correct protojson package to correctly unmarshal the message.
func (m *SaveValueResponse) UnmarshalJSON(b []byte) error {
	return SaveValueResponseJSONUnmarshaler.Unmarshal(b, m)
}

var _ json.Unmarshaler = (*SaveValueResponse)(nil)

// GetValueRequestJSONMarshaler describes the default protojson.Marshaler used by all
// instances of GetValueRequest. This struct is safe to replace or modify but
// should not be done so concurrently.
var GetValueRequestJSONMarshaler = protojson.MarshalOptions{}

// MarshalJSON satisfies the encoding/json Marshaler interface. This method
// uses the more correct protojson package to correctly marshal the message.
func (m *GetValueRequest) MarshalJSON() ([]byte, error) {
	if m == nil {
		return json.Marshal(nil)
	}

	return GetValueRequestJSONMarshaler.Marshal(m)
}

var _ json.Marshaler = (*GetValueRequest)(nil)

// GetValueRequestJSONUnmarshaler describes the default protojson.Unmarshaler used by all
// instances of GetValueRequest. This struct is safe to replace or modify but
// should not be done so concurrently.
var GetValueRequestJSONUnmarshaler = protojson.UnmarshalOptions{}

// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method
// uses the more correct protojson package to correctly unmarshal the message.
func (m *GetValueRequest) UnmarshalJSON(b []byte) error {
	return GetValueRequestJSONUnmarshaler.Unmarshal(b, m)
}

var _ json.Unmarshaler = (*GetValueRequest)(nil)

// GetValueResponseJSONMarshaler describes the default protojson.Marshaler used by all
// instances of GetValueResponse. This struct is safe to replace or modify but
// should not be done so concurrently.
var GetValueResponseJSONMarshaler = protojson.MarshalOptions{}

// MarshalJSON satisfies the encoding/json Marshaler interface. This method
// uses the more correct protojson package to correctly marshal the message.
func (m *GetValueResponse) MarshalJSON() ([]byte, error) {
	if m == nil {
		return json.Marshal(nil)
	}

	return GetValueResponseJSONMarshaler.Marshal(m)
}

var _ json.Marshaler = (*GetValueResponse)(nil)

// GetValueResponseJSONUnmarshaler describes the default protojson.Unmarshaler used by all
// instances of GetValueResponse. This struct is safe to replace or modify but
// should not be done so concurrently.
var GetValueResponseJSONUnmarshaler = protojson.UnmarshalOptions{}

// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method
// uses the more correct protojson package to correctly unmarshal the message.
func (m *GetValueResponse) UnmarshalJSON(b []byte) error {
	return GetValueResponseJSONUnmarshaler.Unmarshal(b, m)
}

var _ json.Unmarshaler = (*GetValueResponse)(nil)

// ListValuesRequestJSONMarshaler describes the default protojson.Marshaler used by all
// instances of ListValuesRequest. This struct is safe to replace or modify but
// should not be done so concurrently.
var ListValuesRequestJSONMarshaler = protojson.MarshalOptions{}

// MarshalJSON satisfies the encoding/json Marshaler interface. This method
// uses the more correct protojson package to correctly marshal the message.
func (m *ListValuesRequest) MarshalJSON() ([]byte, error) {
	if m == nil {
		return json.Marshal(nil)
	}

	return ListValuesRequestJSONMarshaler.Marshal(m)
}

var _ json.Marshaler = (*ListValuesRequest)(nil)

// ListValuesRequestJSONUnmarshaler describes the default protojson.Unmarshaler used by all
// instances of ListValuesRequest. This struct is safe to replace or modify but
// should not be done so concurrently.
var ListValuesRequestJSONUnmarshaler = protojson.UnmarshalOptions{}

// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method
// uses the more correct protojson package to correctly unmarshal the message.
func (m *ListValuesRequest) UnmarshalJSON(b []byte) error {
	return ListValuesRequestJSONUnmarshaler.Unmarshal(b, m)
}

var _ json.Unmarshaler = (*ListValuesRequest)(nil)

// ListValuesResponseJSONMarshaler describes the default protojson.Marshaler used by all
// instances of ListValuesResponse. This struct is safe to replace or modify but
// should not be done so concurrently.
var ListValuesResponseJSONMarshaler = protojson.MarshalOptions{}

// MarshalJSON satisfies the encoding/json Marshaler interface. This method
// uses the more correct protojson package to correctly marshal the message.
func (m *ListValuesResponse) MarshalJSON() ([]byte, error) {
	if m == nil {
		return json.Marshal(nil)
	}

	return ListValuesResponseJSONMarshaler.Marshal(m)
}

var _ json.Marshaler = (*ListValuesResponse)(nil)

// ListValuesResponseJSONUnmarshaler describes the default protojson.Unmarshaler used by all
// instances of ListValuesResponse. This struct is safe to replace or modify but
// should not be done so concurrently.
var ListValuesResponseJSONUnmarshaler = protojson.UnmarshalOptions{}

// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method
// uses the more correct protojson package to correctly unmarshal the message.
func (m *ListValuesResponse) UnmarshalJSON(b []byte) error {
	return ListValuesResponseJSONUnmarshaler.Unmarshal(b, m)
}

var _ json.Unmarshaler = (*ListValuesResponse)(nil)

// GetValueByUniqueIdentifiersRequestJSONMarshaler describes the default protojson.Marshaler used by all
// instances of GetValueByUniqueIdentifiersRequest. This struct is safe to replace or modify but
// should not be done so concurrently.
var GetValueByUniqueIdentifiersRequestJSONMarshaler = protojson.MarshalOptions{}

// MarshalJSON satisfies the encoding/json Marshaler interface. This method
// uses the more correct protojson package to correctly marshal the message.
func (m *GetValueByUniqueIdentifiersRequest) MarshalJSON() ([]byte, error) {
	if m == nil {
		return json.Marshal(nil)
	}

	return GetValueByUniqueIdentifiersRequestJSONMarshaler.Marshal(m)
}

var _ json.Marshaler = (*GetValueByUniqueIdentifiersRequest)(nil)

// GetValueByUniqueIdentifiersRequestJSONUnmarshaler describes the default protojson.Unmarshaler used by all
// instances of GetValueByUniqueIdentifiersRequest. This struct is safe to replace or modify but
// should not be done so concurrently.
var GetValueByUniqueIdentifiersRequestJSONUnmarshaler = protojson.UnmarshalOptions{}

// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method
// uses the more correct protojson package to correctly unmarshal the message.
func (m *GetValueByUniqueIdentifiersRequest) UnmarshalJSON(b []byte) error {
	return GetValueByUniqueIdentifiersRequestJSONUnmarshaler.Unmarshal(b, m)
}

var _ json.Unmarshaler = (*GetValueByUniqueIdentifiersRequest)(nil)

// ListRoleAssignmentsRequestJSONMarshaler describes the default protojson.Marshaler used by all
// instances of ListRoleAssignmentsRequest. This struct is safe to replace or modify but
// should not be done so concurrently.
var ListRoleAssignmentsRequestJSONMarshaler = protojson.MarshalOptions{}

// MarshalJSON satisfies the encoding/json Marshaler interface. This method
// uses the more correct protojson package to correctly marshal the message.
func (m *ListRoleAssignmentsRequest) MarshalJSON() ([]byte, error) {
	if m == nil {
		return json.Marshal(nil)
	}

	return ListRoleAssignmentsRequestJSONMarshaler.Marshal(m)
}

var _ json.Marshaler = (*ListRoleAssignmentsRequest)(nil)

// ListRoleAssignmentsRequestJSONUnmarshaler describes the default protojson.Unmarshaler used by all
// instances of ListRoleAssignmentsRequest. This struct is safe to replace or modify but
// should not be done so concurrently.
var ListRoleAssignmentsRequestJSONUnmarshaler = protojson.UnmarshalOptions{}

// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method
// uses the more correct protojson package to correctly unmarshal the message.
func (m *ListRoleAssignmentsRequest) UnmarshalJSON(b []byte) error {
	return ListRoleAssignmentsRequestJSONUnmarshaler.Unmarshal(b, m)
}

var _ json.Unmarshaler = (*ListRoleAssignmentsRequest)(nil)

// ListRoleAssignmentsFilteredRequestJSONMarshaler describes the default protojson.Marshaler used by all
// instances of ListRoleAssignmentsFilteredRequest. This struct is safe to replace or modify but
// should not be done so concurrently.
var ListRoleAssignmentsFilteredRequestJSONMarshaler = protojson.MarshalOptions{}

// MarshalJSON satisfies the encoding/json Marshaler interface. This method
// uses the more correct protojson package to correctly marshal the message.
func (m *ListRoleAssignmentsFilteredRequest) MarshalJSON() ([]byte, error) {
	if m == nil {
		return json.Marshal(nil)
	}

	return ListRoleAssignmentsFilteredRequestJSONMarshaler.Marshal(m)
}

var _ json.Marshaler = (*ListRoleAssignmentsFilteredRequest)(nil)

// ListRoleAssignmentsFilteredRequestJSONUnmarshaler describes the default protojson.Unmarshaler used by all
// instances of ListRoleAssignmentsFilteredRequest. This struct is safe to replace or modify but
// should not be done so concurrently.
var ListRoleAssignmentsFilteredRequestJSONUnmarshaler = protojson.UnmarshalOptions{}

// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method
// uses the more correct protojson package to correctly unmarshal the message.
func (m *ListRoleAssignmentsFilteredRequest) UnmarshalJSON(b []byte) error {
	return ListRoleAssignmentsFilteredRequestJSONUnmarshaler.Unmarshal(b, m)
}

var _ json.Unmarshaler = (*ListRoleAssignmentsFilteredRequest)(nil)

// ListRoleAssignmentsResponseJSONMarshaler describes the default protojson.Marshaler used by all
// instances of ListRoleAssignmentsResponse. This struct is safe to replace or modify but
// should not be done so concurrently.
var ListRoleAssignmentsResponseJSONMarshaler = protojson.MarshalOptions{}

// MarshalJSON satisfies the encoding/json Marshaler interface. This method
// uses the more correct protojson package to correctly marshal the message.
func (m *ListRoleAssignmentsResponse) MarshalJSON() ([]byte, error) {
	if m == nil {
		return json.Marshal(nil)
	}

	return ListRoleAssignmentsResponseJSONMarshaler.Marshal(m)
}

var _ json.Marshaler = (*ListRoleAssignmentsResponse)(nil)

// ListRoleAssignmentsResponseJSONUnmarshaler describes the default protojson.Unmarshaler used by all
// instances of ListRoleAssignmentsResponse. This struct is safe to replace or modify but
// should not be done so concurrently.
var ListRoleAssignmentsResponseJSONUnmarshaler = protojson.UnmarshalOptions{}

// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method
// uses the more correct protojson package to correctly unmarshal the message.
func (m *ListRoleAssignmentsResponse) UnmarshalJSON(b []byte) error {
	return ListRoleAssignmentsResponseJSONUnmarshaler.Unmarshal(b, m)
}

var _ json.Unmarshaler = (*ListRoleAssignmentsResponse)(nil)

// AssignRoleToUserRequestJSONMarshaler describes the default protojson.Marshaler used by all
// instances of AssignRoleToUserRequest. This struct is safe to replace or modify but
// should not be done so concurrently.
var AssignRoleToUserRequestJSONMarshaler = protojson.MarshalOptions{}

// MarshalJSON satisfies the encoding/json Marshaler interface. This method
// uses the more correct protojson package to correctly marshal the message.
func (m *AssignRoleToUserRequest) MarshalJSON() ([]byte, error) {
	if m == nil {
		return json.Marshal(nil)
	}

	return AssignRoleToUserRequestJSONMarshaler.Marshal(m)
}

var _ json.Marshaler = (*AssignRoleToUserRequest)(nil)

// AssignRoleToUserRequestJSONUnmarshaler describes the default protojson.Unmarshaler used by all
// instances of AssignRoleToUserRequest. This struct is safe to replace or modify but
// should not be done so concurrently.
var AssignRoleToUserRequestJSONUnmarshaler = protojson.UnmarshalOptions{}

// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method
// uses the more correct protojson package to correctly unmarshal the message.
func (m *AssignRoleToUserRequest) UnmarshalJSON(b []byte) error {
	return AssignRoleToUserRequestJSONUnmarshaler.Unmarshal(b, m)
}

var _ json.Unmarshaler = (*AssignRoleToUserRequest)(nil)

// AssignRoleToUserResponseJSONMarshaler describes the default protojson.Marshaler used by all
// instances of AssignRoleToUserResponse. This struct is safe to replace or modify but
// should not be done so concurrently.
var AssignRoleToUserResponseJSONMarshaler = protojson.MarshalOptions{}

// MarshalJSON satisfies the encoding/json Marshaler interface. This method
// uses the more correct protojson package to correctly marshal the message.
func (m *AssignRoleToUserResponse) MarshalJSON() ([]byte, error) {
	if m == nil {
		return json.Marshal(nil)
	}

	return AssignRoleToUserResponseJSONMarshaler.Marshal(m)
}

var _ json.Marshaler = (*AssignRoleToUserResponse)(nil)

// AssignRoleToUserResponseJSONUnmarshaler describes the default protojson.Unmarshaler used by all
// instances of AssignRoleToUserResponse. This struct is safe to replace or modify but
// should not be done so concurrently.
var AssignRoleToUserResponseJSONUnmarshaler = protojson.UnmarshalOptions{}

// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method
// uses the more correct protojson package to correctly unmarshal the message.
func (m *AssignRoleToUserResponse) UnmarshalJSON(b []byte) error {
	return AssignRoleToUserResponseJSONUnmarshaler.Unmarshal(b, m)
}

var _ json.Unmarshaler = (*AssignRoleToUserResponse)(nil)

// RemoveRoleFromUserRequestJSONMarshaler describes the default protojson.Marshaler used by all
// instances of RemoveRoleFromUserRequest. This struct is safe to replace or modify but
// should not be done so concurrently.
var RemoveRoleFromUserRequestJSONMarshaler = protojson.MarshalOptions{}

// MarshalJSON satisfies the encoding/json Marshaler interface. This method
// uses the more correct protojson package to correctly marshal the message.
func (m *RemoveRoleFromUserRequest) MarshalJSON() ([]byte, error) {
	if m == nil {
		return json.Marshal(nil)
	}

	return RemoveRoleFromUserRequestJSONMarshaler.Marshal(m)
}

var _ json.Marshaler = (*RemoveRoleFromUserRequest)(nil)

// RemoveRoleFromUserRequestJSONUnmarshaler describes the default protojson.Unmarshaler used by all
// instances of RemoveRoleFromUserRequest. This struct is safe to replace or modify but
// should not be done so concurrently.
var RemoveRoleFromUserRequestJSONUnmarshaler = protojson.UnmarshalOptions{}

// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method
// uses the more correct protojson package to correctly unmarshal the message.
func (m *RemoveRoleFromUserRequest) UnmarshalJSON(b []byte) error {
	return RemoveRoleFromUserRequestJSONUnmarshaler.Unmarshal(b, m)
}

var _ json.Unmarshaler = (*RemoveRoleFromUserRequest)(nil)

// ListPermissionsRequestJSONMarshaler describes the default protojson.Marshaler used by all
// instances of ListPermissionsRequest. This struct is safe to replace or modify but
// should not be done so concurrently.
var ListPermissionsRequestJSONMarshaler = protojson.MarshalOptions{}

// MarshalJSON satisfies the encoding/json Marshaler interface. This method
// uses the more correct protojson package to correctly marshal the message.
func (m *ListPermissionsRequest) MarshalJSON() ([]byte, error) {
	if m == nil {
		return json.Marshal(nil)
	}

	return ListPermissionsRequestJSONMarshaler.Marshal(m)
}

var _ json.Marshaler = (*ListPermissionsRequest)(nil)

// ListPermissionsRequestJSONUnmarshaler describes the default protojson.Unmarshaler used by all
// instances of ListPermissionsRequest. This struct is safe to replace or modify but
// should not be done so concurrently.
var ListPermissionsRequestJSONUnmarshaler = protojson.UnmarshalOptions{}

// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method
// uses the more correct protojson package to correctly unmarshal the message.
func (m *ListPermissionsRequest) UnmarshalJSON(b []byte) error {
	return ListPermissionsRequestJSONUnmarshaler.Unmarshal(b, m)
}

var _ json.Unmarshaler = (*ListPermissionsRequest)(nil)

// ListPermissionsResponseJSONMarshaler describes the default protojson.Marshaler used by all
// instances of ListPermissionsResponse. This struct is safe to replace or modify but
// should not be done so concurrently.
var ListPermissionsResponseJSONMarshaler = protojson.MarshalOptions{}

// MarshalJSON satisfies the encoding/json Marshaler interface. This method
// uses the more correct protojson package to correctly marshal the message.
func (m *ListPermissionsResponse) MarshalJSON() ([]byte, error) {
	if m == nil {
		return json.Marshal(nil)
	}

	return ListPermissionsResponseJSONMarshaler.Marshal(m)
}

var _ json.Marshaler = (*ListPermissionsResponse)(nil)

// ListPermissionsResponseJSONUnmarshaler describes the default protojson.Unmarshaler used by all
// instances of ListPermissionsResponse. This struct is safe to replace or modify but
// should not be done so concurrently.
var ListPermissionsResponseJSONUnmarshaler = protojson.UnmarshalOptions{}

// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method
// uses the more correct protojson package to correctly unmarshal the message.
func (m *ListPermissionsResponse) UnmarshalJSON(b []byte) error {
	return ListPermissionsResponseJSONUnmarshaler.Unmarshal(b, m)
}

var _ json.Unmarshaler = (*ListPermissionsResponse)(nil)

// ListPermissionsByResourceRequestJSONMarshaler describes the default protojson.Marshaler used by all
// instances of ListPermissionsByResourceRequest. This struct is safe to replace or modify but
// should not be done so concurrently.
var ListPermissionsByResourceRequestJSONMarshaler = protojson.MarshalOptions{}

// MarshalJSON satisfies the encoding/json Marshaler interface. This method
// uses the more correct protojson package to correctly marshal the message.
func (m *ListPermissionsByResourceRequest) MarshalJSON() ([]byte, error) {
	if m == nil {
		return json.Marshal(nil)
	}

	return ListPermissionsByResourceRequestJSONMarshaler.Marshal(m)
}

var _ json.Marshaler = (*ListPermissionsByResourceRequest)(nil)

// ListPermissionsByResourceRequestJSONUnmarshaler describes the default protojson.Unmarshaler used by all
// instances of ListPermissionsByResourceRequest. This struct is safe to replace or modify but
// should not be done so concurrently.
var ListPermissionsByResourceRequestJSONUnmarshaler = protojson.UnmarshalOptions{}

// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method
// uses the more correct protojson package to correctly unmarshal the message.
func (m *ListPermissionsByResourceRequest) UnmarshalJSON(b []byte) error {
	return ListPermissionsByResourceRequestJSONUnmarshaler.Unmarshal(b, m)
}

var _ json.Unmarshaler = (*ListPermissionsByResourceRequest)(nil)

// ListPermissionsByResourceResponseJSONMarshaler describes the default protojson.Marshaler used by all
// instances of ListPermissionsByResourceResponse. This struct is safe to replace or modify but
// should not be done so concurrently.
var ListPermissionsByResourceResponseJSONMarshaler = protojson.MarshalOptions{}

// MarshalJSON satisfies the encoding/json Marshaler interface. This method
// uses the more correct protojson package to correctly marshal the message.
func (m *ListPermissionsByResourceResponse) MarshalJSON() ([]byte, error) {
	if m == nil {
		return json.Marshal(nil)
	}

	return ListPermissionsByResourceResponseJSONMarshaler.Marshal(m)
}

var _ json.Marshaler = (*ListPermissionsByResourceResponse)(nil)

// ListPermissionsByResourceResponseJSONUnmarshaler describes the default protojson.Unmarshaler used by all
// instances of ListPermissionsByResourceResponse. This struct is safe to replace or modify but
// should not be done so concurrently.
var ListPermissionsByResourceResponseJSONUnmarshaler = protojson.UnmarshalOptions{}

// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method
// uses the more correct protojson package to correctly unmarshal the message.
func (m *ListPermissionsByResourceResponse) UnmarshalJSON(b []byte) error {
	return ListPermissionsByResourceResponseJSONUnmarshaler.Unmarshal(b, m)
}

var _ json.Unmarshaler = (*ListPermissionsByResourceResponse)(nil)

// GetPermissionByIDRequestJSONMarshaler describes the default protojson.Marshaler used by all
// instances of GetPermissionByIDRequest. This struct is safe to replace or modify but
// should not be done so concurrently.
var GetPermissionByIDRequestJSONMarshaler = protojson.MarshalOptions{}

// MarshalJSON satisfies the encoding/json Marshaler interface. This method
// uses the more correct protojson package to correctly marshal the message.
func (m *GetPermissionByIDRequest) MarshalJSON() ([]byte, error) {
	if m == nil {
		return json.Marshal(nil)
	}

	return GetPermissionByIDRequestJSONMarshaler.Marshal(m)
}

var _ json.Marshaler = (*GetPermissionByIDRequest)(nil)

// GetPermissionByIDRequestJSONUnmarshaler describes the default protojson.Unmarshaler used by all
// instances of GetPermissionByIDRequest. This struct is safe to replace or modify but
// should not be done so concurrently.
var GetPermissionByIDRequestJSONUnmarshaler = protojson.UnmarshalOptions{}

// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method
// uses the more correct protojson package to correctly unmarshal the message.
func (m *GetPermissionByIDRequest) UnmarshalJSON(b []byte) error {
	return GetPermissionByIDRequestJSONUnmarshaler.Unmarshal(b, m)
}

var _ json.Unmarshaler = (*GetPermissionByIDRequest)(nil)

// GetPermissionByIDResponseJSONMarshaler describes the default protojson.Marshaler used by all
// instances of GetPermissionByIDResponse. This struct is safe to replace or modify but
// should not be done so concurrently.
var GetPermissionByIDResponseJSONMarshaler = protojson.MarshalOptions{}

// MarshalJSON satisfies the encoding/json Marshaler interface. This method
// uses the more correct protojson package to correctly marshal the message.
func (m *GetPermissionByIDResponse) MarshalJSON() ([]byte, error) {
	if m == nil {
		return json.Marshal(nil)
	}

	return GetPermissionByIDResponseJSONMarshaler.Marshal(m)
}

var _ json.Marshaler = (*GetPermissionByIDResponse)(nil)

// GetPermissionByIDResponseJSONUnmarshaler describes the default protojson.Unmarshaler used by all
// instances of GetPermissionByIDResponse. This struct is safe to replace or modify but
// should not be done so concurrently.
var GetPermissionByIDResponseJSONUnmarshaler = protojson.UnmarshalOptions{}

// UnmarshalJSON satisfies the encoding/json Unmarshaler interface. This method
// uses the more correct protojson package to correctly unmarshal the message.
func (m *GetPermissionByIDResponse) UnmarshalJSON(b []byte) error {
	return GetPermissionByIDResponseJSONUnmarshaler.Unmarshal(b, m)
}

var _ json.Unmarshaler = (*GetPermissionByIDResponse)(nil)
