// Generated by the protocol buffer compiler.  DO NOT EDIT!
// NO CHECKED-IN PROTOBUF GENCODE
// source: xla/service/shaped_slice.proto
// Protobuf C++ Version: 6.31.1

#ifndef xla_2fservice_2fshaped_5fslice_2eproto_2epb_2eh
#define xla_2fservice_2fshaped_5fslice_2eproto_2epb_2eh

#include <limits>
#include <string>
#include <type_traits>
#include <utility>

#include "google/protobuf/runtime_version.h"
#if PROTOBUF_VERSION != 6031001
#error "Protobuf C++ gencode is built with an incompatible version of"
#error "Protobuf C++ headers/runtime. See"
#error "https://protobuf.dev/support/cross-version-runtime-guarantee/#cpp"
#endif
#include "google/protobuf/io/coded_stream.h"
#include "google/protobuf/arena.h"
#include "google/protobuf/arenastring.h"
#include "google/protobuf/generated_message_tctable_decl.h"
#include "google/protobuf/generated_message_util.h"
#include "google/protobuf/metadata_lite.h"
#include "google/protobuf/generated_message_reflection.h"
#include "google/protobuf/message.h"
#include "google/protobuf/message_lite.h"
#include "google/protobuf/repeated_field.h"  // IWYU pragma: export
#include "google/protobuf/extension_set.h"  // IWYU pragma: export
#include "google/protobuf/unknown_field_set.h"
#include "xla/service/buffer_assignment.pb.h"
#include "xla/xla_data.pb.h"
// @@protoc_insertion_point(includes)

// Must be included last.
#include "google/protobuf/port_def.inc"

#define PROTOBUF_INTERNAL_EXPORT_xla_2fservice_2fshaped_5fslice_2eproto PROTOBUF_EXPORT

namespace google {
namespace protobuf {
namespace internal {
template <typename T>
::absl::string_view GetAnyMessageName();
}  // namespace internal
}  // namespace protobuf
}  // namespace google

// Internal implementation detail -- do not use these members.
struct PROTOBUF_EXPORT TableStruct_xla_2fservice_2fshaped_5fslice_2eproto {
  static const ::uint32_t offsets[];
};
extern "C" {
PROTOBUF_EXPORT extern const ::google::protobuf::internal::DescriptorTable descriptor_table_xla_2fservice_2fshaped_5fslice_2eproto;
}  // extern "C"
namespace xla {
class NullableShapedSliceProto;
struct NullableShapedSliceProtoDefaultTypeInternal;
PROTOBUF_EXPORT extern NullableShapedSliceProtoDefaultTypeInternal _NullableShapedSliceProto_default_instance_;
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull NullableShapedSliceProto_class_data_;
class ShapedSliceProto;
struct ShapedSliceProtoDefaultTypeInternal;
PROTOBUF_EXPORT extern ShapedSliceProtoDefaultTypeInternal _ShapedSliceProto_default_instance_;
PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull ShapedSliceProto_class_data_;
}  // namespace xla
namespace google {
namespace protobuf {
}  // namespace protobuf
}  // namespace google

