// third_party/blink/public/mojom/subapps/sub_apps_service.mojom-shared-internal.h is auto generated by mojom_bindings_generator.py, do not edit

// Copyright 2016 The Chromium Authors
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.

#ifndef THIRD_PARTY_BLINK_PUBLIC_MOJOM_SUBAPPS_SUB_APPS_SERVICE_MOJOM_SHARED_INTERNAL_H_
#define THIRD_PARTY_BLINK_PUBLIC_MOJOM_SUBAPPS_SUB_APPS_SERVICE_MOJOM_SHARED_INTERNAL_H_
#include "mojo/public/cpp/bindings/lib/array_internal.h"
#include "mojo/public/cpp/bindings/lib/bindings_internal.h"
#include "mojo/public/cpp/bindings/lib/map_data_internal.h"
#include "mojo/public/cpp/bindings/lib/validation_errors.h"
#include "mojo/public/cpp/bindings/lib/message_fragment.h"
#include "mojo/public/c/system/macros.h"
#include "mojo/public/cpp/bindings/lib/native_enum_data.h"
#include "mojo/public/interfaces/bindings/native_struct.mojom-shared-internal.h"
#include "base/component_export.h"



namespace mojo {
namespace internal {
class ValidationContext;
}
}


namespace blink::mojom {
namespace internal {
class SubAppsServiceAddResult_Data;
class SubAppsServiceListResultEntry_Data;
class SubAppsServiceRemoveResult_Data;
class SubAppsService_Add_ResponseParam_Result_Data;
class SubAppsService_List_ResponseParam_Result_Data;
class SubAppsService_Remove_ResponseParam_Result_Data;

struct SubAppsServiceResultCode_Data {
 public:
  static bool constexpr kIsExtensible = false;

  static bool IsKnownValue(int32_t value) {
    switch (value) {
      case 0:
      case 1:
      case 2:
      case 3:
      case 4:
      case 5:
        return true;
    }
    return false;
  }

  static bool Validate(int32_t value,
                       mojo::internal::ValidationContext* validation_context) {
    if (kIsExtensible || IsKnownValue(value))
      return true;

    ReportValidationError(validation_context,
                          mojo::internal::VALIDATION_ERROR_UNKNOWN_ENUM_VALUE);
    return false;
  }
};

struct SubAppsServiceAddResultType_Data {
 public:
  static bool constexpr kIsExtensible = false;

  static bool IsKnownValue(int32_t value) {
    switch (value) {
      case 0:
      case 1:
      case 2:
      case 3:
      case 4:
      case 5:
        return true;
    }
    return false;
  }

  static bool Validate(int32_t value,
                       mojo::internal::ValidationContext* validation_context) {
    if (kIsExtensible || IsKnownValue(value))
      return true;

    ReportValidationError(validation_context,
                          mojo::internal::VALIDATION_ERROR_UNKNOWN_ENUM_VALUE);
    return false;
  }
};

struct SubAppsServiceRemoveResultType_Data {
 public:
  static bool constexpr kIsExtensible = false;

  static bool IsKnownValue(int32_t value) {
    switch (value) {
      case 0:
      case 1:
      case 2:
        return true;
    }
    return false;
  }

  static bool Validate(int32_t value,
                       mojo::internal::ValidationContext* validation_context) {
    if (kIsExtensible || IsKnownValue(value))
      return true;

    ReportValidationError(validation_context,
                          mojo::internal::VALIDATION_ERROR_UNKNOWN_ENUM_VALUE);
    return false;
  }
};

#pragma pack(push, 1)


class COMPONENT_EXPORT(MOJOM_SHARED_BLINK_COMMON_EXPORT) SubAppsService_Add_ResponseParam_Result_Data {
 public:
  // Used to identify Mojom Union Data Classes.
  typedef void MojomUnionDataType;

  SubAppsService_Add_ResponseParam_Result_Data() = default;
  // Do nothing in the destructor since it won't be called when it is a
  // non-inlined union.
  ~SubAppsService_Add_ResponseParam_Result_Data() = default;

  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context,
                       bool inlined);

  bool is_null() const { return size == 0; }

