blob: 319c73a4dc056088309ed9d4d753f1e394bbd950 [file] [log] [blame]
// WARNING: This file is machine generated by fidlgen.
// fidl_experiment = output_index_json
#pragma once
#include <fidl/test.requestflexibleenvelope/cpp/natural_types.h>
#include <lib/fidl/cpp/hlcpp_conversion.h>
#include <lib/fidl/cpp/wire/service_handler.h>
#include <test/requestflexibleenvelope/cpp/fidl.h>
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wshadow"
namespace fidl {
namespace internal {
template <>
struct NaturalToHLCPPTraits<fidl::ClientEnd<::test_requestflexibleenvelope::Protocol>> {
using HLCPPType = fidl::InterfaceHandle<::test::requestflexibleenvelope::Protocol>;
static inline fidl::InterfaceHandle<::test::requestflexibleenvelope::Protocol> Convert(fidl::ClientEnd<::test_requestflexibleenvelope::Protocol>&& c) {
return fidl::InterfaceHandle<::test::requestflexibleenvelope::Protocol>(c.TakeChannel());
}
};
template <>
struct NaturalToHLCPPTraits<fidl::ServerEnd<::test_requestflexibleenvelope::Protocol>> {
using HLCPPType = fidl::InterfaceRequest<::test::requestflexibleenvelope::Protocol>;
static inline fidl::InterfaceRequest<::test::requestflexibleenvelope::Protocol> Convert(fidl::ServerEnd<::test_requestflexibleenvelope::Protocol>&& c) {
return fidl::InterfaceRequest<::test::requestflexibleenvelope::Protocol>(c.TakeChannel());
}
};
template <>
struct HLCPPToNaturalTraits<fidl::InterfaceHandle<::test::requestflexibleenvelope::Protocol>> {
using NaturalType = fidl::ClientEnd<::test_requestflexibleenvelope::Protocol>;
static inline fidl::ClientEnd<::test_requestflexibleenvelope::Protocol> Convert(fidl::InterfaceHandle<::test::requestflexibleenvelope::Protocol>&& c) {
return fidl::ClientEnd<::test_requestflexibleenvelope::Protocol>(c.TakeChannel());
}
};
template <>
struct HLCPPToNaturalTraits<fidl::InterfaceRequest<::test::requestflexibleenvelope::Protocol>> {
using NaturalType = fidl::ServerEnd<::test_requestflexibleenvelope::Protocol>;
static inline fidl::ServerEnd<::test_requestflexibleenvelope::Protocol> Convert(fidl::InterfaceRequest<::test::requestflexibleenvelope::Protocol>&& c) {
return fidl::ServerEnd<::test_requestflexibleenvelope::Protocol>(c.TakeChannel());
}
};
template <>
struct NaturalToHLCPPTraits<fidl::ProtocolHandler<::test_requestflexibleenvelope::Protocol>> {
using HLCPPType = fidl::InterfaceRequestHandler<::test::requestflexibleenvelope::Protocol>;
static inline fidl::InterfaceRequestHandler<::test::requestflexibleenvelope::Protocol> Convert(fidl::ProtocolHandler<::test_requestflexibleenvelope::Protocol>&& c) {
return [c = std::move(c)](fidl::InterfaceRequest<::test::requestflexibleenvelope::Protocol> r) {
c(::fidl::HLCPPToNatural(r));
};
}
};
template <>
struct HLCPPToNaturalTraits<fidl::InterfaceRequestHandler<::test::requestflexibleenvelope::Protocol>> {
using NaturalType = fidl::ProtocolHandler<::test_requestflexibleenvelope::Protocol>;
static inline fidl::ProtocolHandler<::test_requestflexibleenvelope::Protocol> Convert(fidl::InterfaceRequestHandler<::test::requestflexibleenvelope::Protocol>&& c) {
return [c = std::move(c)](fidl::ServerEnd<::test_requestflexibleenvelope::Protocol> r) {
c(::fidl::NaturalToHLCPP(r));
};
}
};
template <>
struct NaturalToHLCPPTraits<::test_requestflexibleenvelope::ProtocolRequestStrictResponseFlexibleRequest> {
using HLCPPType = ::test::requestflexibleenvelope::ProtocolRequestStrictResponseFlexibleRequest;
static inline ::test::requestflexibleenvelope::ProtocolRequestStrictResponseFlexibleRequest Convert(::test_requestflexibleenvelope::ProtocolRequestStrictResponseFlexibleRequest&&);
};
template <>
struct HLCPPToNaturalTraits<::test::requestflexibleenvelope::ProtocolRequestStrictResponseFlexibleRequest> {
using NaturalType = ::test_requestflexibleenvelope::ProtocolRequestStrictResponseFlexibleRequest;
static inline ::test_requestflexibleenvelope::ProtocolRequestStrictResponseFlexibleRequest Convert(::test::requestflexibleenvelope::ProtocolRequestStrictResponseFlexibleRequest&&);
};
template <>
struct NaturalToHLCPPTraits<::test_requestflexibleenvelope::ProtocolRequestStrictResponseFlexibleResponse> {
using HLCPPType = ::test::requestflexibleenvelope::ProtocolRequestStrictResponseFlexibleResponse;
static inline ::test::requestflexibleenvelope::ProtocolRequestStrictResponseFlexibleResponse Convert(::test_requestflexibleenvelope::ProtocolRequestStrictResponseFlexibleResponse&&);
};
template <>
struct HLCPPToNaturalTraits<::test::requestflexibleenvelope::ProtocolRequestStrictResponseFlexibleResponse> {
using NaturalType = ::test_requestflexibleenvelope::ProtocolRequestStrictResponseFlexibleResponse;
static inline ::test_requestflexibleenvelope::ProtocolRequestStrictResponseFlexibleResponse Convert(::test::requestflexibleenvelope::ProtocolRequestStrictResponseFlexibleResponse&&);
};
template <>
struct NaturalToHLCPPTraits<::test_requestflexibleenvelope::ProtocolRequestFlexibleResponseStrictRequest> {
using HLCPPType = ::test::requestflexibleenvelope::ProtocolRequestFlexibleResponseStrictRequest;
static inline ::test::requestflexibleenvelope::ProtocolRequestFlexibleResponseStrictRequest Convert(::test_requestflexibleenvelope::ProtocolRequestFlexibleResponseStrictRequest&&);
};
template <>
struct HLCPPToNaturalTraits<::test::requestflexibleenvelope::ProtocolRequestFlexibleResponseStrictRequest> {
using NaturalType = ::test_requestflexibleenvelope::ProtocolRequestFlexibleResponseStrictRequest;
static inline ::test_requestflexibleenvelope::ProtocolRequestFlexibleResponseStrictRequest Convert(::test::requestflexibleenvelope::ProtocolRequestFlexibleResponseStrictRequest&&);
};
template <>
struct NaturalToHLCPPTraits<::test_requestflexibleenvelope::ProtocolRequestFlexibleResponseStrictResponse> {
using HLCPPType = ::test::requestflexibleenvelope::ProtocolRequestFlexibleResponseStrictResponse;
static inline ::test::requestflexibleenvelope::ProtocolRequestFlexibleResponseStrictResponse Convert(::test_requestflexibleenvelope::ProtocolRequestFlexibleResponseStrictResponse&&);
};
template <>
struct HLCPPToNaturalTraits<::test::requestflexibleenvelope::ProtocolRequestFlexibleResponseStrictResponse> {
using NaturalType = ::test_requestflexibleenvelope::ProtocolRequestFlexibleResponseStrictResponse;
static inline ::test_requestflexibleenvelope::ProtocolRequestFlexibleResponseStrictResponse Convert(::test::requestflexibleenvelope::ProtocolRequestFlexibleResponseStrictResponse&&);
};
template <>
struct NaturalToHLCPPTraits<::test_requestflexibleenvelope::FlexibleFoo> {
using HLCPPType = ::test::requestflexibleenvelope::FlexibleFoo;
static inline ::test::requestflexibleenvelope::FlexibleFoo Convert(::test_requestflexibleenvelope::FlexibleFoo&&);
};
template <>
struct HLCPPToNaturalTraits<::test::requestflexibleenvelope::FlexibleFoo> {
using NaturalType = ::test_requestflexibleenvelope::FlexibleFoo;
static inline ::test_requestflexibleenvelope::FlexibleFoo Convert(::test::requestflexibleenvelope::FlexibleFoo&&);
};
template <>
struct NaturalToHLCPPTraits<::test_requestflexibleenvelope::StrictFoo> {
using HLCPPType = ::test::requestflexibleenvelope::StrictFoo;
static inline ::test::requestflexibleenvelope::StrictFoo Convert(::test_requestflexibleenvelope::StrictFoo&&);
};
template <>
struct HLCPPToNaturalTraits<::test::requestflexibleenvelope::StrictFoo> {
using NaturalType = ::test_requestflexibleenvelope::StrictFoo;
static inline ::test_requestflexibleenvelope::StrictFoo Convert(::test::requestflexibleenvelope::StrictFoo&&);
};
::test::requestflexibleenvelope::ProtocolRequestStrictResponseFlexibleRequest NaturalToHLCPPTraits<::test_requestflexibleenvelope::ProtocolRequestStrictResponseFlexibleRequest>::Convert(::test_requestflexibleenvelope::ProtocolRequestStrictResponseFlexibleRequest&& value) {
::test::requestflexibleenvelope::ProtocolRequestStrictResponseFlexibleRequest hlcpp;
hlcpp.s = ::fidl::NaturalToHLCPP(std::move(value.s()));
return hlcpp;
}
::test_requestflexibleenvelope::ProtocolRequestStrictResponseFlexibleRequest HLCPPToNaturalTraits<::test::requestflexibleenvelope::ProtocolRequestStrictResponseFlexibleRequest>::Convert(::test::requestflexibleenvelope::ProtocolRequestStrictResponseFlexibleRequest&& value) {
return ::test_requestflexibleenvelope::ProtocolRequestStrictResponseFlexibleRequest{{
.s = ::fidl::HLCPPToNatural(std::move(value.s)),
}};
}
::test::requestflexibleenvelope::ProtocolRequestStrictResponseFlexibleResponse NaturalToHLCPPTraits<::test_requestflexibleenvelope::ProtocolRequestStrictResponseFlexibleResponse>::Convert(::test_requestflexibleenvelope::ProtocolRequestStrictResponseFlexibleResponse&& value) {
::test::requestflexibleenvelope::ProtocolRequestStrictResponseFlexibleResponse hlcpp;
hlcpp.f = ::fidl::NaturalToHLCPP(std::move(value.f()));
return hlcpp;
}
::test_requestflexibleenvelope::ProtocolRequestStrictResponseFlexibleResponse HLCPPToNaturalTraits<::test::requestflexibleenvelope::ProtocolRequestStrictResponseFlexibleResponse>::Convert(::test::requestflexibleenvelope::ProtocolRequestStrictResponseFlexibleResponse&& value) {
return ::test_requestflexibleenvelope::ProtocolRequestStrictResponseFlexibleResponse{{
.f = ::fidl::HLCPPToNatural(std::move(value.f)),
}};
}
::test::requestflexibleenvelope::ProtocolRequestFlexibleResponseStrictRequest NaturalToHLCPPTraits<::test_requestflexibleenvelope::ProtocolRequestFlexibleResponseStrictRequest>::Convert(::test_requestflexibleenvelope::ProtocolRequestFlexibleResponseStrictRequest&& value) {
::test::requestflexibleenvelope::ProtocolRequestFlexibleResponseStrictRequest hlcpp;
hlcpp.s = ::fidl::NaturalToHLCPP(std::move(value.s()));
return hlcpp;
}
::test_requestflexibleenvelope::ProtocolRequestFlexibleResponseStrictRequest HLCPPToNaturalTraits<::test::requestflexibleenvelope::ProtocolRequestFlexibleResponseStrictRequest>::Convert(::test::requestflexibleenvelope::ProtocolRequestFlexibleResponseStrictRequest&& value) {
return ::test_requestflexibleenvelope::ProtocolRequestFlexibleResponseStrictRequest{{
.s = ::fidl::HLCPPToNatural(std::move(value.s)),
}};
}
::test::requestflexibleenvelope::ProtocolRequestFlexibleResponseStrictResponse NaturalToHLCPPTraits<::test_requestflexibleenvelope::ProtocolRequestFlexibleResponseStrictResponse>::Convert(::test_requestflexibleenvelope::ProtocolRequestFlexibleResponseStrictResponse&& value) {
::test::requestflexibleenvelope::ProtocolRequestFlexibleResponseStrictResponse hlcpp;
hlcpp.f = ::fidl::NaturalToHLCPP(std::move(value.f()));
return hlcpp;
}
::test_requestflexibleenvelope::ProtocolRequestFlexibleResponseStrictResponse HLCPPToNaturalTraits<::test::requestflexibleenvelope::ProtocolRequestFlexibleResponseStrictResponse>::Convert(::test::requestflexibleenvelope::ProtocolRequestFlexibleResponseStrictResponse&& value) {
return ::test_requestflexibleenvelope::ProtocolRequestFlexibleResponseStrictResponse{{
.f = ::fidl::HLCPPToNatural(std::move(value.f)),
}};
}
::test::requestflexibleenvelope::FlexibleFoo NaturalToHLCPPTraits<::test_requestflexibleenvelope::FlexibleFoo>::Convert(::test_requestflexibleenvelope::FlexibleFoo&& value) {
::test::requestflexibleenvelope::FlexibleFoo hlcpp;
switch (value.Which()) {
case ::test_requestflexibleenvelope::FlexibleFoo::Tag::kS:
hlcpp.set_s(::fidl::NaturalToHLCPP(std::move(value.s().value())));
break;
case ::test_requestflexibleenvelope::FlexibleFoo::Tag::kI:
hlcpp.set_i(::fidl::NaturalToHLCPP(std::move(value.i().value())));
break;
default:
break;
}
return hlcpp;
}
::test_requestflexibleenvelope::FlexibleFoo HLCPPToNaturalTraits<::test::requestflexibleenvelope::FlexibleFoo>::Convert(::test::requestflexibleenvelope::FlexibleFoo&& value) {
using _NaturalUnion = ::test_requestflexibleenvelope::FlexibleFoo;
switch (value.Which()) {
case ::test::requestflexibleenvelope::FlexibleFoo::Tag::kS:
return _NaturalUnion::WithS(
::fidl::HLCPPToNatural(std::move(value.s())));
case ::test::requestflexibleenvelope::FlexibleFoo::Tag::kI:
return _NaturalUnion::WithI(
::fidl::HLCPPToNatural(std::move(value.i())));
default:
return _NaturalUnion(::fidl::internal::DefaultConstructPossiblyInvalidObjectTag{});
}
}
::test::requestflexibleenvelope::StrictFoo NaturalToHLCPPTraits<::test_requestflexibleenvelope::StrictFoo>::Convert(::test_requestflexibleenvelope::StrictFoo&& value) {
::test::requestflexibleenvelope::StrictFoo hlcpp;
switch (value.Which()) {
case ::test_requestflexibleenvelope::StrictFoo::Tag::kS:
hlcpp.set_s(::fidl::NaturalToHLCPP(std::move(value.s().value())));
break;
case ::test_requestflexibleenvelope::StrictFoo::Tag::kI:
hlcpp.set_i(::fidl::NaturalToHLCPP(std::move(value.i().value())));
break;
default:
break;
}
return hlcpp;
}
::test_requestflexibleenvelope::StrictFoo HLCPPToNaturalTraits<::test::requestflexibleenvelope::StrictFoo>::Convert(::test::requestflexibleenvelope::StrictFoo&& value) {
using _NaturalUnion = ::test_requestflexibleenvelope::StrictFoo;
switch (value.Which()) {
case ::test::requestflexibleenvelope::StrictFoo::Tag::kS:
return _NaturalUnion::WithS(
::fidl::HLCPPToNatural(std::move(value.s())));
case ::test::requestflexibleenvelope::StrictFoo::Tag::kI:
return _NaturalUnion::WithI(
::fidl::HLCPPToNatural(std::move(value.i())));
default:
ZX_PANIC("Can't convert invalid strict union %s from HLCPP to Natural", "::test::requestflexibleenvelope::StrictFoo");
}
}
#pragma clang diagnostic pop
} // namespace internal
} // namespace fidl