// DO NOT MODIFY
// THIS FILE IS AUTOGENERATED

#import "RCTMGLStyle.h"
#import "RCTMGLUtils.h"

@implementation RCTMGLStyle

- (id)initWithMGLStyle:(MGLStyle*)mglStyle
{
    if (self = [super init]) {
        _style = mglStyle;
    }
    return self;
}


- (void)fillLayer:(MGLFillStyleLayer *)layer withReactStyle:(NSDictionary *)reactStyle
{
  if (![self _hasReactStyle:reactStyle]) {
    // TODO throw exception
    return;
  }

  NSArray<NSString*> *styleProps = [reactStyle allKeys];
  for (NSString *prop in styleProps) {
    if ([prop isEqualToString:@"__MAPBOX_STYLESHEET__"]) {
      continue;
    }

    RCTMGLStyleValue *styleValue = [RCTMGLStyleValue make:reactStyle[prop]];

    if ([prop isEqualToString:@"visibility"]) {
      [self setFillStyleLayerVisibility:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"fillAntialias"]) {
      [self setFillAntialias:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"fillOpacity"]) {
      [self setFillOpacity:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"fillOpacityTransition"]) {
      [self setFillOpacityTransition:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"fillColor"]) {
      [self setFillColor:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"fillColorTransition"]) {
      [self setFillColorTransition:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"fillOutlineColor"]) {
      [self setFillOutlineColor:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"fillOutlineColorTransition"]) {
      [self setFillOutlineColorTransition:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"fillTranslate"]) {
      [self setFillTranslate:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"fillTranslateTransition"]) {
      [self setFillTranslateTransition:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"fillTranslateAnchor"]) {
      [self setFillTranslateAnchor:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"fillPattern"]) {
      if (![styleValue.payload[@"shouldAddImage"] boolValue]) {
        [self setFillPattern:layer withReactStyleValue:styleValue];
      } else {
        [RCTMGLUtils fetchImage:_bridge url:styleValue.payload[@"value"] callback:^(NSError *error, UIImage *image) {
          if (image != nil) {
            dispatch_async(dispatch_get_main_queue(), ^{
              [_style setImage:image forName:styleValue.payload[@"value"]];
              [self setFillPattern:layer withReactStyleValue:styleValue];
            });
          }
        }];
      }
    } else if ([prop isEqualToString:@"fillPatternTransition"]) {
      [self setFillPatternTransition:layer withReactStyleValue:styleValue];
    } else {
      // TODO throw exception
    }
  }
}

- (void)lineLayer:(MGLLineStyleLayer *)layer withReactStyle:(NSDictionary *)reactStyle
{
  if (![self _hasReactStyle:reactStyle]) {
    // TODO throw exception
    return;
  }

  NSArray<NSString*> *styleProps = [reactStyle allKeys];
  for (NSString *prop in styleProps) {
    if ([prop isEqualToString:@"__MAPBOX_STYLESHEET__"]) {
      continue;
    }

    RCTMGLStyleValue *styleValue = [RCTMGLStyleValue make:reactStyle[prop]];

    if ([prop isEqualToString:@"lineCap"]) {
      [self setLineCap:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"lineJoin"]) {
      [self setLineJoin:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"lineMiterLimit"]) {
      [self setLineMiterLimit:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"lineRoundLimit"]) {
      [self setLineRoundLimit:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"visibility"]) {
      [self setLineStyleLayerVisibility:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"lineOpacity"]) {
      [self setLineOpacity:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"lineOpacityTransition"]) {
      [self setLineOpacityTransition:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"lineColor"]) {
      [self setLineColor:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"lineColorTransition"]) {
      [self setLineColorTransition:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"lineTranslate"]) {
      [self setLineTranslate:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"lineTranslateTransition"]) {
      [self setLineTranslateTransition:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"lineTranslateAnchor"]) {
      [self setLineTranslateAnchor:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"lineWidth"]) {
      [self setLineWidth:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"lineWidthTransition"]) {
      [self setLineWidthTransition:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"lineGapWidth"]) {
      [self setLineGapWidth:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"lineGapWidthTransition"]) {
      [self setLineGapWidthTransition:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"lineOffset"]) {
      [self setLineOffset:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"lineOffsetTransition"]) {
      [self setLineOffsetTransition:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"lineBlur"]) {
      [self setLineBlur:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"lineBlurTransition"]) {
      [self setLineBlurTransition:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"lineDasharray"]) {
      [self setLineDasharray:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"lineDasharrayTransition"]) {
      [self setLineDasharrayTransition:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"linePattern"]) {
      if (![styleValue.payload[@"shouldAddImage"] boolValue]) {
        [self setLinePattern:layer withReactStyleValue:styleValue];
      } else {
        [RCTMGLUtils fetchImage:_bridge url:styleValue.payload[@"value"] callback:^(NSError *error, UIImage *image) {
          if (image != nil) {
            dispatch_async(dispatch_get_main_queue(), ^{
              [_style setImage:image forName:styleValue.payload[@"value"]];
              [self setLinePattern:layer withReactStyleValue:styleValue];
            });
          }
        }];
      }
    } else if ([prop isEqualToString:@"linePatternTransition"]) {
      [self setLinePatternTransition:layer withReactStyleValue:styleValue];
    } else {
      // TODO throw exception
    }
  }
}