  void set_null() {
    size = 0U;
    tag = static_cast<SubAppsService_Add_ResponseParam_Result_Tag>(0);
    data.unknown = 0U;
  }

  // TODO(crbug.com/40731316): SHOUTY_CASE values are being deprecated per C++ code style
  // guidelines (https://google.github.io/styleguide/cppguide.html#Enumerator_Names),
  // please use kCamelCase values instead.  Cleanup NULL_VALUE, BOOL_VALUE, INT_VALUE, etc.
  // generation once codebase is transitioned to kNullValue, kBoolValue, kIntValue, etc.
  enum class SubAppsService_Add_ResponseParam_Result_Tag : uint32_t {

    
    kSuccess,
    
    kFailure,
  };

  // A note on layout:
  // "Each non-static data member is allocated as if it were the sole member of
  // a struct." - Section 9.5.2 ISO/IEC 14882:2011 (The C++ Spec)
  union MOJO_ALIGNAS(8) Union_ {
    Union_() : unknown(0) {}
    mojo::internal::Pointer<mojo::internal::Array_Data<mojo::internal::Pointer<internal::SubAppsServiceAddResult_Data>>> f_success;
    int32_t f_failure;
    uint64_t unknown;
  };

  uint32_t size;
  SubAppsService_Add_ResponseParam_Result_Tag tag;
  Union_ data;
};
static_assert(sizeof(SubAppsService_Add_ResponseParam_Result_Data) == mojo::internal::kUnionDataSize,
              "Bad sizeof(SubAppsService_Add_ResponseParam_Result_Data)");


class COMPONENT_EXPORT(MOJOM_SHARED_BLINK_COMMON_EXPORT) SubAppsService_List_ResponseParam_Result_Data {
 public:
  // Used to identify Mojom Union Data Classes.
  typedef void MojomUnionDataType;

  SubAppsService_List_ResponseParam_Result_Data() = default;
  // Do nothing in the destructor since it won't be called when it is a
  // non-inlined union.
  ~SubAppsService_List_ResponseParam_Result_Data() = default;

  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context,
                       bool inlined);

  bool is_null() const { return size == 0; }

  void set_null() {
    size = 0U;
    tag = static_cast<SubAppsService_List_ResponseParam_Result_Tag>(0);
    data.unknown = 0U;
  }

  // TODO(crbug.com/40731316): SHOUTY_CASE values are being deprecated per C++ code style
  // guidelines (https://google.github.io/styleguide/cppguide.html#Enumerator_Names),
  // please use kCamelCase values instead.  Cleanup NULL_VALUE, BOOL_VALUE, INT_VALUE, etc.
  // generation once codebase is transitioned to kNullValue, kBoolValue, kIntValue, etc.
  enum class SubAppsService_List_ResponseParam_Result_Tag : uint32_t {

    
    kSuccess,
    
    kFailure,
  };

  // A note on layout:
  // "Each non-static data member is allocated as if it were the sole member of
  // a struct." - Section 9.5.2 ISO/IEC 14882:2011 (The C++ Spec)
  union MOJO_ALIGNAS(8) Union_ {
    Union_() : unknown(0) {}
    mojo::internal::Pointer<mojo::internal::Array_Data<mojo::internal::Pointer<internal::SubAppsServiceListResultEntry_Data>>> f_success;
    int32_t f_failure;
    uint64_t unknown;
  };

  uint32_t size;
  SubAppsService_List_ResponseParam_Result_Tag tag;
  Union_ data;
};
static_assert(sizeof(SubAppsService_List_ResponseParam_Result_Data) == mojo::internal::kUnionDataSize,
              "Bad sizeof(SubAppsService_List_ResponseParam_Result_Data)");


class COMPONENT_EXPORT(MOJOM_SHARED_BLINK_COMMON_EXPORT) SubAppsService_Remove_ResponseParam_Result_Data {
 public:
  // Used to identify Mojom Union Data Classes.
  typedef void MojomUnionDataType;