namespace xla {

// ===================================================================


// -------------------------------------------------------------------

class PROTOBUF_EXPORT ShapedSliceProto final : public ::google::protobuf::Message
/* @@protoc_insertion_point(class_definition:xla.ShapedSliceProto) */ {
 public:
  inline ShapedSliceProto() : ShapedSliceProto(nullptr) {}
  ~ShapedSliceProto() PROTOBUF_FINAL;

#if defined(PROTOBUF_CUSTOM_VTABLE)
  void operator delete(ShapedSliceProto* PROTOBUF_NONNULL msg, std::destroying_delete_t) {
    SharedDtor(*msg);
    ::google::protobuf::internal::SizedDelete(msg, sizeof(ShapedSliceProto));
  }
#endif

  template <typename = void>
  explicit PROTOBUF_CONSTEXPR ShapedSliceProto(::google::protobuf::internal::ConstantInitialized);

  inline ShapedSliceProto(const ShapedSliceProto& from) : ShapedSliceProto(nullptr, from) {}
  inline ShapedSliceProto(ShapedSliceProto&& from) noexcept
      : ShapedSliceProto(nullptr, ::std::move(from)) {}
  inline ShapedSliceProto& operator=(const ShapedSliceProto& from) {
    CopyFrom(from);
    return *this;
  }
  inline ShapedSliceProto& operator=(ShapedSliceProto&& from) noexcept {
    if (this == &from) return *this;
    if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) {
      InternalSwap(&from);
    } else {
      CopyFrom(from);
    }
    return *this;
  }

  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const
      ABSL_ATTRIBUTE_LIFETIME_BOUND {
    return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance);
  }
  inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields()
      ABSL_ATTRIBUTE_LIFETIME_BOUND {
    return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>();
  }

  static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() {
    return GetDescriptor();
  }
  static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() {
    return default_instance().GetMetadata().descriptor;
  }
  static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() {
    return default_instance().GetMetadata().reflection;
  }
  static const ShapedSliceProto& default_instance() {
    return *reinterpret_cast<const ShapedSliceProto*>(
        &_ShapedSliceProto_default_instance_);
  }
  static constexpr int kIndexInFileMessages = 0;
  friend void swap(ShapedSliceProto& a, ShapedSliceProto& b) { a.Swap(&b); }
  inline void Swap(ShapedSliceProto* PROTOBUF_NONNULL other) {
    if (other == this) return;
    if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) {
      InternalSwap(other);
    } else {
      ::google::protobuf::internal::GenericSwap(this, other);
    }
  }
  void UnsafeArenaSwap(ShapedSliceProto* PROTOBUF_NONNULL other) {
    if (other == this) return;
    ABSL_DCHECK(GetArena() == other->GetArena());
    InternalSwap(other);
  }

  // implements Message ----------------------------------------------

  ShapedSliceProto* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const {
    return ::google::protobuf::Message::DefaultConstruct<ShapedSliceProto>(arena);
  }
  using ::google::protobuf::Message::CopyFrom;
  void CopyFrom(const ShapedSliceProto& from);
  using ::google::protobuf::Message::MergeFrom;
  void MergeFrom(const ShapedSliceProto& from) { ShapedSliceProto::MergeImpl(*this, from); }

  private:
  static void MergeImpl(::google::protobuf::MessageLite& to_msg,
                        const ::google::protobuf::MessageLite& from_msg);

  public:
  bool IsInitialized() const {
    return true;
  }
  ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL;
  #if defined(PROTOBUF_CUSTOM_VTABLE)
  private:
  static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg);
  static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize(
      const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target,
      ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream);

  public:
  ::size_t ByteSizeLong() const { return ByteSizeLong(*this); }
  ::uint8_t* PROTOBUF_NONNULL _InternalSerialize(
      ::uint8_t* PROTOBUF_NONNULL target,
      ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
    return _InternalSerialize(*this, target, stream);
  }
  #else   // PROTOBUF_CUSTOM_VTABLE
  ::size_t ByteSizeLong() const final;
  ::uint8_t* PROTOBUF_NONNULL _InternalSerialize(
      ::uint8_t* PROTOBUF_NONNULL target,
      ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final;
  #endif  // PROTOBUF_CUSTOM_VTABLE
  int GetCachedSize() const { return _impl_._cached_size_.Get(); }

  private:
  void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
  static void SharedDtor(MessageLite& self);
  void InternalSwap(ShapedSliceProto* PROTOBUF_NONNULL other);
 private:
  template <typename T>
  friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)();
  static ::absl::string_view FullMessageName() { return "xla.ShapedSliceProto"; }

 protected:
  explicit ShapedSliceProto(::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
  ShapedSliceProto(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const ShapedSliceProto& from);
  ShapedSliceProto(
      ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, ShapedSliceProto&& from) noexcept
      : ShapedSliceProto(arena) {
    *this = ::std::move(from);
  }
  const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL;
  static void* PROTOBUF_NONNULL PlacementNew_(
      const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
      ::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
  static constexpr auto InternalNewImpl_();

 public:
  static constexpr auto InternalGenerateClassData_();

  ::google::protobuf::Metadata GetMetadata() const;
  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------
  enum : int {
    kSliceFieldNumber = 1,
    kShapeFieldNumber = 2,
  };
  // .xla.buffer_assignment.BufferAllocationSliceProto slice = 1;
  bool has_slice() const;
  void clear_slice() ;
  const ::xla::buffer_assignment::BufferAllocationSliceProto& slice() const;
  [[nodiscard]] ::xla::buffer_assignment::BufferAllocationSliceProto* PROTOBUF_NULLABLE release_slice();
  ::xla::buffer_assignment::BufferAllocationSliceProto* PROTOBUF_NONNULL mutable_slice();
  void set_allocated_slice(::xla::buffer_assignment::BufferAllocationSliceProto* PROTOBUF_NULLABLE value);
  void unsafe_arena_set_allocated_slice(::xla::buffer_assignment::BufferAllocationSliceProto* PROTOBUF_NULLABLE value);
  ::xla::buffer_assignment::BufferAllocationSliceProto* PROTOBUF_NULLABLE unsafe_arena_release_slice();

  private:
  const ::xla::buffer_assignment::BufferAllocationSliceProto& _internal_slice() const;
  ::xla::buffer_assignment::BufferAllocationSliceProto* PROTOBUF_NONNULL _internal_mutable_slice();

  public:
  // .xla.ShapeProto shape = 2;
  bool has_shape() const;
  void clear_shape() ;
  const ::xla::ShapeProto& shape() const;
  [[nodiscard]] ::xla::ShapeProto* PROTOBUF_NULLABLE release_shape();
  ::xla::ShapeProto* PROTOBUF_NONNULL mutable_shape();
  void set_allocated_shape(::xla::ShapeProto* PROTOBUF_NULLABLE value);
  void unsafe_arena_set_allocated_shape(::xla::ShapeProto* PROTOBUF_NULLABLE value);
  ::xla::ShapeProto* PROTOBUF_NULLABLE unsafe_arena_release_shape();

  private:
  const ::xla::ShapeProto& _internal_shape() const;
  ::xla::ShapeProto* PROTOBUF_NONNULL _internal_mutable_shape();

  public:
  // @@protoc_insertion_point(class_scope:xla.ShapedSliceProto)
 private:
  class _Internal;
  friend class ::google::protobuf::internal::TcParser;
  static const ::google::protobuf::internal::TcParseTable<1, 2,
                                   2, 0,
                                   2>
      _table_;

  friend class ::google::protobuf::MessageLite;
  friend class ::google::protobuf::Arena;
  template <typename T>
  friend class ::google::protobuf::Arena::InternalHelper;
  using InternalArenaConstructable_ = void;
  using DestructorSkippable_ = void;
  struct Impl_ {
    inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept;
    inline explicit Impl_(
        ::google::protobuf::internal::InternalVisibility visibility,
        ::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
    inline explicit Impl_(
        ::google::protobuf::internal::InternalVisibility visibility,
        ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
        const ShapedSliceProto& from_msg);
    ::google::protobuf::internal::HasBits<1> _has_bits_;
    ::google::protobuf::internal::CachedSize _cached_size_;
    ::xla::buffer_assignment::BufferAllocationSliceProto* PROTOBUF_NULLABLE slice_;
    ::xla::ShapeProto* PROTOBUF_NULLABLE shape_;
    PROTOBUF_TSAN_DECLARE_MEMBER
  };
  union { Impl_ _impl_; };
  friend struct ::TableStruct_xla_2fservice_2fshaped_5fslice_2eproto;
};

PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull ShapedSliceProto_class_data_;
// -------------------------------------------------------------------

class PROTOBUF_EXPORT NullableShapedSliceProto final : public ::google::protobuf::Message
/* @@protoc_insertion_point(class_definition:xla.NullableShapedSliceProto) */ {
 public:
  inline NullableShapedSliceProto() : NullableShapedSliceProto(nullptr) {}
  ~NullableShapedSliceProto() PROTOBUF_FINAL;

#if defined(PROTOBUF_CUSTOM_VTABLE)
  void operator delete(NullableShapedSliceProto* PROTOBUF_NONNULL msg, std::destroying_delete_t) {
    SharedDtor(*msg);
    ::google::protobuf::internal::SizedDelete(msg, sizeof(NullableShapedSliceProto));
  }
#endif

  template <typename = void>
  explicit PROTOBUF_CONSTEXPR NullableShapedSliceProto(::google::protobuf::internal::ConstantInitialized);

  inline NullableShapedSliceProto(const NullableShapedSliceProto& from) : NullableShapedSliceProto(nullptr, from) {}
  inline NullableShapedSliceProto(NullableShapedSliceProto&& from) noexcept
      : NullableShapedSliceProto(nullptr, ::std::move(from)) {}
  inline NullableShapedSliceProto& operator=(const NullableShapedSliceProto& from) {
    CopyFrom(from);
    return *this;
  }
  inline NullableShapedSliceProto& operator=(NullableShapedSliceProto&& from) noexcept {
    if (this == &from) return *this;
    if (::google::protobuf::internal::CanMoveWithInternalSwap(GetArena(), from.GetArena())) {
      InternalSwap(&from);
    } else {
      CopyFrom(from);
    }
    return *this;
  }

  inline const ::google::protobuf::UnknownFieldSet& unknown_fields() const
      ABSL_ATTRIBUTE_LIFETIME_BOUND {
    return _internal_metadata_.unknown_fields<::google::protobuf::UnknownFieldSet>(::google::protobuf::UnknownFieldSet::default_instance);
  }
  inline ::google::protobuf::UnknownFieldSet* PROTOBUF_NONNULL mutable_unknown_fields()
      ABSL_ATTRIBUTE_LIFETIME_BOUND {
    return _internal_metadata_.mutable_unknown_fields<::google::protobuf::UnknownFieldSet>();
  }

  static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL descriptor() {
    return GetDescriptor();
  }
  static const ::google::protobuf::Descriptor* PROTOBUF_NONNULL GetDescriptor() {
    return default_instance().GetMetadata().descriptor;
  }
  static const ::google::protobuf::Reflection* PROTOBUF_NONNULL GetReflection() {
    return default_instance().GetMetadata().reflection;
  }
  static const NullableShapedSliceProto& default_instance() {
    return *reinterpret_cast<const NullableShapedSliceProto*>(
        &_NullableShapedSliceProto_default_instance_);
  }
  static constexpr int kIndexInFileMessages = 1;
  friend void swap(NullableShapedSliceProto& a, NullableShapedSliceProto& b) { a.Swap(&b); }
  inline void Swap(NullableShapedSliceProto* PROTOBUF_NONNULL other) {
    if (other == this) return;
    if (::google::protobuf::internal::CanUseInternalSwap(GetArena(), other->GetArena())) {
      InternalSwap(other);
    } else {
      ::google::protobuf::internal::GenericSwap(this, other);
    }
  }
  void UnsafeArenaSwap(NullableShapedSliceProto* PROTOBUF_NONNULL other) {
    if (other == this) return;
    ABSL_DCHECK(GetArena() == other->GetArena());
    InternalSwap(other);
  }

  // implements Message ----------------------------------------------

  NullableShapedSliceProto* PROTOBUF_NONNULL New(::google::protobuf::Arena* PROTOBUF_NULLABLE arena = nullptr) const {
    return ::google::protobuf::Message::DefaultConstruct<NullableShapedSliceProto>(arena);
  }
  using ::google::protobuf::Message::CopyFrom;
  void CopyFrom(const NullableShapedSliceProto& from);
  using ::google::protobuf::Message::MergeFrom;
  void MergeFrom(const NullableShapedSliceProto& from) { NullableShapedSliceProto::MergeImpl(*this, from); }

  private:
  static void MergeImpl(::google::protobuf::MessageLite& to_msg,
                        const ::google::protobuf::MessageLite& from_msg);

  public:
  bool IsInitialized() const {
    return true;
  }
  ABSL_ATTRIBUTE_REINITIALIZES void Clear() PROTOBUF_FINAL;
  #if defined(PROTOBUF_CUSTOM_VTABLE)
  private:
  static ::size_t ByteSizeLong(const ::google::protobuf::MessageLite& msg);
  static ::uint8_t* PROTOBUF_NONNULL _InternalSerialize(
      const ::google::protobuf::MessageLite& msg, ::uint8_t* PROTOBUF_NONNULL target,
      ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream);

  public:
  ::size_t ByteSizeLong() const { return ByteSizeLong(*this); }
  ::uint8_t* PROTOBUF_NONNULL _InternalSerialize(
      ::uint8_t* PROTOBUF_NONNULL target,
      ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const {
    return _InternalSerialize(*this, target, stream);
  }
  #else   // PROTOBUF_CUSTOM_VTABLE
  ::size_t ByteSizeLong() const final;
  ::uint8_t* PROTOBUF_NONNULL _InternalSerialize(
      ::uint8_t* PROTOBUF_NONNULL target,
      ::google::protobuf::io::EpsCopyOutputStream* PROTOBUF_NONNULL stream) const final;
  #endif  // PROTOBUF_CUSTOM_VTABLE
  int GetCachedSize() const { return _impl_._cached_size_.Get(); }

  private:
  void SharedCtor(::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
  static void SharedDtor(MessageLite& self);
  void InternalSwap(NullableShapedSliceProto* PROTOBUF_NONNULL other);
 private:
  template <typename T>
  friend ::absl::string_view(::google::protobuf::internal::GetAnyMessageName)();
  static ::absl::string_view FullMessageName() { return "xla.NullableShapedSliceProto"; }

 protected:
  explicit NullableShapedSliceProto(::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
  NullableShapedSliceProto(::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const NullableShapedSliceProto& from);
  NullableShapedSliceProto(
      ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, NullableShapedSliceProto&& from) noexcept
      : NullableShapedSliceProto(arena) {
    *this = ::std::move(from);
  }
  const ::google::protobuf::internal::ClassData* PROTOBUF_NONNULL GetClassData() const PROTOBUF_FINAL;
  static void* PROTOBUF_NONNULL PlacementNew_(
      const void* PROTOBUF_NONNULL, void* PROTOBUF_NONNULL mem,
      ::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
  static constexpr auto InternalNewImpl_();

 public:
  static constexpr auto InternalGenerateClassData_();

  ::google::protobuf::Metadata GetMetadata() const;
  // nested types ----------------------------------------------------

  // accessors -------------------------------------------------------
  enum : int {
    kShapedSliceFieldNumber = 1,
  };
  // optional .xla.ShapedSliceProto shaped_slice = 1;
  bool has_shaped_slice() const;
  void clear_shaped_slice() ;
  const ::xla::ShapedSliceProto& shaped_slice() const;
  [[nodiscard]] ::xla::ShapedSliceProto* PROTOBUF_NULLABLE release_shaped_slice();
  ::xla::ShapedSliceProto* PROTOBUF_NONNULL mutable_shaped_slice();
  void set_allocated_shaped_slice(::xla::ShapedSliceProto* PROTOBUF_NULLABLE value);
  void unsafe_arena_set_allocated_shaped_slice(::xla::ShapedSliceProto* PROTOBUF_NULLABLE value);
  ::xla::ShapedSliceProto* PROTOBUF_NULLABLE unsafe_arena_release_shaped_slice();

  private:
  const ::xla::ShapedSliceProto& _internal_shaped_slice() const;
  ::xla::ShapedSliceProto* PROTOBUF_NONNULL _internal_mutable_shaped_slice();

  public:
  // @@protoc_insertion_point(class_scope:xla.NullableShapedSliceProto)
 private:
  class _Internal;
  friend class ::google::protobuf::internal::TcParser;
  static const ::google::protobuf::internal::TcParseTable<0, 1,
                                   1, 0,
                                   2>
      _table_;

  friend class ::google::protobuf::MessageLite;
  friend class ::google::protobuf::Arena;
  template <typename T>
  friend class ::google::protobuf::Arena::InternalHelper;
  using InternalArenaConstructable_ = void;
  using DestructorSkippable_ = void;
  struct Impl_ {
    inline explicit constexpr Impl_(::google::protobuf::internal::ConstantInitialized) noexcept;
    inline explicit Impl_(
        ::google::protobuf::internal::InternalVisibility visibility,
        ::google::protobuf::Arena* PROTOBUF_NULLABLE arena);
    inline explicit Impl_(
        ::google::protobuf::internal::InternalVisibility visibility,
        ::google::protobuf::Arena* PROTOBUF_NULLABLE arena, const Impl_& from,
        const NullableShapedSliceProto& from_msg);
    ::google::protobuf::internal::HasBits<1> _has_bits_;
    ::google::protobuf::internal::CachedSize _cached_size_;
    ::xla::ShapedSliceProto* PROTOBUF_NULLABLE shaped_slice_;
    PROTOBUF_TSAN_DECLARE_MEMBER
  };
  union { Impl_ _impl_; };
  friend struct ::TableStruct_xla_2fservice_2fshaped_5fslice_2eproto;
};

PROTOBUF_EXPORT extern const ::google::protobuf::internal::ClassDataFull NullableShapedSliceProto_class_data_;

// ===================================================================




// ===================================================================


#ifdef __GNUC__
#pragma GCC diagnostic push
#pragma GCC diagnostic ignored "-Wstrict-aliasing"
#endif  // __GNUC__
// -------------------------------------------------------------------

// ShapedSliceProto

// .xla.buffer_assignment.BufferAllocationSliceProto slice = 1;
inline bool ShapedSliceProto::has_slice() const {
  bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0;
  PROTOBUF_ASSUME(!value || _impl_.slice_ != nullptr);
  return value;
}
inline const ::xla::buffer_assignment::BufferAllocationSliceProto& ShapedSliceProto::_internal_slice() const {
  ::google::protobuf::internal::TSanRead(&_impl_);
  const ::xla::buffer_assignment::BufferAllocationSliceProto* p = _impl_.slice_;
  return p != nullptr ? *p : reinterpret_cast<const ::xla::buffer_assignment::BufferAllocationSliceProto&>(::xla::buffer_assignment::_BufferAllocationSliceProto_default_instance_);
}
inline const ::xla::buffer_assignment::BufferAllocationSliceProto& ShapedSliceProto::slice() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:xla.ShapedSliceProto.slice)
  return _internal_slice();
}
inline void ShapedSliceProto::unsafe_arena_set_allocated_slice(
    ::xla::buffer_assignment::BufferAllocationSliceProto* PROTOBUF_NULLABLE value) {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (GetArena() == nullptr) {
    delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.slice_);
  }
  _impl_.slice_ = reinterpret_cast<::xla::buffer_assignment::BufferAllocationSliceProto*>(value);
  if (value != nullptr) {
    _impl_._has_bits_[0] |= 0x00000001u;
  } else {
    _impl_._has_bits_[0] &= ~0x00000001u;
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:xla.ShapedSliceProto.slice)
}
inline ::xla::buffer_assignment::BufferAllocationSliceProto* PROTOBUF_NULLABLE ShapedSliceProto::release_slice() {
  ::google::protobuf::internal::TSanWrite(&_impl_);

  _impl_._has_bits_[0] &= ~0x00000001u;
  ::xla::buffer_assignment::BufferAllocationSliceProto* released = _impl_.slice_;
  _impl_.slice_ = nullptr;
  if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) {
    auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released);
    released = ::google::protobuf::internal::DuplicateIfNonNull(released);
    if (GetArena() == nullptr) {
      delete old;
    }
  } else {
    if (GetArena() != nullptr) {
      released = ::google::protobuf::internal::DuplicateIfNonNull(released);
    }
  }
  return released;
}
inline ::xla::buffer_assignment::BufferAllocationSliceProto* PROTOBUF_NULLABLE ShapedSliceProto::unsafe_arena_release_slice() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  // @@protoc_insertion_point(field_release:xla.ShapedSliceProto.slice)

  _impl_._has_bits_[0] &= ~0x00000001u;
  ::xla::buffer_assignment::BufferAllocationSliceProto* temp = _impl_.slice_;
  _impl_.slice_ = nullptr;
  return temp;
}
inline ::xla::buffer_assignment::BufferAllocationSliceProto* PROTOBUF_NONNULL ShapedSliceProto::_internal_mutable_slice() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (_impl_.slice_ == nullptr) {
    auto* p = ::google::protobuf::Message::DefaultConstruct<::xla::buffer_assignment::BufferAllocationSliceProto>(GetArena());
    _impl_.slice_ = reinterpret_cast<::xla::buffer_assignment::BufferAllocationSliceProto*>(p);
  }
  return _impl_.slice_;
}
inline ::xla::buffer_assignment::BufferAllocationSliceProto* PROTOBUF_NONNULL ShapedSliceProto::mutable_slice()
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  _impl_._has_bits_[0] |= 0x00000001u;
  ::xla::buffer_assignment::BufferAllocationSliceProto* _msg = _internal_mutable_slice();
  // @@protoc_insertion_point(field_mutable:xla.ShapedSliceProto.slice)
  return _msg;
}
inline void ShapedSliceProto::set_allocated_slice(::xla::buffer_assignment::BufferAllocationSliceProto* PROTOBUF_NULLABLE value) {
  ::google::protobuf::Arena* message_arena = GetArena();
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (message_arena == nullptr) {
    delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.slice_);
  }

  if (value != nullptr) {
    ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::google::protobuf::Message*>(value)->GetArena();
    if (message_arena != submessage_arena) {
      value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena);
    }
    _impl_._has_bits_[0] |= 0x00000001u;
  } else {
    _impl_._has_bits_[0] &= ~0x00000001u;
  }

  _impl_.slice_ = reinterpret_cast<::xla::buffer_assignment::BufferAllocationSliceProto*>(value);
  // @@protoc_insertion_point(field_set_allocated:xla.ShapedSliceProto.slice)
}

