
/**
 * This code was generated by [react-native-codegen](https://www.npmjs.com/package/react-native-codegen).
 *
 * Do not edit this file as changes may cause incorrect behavior and will be lost
 * once the code is regenerated.
 *
 * @generated by codegen project: GeneratePropsCpp.js
 */

#include "Props.h"
#include <react/renderer/core/PropsParserContext.h>
#include <react/renderer/core/propsConversions.h>

namespace facebook::react {

OTRNPublisherProps::OTRNPublisherProps(
    const PropsParserContext &context,
    const OTRNPublisherProps &sourceProps,
    const RawProps &rawProps): ViewProps(context, sourceProps, rawProps),

    sessionId(convertRawProp(context, rawProps, "sessionId", sourceProps.sessionId, {})),
    publisherId(convertRawProp(context, rawProps, "publisherId", sourceProps.publisherId, {})),
    publishAudio(convertRawProp(context, rawProps, "publishAudio", sourceProps.publishAudio, {false})),
    publishVideo(convertRawProp(context, rawProps, "publishVideo", sourceProps.publishVideo, {false})),
    publishCaptions(convertRawProp(context, rawProps, "publishCaptions", sourceProps.publishCaptions, {false})),
    audioBitrate(convertRawProp(context, rawProps, "audioBitrate", sourceProps.audioBitrate, {0})),
    publisherAudioFallback(convertRawProp(context, rawProps, "publisherAudioFallback", sourceProps.publisherAudioFallback, {false})),
    subscriberAudioFallback(convertRawProp(context, rawProps, "subscriberAudioFallback", sourceProps.subscriberAudioFallback, {false})),
    audioTrack(convertRawProp(context, rawProps, "audioTrack", sourceProps.audioTrack, {false})),
    cameraPosition(convertRawProp(context, rawProps, "cameraPosition", sourceProps.cameraPosition, {})),
    cameraTorch(convertRawProp(context, rawProps, "cameraTorch", sourceProps.cameraTorch, {false})),
    cameraZoomFactor(convertRawProp(context, rawProps, "cameraZoomFactor", sourceProps.cameraZoomFactor, {0.0})),
    enableDtx(convertRawProp(context, rawProps, "enableDtx", sourceProps.enableDtx, {false})),
    frameRate(convertRawProp(context, rawProps, "frameRate", sourceProps.frameRate, {0})),
    name(convertRawProp(context, rawProps, "name", sourceProps.name, {})),
    resolution(convertRawProp(context, rawProps, "resolution", sourceProps.resolution, {})),
    scalableScreenshare(convertRawProp(context, rawProps, "scalableScreenshare", sourceProps.scalableScreenshare, {false})),
    allowAudioCaptureWhileMuted(convertRawProp(context, rawProps, "allowAudioCaptureWhileMuted", sourceProps.allowAudioCaptureWhileMuted, {false})),
    audioFallbackEnabled(convertRawProp(context, rawProps, "audioFallbackEnabled", sourceProps.audioFallbackEnabled, {false})),
    videoTrack(convertRawProp(context, rawProps, "videoTrack", sourceProps.videoTrack, {false})),
    videoSource(convertRawProp(context, rawProps, "videoSource", sourceProps.videoSource, {})),
    videoContentHint(convertRawProp(context, rawProps, "videoContentHint", sourceProps.videoContentHint, {})),
    maxVideoBitrate(convertRawProp(context, rawProps, "maxVideoBitrate", sourceProps.maxVideoBitrate, {0})),
    videoBitratePreset(convertRawProp(context, rawProps, "videoBitratePreset", sourceProps.videoBitratePreset, {})),
    scaleBehavior(convertRawProp(context, rawProps, "scaleBehavior", sourceProps.scaleBehavior, {})),
    publishSenderStats(convertRawProp(context, rawProps, "publishSenderStats", sourceProps.publishSenderStats, {false})),
    preferredVideoCodecs(convertRawProp(context, rawProps, "preferredVideoCodecs", sourceProps.preferredVideoCodecs, {})) {}
    
#ifdef RN_SERIALIZABLE_STATE
ComponentName OTRNPublisherProps::getDiffPropsImplementationTarget() const {
  return "OTRNPublisher";
}

folly::dynamic OTRNPublisherProps::getDiffProps(
    const Props* prevProps) const {
  static const auto defaultProps = OTRNPublisherProps();
  const OTRNPublisherProps* oldProps = prevProps == nullptr
      ? &defaultProps
      : static_cast<const OTRNPublisherProps*>(prevProps);
  if (this == oldProps) {
    return folly::dynamic::object();
  }
  folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
  
  if (sessionId != oldProps->sessionId) {
    result["sessionId"] = sessionId;
  }
    
  if (publisherId != oldProps->publisherId) {
    result["publisherId"] = publisherId;
  }
    
  if (publishAudio != oldProps->publishAudio) {
    result["publishAudio"] = publishAudio;
  }
    
  if (publishVideo != oldProps->publishVideo) {
    result["publishVideo"] = publishVideo;
  }
    
  if (publishCaptions != oldProps->publishCaptions) {
    result["publishCaptions"] = publishCaptions;
  }
    
  if (audioBitrate != oldProps->audioBitrate) {
    result["audioBitrate"] = audioBitrate;
  }
    
  if (publisherAudioFallback != oldProps->publisherAudioFallback) {
    result["publisherAudioFallback"] = publisherAudioFallback;
  }
    
  if (subscriberAudioFallback != oldProps->subscriberAudioFallback) {
    result["subscriberAudioFallback"] = subscriberAudioFallback;
  }
    
  if (audioTrack != oldProps->audioTrack) {
    result["audioTrack"] = audioTrack;
  }
    
  if (cameraPosition != oldProps->cameraPosition) {
    result["cameraPosition"] = cameraPosition;
  }
    
  if (cameraTorch != oldProps->cameraTorch) {
    result["cameraTorch"] = cameraTorch;
  }
    
  if ((cameraZoomFactor != oldProps->cameraZoomFactor) && !(std::isnan(cameraZoomFactor) && std::isnan(oldProps->cameraZoomFactor))) {
    result["cameraZoomFactor"] = cameraZoomFactor;
  }
    
  if (enableDtx != oldProps->enableDtx) {
    result["enableDtx"] = enableDtx;
  }
    
  if (frameRate != oldProps->frameRate) {
    result["frameRate"] = frameRate;
  }
    
  if (name != oldProps->name) {
    result["name"] = name;
  }
    
  if (resolution != oldProps->resolution) {
    result["resolution"] = resolution;
  }
    
  if (scalableScreenshare != oldProps->scalableScreenshare) {
    result["scalableScreenshare"] = scalableScreenshare;
  }
    
  if (allowAudioCaptureWhileMuted != oldProps->allowAudioCaptureWhileMuted) {
    result["allowAudioCaptureWhileMuted"] = allowAudioCaptureWhileMuted;
  }
    
  if (audioFallbackEnabled != oldProps->audioFallbackEnabled) {
    result["audioFallbackEnabled"] = audioFallbackEnabled;
  }
    
  if (videoTrack != oldProps->videoTrack) {
    result["videoTrack"] = videoTrack;
  }
    
  if (videoSource != oldProps->videoSource) {
    result["videoSource"] = videoSource;
  }
    
  if (videoContentHint != oldProps->videoContentHint) {
    result["videoContentHint"] = videoContentHint;
  }
    
  if (maxVideoBitrate != oldProps->maxVideoBitrate) {
    result["maxVideoBitrate"] = maxVideoBitrate;
  }
    
  if (videoBitratePreset != oldProps->videoBitratePreset) {
    result["videoBitratePreset"] = videoBitratePreset;
  }
    
  if (scaleBehavior != oldProps->scaleBehavior) {
    result["scaleBehavior"] = scaleBehavior;
  }
    
  if (publishSenderStats != oldProps->publishSenderStats) {
    result["publishSenderStats"] = publishSenderStats;
  }
    
  if (preferredVideoCodecs != oldProps->preferredVideoCodecs) {
    result["preferredVideoCodecs"] = preferredVideoCodecs;
  }
  return result;
}
#endif
OTRNSubscriberProps::OTRNSubscriberProps(
    const PropsParserContext &context,
    const OTRNSubscriberProps &sourceProps,
    const RawProps &rawProps): ViewProps(context, sourceProps, rawProps),