- (void)symbolLayer:(MGLSymbolStyleLayer *)layer withReactStyle:(NSDictionary *)reactStyle
{
  if (![self _hasReactStyle:reactStyle]) {
    // TODO throw exception
    return;
  }

  NSArray<NSString*> *styleProps = [reactStyle allKeys];
  for (NSString *prop in styleProps) {
    if ([prop isEqualToString:@"__MAPBOX_STYLESHEET__"]) {
      continue;
    }

    RCTMGLStyleValue *styleValue = [RCTMGLStyleValue make:reactStyle[prop]];

    if ([prop isEqualToString:@"symbolPlacement"]) {
      [self setSymbolPlacement:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"symbolSpacing"]) {
      [self setSymbolSpacing:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"symbolAvoidEdges"]) {
      [self setSymbolAvoidEdges:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"iconAllowOverlap"]) {
      [self setIconAllowOverlap:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"iconIgnorePlacement"]) {
      [self setIconIgnorePlacement:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"iconOptional"]) {
      [self setIconOptional:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"iconRotationAlignment"]) {
      [self setIconRotationAlignment:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"iconSize"]) {
      [self setIconSize:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"iconTextFit"]) {
      [self setIconTextFit:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"iconTextFitPadding"]) {
      [self setIconTextFitPadding:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"iconImage"]) {
      if (![styleValue.payload[@"shouldAddImage"] boolValue]) {
        [self setIconImage:layer withReactStyleValue:styleValue];
      } else {
        [RCTMGLUtils fetchImage:_bridge url:styleValue.payload[@"value"] callback:^(NSError *error, UIImage *image) {
          if (image != nil) {
            dispatch_async(dispatch_get_main_queue(), ^{
              [_style setImage:image forName:styleValue.payload[@"value"]];
              [self setIconImage:layer withReactStyleValue:styleValue];
            });
          }
        }];
      }
    } else if ([prop isEqualToString:@"iconRotate"]) {
      [self setIconRotate:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"iconPadding"]) {
      [self setIconPadding:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"iconKeepUpright"]) {
      [self setIconKeepUpright:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"iconOffset"]) {
      [self setIconOffset:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"iconAnchor"]) {
      [self setIconAnchor:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"iconPitchAlignment"]) {
      [self setIconPitchAlignment:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"textPitchAlignment"]) {
      [self setTextPitchAlignment:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"textRotationAlignment"]) {
      [self setTextRotationAlignment:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"textField"]) {
      [self setTextField:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"textFont"]) {
      [self setTextFont:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"textSize"]) {
      [self setTextSize:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"textMaxWidth"]) {
      [self setTextMaxWidth:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"textLineHeight"]) {
      [self setTextLineHeight:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"textLetterSpacing"]) {
      [self setTextLetterSpacing:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"textJustify"]) {
      [self setTextJustify:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"textAnchor"]) {
      [self setTextAnchor:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"textMaxAngle"]) {
      [self setTextMaxAngle:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"textRotate"]) {
      [self setTextRotate:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"textPadding"]) {
      [self setTextPadding:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"textKeepUpright"]) {
      [self setTextKeepUpright:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"textTransform"]) {
      [self setTextTransform:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"textOffset"]) {
      [self setTextOffset:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"textAllowOverlap"]) {
      [self setTextAllowOverlap:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"textIgnorePlacement"]) {
      [self setTextIgnorePlacement:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"textOptional"]) {
      [self setTextOptional:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"visibility"]) {
      [self setSymbolStyleLayerVisibility:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"iconOpacity"]) {
      [self setIconOpacity:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"iconOpacityTransition"]) {
      [self setIconOpacityTransition:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"iconColor"]) {
      [self setIconColor:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"iconColorTransition"]) {
      [self setIconColorTransition:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"iconHaloColor"]) {
      [self setIconHaloColor:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"iconHaloColorTransition"]) {
      [self setIconHaloColorTransition:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"iconHaloWidth"]) {
      [self setIconHaloWidth:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"iconHaloWidthTransition"]) {
      [self setIconHaloWidthTransition:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"iconHaloBlur"]) {
      [self setIconHaloBlur:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"iconHaloBlurTransition"]) {
      [self setIconHaloBlurTransition:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"iconTranslate"]) {
      [self setIconTranslate:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"iconTranslateTransition"]) {
      [self setIconTranslateTransition:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"iconTranslateAnchor"]) {
      [self setIconTranslateAnchor:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"textOpacity"]) {
      [self setTextOpacity:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"textOpacityTransition"]) {
      [self setTextOpacityTransition:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"textColor"]) {
      [self setTextColor:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"textColorTransition"]) {
      [self setTextColorTransition:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"textHaloColor"]) {
      [self setTextHaloColor:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"textHaloColorTransition"]) {
      [self setTextHaloColorTransition:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"textHaloWidth"]) {
      [self setTextHaloWidth:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"textHaloWidthTransition"]) {
      [self setTextHaloWidthTransition:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"textHaloBlur"]) {
      [self setTextHaloBlur:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"textHaloBlurTransition"]) {
      [self setTextHaloBlurTransition:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"textTranslate"]) {
      [self setTextTranslate:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"textTranslateTransition"]) {
      [self setTextTranslateTransition:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"textTranslateAnchor"]) {
      [self setTextTranslateAnchor:layer withReactStyleValue:styleValue];
    } else {
      // TODO throw exception
    }
  }
}