// .xla.ShapeProto shape = 2;
inline bool ShapedSliceProto::has_shape() const {
  bool value = (_impl_._has_bits_[0] & 0x00000002u) != 0;
  PROTOBUF_ASSUME(!value || _impl_.shape_ != nullptr);
  return value;
}
inline const ::xla::ShapeProto& ShapedSliceProto::_internal_shape() const {
  ::google::protobuf::internal::TSanRead(&_impl_);
  const ::xla::ShapeProto* p = _impl_.shape_;
  return p != nullptr ? *p : reinterpret_cast<const ::xla::ShapeProto&>(::xla::_ShapeProto_default_instance_);
}
inline const ::xla::ShapeProto& ShapedSliceProto::shape() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:xla.ShapedSliceProto.shape)
  return _internal_shape();
}
inline void ShapedSliceProto::unsafe_arena_set_allocated_shape(
    ::xla::ShapeProto* PROTOBUF_NULLABLE value) {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (GetArena() == nullptr) {
    delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.shape_);
  }
  _impl_.shape_ = reinterpret_cast<::xla::ShapeProto*>(value);
  if (value != nullptr) {
    _impl_._has_bits_[0] |= 0x00000002u;
  } else {
    _impl_._has_bits_[0] &= ~0x00000002u;
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:xla.ShapedSliceProto.shape)
}
inline ::xla::ShapeProto* PROTOBUF_NULLABLE ShapedSliceProto::release_shape() {
  ::google::protobuf::internal::TSanWrite(&_impl_);

  _impl_._has_bits_[0] &= ~0x00000002u;
  ::xla::ShapeProto* released = _impl_.shape_;
  _impl_.shape_ = nullptr;
  if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) {
    auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released);
    released = ::google::protobuf::internal::DuplicateIfNonNull(released);
    if (GetArena() == nullptr) {
      delete old;
    }
  } else {
    if (GetArena() != nullptr) {
      released = ::google::protobuf::internal::DuplicateIfNonNull(released);
    }
  }
  return released;
}
inline ::xla::ShapeProto* PROTOBUF_NULLABLE ShapedSliceProto::unsafe_arena_release_shape() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  // @@protoc_insertion_point(field_release:xla.ShapedSliceProto.shape)

  _impl_._has_bits_[0] &= ~0x00000002u;
  ::xla::ShapeProto* temp = _impl_.shape_;
  _impl_.shape_ = nullptr;
  return temp;
}
inline ::xla::ShapeProto* PROTOBUF_NONNULL ShapedSliceProto::_internal_mutable_shape() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (_impl_.shape_ == nullptr) {
    auto* p = ::google::protobuf::Message::DefaultConstruct<::xla::ShapeProto>(GetArena());
    _impl_.shape_ = reinterpret_cast<::xla::ShapeProto*>(p);
  }
  return _impl_.shape_;
}
inline ::xla::ShapeProto* PROTOBUF_NONNULL ShapedSliceProto::mutable_shape()
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  _impl_._has_bits_[0] |= 0x00000002u;
  ::xla::ShapeProto* _msg = _internal_mutable_shape();
  // @@protoc_insertion_point(field_mutable:xla.ShapedSliceProto.shape)
  return _msg;
}
inline void ShapedSliceProto::set_allocated_shape(::xla::ShapeProto* PROTOBUF_NULLABLE value) {
  ::google::protobuf::Arena* message_arena = GetArena();
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (message_arena == nullptr) {
    delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.shape_);
  }

  if (value != nullptr) {
    ::google::protobuf::Arena* submessage_arena = reinterpret_cast<::google::protobuf::Message*>(value)->GetArena();
    if (message_arena != submessage_arena) {
      value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena);
    }
    _impl_._has_bits_[0] |= 0x00000002u;
  } else {
    _impl_._has_bits_[0] &= ~0x00000002u;
  }

  _impl_.shape_ = reinterpret_cast<::xla::ShapeProto*>(value);
  // @@protoc_insertion_point(field_set_allocated:xla.ShapedSliceProto.shape)
}