    sessionId(convertRawProp(context, rawProps, "sessionId", sourceProps.sessionId, {})),
    streamId(convertRawProp(context, rawProps, "streamId", sourceProps.streamId, {})),
    subscribeToAudio(convertRawProp(context, rawProps, "subscribeToAudio", sourceProps.subscribeToAudio, {false})),
    subscribeToVideo(convertRawProp(context, rawProps, "subscribeToVideo", sourceProps.subscribeToVideo, {false})),
    scaleBehavior(convertRawProp(context, rawProps, "scaleBehavior", sourceProps.scaleBehavior, {})),
    subscribeToCaptions(convertRawProp(context, rawProps, "subscribeToCaptions", sourceProps.subscribeToCaptions, {false})),
    audioVolume(convertRawProp(context, rawProps, "audioVolume", sourceProps.audioVolume, {0.0})),
    preferredFrameRate(convertRawProp(context, rawProps, "preferredFrameRate", sourceProps.preferredFrameRate, {0})),
    preferredResolution(convertRawProp(context, rawProps, "preferredResolution", sourceProps.preferredResolution, {})) {}
    
#ifdef RN_SERIALIZABLE_STATE
ComponentName OTRNSubscriberProps::getDiffPropsImplementationTarget() const {
  return "OTRNSubscriber";
}

folly::dynamic OTRNSubscriberProps::getDiffProps(
    const Props* prevProps) const {
  static const auto defaultProps = OTRNSubscriberProps();
  const OTRNSubscriberProps* oldProps = prevProps == nullptr
      ? &defaultProps
      : static_cast<const OTRNSubscriberProps*>(prevProps);
  if (this == oldProps) {
    return folly::dynamic::object();
  }
  folly::dynamic result = HostPlatformViewProps::getDiffProps(prevProps);
  
  if (sessionId != oldProps->sessionId) {
    result["sessionId"] = sessionId;
  }
    
  if (streamId != oldProps->streamId) {
    result["streamId"] = streamId;
  }
    
  if (subscribeToAudio != oldProps->subscribeToAudio) {
    result["subscribeToAudio"] = subscribeToAudio;
  }
    
  if (subscribeToVideo != oldProps->subscribeToVideo) {
    result["subscribeToVideo"] = subscribeToVideo;
  }
    
  if (scaleBehavior != oldProps->scaleBehavior) {
    result["scaleBehavior"] = scaleBehavior;
  }
    
  if (subscribeToCaptions != oldProps->subscribeToCaptions) {
    result["subscribeToCaptions"] = subscribeToCaptions;
  }
    
  if ((audioVolume != oldProps->audioVolume) && !(std::isnan(audioVolume) && std::isnan(oldProps->audioVolume))) {
    result["audioVolume"] = audioVolume;
  }
    
  if (preferredFrameRate != oldProps->preferredFrameRate) {
    result["preferredFrameRate"] = preferredFrameRate;
  }
    
  if (preferredResolution != oldProps->preferredResolution) {
    result["preferredResolution"] = preferredResolution;
  }
  return result;
}
#endif

} // namespace facebook::react