- (void)circleLayer:(MGLCircleStyleLayer *)layer withReactStyle:(NSDictionary *)reactStyle
{
  if (![self _hasReactStyle:reactStyle]) {
    // TODO throw exception
    return;
  }

  NSArray<NSString*> *styleProps = [reactStyle allKeys];
  for (NSString *prop in styleProps) {
    if ([prop isEqualToString:@"__MAPBOX_STYLESHEET__"]) {
      continue;
    }

    RCTMGLStyleValue *styleValue = [RCTMGLStyleValue make:reactStyle[prop]];

    if ([prop isEqualToString:@"visibility"]) {
      [self setCircleStyleLayerVisibility:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"circleRadius"]) {
      [self setCircleRadius:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"circleRadiusTransition"]) {
      [self setCircleRadiusTransition:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"circleColor"]) {
      [self setCircleColor:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"circleColorTransition"]) {
      [self setCircleColorTransition:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"circleBlur"]) {
      [self setCircleBlur:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"circleBlurTransition"]) {
      [self setCircleBlurTransition:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"circleOpacity"]) {
      [self setCircleOpacity:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"circleOpacityTransition"]) {
      [self setCircleOpacityTransition:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"circleTranslate"]) {
      [self setCircleTranslate:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"circleTranslateTransition"]) {
      [self setCircleTranslateTransition:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"circleTranslateAnchor"]) {
      [self setCircleTranslateAnchor:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"circlePitchScale"]) {
      [self setCirclePitchScale:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"circlePitchAlignment"]) {
      [self setCirclePitchAlignment:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"circleStrokeWidth"]) {
      [self setCircleStrokeWidth:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"circleStrokeWidthTransition"]) {
      [self setCircleStrokeWidthTransition:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"circleStrokeColor"]) {
      [self setCircleStrokeColor:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"circleStrokeColorTransition"]) {
      [self setCircleStrokeColorTransition:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"circleStrokeOpacity"]) {
      [self setCircleStrokeOpacity:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"circleStrokeOpacityTransition"]) {
      [self setCircleStrokeOpacityTransition:layer withReactStyleValue:styleValue];
    } else {
      // TODO throw exception
    }
  }
}

- (void)fillExtrusionLayer:(MGLFillExtrusionStyleLayer *)layer withReactStyle:(NSDictionary *)reactStyle
{
  if (![self _hasReactStyle:reactStyle]) {
    // TODO throw exception
    return;
  }

  NSArray<NSString*> *styleProps = [reactStyle allKeys];
  for (NSString *prop in styleProps) {
    if ([prop isEqualToString:@"__MAPBOX_STYLESHEET__"]) {
      continue;
    }

    RCTMGLStyleValue *styleValue = [RCTMGLStyleValue make:reactStyle[prop]];

    if ([prop isEqualToString:@"visibility"]) {
      [self setFillExtrusionStyleLayerVisibility:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"fillExtrusionOpacity"]) {
      [self setFillExtrusionOpacity:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"fillExtrusionOpacityTransition"]) {
      [self setFillExtrusionOpacityTransition:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"fillExtrusionColor"]) {
      [self setFillExtrusionColor:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"fillExtrusionColorTransition"]) {
      [self setFillExtrusionColorTransition:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"fillExtrusionTranslate"]) {
      [self setFillExtrusionTranslate:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"fillExtrusionTranslateTransition"]) {
      [self setFillExtrusionTranslateTransition:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"fillExtrusionTranslateAnchor"]) {
      [self setFillExtrusionTranslateAnchor:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"fillExtrusionPattern"]) {
      if (![styleValue.payload[@"shouldAddImage"] boolValue]) {
        [self setFillExtrusionPattern:layer withReactStyleValue:styleValue];
      } else {
        [RCTMGLUtils fetchImage:_bridge url:styleValue.payload[@"value"] callback:^(NSError *error, UIImage *image) {
          if (image != nil) {
            dispatch_async(dispatch_get_main_queue(), ^{
              [_style setImage:image forName:styleValue.payload[@"value"]];
              [self setFillExtrusionPattern:layer withReactStyleValue:styleValue];
            });
          }
        }];
      }
    } else if ([prop isEqualToString:@"fillExtrusionPatternTransition"]) {
      [self setFillExtrusionPatternTransition:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"fillExtrusionHeight"]) {
      [self setFillExtrusionHeight:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"fillExtrusionHeightTransition"]) {
      [self setFillExtrusionHeightTransition:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"fillExtrusionBase"]) {
      [self setFillExtrusionBase:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"fillExtrusionBaseTransition"]) {
      [self setFillExtrusionBaseTransition:layer withReactStyleValue:styleValue];
    } else {
      // TODO throw exception
    }
  }
}