// -------------------------------------------------------------------

// NullableShapedSliceProto

// optional .xla.ShapedSliceProto shaped_slice = 1;
inline bool NullableShapedSliceProto::has_shaped_slice() const {
  bool value = (_impl_._has_bits_[0] & 0x00000001u) != 0;
  PROTOBUF_ASSUME(!value || _impl_.shaped_slice_ != nullptr);
  return value;
}
inline void NullableShapedSliceProto::clear_shaped_slice() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (_impl_.shaped_slice_ != nullptr) _impl_.shaped_slice_->Clear();
  _impl_._has_bits_[0] &= ~0x00000001u;
}
inline const ::xla::ShapedSliceProto& NullableShapedSliceProto::_internal_shaped_slice() const {
  ::google::protobuf::internal::TSanRead(&_impl_);
  const ::xla::ShapedSliceProto* p = _impl_.shaped_slice_;
  return p != nullptr ? *p : reinterpret_cast<const ::xla::ShapedSliceProto&>(::xla::_ShapedSliceProto_default_instance_);
}
inline const ::xla::ShapedSliceProto& NullableShapedSliceProto::shaped_slice() const ABSL_ATTRIBUTE_LIFETIME_BOUND {
  // @@protoc_insertion_point(field_get:xla.NullableShapedSliceProto.shaped_slice)
  return _internal_shaped_slice();
}
inline void NullableShapedSliceProto::unsafe_arena_set_allocated_shaped_slice(
    ::xla::ShapedSliceProto* PROTOBUF_NULLABLE value) {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (GetArena() == nullptr) {
    delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.shaped_slice_);
  }
  _impl_.shaped_slice_ = reinterpret_cast<::xla::ShapedSliceProto*>(value);
  if (value != nullptr) {
    _impl_._has_bits_[0] |= 0x00000001u;
  } else {
    _impl_._has_bits_[0] &= ~0x00000001u;
  }
  // @@protoc_insertion_point(field_unsafe_arena_set_allocated:xla.NullableShapedSliceProto.shaped_slice)
}
inline ::xla::ShapedSliceProto* PROTOBUF_NULLABLE NullableShapedSliceProto::release_shaped_slice() {
  ::google::protobuf::internal::TSanWrite(&_impl_);

  _impl_._has_bits_[0] &= ~0x00000001u;
  ::xla::ShapedSliceProto* released = _impl_.shaped_slice_;
  _impl_.shaped_slice_ = nullptr;
  if (::google::protobuf::internal::DebugHardenForceCopyInRelease()) {
    auto* old = reinterpret_cast<::google::protobuf::MessageLite*>(released);
    released = ::google::protobuf::internal::DuplicateIfNonNull(released);
    if (GetArena() == nullptr) {
      delete old;
    }
  } else {
    if (GetArena() != nullptr) {
      released = ::google::protobuf::internal::DuplicateIfNonNull(released);
    }
  }
  return released;
}
inline ::xla::ShapedSliceProto* PROTOBUF_NULLABLE NullableShapedSliceProto::unsafe_arena_release_shaped_slice() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  // @@protoc_insertion_point(field_release:xla.NullableShapedSliceProto.shaped_slice)

  _impl_._has_bits_[0] &= ~0x00000001u;
  ::xla::ShapedSliceProto* temp = _impl_.shaped_slice_;
  _impl_.shaped_slice_ = nullptr;
  return temp;
}
inline ::xla::ShapedSliceProto* PROTOBUF_NONNULL NullableShapedSliceProto::_internal_mutable_shaped_slice() {
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (_impl_.shaped_slice_ == nullptr) {
    auto* p = ::google::protobuf::Message::DefaultConstruct<::xla::ShapedSliceProto>(GetArena());
    _impl_.shaped_slice_ = reinterpret_cast<::xla::ShapedSliceProto*>(p);
  }
  return _impl_.shaped_slice_;
}
inline ::xla::ShapedSliceProto* PROTOBUF_NONNULL NullableShapedSliceProto::mutable_shaped_slice()
    ABSL_ATTRIBUTE_LIFETIME_BOUND {
  _impl_._has_bits_[0] |= 0x00000001u;
  ::xla::ShapedSliceProto* _msg = _internal_mutable_shaped_slice();
  // @@protoc_insertion_point(field_mutable:xla.NullableShapedSliceProto.shaped_slice)
  return _msg;
}
inline void NullableShapedSliceProto::set_allocated_shaped_slice(::xla::ShapedSliceProto* PROTOBUF_NULLABLE value) {
  ::google::protobuf::Arena* message_arena = GetArena();
  ::google::protobuf::internal::TSanWrite(&_impl_);
  if (message_arena == nullptr) {
    delete reinterpret_cast<::google::protobuf::MessageLite*>(_impl_.shaped_slice_);
  }

  if (value != nullptr) {
    ::google::protobuf::Arena* submessage_arena = value->GetArena();
    if (message_arena != submessage_arena) {
      value = ::google::protobuf::internal::GetOwnedMessage(message_arena, value, submessage_arena);
    }
    _impl_._has_bits_[0] |= 0x00000001u;
  } else {
    _impl_._has_bits_[0] &= ~0x00000001u;
  }

  _impl_.shaped_slice_ = reinterpret_cast<::xla::ShapedSliceProto*>(value);
  // @@protoc_insertion_point(field_set_allocated:xla.NullableShapedSliceProto.shaped_slice)
}

#ifdef __GNUC__
#pragma GCC diagnostic pop
#endif  // __GNUC__

// @@protoc_insertion_point(namespace_scope)
}  // namespace xla


// @@protoc_insertion_point(global_scope)

#include "google/protobuf/port_undef.inc"

#endif  // xla_2fservice_2fshaped_5fslice_2eproto_2epb_2eh
