Mateusz Mackowiak c68168fa27 - Remove optional license property
- License in all header files
2016-05-25 18:13:27 +02:00

36 lines
872 B
Objective-C

#import "SWGPet.h"
@implementation SWGPet
- (instancetype)init {
self = [super init];
if (self) {
// initialize property's default value, if any
}
return self;
}
/**
* Maps json key to property name.
* This method is used by `JSONModel`.
*/
+ (JSONKeyMapper *)keyMapper {
return [[JSONKeyMapper alloc] initWithDictionary:@{ @"id": @"_id", @"category": @"category", @"name": @"name", @"photoUrls": @"photoUrls", @"tags": @"tags", @"status": @"status" }];
}
/**
* Indicates whether the property with the given name is optional.
* If `propertyName` is optional, then return `YES`, otherwise return `NO`.
* This method is used by `JSONModel`.
*/
+ (BOOL)propertyIsOptional:(NSString *)propertyName {
NSArray *optionalProperties = @[@"_id", @"category", @"tags", @"status"];
return [optionalProperties containsObject:propertyName];
}
@end