- (void)rasterLayer:(MGLRasterStyleLayer *)layer withReactStyle:(NSDictionary *)reactStyle
{
  if (![self _hasReactStyle:reactStyle]) {
    // TODO throw exception
    return;
  }

  NSArray<NSString*> *styleProps = [reactStyle allKeys];
  for (NSString *prop in styleProps) {
    if ([prop isEqualToString:@"__MAPBOX_STYLESHEET__"]) {
      continue;
    }

    RCTMGLStyleValue *styleValue = [RCTMGLStyleValue make:reactStyle[prop]];

    if ([prop isEqualToString:@"visibility"]) {
      [self setRasterStyleLayerVisibility:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"rasterOpacity"]) {
      [self setRasterOpacity:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"rasterOpacityTransition"]) {
      [self setRasterOpacityTransition:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"rasterHueRotate"]) {
      [self setRasterHueRotate:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"rasterHueRotateTransition"]) {
      [self setRasterHueRotateTransition:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"rasterBrightnessMin"]) {
      [self setRasterBrightnessMin:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"rasterBrightnessMinTransition"]) {
      [self setRasterBrightnessMinTransition:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"rasterBrightnessMax"]) {
      [self setRasterBrightnessMax:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"rasterBrightnessMaxTransition"]) {
      [self setRasterBrightnessMaxTransition:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"rasterSaturation"]) {
      [self setRasterSaturation:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"rasterSaturationTransition"]) {
      [self setRasterSaturationTransition:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"rasterContrast"]) {
      [self setRasterContrast:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"rasterContrastTransition"]) {
      [self setRasterContrastTransition:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"rasterFadeDuration"]) {
      [self setRasterFadeDuration:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"rasterFadeDurationTransition"]) {
      [self setRasterFadeDurationTransition:layer withReactStyleValue:styleValue];
    } else {
      // TODO throw exception
    }
  }
}

- (void)backgroundLayer:(MGLBackgroundStyleLayer *)layer withReactStyle:(NSDictionary *)reactStyle
{
  if (![self _hasReactStyle:reactStyle]) {
    // TODO throw exception
    return;
  }

  NSArray<NSString*> *styleProps = [reactStyle allKeys];
  for (NSString *prop in styleProps) {
    if ([prop isEqualToString:@"__MAPBOX_STYLESHEET__"]) {
      continue;
    }

    RCTMGLStyleValue *styleValue = [RCTMGLStyleValue make:reactStyle[prop]];

    if ([prop isEqualToString:@"visibility"]) {
      [self setBackgroundStyleLayerVisibility:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"backgroundColor"]) {
      [self setBackgroundColor:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"backgroundColorTransition"]) {
      [self setBackgroundColorTransition:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"backgroundPattern"]) {
      if (![styleValue.payload[@"shouldAddImage"] boolValue]) {
        [self setBackgroundPattern:layer withReactStyleValue:styleValue];
      } else {
        [RCTMGLUtils fetchImage:_bridge url:styleValue.payload[@"value"] callback:^(NSError *error, UIImage *image) {
          if (image != nil) {
            dispatch_async(dispatch_get_main_queue(), ^{
              [_style setImage:image forName:styleValue.payload[@"value"]];
              [self setBackgroundPattern:layer withReactStyleValue:styleValue];
            });
          }
        }];
      }
    } else if ([prop isEqualToString:@"backgroundPatternTransition"]) {
      [self setBackgroundPatternTransition:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"backgroundOpacity"]) {
      [self setBackgroundOpacity:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"backgroundOpacityTransition"]) {
      [self setBackgroundOpacityTransition:layer withReactStyleValue:styleValue];
    } else {
      // TODO throw exception
    }
  }
}

- (void)lightLayer:(MGLLight *)layer withReactStyle:(NSDictionary *)reactStyle
{
  if (![self _hasReactStyle:reactStyle]) {
    // TODO throw exception
    return;
  }

  NSArray<NSString*> *styleProps = [reactStyle allKeys];
  for (NSString *prop in styleProps) {
    if ([prop isEqualToString:@"__MAPBOX_STYLESHEET__"]) {
      continue;
    }

    RCTMGLStyleValue *styleValue = [RCTMGLStyleValue make:reactStyle[prop]];

    if ([prop isEqualToString:@"anchor"]) {
      [self setAnchor:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"position"]) {
      [self setPosition:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"positionTransition"]) {
      [self setPositionTransition:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"color"]) {
      [self setColor:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"colorTransition"]) {
      [self setColorTransition:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"intensity"]) {
      [self setIntensity:layer withReactStyleValue:styleValue];
    } else if ([prop isEqualToString:@"intensityTransition"]) {
      [self setIntensityTransition:layer withReactStyleValue:styleValue];
    } else {
      // TODO throw exception
    }
  }
}




- (void)setFillStyleLayerVisibility:(MGLFillStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    layer.visible = [styleValue isVisible];
}

- (void)setFillAntialias:(MGLFillStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.fillAntialiased = styleValue.mglStyleValue;
}

- (void)setFillOpacity:(MGLFillStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera", @"source", @"composite"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.fillOpacity = styleValue.mglStyleValue;
}

- (void)setFillOpacityTransition:(MGLFillStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    layer.fillOpacityTransition = [styleValue getTransition];
}

- (void)setFillColor:(MGLFillStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera", @"source", @"composite"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.fillColor = styleValue.mglStyleValue;
}

- (void)setFillColorTransition:(MGLFillStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    layer.fillColorTransition = [styleValue getTransition];
}

- (void)setFillOutlineColor:(MGLFillStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera", @"source", @"composite"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.fillOutlineColor = styleValue.mglStyleValue;
}

- (void)setFillOutlineColorTransition:(MGLFillStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    layer.fillOutlineColorTransition = [styleValue getTransition];
}

