// services/network/public/mojom/fetch_api.mojom-shared.cc is auto generated by mojom_bindings_generator.py, do not edit

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

#include "services/network/public/mojom/fetch_api.mojom-shared.h"

#include <utility>

#include "base/stl_util.h"  // for base::size()
#include "mojo/public/cpp/bindings/lib/validate_params.h"
#include "mojo/public/cpp/bindings/lib/validation_context.h"
#include "mojo/public/cpp/bindings/lib/validation_errors.h"
#include "mojo/public/cpp/bindings/lib/validation_util.h"

#include "services/network/public/mojom/fetch_api.mojom-params-data.h"
namespace network {
namespace mojom {

std::ostream& operator<<(std::ostream& os, RequestMode value) {
  switch(value) {
    case RequestMode::kSameOrigin:
      return os << "RequestMode::kSameOrigin";
    case RequestMode::kNoCors:
      return os << "RequestMode::kNoCors";
    case RequestMode::kCors:
      return os << "RequestMode::kCors";
    case RequestMode::kCorsWithForcedPreflight:
      return os << "RequestMode::kCorsWithForcedPreflight";
    case RequestMode::kNavigate:
      return os << "RequestMode::kNavigate";
    default:
      return os << "Unknown RequestMode value: " << static_cast<int32_t>(value);
  }
}

std::ostream& operator<<(std::ostream& os, RequestDestination value) {
  switch(value) {
    case RequestDestination::kEmpty:
      return os << "RequestDestination::kEmpty";
    case RequestDestination::kAudio:
      return os << "RequestDestination::kAudio";
    case RequestDestination::kAudioWorklet:
      return os << "RequestDestination::kAudioWorklet";
    case RequestDestination::kDocument:
      return os << "RequestDestination::kDocument";
    case RequestDestination::kEmbed:
      return os << "RequestDestination::kEmbed";
    case RequestDestination::kFont:
      return os << "RequestDestination::kFont";
    case RequestDestination::kFrame:
      return os << "RequestDestination::kFrame";
    case RequestDestination::kIframe:
      return os << "RequestDestination::kIframe";
    case RequestDestination::kImage:
      return os << "RequestDestination::kImage";
    case RequestDestination::kManifest:
      return os << "RequestDestination::kManifest";
    case RequestDestination::kObject:
      return os << "RequestDestination::kObject";
    case RequestDestination::kPaintWorklet:
      return os << "RequestDestination::kPaintWorklet";
    case RequestDestination::kReport:
      return os << "RequestDestination::kReport";
    case RequestDestination::kScript:
      return os << "RequestDestination::kScript";
    case RequestDestination::kServiceWorker:
      return os << "RequestDestination::kServiceWorker";
    case RequestDestination::kSharedWorker:
      return os << "RequestDestination::kSharedWorker";
    case RequestDestination::kStyle:
      return os << "RequestDestination::kStyle";
    case RequestDestination::kTrack:
      return os << "RequestDestination::kTrack";
    case RequestDestination::kVideo:
      return os << "RequestDestination::kVideo";
    case RequestDestination::kWorker:
      return os << "RequestDestination::kWorker";
    case RequestDestination::kXslt:
      return os << "RequestDestination::kXslt";
    default:
      return os << "Unknown RequestDestination value: " << static_cast<int32_t>(value);
  }
}

std::ostream& operator<<(std::ostream& os, RedirectMode value) {
  switch(value) {
    case RedirectMode::kFollow:
      return os << "RedirectMode::kFollow";
    case RedirectMode::kError:
      return os << "RedirectMode::kError";
    case RedirectMode::kManual:
      return os << "RedirectMode::kManual";
    default:
      return os << "Unknown RedirectMode value: " << static_cast<int32_t>(value);
  }
}

std::ostream& operator<<(std::ostream& os, CredentialsMode value) {
  switch(value) {
    case CredentialsMode::kOmit:
      return os << "CredentialsMode::kOmit";
    case CredentialsMode::kSameOrigin:
      return os << "CredentialsMode::kSameOrigin";
    case CredentialsMode::kInclude:
      return os << "CredentialsMode::kInclude";
    case CredentialsMode::kOmitBug_775438_Workaround:
      return os << "CredentialsMode::kOmitBug_775438_Workaround";
    default:
      return os << "Unknown CredentialsMode value: " << static_cast<int32_t>(value);
  }
}

std::ostream& operator<<(std::ostream& os, FetchResponseType value) {
  switch(value) {
    case FetchResponseType::kBasic:
      return os << "FetchResponseType::kBasic";
    case FetchResponseType::kCors:
      return os << "FetchResponseType::kCors";
    case FetchResponseType::kDefault:
      return os << "FetchResponseType::kDefault";
    case FetchResponseType::kError:
      return os << "FetchResponseType::kError";
    case FetchResponseType::kOpaque:
      return os << "FetchResponseType::kOpaque";
    case FetchResponseType::kOpaqueRedirect:
      return os << "FetchResponseType::kOpaqueRedirect";
    default:
      return os << "Unknown FetchResponseType value: " << static_cast<int32_t>(value);
  }
}

std::ostream& operator<<(std::ostream& os, FetchResponseSource value) {
  switch(value) {
    case FetchResponseSource::kUnspecified:
      return os << "FetchResponseSource::kUnspecified";
    case FetchResponseSource::kNetwork:
      return os << "FetchResponseSource::kNetwork";
    case FetchResponseSource::kHttpCache:
      return os << "FetchResponseSource::kHttpCache";
    case FetchResponseSource::kCacheStorage:
      return os << "FetchResponseSource::kCacheStorage";
    default:
      return os << "Unknown FetchResponseSource value: " << static_cast<int32_t>(value);
  }
}

namespace internal {

}  // namespace internal
}  // namespace mojom
}  // namespace network