root / src / com / rackspace / cloud / files / api / client / Container.java @ 4daf0073
History | View | Annotate | Download (2.1 kB)
1 |
package com.rackspace.cloud.files.api.client; |
---|---|
2 |
|
3 |
import com.rackspace.cloud.servers.api.client.Entity; |
4 |
|
5 |
/**
|
6 |
* @author Phillip Toohill dead2hill@gmail.com
|
7 |
*
|
8 |
*/
|
9 |
public class Container extends Entity { |
10 |
|
11 |
private static final long serialVersionUID = 5994739895998309675L; |
12 |
|
13 |
// Regular attributes
|
14 |
private String name; |
15 |
private int count; |
16 |
private int bytes; |
17 |
|
18 |
// CDN attributes
|
19 |
private boolean cdnEnabled; |
20 |
private int Ttl; |
21 |
public String cdnUrl; |
22 |
public boolean logRetention; |
23 |
|
24 |
public String toXML() { |
25 |
String xml = ""; |
26 |
xml = "<container xmlns=\"http://docs.rackspacecloud.com/servers/api/v1.0\" name=\""
|
27 |
+ getName() + "\"></server>";
|
28 |
return xml;
|
29 |
} |
30 |
|
31 |
/**
|
32 |
* @return the name
|
33 |
*/
|
34 |
public String getName() { |
35 |
return name;
|
36 |
} |
37 |
|
38 |
/**
|
39 |
* @param name
|
40 |
* the name to set
|
41 |
*/
|
42 |
public void setName(String name) { |
43 |
this.name = name;
|
44 |
} |
45 |
|
46 |
/**
|
47 |
* @return the count
|
48 |
*/
|
49 |
public int getCount() { |
50 |
return count;
|
51 |
} |
52 |
|
53 |
/**
|
54 |
* @param count
|
55 |
* the count to set
|
56 |
*/
|
57 |
public void setCount(int count) { |
58 |
this.count = count;
|
59 |
} |
60 |
|
61 |
/**
|
62 |
* @return the bytes
|
63 |
*/
|
64 |
public int getBytes() { |
65 |
return bytes;
|
66 |
} |
67 |
|
68 |
/**
|
69 |
* @param bytes
|
70 |
* the bytes to set
|
71 |
*/
|
72 |
public void setBytes(int bytes) { |
73 |
this.bytes = bytes;
|
74 |
} |
75 |
|
76 |
/**
|
77 |
* @return the cdnEnabled
|
78 |
*/
|
79 |
public boolean isCdnEnabled() { |
80 |
return cdnEnabled;
|
81 |
} |
82 |
|
83 |
/**
|
84 |
* @param cdnEnabled
|
85 |
* the cdnEnabled to set
|
86 |
*/
|
87 |
public void setCdnEnabled(boolean cdnEnabled) { |
88 |
this.cdnEnabled = cdnEnabled;
|
89 |
} |
90 |
|
91 |
/**
|
92 |
* @return the ttl
|
93 |
*/
|
94 |
public int getTtl() { |
95 |
return Ttl;
|
96 |
} |
97 |
|
98 |
/**
|
99 |
* @param ttl
|
100 |
* the ttl to set
|
101 |
*/
|
102 |
public void setTtl(int ttl) { |
103 |
Ttl = ttl; |
104 |
} |
105 |
|
106 |
/**
|
107 |
* @return the cdnUrl
|
108 |
*/
|
109 |
public String getCdnUrl() { |
110 |
return cdnUrl;
|
111 |
} |
112 |
|
113 |
/**
|
114 |
* @param cdnUrl
|
115 |
* the cdnUrl to set
|
116 |
*/
|
117 |
public void setCdnUrl(String cdnUrl) { |
118 |
this.cdnUrl = cdnUrl;
|
119 |
} |
120 |
|
121 |
/**
|
122 |
* @return the logRetention
|
123 |
*/
|
124 |
public boolean isLogRetention() { |
125 |
return logRetention;
|
126 |
} |
127 |
|
128 |
/**
|
129 |
* @param logRetention
|
130 |
* the logRetention to set
|
131 |
*/
|
132 |
public void setLogRetention(boolean logRetention) { |
133 |
this.logRetention = logRetention;
|
134 |
} |
135 |
|
136 |
} |