- (void)setFillTranslate:(MGLFillStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.fillTranslation = styleValue.mglStyleValue;
}

- (void)setFillTranslateTransition:(MGLFillStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    layer.fillTranslationTransition = [styleValue getTransition];
}

- (void)setFillTranslateAnchor:(MGLFillStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.fillTranslationAnchor = styleValue.mglStyleValue;
}

- (void)setFillPattern:(MGLFillStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.fillPattern = styleValue.mglStyleValue;
}

- (void)setFillPatternTransition:(MGLFillStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    layer.fillPatternTransition = [styleValue getTransition];
}



- (void)setLineCap:(MGLLineStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.lineCap = styleValue.mglStyleValue;
}

- (void)setLineJoin:(MGLLineStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.lineJoin = styleValue.mglStyleValue;
}

- (void)setLineMiterLimit:(MGLLineStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.lineMiterLimit = styleValue.mglStyleValue;
}

- (void)setLineRoundLimit:(MGLLineStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.lineRoundLimit = styleValue.mglStyleValue;
}

- (void)setLineStyleLayerVisibility:(MGLLineStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    layer.visible = [styleValue isVisible];
}

- (void)setLineOpacity:(MGLLineStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera", @"source", @"composite"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.lineOpacity = styleValue.mglStyleValue;
}

- (void)setLineOpacityTransition:(MGLLineStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    layer.lineOpacityTransition = [styleValue getTransition];
}

- (void)setLineColor:(MGLLineStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera", @"source", @"composite"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.lineColor = styleValue.mglStyleValue;
}

- (void)setLineColorTransition:(MGLLineStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    layer.lineColorTransition = [styleValue getTransition];
}

- (void)setLineTranslate:(MGLLineStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.lineTranslation = styleValue.mglStyleValue;
}

- (void)setLineTranslateTransition:(MGLLineStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    layer.lineTranslationTransition = [styleValue getTransition];
}

- (void)setLineTranslateAnchor:(MGLLineStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.lineTranslationAnchor = styleValue.mglStyleValue;
}

- (void)setLineWidth:(MGLLineStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.lineWidth = styleValue.mglStyleValue;
}

- (void)setLineWidthTransition:(MGLLineStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    layer.lineWidthTransition = [styleValue getTransition];
}

- (void)setLineGapWidth:(MGLLineStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera", @"source", @"composite"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.lineGapWidth = styleValue.mglStyleValue;
}

- (void)setLineGapWidthTransition:(MGLLineStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    layer.lineGapWidthTransition = [styleValue getTransition];
}

- (void)setLineOffset:(MGLLineStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera", @"source", @"composite"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.lineOffset = styleValue.mglStyleValue;
}

- (void)setLineOffsetTransition:(MGLLineStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    layer.lineOffsetTransition = [styleValue getTransition];
}

- (void)setLineBlur:(MGLLineStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera", @"source", @"composite"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.lineBlur = styleValue.mglStyleValue;
}

- (void)setLineBlurTransition:(MGLLineStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    layer.lineBlurTransition = [styleValue getTransition];
}

- (void)setLineDasharray:(MGLLineStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.lineDashPattern = styleValue.mglStyleValue;
}

- (void)setLineDasharrayTransition:(MGLLineStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    layer.lineDashPatternTransition = [styleValue getTransition];
}

- (void)setLinePattern:(MGLLineStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.linePattern = styleValue.mglStyleValue;
}

- (void)setLinePatternTransition:(MGLLineStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    layer.linePatternTransition = [styleValue getTransition];
}



- (void)setSymbolPlacement:(MGLSymbolStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.symbolPlacement = styleValue.mglStyleValue;
}

- (void)setSymbolSpacing:(MGLSymbolStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.symbolSpacing = styleValue.mglStyleValue;
}

- (void)setSymbolAvoidEdges:(MGLSymbolStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.symbolAvoidsEdges = styleValue.mglStyleValue;
}

- (void)setIconAllowOverlap:(MGLSymbolStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.iconAllowsOverlap = styleValue.mglStyleValue;
}

- (void)setIconIgnorePlacement:(MGLSymbolStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.iconIgnoresPlacement = styleValue.mglStyleValue;
}

- (void)setIconOptional:(MGLSymbolStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.iconOptional = styleValue.mglStyleValue;
}

- (void)setIconRotationAlignment:(MGLSymbolStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.iconRotationAlignment = styleValue.mglStyleValue;
}

- (void)setIconSize:(MGLSymbolStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera", @"source", @"composite"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.iconScale = styleValue.mglStyleValue;
}

- (void)setIconTextFit:(MGLSymbolStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.iconTextFit = styleValue.mglStyleValue;
}

- (void)setIconTextFitPadding:(MGLSymbolStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.iconTextFitPadding = styleValue.mglStyleValue;
}

- (void)setIconImage:(MGLSymbolStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera", @"source", @"composite"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.iconImageName = styleValue.mglStyleValue;
}

- (void)setIconRotate:(MGLSymbolStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera", @"source", @"composite"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.iconRotation = styleValue.mglStyleValue;
}

- (void)setIconPadding:(MGLSymbolStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.iconPadding = styleValue.mglStyleValue;
}