  SubAppsService_Remove_ResponseParam_Result_Data() = default;
  // Do nothing in the destructor since it won't be called when it is a
  // non-inlined union.
  ~SubAppsService_Remove_ResponseParam_Result_Data() = default;

  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context,
                       bool inlined);

  bool is_null() const { return size == 0; }

  void set_null() {
    size = 0U;
    tag = static_cast<SubAppsService_Remove_ResponseParam_Result_Tag>(0);
    data.unknown = 0U;
  }

  // TODO(crbug.com/40731316): SHOUTY_CASE values are being deprecated per C++ code style
  // guidelines (https://google.github.io/styleguide/cppguide.html#Enumerator_Names),
  // please use kCamelCase values instead.  Cleanup NULL_VALUE, BOOL_VALUE, INT_VALUE, etc.
  // generation once codebase is transitioned to kNullValue, kBoolValue, kIntValue, etc.
  enum class SubAppsService_Remove_ResponseParam_Result_Tag : uint32_t {

    
    kSuccess,
    
    kFailure,
  };

  // A note on layout:
  // "Each non-static data member is allocated as if it were the sole member of
  // a struct." - Section 9.5.2 ISO/IEC 14882:2011 (The C++ Spec)
  union MOJO_ALIGNAS(8) Union_ {
    Union_() : unknown(0) {}
    mojo::internal::Pointer<mojo::internal::Array_Data<mojo::internal::Pointer<internal::SubAppsServiceRemoveResult_Data>>> f_success;
    int32_t f_failure;
    uint64_t unknown;
  };

  uint32_t size;
  SubAppsService_Remove_ResponseParam_Result_Tag tag;
  Union_ data;
};
static_assert(sizeof(SubAppsService_Remove_ResponseParam_Result_Data) == mojo::internal::kUnionDataSize,
              "Bad sizeof(SubAppsService_Remove_ResponseParam_Result_Data)");
class COMPONENT_EXPORT(MOJOM_SHARED_BLINK_COMMON_EXPORT) SubAppsServiceAddResult_Data {
 public:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);

  mojo::internal::StructHeader header_;
  mojo::internal::Pointer<mojo::internal::String_Data> install_path;
  mojo::internal::Pointer<mojo::internal::String_Data> manifest_id;
  int32_t result_type;
  uint8_t padfinal_[4];

 private:
  friend class mojo::internal::MessageFragment<SubAppsServiceAddResult_Data>;

  SubAppsServiceAddResult_Data();
  ~SubAppsServiceAddResult_Data() = delete;
};
static_assert(sizeof(SubAppsServiceAddResult_Data) == 32,
              "Bad sizeof(SubAppsServiceAddResult_Data)");
// Used by SubAppsServiceAddResult::WrapAsMessage to lazily serialize the struct.
template <typename UserType, typename DataView>
struct SubAppsServiceAddResult_UnserializedMessageContext
    : public mojo::internal::UnserializedMessageContext {
 public:
  static const mojo::internal::UnserializedMessageContext::Tag kMessageTag;

  SubAppsServiceAddResult_UnserializedMessageContext(
    uint32_t message_name,
    uint32_t message_flags,
    UserType input)
      : mojo::internal::UnserializedMessageContext(&kMessageTag, message_name, message_flags)
      , user_data_(std::move(input)) {}
  ~SubAppsServiceAddResult_UnserializedMessageContext() override = default;

  UserType TakeData() {
    return std::move(user_data_);
  }

 private:
  // mojo::internal::UnserializedMessageContext:
  void Serialize(mojo::Message& message) override {
    mojo::internal::MessageFragment<SubAppsServiceAddResult_Data> fragment(message);
    mojo::internal::Serialize<DataView>(user_data_, fragment);
  }

  UserType user_data_;
};

template <typename UserType, typename DataView>
const mojo::internal::UnserializedMessageContext::Tag
    SubAppsServiceAddResult_UnserializedMessageContext<UserType, DataView>::kMessageTag = {};
