Copy of rackspace-ios version 2.1.1
[pithos-ios] / Classes / LoadBalancer.h
1 //
2 //  LoadBalancer.h
3 //  OpenStack
4 //
5 //  Created by Mike Mayo on 2/9/10.
6 //  The OpenStack project is provided under the Apache 2.0 license.
7 //
8
9 #import "ComputeModel.h"
10 #import "ASIHTTPRequest.h"
11
12 @class LoadBalancerProtocol, LoadBalancerUsage, LoadBalancerConnectionThrottle, OpenStackAccount;
13
14 @interface LoadBalancer : ComputeModel <NSCoding> {
15 }
16
17 @property (nonatomic, retain) LoadBalancerProtocol *protocol;
18 @property (nonatomic, retain) NSString *algorithm;
19 @property (nonatomic, retain) NSString *status;
20 @property (nonatomic, retain) NSString *virtualIPType;
21 @property (nonatomic, retain) NSMutableArray *virtualIPs;
22 @property (nonatomic, retain) NSDate *created;
23 @property (nonatomic, retain) NSDate *updated;
24 @property (nonatomic, assign) NSUInteger maxConcurrentConnections;
25 @property (nonatomic, assign) BOOL connectionLoggingEnabled;
26 @property (nonatomic, retain) NSMutableArray *nodes;
27 //@property (nonatomic, retain) NSMutableArray *cloudServerNodes;
28 @property (nonatomic, retain) NSString *sessionPersistenceType;  
29 @property (nonatomic, retain) LoadBalancerConnectionThrottle *connectionThrottle;
30 @property (nonatomic, retain) NSString *clusterName;
31 @property (nonatomic, assign) NSInteger progress;
32 @property (nonatomic, retain) NSString *region;
33 @property (nonatomic, retain) LoadBalancerUsage *usage;
34
35 + (LoadBalancer *)fromJSON:(NSDictionary *)dict account:(OpenStackAccount *)account;
36 - (BOOL)shouldBePolled;
37 - (NSString *)toJSON;
38 - (NSString *)toUpdateJSON;
39
40 - (void)pollUntilActive:(OpenStackAccount *)account withProgress:(ASIBasicBlock)progressBlock complete:(ASIBasicBlock)completeBlock;
41 - (void)pollUntilActive:(OpenStackAccount *)account complete:(ASIBasicBlock)completeBlock;
42
43 - (void)pollUntilActive:(OpenStackAccount *)account delegate:(id)delegate completeSelector:(SEL)completeSelector object:(id)object;
44 - (void)pollUntilActive:(OpenStackAccount *)account delegate:(id)delegate progressSelector:(SEL)progressSelector completeSelector:(SEL)completeSelector object:(id)object;
45
46 - (UIImage *)imageForStatus;
47
48 @end