- (void)setIconKeepUpright:(MGLSymbolStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.keepsIconUpright = styleValue.mglStyleValue;
}

- (void)setIconOffset:(MGLSymbolStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera", @"source", @"composite"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.iconOffset = styleValue.mglStyleValue;
}

- (void)setIconAnchor:(MGLSymbolStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera", @"source", @"composite"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.iconAnchor = styleValue.mglStyleValue;
}

- (void)setIconPitchAlignment:(MGLSymbolStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.iconPitchAlignment = styleValue.mglStyleValue;
}

- (void)setTextPitchAlignment:(MGLSymbolStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.textPitchAlignment = styleValue.mglStyleValue;
}

- (void)setTextRotationAlignment:(MGLSymbolStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.textRotationAlignment = styleValue.mglStyleValue;
}

- (void)setTextField:(MGLSymbolStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera", @"source", @"composite"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.text = styleValue.mglStyleValue;
}

- (void)setTextFont:(MGLSymbolStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.textFontNames = styleValue.mglStyleValue;
}

- (void)setTextSize:(MGLSymbolStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera", @"source", @"composite"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.textFontSize = styleValue.mglStyleValue;
}

- (void)setTextMaxWidth:(MGLSymbolStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.maximumTextWidth = styleValue.mglStyleValue;
}

- (void)setTextLineHeight:(MGLSymbolStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.textLineHeight = styleValue.mglStyleValue;
}

- (void)setTextLetterSpacing:(MGLSymbolStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.textLetterSpacing = styleValue.mglStyleValue;
}

- (void)setTextJustify:(MGLSymbolStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.textJustification = styleValue.mglStyleValue;
}

- (void)setTextAnchor:(MGLSymbolStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.textAnchor = styleValue.mglStyleValue;
}

- (void)setTextMaxAngle:(MGLSymbolStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.maximumTextAngle = styleValue.mglStyleValue;
}

- (void)setTextRotate:(MGLSymbolStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera", @"source", @"composite"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.textRotation = styleValue.mglStyleValue;
}

- (void)setTextPadding:(MGLSymbolStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.textPadding = styleValue.mglStyleValue;
}

- (void)setTextKeepUpright:(MGLSymbolStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.keepsTextUpright = styleValue.mglStyleValue;
}

- (void)setTextTransform:(MGLSymbolStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera", @"source", @"composite"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.textTransform = styleValue.mglStyleValue;
}

- (void)setTextOffset:(MGLSymbolStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera", @"source", @"composite"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.textOffset = styleValue.mglStyleValue;
}

- (void)setTextAllowOverlap:(MGLSymbolStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.textAllowsOverlap = styleValue.mglStyleValue;
}

- (void)setTextIgnorePlacement:(MGLSymbolStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.textIgnoresPlacement = styleValue.mglStyleValue;
}

- (void)setTextOptional:(MGLSymbolStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.textOptional = styleValue.mglStyleValue;
}

- (void)setSymbolStyleLayerVisibility:(MGLSymbolStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    layer.visible = [styleValue isVisible];
}

- (void)setIconOpacity:(MGLSymbolStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera", @"source", @"composite"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.iconOpacity = styleValue.mglStyleValue;
}

- (void)setIconOpacityTransition:(MGLSymbolStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    layer.iconOpacityTransition = [styleValue getTransition];
}

- (void)setIconColor:(MGLSymbolStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera", @"source", @"composite"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.iconColor = styleValue.mglStyleValue;
}

- (void)setIconColorTransition:(MGLSymbolStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    layer.iconColorTransition = [styleValue getTransition];
}

- (void)setIconHaloColor:(MGLSymbolStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera", @"source", @"composite"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.iconHaloColor = styleValue.mglStyleValue;
}

- (void)setIconHaloColorTransition:(MGLSymbolStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    layer.iconHaloColorTransition = [styleValue getTransition];
}

- (void)setIconHaloWidth:(MGLSymbolStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera", @"source", @"composite"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.iconHaloWidth = styleValue.mglStyleValue;
}

- (void)setIconHaloWidthTransition:(MGLSymbolStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    layer.iconHaloWidthTransition = [styleValue getTransition];
}

- (void)setIconHaloBlur:(MGLSymbolStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera", @"source", @"composite"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.iconHaloBlur = styleValue.mglStyleValue;
}

- (void)setIconHaloBlurTransition:(MGLSymbolStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    layer.iconHaloBlurTransition = [styleValue getTransition];
}

- (void)setIconTranslate:(MGLSymbolStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.iconTranslation = styleValue.mglStyleValue;
}

- (void)setIconTranslateTransition:(MGLSymbolStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    layer.iconTranslationTransition = [styleValue getTransition];
}

- (void)setIconTranslateAnchor:(MGLSymbolStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.iconTranslationAnchor = styleValue.mglStyleValue;
}

- (void)setTextOpacity:(MGLSymbolStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera", @"source", @"composite"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.textOpacity = styleValue.mglStyleValue;
}

- (void)setTextOpacityTransition:(MGLSymbolStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    layer.textOpacityTransition = [styleValue getTransition];
}

- (void)setTextColor:(MGLSymbolStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera", @"source", @"composite"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.textColor = styleValue.mglStyleValue;
}