class COMPONENT_EXPORT(MOJOM_SHARED_BLINK_COMMON_EXPORT) SubAppsServiceListResultEntry_Data {
 public:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);

  mojo::internal::StructHeader header_;
  mojo::internal::Pointer<mojo::internal::String_Data> manifest_id;
  mojo::internal::Pointer<mojo::internal::String_Data> app_name;

 private:
  friend class mojo::internal::MessageFragment<SubAppsServiceListResultEntry_Data>;

  SubAppsServiceListResultEntry_Data();
  ~SubAppsServiceListResultEntry_Data() = delete;
};
static_assert(sizeof(SubAppsServiceListResultEntry_Data) == 24,
              "Bad sizeof(SubAppsServiceListResultEntry_Data)");
// Used by SubAppsServiceListResultEntry::WrapAsMessage to lazily serialize the struct.
template <typename UserType, typename DataView>
struct SubAppsServiceListResultEntry_UnserializedMessageContext
    : public mojo::internal::UnserializedMessageContext {
 public:
  static const mojo::internal::UnserializedMessageContext::Tag kMessageTag;

  SubAppsServiceListResultEntry_UnserializedMessageContext(
    uint32_t message_name,
    uint32_t message_flags,
    UserType input)
      : mojo::internal::UnserializedMessageContext(&kMessageTag, message_name, message_flags)
      , user_data_(std::move(input)) {}
  ~SubAppsServiceListResultEntry_UnserializedMessageContext() override = default;

  UserType TakeData() {
    return std::move(user_data_);
  }

 private:
  // mojo::internal::UnserializedMessageContext:
  void Serialize(mojo::Message& message) override {
    mojo::internal::MessageFragment<SubAppsServiceListResultEntry_Data> fragment(message);
    mojo::internal::Serialize<DataView>(user_data_, fragment);
  }

  UserType user_data_;
};

template <typename UserType, typename DataView>
const mojo::internal::UnserializedMessageContext::Tag
    SubAppsServiceListResultEntry_UnserializedMessageContext<UserType, DataView>::kMessageTag = {};
class COMPONENT_EXPORT(MOJOM_SHARED_BLINK_COMMON_EXPORT) SubAppsServiceRemoveResult_Data {
 public:
  static bool Validate(const void* data,
                       mojo::internal::ValidationContext* validation_context);

  mojo::internal::StructHeader header_;
  mojo::internal::Pointer<mojo::internal::String_Data> manifest_id;
  int32_t result_type;
  uint8_t padfinal_[4];

 private:
  friend class mojo::internal::MessageFragment<SubAppsServiceRemoveResult_Data>;

  SubAppsServiceRemoveResult_Data();
  ~SubAppsServiceRemoveResult_Data() = delete;
};
static_assert(sizeof(SubAppsServiceRemoveResult_Data) == 24,
              "Bad sizeof(SubAppsServiceRemoveResult_Data)");
// Used by SubAppsServiceRemoveResult::WrapAsMessage to lazily serialize the struct.
template <typename UserType, typename DataView>
struct SubAppsServiceRemoveResult_UnserializedMessageContext
    : public mojo::internal::UnserializedMessageContext {
 public:
  static const mojo::internal::UnserializedMessageContext::Tag kMessageTag;

  SubAppsServiceRemoveResult_UnserializedMessageContext(
    uint32_t message_name,
    uint32_t message_flags,
    UserType input)
      : mojo::internal::UnserializedMessageContext(&kMessageTag, message_name, message_flags)
      , user_data_(std::move(input)) {}
  ~SubAppsServiceRemoveResult_UnserializedMessageContext() override = default;

  UserType TakeData() {
    return std::move(user_data_);
  }

 private:
  // mojo::internal::UnserializedMessageContext:
  void Serialize(mojo::Message& message) override {
    mojo::internal::MessageFragment<SubAppsServiceRemoveResult_Data> fragment(message);
    mojo::internal::Serialize<DataView>(user_data_, fragment);
  }

  UserType user_data_;
};

template <typename UserType, typename DataView>
const mojo::internal::UnserializedMessageContext::Tag
    SubAppsServiceRemoveResult_UnserializedMessageContext<UserType, DataView>::kMessageTag = {};

#pragma pack(pop)

}  // namespace internal

}  // blink::mojom

#endif  // THIRD_PARTY_BLINK_PUBLIC_MOJOM_SUBAPPS_SUB_APPS_SERVICE_MOJOM_SHARED_INTERNAL_H_