

#import "SWGInlineObject1ManagedObjectBuilder.h"

/**
* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
* https://openapi-generator.tech
* Do not edit the class manually.
*/

@implementation SWGInlineObject1ManagedObjectBuilder

-(instancetype)init {
    self = [super init];
    if (self != nil) {
    }
    return self;
}

-(SWGInlineObject1ManagedObject*)createNewSWGInlineObject1ManagedObjectInContext:(NSManagedObjectContext*)context {
    SWGInlineObject1ManagedObject *managedObject = [NSEntityDescription insertNewObjectForEntityForName:NSStringFromClass([SWGInlineObject1ManagedObject class]) inManagedObjectContext:context];
    return managedObject;
}

-(SWGInlineObject1ManagedObject*)SWGInlineObject1ManagedObjectFromSWGInlineObject1:(SWGInlineObject1*)object context:(NSManagedObjectContext*)context {
    SWGInlineObject1ManagedObject* newSWGInlineObject1 = [self createNewSWGInlineObject1ManagedObjectInContext:context];
    [self updateSWGInlineObject1ManagedObject:newSWGInlineObject1 withSWGInlineObject1:object];
    return newSWGInlineObject1;
}

-(void)updateSWGInlineObject1ManagedObject:(SWGInlineObject1ManagedObject*)managedObject withSWGInlineObject1:(SWGInlineObject1*)object {
    if(!managedObject || !object) {
        return;
    }
    NSManagedObjectContext* context = managedObject.managedObjectContext;
    managedObject.additionalMetadata = [object.additionalMetadata copy];
    managedObject.file = [object.file copy];

}

-(SWGInlineObject1*)SWGInlineObject1FromSWGInlineObject1ManagedObject:(SWGInlineObject1ManagedObject*)obj {
    if(!obj) {
        return nil;
    }
    SWGInlineObject1* newSWGInlineObject1 = [[SWGInlineObject1 alloc] init];
    [self updateSWGInlineObject1:newSWGInlineObject1 withSWGInlineObject1ManagedObject:obj];
    return newSWGInlineObject1;
}

-(void)updateSWGInlineObject1:(SWGInlineObject1*)newSWGInlineObject1 withSWGInlineObject1ManagedObject:(SWGInlineObject1ManagedObject*)obj {
    newSWGInlineObject1.additionalMetadata = [obj.additionalMetadata copy];
    newSWGInlineObject1.file = [obj.file copy];
}

@end