- (void)setTextColorTransition:(MGLSymbolStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    layer.textColorTransition = [styleValue getTransition];
}

- (void)setTextHaloColor:(MGLSymbolStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera", @"source", @"composite"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.textHaloColor = styleValue.mglStyleValue;
}

- (void)setTextHaloColorTransition:(MGLSymbolStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    layer.textHaloColorTransition = [styleValue getTransition];
}

- (void)setTextHaloWidth:(MGLSymbolStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera", @"source", @"composite"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.textHaloWidth = styleValue.mglStyleValue;
}

- (void)setTextHaloWidthTransition:(MGLSymbolStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    layer.textHaloWidthTransition = [styleValue getTransition];
}

- (void)setTextHaloBlur:(MGLSymbolStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera", @"source", @"composite"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.textHaloBlur = styleValue.mglStyleValue;
}

- (void)setTextHaloBlurTransition:(MGLSymbolStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    layer.textHaloBlurTransition = [styleValue getTransition];
}

- (void)setTextTranslate:(MGLSymbolStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.textTranslation = styleValue.mglStyleValue;
}

- (void)setTextTranslateTransition:(MGLSymbolStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    layer.textTranslationTransition = [styleValue getTransition];
}

- (void)setTextTranslateAnchor:(MGLSymbolStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.textTranslationAnchor = styleValue.mglStyleValue;
}



- (void)setCircleStyleLayerVisibility:(MGLCircleStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    layer.visible = [styleValue isVisible];
}

- (void)setCircleRadius:(MGLCircleStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera", @"source", @"composite"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.circleRadius = styleValue.mglStyleValue;
}

- (void)setCircleRadiusTransition:(MGLCircleStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    layer.circleRadiusTransition = [styleValue getTransition];
}

- (void)setCircleColor:(MGLCircleStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera", @"source", @"composite"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.circleColor = styleValue.mglStyleValue;
}

- (void)setCircleColorTransition:(MGLCircleStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    layer.circleColorTransition = [styleValue getTransition];
}

- (void)setCircleBlur:(MGLCircleStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera", @"source", @"composite"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.circleBlur = styleValue.mglStyleValue;
}

- (void)setCircleBlurTransition:(MGLCircleStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    layer.circleBlurTransition = [styleValue getTransition];
}

- (void)setCircleOpacity:(MGLCircleStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera", @"source", @"composite"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.circleOpacity = styleValue.mglStyleValue;
}

- (void)setCircleOpacityTransition:(MGLCircleStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    layer.circleOpacityTransition = [styleValue getTransition];
}

- (void)setCircleTranslate:(MGLCircleStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.circleTranslation = styleValue.mglStyleValue;
}

- (void)setCircleTranslateTransition:(MGLCircleStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    layer.circleTranslationTransition = [styleValue getTransition];
}

- (void)setCircleTranslateAnchor:(MGLCircleStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.circleTranslationAnchor = styleValue.mglStyleValue;
}

- (void)setCirclePitchScale:(MGLCircleStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.circleScaleAlignment = styleValue.mglStyleValue;
}

- (void)setCirclePitchAlignment:(MGLCircleStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.circlePitchAlignment = styleValue.mglStyleValue;
}

- (void)setCircleStrokeWidth:(MGLCircleStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera", @"source", @"composite"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.circleStrokeWidth = styleValue.mglStyleValue;
}

- (void)setCircleStrokeWidthTransition:(MGLCircleStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    layer.circleStrokeWidthTransition = [styleValue getTransition];
}

- (void)setCircleStrokeColor:(MGLCircleStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera", @"source", @"composite"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.circleStrokeColor = styleValue.mglStyleValue;
}

- (void)setCircleStrokeColorTransition:(MGLCircleStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    layer.circleStrokeColorTransition = [styleValue getTransition];
}

- (void)setCircleStrokeOpacity:(MGLCircleStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera", @"source", @"composite"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.circleStrokeOpacity = styleValue.mglStyleValue;
}

- (void)setCircleStrokeOpacityTransition:(MGLCircleStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    layer.circleStrokeOpacityTransition = [styleValue getTransition];
}



- (void)setFillExtrusionStyleLayerVisibility:(MGLFillExtrusionStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    layer.visible = [styleValue isVisible];
}

- (void)setFillExtrusionOpacity:(MGLFillExtrusionStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.fillExtrusionOpacity = styleValue.mglStyleValue;
}

- (void)setFillExtrusionOpacityTransition:(MGLFillExtrusionStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    layer.fillExtrusionOpacityTransition = [styleValue getTransition];
}

- (void)setFillExtrusionColor:(MGLFillExtrusionStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera", @"source", @"composite"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.fillExtrusionColor = styleValue.mglStyleValue;
}

- (void)setFillExtrusionColorTransition:(MGLFillExtrusionStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    layer.fillExtrusionColorTransition = [styleValue getTransition];
}

- (void)setFillExtrusionTranslate:(MGLFillExtrusionStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.fillExtrusionTranslation = styleValue.mglStyleValue;
}

- (void)setFillExtrusionTranslateTransition:(MGLFillExtrusionStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    layer.fillExtrusionTranslationTransition = [styleValue getTransition];
}

- (void)setFillExtrusionTranslateAnchor:(MGLFillExtrusionStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.fillExtrusionTranslationAnchor = styleValue.mglStyleValue;
}

- (void)setFillExtrusionPattern:(MGLFillExtrusionStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.fillExtrusionPattern = styleValue.mglStyleValue;
}

- (void)setFillExtrusionPatternTransition:(MGLFillExtrusionStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    layer.fillExtrusionPatternTransition = [styleValue getTransition];
}

- (void)setFillExtrusionHeight:(MGLFillExtrusionStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera", @"source", @"composite"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.fillExtrusionHeight = styleValue.mglStyleValue;
}

- (void)setFillExtrusionHeightTransition:(MGLFillExtrusionStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    layer.fillExtrusionHeightTransition = [styleValue getTransition];
}

- (void)setFillExtrusionBase:(MGLFillExtrusionStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera", @"source", @"composite"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.fillExtrusionBase = styleValue.mglStyleValue;
}

- (void)setFillExtrusionBaseTransition:(MGLFillExtrusionStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    layer.fillExtrusionBaseTransition = [styleValue getTransition];
}



- (void)setRasterStyleLayerVisibility:(MGLRasterStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    layer.visible = [styleValue isVisible];
}

- (void)setRasterOpacity:(MGLRasterStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.rasterOpacity = styleValue.mglStyleValue;
}

- (void)setRasterOpacityTransition:(MGLRasterStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    layer.rasterOpacityTransition = [styleValue getTransition];
}

- (void)setRasterHueRotate:(MGLRasterStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.rasterHueRotation = styleValue.mglStyleValue;
}

- (void)setRasterHueRotateTransition:(MGLRasterStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    layer.rasterHueRotationTransition = [styleValue getTransition];
}

- (void)setRasterBrightnessMin:(MGLRasterStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.minimumRasterBrightness = styleValue.mglStyleValue;
}

- (void)setRasterBrightnessMinTransition:(MGLRasterStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    layer.minimumRasterBrightnessTransition = [styleValue getTransition];
}

- (void)setRasterBrightnessMax:(MGLRasterStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.maximumRasterBrightness = styleValue.mglStyleValue;
}

- (void)setRasterBrightnessMaxTransition:(MGLRasterStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    layer.maximumRasterBrightnessTransition = [styleValue getTransition];
}

- (void)setRasterSaturation:(MGLRasterStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.rasterSaturation = styleValue.mglStyleValue;
}

- (void)setRasterSaturationTransition:(MGLRasterStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    layer.rasterSaturationTransition = [styleValue getTransition];
}

- (void)setRasterContrast:(MGLRasterStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.rasterContrast = styleValue.mglStyleValue;
}

- (void)setRasterContrastTransition:(MGLRasterStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    layer.rasterContrastTransition = [styleValue getTransition];
}

- (void)setRasterFadeDuration:(MGLRasterStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.rasterFadeDuration = styleValue.mglStyleValue;
}

- (void)setRasterFadeDurationTransition:(MGLRasterStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    layer.rasterFadeDurationTransition = [styleValue getTransition];
}



- (void)setBackgroundStyleLayerVisibility:(MGLBackgroundStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    layer.visible = [styleValue isVisible];
}

- (void)setBackgroundColor:(MGLBackgroundStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.backgroundColor = styleValue.mglStyleValue;
}

- (void)setBackgroundColorTransition:(MGLBackgroundStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    layer.backgroundColorTransition = [styleValue getTransition];
}

- (void)setBackgroundPattern:(MGLBackgroundStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.backgroundPattern = styleValue.mglStyleValue;
}

- (void)setBackgroundPatternTransition:(MGLBackgroundStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    layer.backgroundPatternTransition = [styleValue getTransition];
}

- (void)setBackgroundOpacity:(MGLBackgroundStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    NSArray<NSString*> *allowedFunctionTypes = @[@"camera"];
    if ([styleValue isFunction] && ![styleValue isFunctionTypeSupported:allowedFunctionTypes]) {
        // TODO throw execpetion
        return;
    }
    layer.backgroundOpacity = styleValue.mglStyleValue;
}

- (void)setBackgroundOpacityTransition:(MGLBackgroundStyleLayer *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    layer.backgroundOpacityTransition = [styleValue getTransition];
}



- (void)setAnchor:(MGLLight *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    layer.anchor = styleValue.mglStyleValue;
}

- (void)setPosition:(MGLLight *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    layer.position = [styleValue getSphericalPosition];
}

- (void)setPositionTransition:(MGLLight *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    layer.positionTransition = [styleValue getTransition];
}

- (void)setColor:(MGLLight *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    layer.color = styleValue.mglStyleValue;
}

- (void)setColorTransition:(MGLLight *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    layer.colorTransition = [styleValue getTransition];
}

- (void)setIntensity:(MGLLight *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    layer.intensity = styleValue.mglStyleValue;
}

- (void)setIntensityTransition:(MGLLight *)layer withReactStyleValue:(RCTMGLStyleValue *)styleValue
{
    layer.intensityTransition = [styleValue getTransition];
}



- (BOOL)_hasReactStyle:(NSDictionary *)reactStyle
{
  return reactStyle != nil && reactStyle.allKeys.count > 0;
}

@end
