apcera 0.1.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. checksums.yaml +7 -0
  2. data/apcera.gemspec +31 -0
  3. data/lib/apcera/api/default_api.rb +128 -0
  4. data/lib/apcera/api/instances_api.rb +280 -0
  5. data/lib/apcera/api/jobs_api.rb +1428 -0
  6. data/lib/apcera/api/logs_api.rb +120 -0
  7. data/lib/apcera/api/metrics_api.rb +280 -0
  8. data/lib/apcera/api/packages_api.rb +541 -0
  9. data/lib/apcera/api/providers_api.rb +175 -0
  10. data/lib/apcera/api/rules_api.rb +228 -0
  11. data/lib/apcera/api/services_and_bindings_api.rb +278 -0
  12. data/lib/apcera/api/staging_pipelines_api.rb +281 -0
  13. data/lib/apcera/api/utilities_api.rb +327 -0
  14. data/lib/apcera/api_client.rb +294 -0
  15. data/lib/apcera/api_error.rb +24 -0
  16. data/lib/apcera/configuration.rb +173 -0
  17. data/lib/apcera/models/apc_version_object.rb +37 -0
  18. data/lib/apcera/models/api_error.rb +143 -0
  19. data/lib/apcera/models/audit_log_item.rb +117 -0
  20. data/lib/apcera/models/audit_log_item_old.rb +85 -0
  21. data/lib/apcera/models/base_object.rb +96 -0
  22. data/lib/apcera/models/binding.rb +137 -0
  23. data/lib/apcera/models/create_docker_job_request.rb +197 -0
  24. data/lib/apcera/models/create_docker_job_response.rb +37 -0
  25. data/lib/apcera/models/dependency.rb +53 -0
  26. data/lib/apcera/models/dependency_resolve.rb +45 -0
  27. data/lib/apcera/models/docker_origin.rb +63 -0
  28. data/lib/apcera/models/drain.rb +61 -0
  29. data/lib/apcera/models/drain_config.rb +53 -0
  30. data/lib/apcera/models/file_listing.rb +45 -0
  31. data/lib/apcera/models/info.rb +53 -0
  32. data/lib/apcera/models/instance_manager.rb +105 -0
  33. data/lib/apcera/models/instance_state.rb +117 -0
  34. data/lib/apcera/models/instances.rb +109 -0
  35. data/lib/apcera/models/job.rb +243 -0
  36. data/lib/apcera/models/job_health.rb +63 -0
  37. data/lib/apcera/models/job_preferences.rb +37 -0
  38. data/lib/apcera/models/log.rb +53 -0
  39. data/lib/apcera/models/metric_series.rb +49 -0
  40. data/lib/apcera/models/metric_series_hash.rb +29 -0
  41. data/lib/apcera/models/metrics.rb +49 -0
  42. data/lib/apcera/models/namespace.rb +37 -0
  43. data/lib/apcera/models/package.rb +183 -0
  44. data/lib/apcera/models/package_depends_request.rb +47 -0
  45. data/lib/apcera/models/package_info.rb +69 -0
  46. data/lib/apcera/models/package_resource.rb +61 -0
  47. data/lib/apcera/models/policy_error.rb +63 -0
  48. data/lib/apcera/models/port.rb +55 -0
  49. data/lib/apcera/models/process.rb +37 -0
  50. data/lib/apcera/models/process_object.rb +115 -0
  51. data/lib/apcera/models/provide.rb +53 -0
  52. data/lib/apcera/models/provider.rb +85 -0
  53. data/lib/apcera/models/resource.rb +69 -0
  54. data/lib/apcera/models/restart_config.rb +53 -0
  55. data/lib/apcera/models/rollout_config.rb +69 -0
  56. data/lib/apcera/models/route.rb +53 -0
  57. data/lib/apcera/models/rule.rb +101 -0
  58. data/lib/apcera/models/runtime.rb +47 -0
  59. data/lib/apcera/models/semi_pipe_rule.rb +101 -0
  60. data/lib/apcera/models/semi_pipe_rule_action.rb +37 -0
  61. data/lib/apcera/models/stager_job.rb +37 -0
  62. data/lib/apcera/models/staging_pipeline.rb +103 -0
  63. data/lib/apcera/models/sub_task.rb +61 -0
  64. data/lib/apcera/models/task.rb +87 -0
  65. data/lib/apcera/models/task_event.rb +113 -0
  66. data/lib/apcera/models/task_progress.rb +45 -0
  67. data/lib/apcera/models/unbind_parameter_object.rb +53 -0
  68. data/lib/apcera/models/unlink_parameter_object.rb +53 -0
  69. data/lib/apcera/version.rb +3 -0
  70. data/lib/apcera.rb +90 -0
  71. metadata +293 -0
@@ -0,0 +1,109 @@
1
+ module Apcera
2
+ #
3
+ class Instances < BaseObject
4
+ attr_accessor :announced_routes, :created_time, :exit_code, :exited, :failed, :host, :instance_manager, :job_version_id, :state, :uuid
5
+ # attribute mapping from ruby-style variable name to JSON key
6
+ def self.attribute_map
7
+ {
8
+
9
+ # Indicates whether the routes for this instance have been announced.
10
+ :'announced_routes' => :'announced_routes',
11
+
12
+ # UNIX timestamp for when instance was created.
13
+ :'created_time' => :'created_time',
14
+
15
+ # Exit code of the main processes; should only be checked if `exited` is `true`.
16
+ :'exit_code' => :'exit_code',
17
+
18
+ # Set to true if the instance started and its main process managed to exit.
19
+ :'exited' => :'exited',
20
+
21
+ # Set to `true` if the instance has failed in some way.
22
+ :'failed' => :'failed',
23
+
24
+ # Name of the host the instance is running on.
25
+ :'host' => :'host',
26
+
27
+ # UUID of the instance manager running the instance.
28
+ :'instance_manager' => :'instance_manager',
29
+
30
+ # The sequence number of the job the instance is running.
31
+ :'job_version_id' => :'job_version_id',
32
+
33
+ # State of the instance.
34
+ :'state' => :'state',
35
+
36
+ # The instance&#39;s unique identifier.
37
+ :'uuid' => :'uuid'
38
+
39
+ }
40
+ end
41
+
42
+ # attribute type
43
+ def self.swagger_types
44
+ {
45
+ :'announced_routes' => :'BOOLEAN',
46
+ :'created_time' => :'Float',
47
+ :'exit_code' => :'Integer',
48
+ :'exited' => :'BOOLEAN',
49
+ :'failed' => :'BOOLEAN',
50
+ :'host' => :'String',
51
+ :'instance_manager' => :'String',
52
+ :'job_version_id' => :'Integer',
53
+ :'state' => :'InstanceState',
54
+ :'uuid' => :'String'
55
+
56
+ }
57
+ end
58
+
59
+ def initialize(attributes = {})
60
+ return if !attributes.is_a?(Hash) || attributes.empty?
61
+
62
+ # convert string to symbol for hash key
63
+ attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
64
+
65
+
66
+ if attributes[:'announced_routes']
67
+ self.announced_routes = attributes[:'announced_routes']
68
+ end
69
+
70
+ if attributes[:'created_time']
71
+ self.created_time = attributes[:'created_time']
72
+ end
73
+
74
+ if attributes[:'exit_code']
75
+ self.exit_code = attributes[:'exit_code']
76
+ end
77
+
78
+ if attributes[:'exited']
79
+ self.exited = attributes[:'exited']
80
+ end
81
+
82
+ if attributes[:'failed']
83
+ self.failed = attributes[:'failed']
84
+ end
85
+
86
+ if attributes[:'host']
87
+ self.host = attributes[:'host']
88
+ end
89
+
90
+ if attributes[:'instance_manager']
91
+ self.instance_manager = attributes[:'instance_manager']
92
+ end
93
+
94
+ if attributes[:'job_version_id']
95
+ self.job_version_id = attributes[:'job_version_id']
96
+ end
97
+
98
+ if attributes[:'state']
99
+ self.state = attributes[:'state']
100
+ end
101
+
102
+ if attributes[:'uuid']
103
+ self.uuid = attributes[:'uuid']
104
+ end
105
+
106
+ end
107
+
108
+ end
109
+ end
@@ -0,0 +1,243 @@
1
+ module Apcera
2
+ #
3
+ class Job < BaseObject
4
+ attr_accessor :bindings, :created_at, :created_by, :docker_origin, :fqn, :hard_scheduling_tags, :health, :logs, :name, :num_instances, :packages, :ports, :processes, :resources, :restart, :rollout, :soft_scheduling_tags, :state, :tags, :updated_at, :updated_by, :uuid, :version_id, :weight
5
+ # attribute mapping from ruby-style variable name to JSON key
6
+ def self.attribute_map
7
+ {
8
+
9
+ # A list of service bindings associated with the job.
10
+ :'bindings' => :'bindings',
11
+
12
+ # Time at which the job was created.
13
+ :'created_at' => :'created_at',
14
+
15
+ # The principal name of user who created the job.
16
+ :'created_by' => :'created_by',
17
+
18
+ # For jobs that run Docker images, specifies the Docker registry, image name and tag that were used to create the job. This field can&#39;t be changed after the job is created.
19
+ :'docker_origin' => :'docker_origin',
20
+
21
+ # Job&#39;s fully-qualified name.
22
+ :'fqn' => :'fqn',
23
+
24
+ # List of hard scheduling tags. See [Hard Tags](http://enterprise-docs.apcera.com/other/job-scheduling/#hard-tags) for more information.
25
+ :'hard_scheduling_tags' => :'hard_scheduling_tags',
26
+
27
+ # Indicates the health of the job. If empty then the job&#39;s health has not been retrieved from the health manager yet.
28
+ :'health' => :'health',
29
+
30
+ # An array of logs the job will be producing that should be collected for aggregation or streaming.
31
+ :'logs' => :'logs',
32
+
33
+ # Name of the job.
34
+ :'name' => :'name',
35
+
36
+ # The number of job instances currently running.
37
+ :'num_instances' => :'num_instances',
38
+
39
+ # Array of packages for this Job. Includes both user-specified packages and the packages calculated by the package manager.
40
+ :'packages' => :'packages',
41
+
42
+ # An array of ports associated with the job.
43
+ :'ports' => :'ports',
44
+
45
+ # A list of processes associated with the job.
46
+ :'processes' => :'processes',
47
+
48
+ # A list of compute and network resources that this job can consume.
49
+ :'resources' => :'resources',
50
+
51
+ # Configuration related to restarting the job.
52
+ :'restart' => :'restart',
53
+
54
+ # Configuration related to rolling updates of the job.
55
+ :'rollout' => :'rollout',
56
+
57
+ # List of soft scheduling tags. See [Soft Tags](http://enterprise-docs.apcera.com/other/job-scheduling/#soft-tags) for more information.
58
+ :'soft_scheduling_tags' => :'soft_scheduling_tags',
59
+
60
+ # General state of this Job in the system.
61
+ :'state' => :'state',
62
+
63
+ # Map of tags (arbitrary strings) to values.
64
+ :'tags' => :'tags',
65
+
66
+ # Time at which the job was most recently updated.
67
+ :'updated_at' => :'updated_at',
68
+
69
+ # The principal name of the last user to update the job.
70
+ :'updated_by' => :'updated_by',
71
+
72
+ # The job&#39;s unique identifier.
73
+ :'uuid' => :'uuid',
74
+
75
+ # An auto-incremented number that indicates the revision of the object.
76
+ :'version_id' => :'version_id',
77
+
78
+ # A job&#39;s weight is used to route requests to this job relative to other job that have the same routes. See [Sharing Routes and Route Weights](http://docs.apcera.com/jobs/routes/#about-route-weights).
79
+ :'weight' => :'weight'
80
+
81
+ }
82
+ end
83
+
84
+ # attribute type
85
+ def self.swagger_types
86
+ {
87
+ :'bindings' => :'Hash<String, Binding>',
88
+ :'created_at' => :'DateTime',
89
+ :'created_by' => :'String',
90
+ :'docker_origin' => :'DockerOrigin',
91
+ :'fqn' => :'String',
92
+ :'hard_scheduling_tags' => :'Hash<String, BOOLEAN>',
93
+ :'health' => :'JobHealth',
94
+ :'logs' => :'Array<Log>',
95
+ :'name' => :'String',
96
+ :'num_instances' => :'Integer',
97
+ :'packages' => :'Array<PackageInfo>',
98
+ :'ports' => :'Array<Port>',
99
+ :'processes' => :'Process',
100
+ :'resources' => :'Resource',
101
+ :'restart' => :'RestartConfig',
102
+ :'rollout' => :'RolloutConfig',
103
+ :'soft_scheduling_tags' => :'Hash<String, BOOLEAN>',
104
+ :'state' => :'String',
105
+ :'tags' => :'Hash<String, String>',
106
+ :'updated_at' => :'DateTime',
107
+ :'updated_by' => :'String',
108
+ :'uuid' => :'String',
109
+ :'version_id' => :'Integer',
110
+ :'weight' => :'Integer'
111
+
112
+ }
113
+ end
114
+
115
+ def initialize(attributes = {})
116
+ return if !attributes.is_a?(Hash) || attributes.empty?
117
+
118
+ # convert string to symbol for hash key
119
+ attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
120
+
121
+
122
+ if attributes[:'bindings']
123
+ if (value = attributes[:'bindings']).is_a?(Array)
124
+ self.bindings = value
125
+ end
126
+ end
127
+
128
+ if attributes[:'created_at']
129
+ self.created_at = attributes[:'created_at']
130
+ end
131
+
132
+ if attributes[:'created_by']
133
+ self.created_by = attributes[:'created_by']
134
+ end
135
+
136
+ if attributes[:'docker_origin']
137
+ self.docker_origin = attributes[:'docker_origin']
138
+ end
139
+
140
+ if attributes[:'fqn']
141
+ self.fqn = attributes[:'fqn']
142
+ end
143
+
144
+ if attributes[:'hard_scheduling_tags']
145
+ if (value = attributes[:'hard_scheduling_tags']).is_a?(Array)
146
+ self.hard_scheduling_tags = value
147
+ end
148
+ end
149
+
150
+ if attributes[:'health']
151
+ self.health = attributes[:'health']
152
+ end
153
+
154
+ if attributes[:'logs']
155
+ if (value = attributes[:'logs']).is_a?(Array)
156
+ self.logs = value
157
+ end
158
+ end
159
+
160
+ if attributes[:'name']
161
+ self.name = attributes[:'name']
162
+ end
163
+
164
+ if attributes[:'num_instances']
165
+ self.num_instances = attributes[:'num_instances']
166
+ end
167
+
168
+ if attributes[:'packages']
169
+ if (value = attributes[:'packages']).is_a?(Array)
170
+ self.packages = value
171
+ end
172
+ end
173
+
174
+ if attributes[:'ports']
175
+ if (value = attributes[:'ports']).is_a?(Array)
176
+ self.ports = value
177
+ end
178
+ end
179
+
180
+ if attributes[:'processes']
181
+ self.processes = attributes[:'processes']
182
+ end
183
+
184
+ if attributes[:'resources']
185
+ self.resources = attributes[:'resources']
186
+ end
187
+
188
+ if attributes[:'restart']
189
+ self.restart = attributes[:'restart']
190
+ end
191
+
192
+ if attributes[:'rollout']
193
+ self.rollout = attributes[:'rollout']
194
+ end
195
+
196
+ if attributes[:'soft_scheduling_tags']
197
+ if (value = attributes[:'soft_scheduling_tags']).is_a?(Array)
198
+ self.soft_scheduling_tags = value
199
+ end
200
+ end
201
+
202
+ if attributes[:'state']
203
+ self.state = attributes[:'state']
204
+ end
205
+
206
+ if attributes[:'tags']
207
+ if (value = attributes[:'tags']).is_a?(Array)
208
+ self.tags = value
209
+ end
210
+ end
211
+
212
+ if attributes[:'updated_at']
213
+ self.updated_at = attributes[:'updated_at']
214
+ end
215
+
216
+ if attributes[:'updated_by']
217
+ self.updated_by = attributes[:'updated_by']
218
+ end
219
+
220
+ if attributes[:'uuid']
221
+ self.uuid = attributes[:'uuid']
222
+ end
223
+
224
+ if attributes[:'version_id']
225
+ self.version_id = attributes[:'version_id']
226
+ end
227
+
228
+ if attributes[:'weight']
229
+ self.weight = attributes[:'weight']
230
+ end
231
+
232
+ end
233
+
234
+ def state=(state)
235
+ allowed_values = ["invalid", "unknown", "created", "errored", "staging", "staging_failed", "ready", "started", "stopped", "finished"]
236
+ if state && !allowed_values.include?(state)
237
+ fail "invalid value for 'state', must be one of #{allowed_values}"
238
+ end
239
+ @state = state
240
+ end
241
+
242
+ end
243
+ end
@@ -0,0 +1,63 @@
1
+ module Apcera
2
+ #
3
+ class JobHealth < BaseObject
4
+ attr_accessor :flapping, :instance_state_count, :score, :uuid
5
+ # attribute mapping from ruby-style variable name to JSON key
6
+ def self.attribute_map
7
+ {
8
+
9
+ # Indicates if job is in a flapping state (true) or not (false).
10
+ :'flapping' => :'flapping',
11
+
12
+ # Map of instance states to the number of instances in that state, as reported by the health manager.
13
+ :'instance_state_count' => :'instance_state_count',
14
+
15
+ # Score is the ratio of running instances to configured instances, capped between 0 and 1.
16
+ :'score' => :'score',
17
+
18
+ # UUID of the job.
19
+ :'uuid' => :'uuid'
20
+
21
+ }
22
+ end
23
+
24
+ # attribute type
25
+ def self.swagger_types
26
+ {
27
+ :'flapping' => :'BOOLEAN',
28
+ :'instance_state_count' => :'Hash<String, InstanceState>',
29
+ :'score' => :'Integer',
30
+ :'uuid' => :'BOOLEAN'
31
+
32
+ }
33
+ end
34
+
35
+ def initialize(attributes = {})
36
+ return if !attributes.is_a?(Hash) || attributes.empty?
37
+
38
+ # convert string to symbol for hash key
39
+ attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
40
+
41
+
42
+ if attributes[:'flapping']
43
+ self.flapping = attributes[:'flapping']
44
+ end
45
+
46
+ if attributes[:'instance_state_count']
47
+ if (value = attributes[:'instance_state_count']).is_a?(Array)
48
+ self.instance_state_count = value
49
+ end
50
+ end
51
+
52
+ if attributes[:'score']
53
+ self.score = attributes[:'score']
54
+ end
55
+
56
+ if attributes[:'uuid']
57
+ self.uuid = attributes[:'uuid']
58
+ end
59
+
60
+ end
61
+
62
+ end
63
+ end
@@ -0,0 +1,37 @@
1
+ module Apcera
2
+ #
3
+ class JobPreferences < BaseObject
4
+ attr_accessor :docker_cache_namespace
5
+ # attribute mapping from ruby-style variable name to JSON key
6
+ def self.attribute_map
7
+ {
8
+
9
+ # The package namespace where Docker jobs should look for cached packages.
10
+ :'docker_cache_namespace' => :'docker_cache_namespace'
11
+
12
+ }
13
+ end
14
+
15
+ # attribute type
16
+ def self.swagger_types
17
+ {
18
+ :'docker_cache_namespace' => :'String'
19
+
20
+ }
21
+ end
22
+
23
+ def initialize(attributes = {})
24
+ return if !attributes.is_a?(Hash) || attributes.empty?
25
+
26
+ # convert string to symbol for hash key
27
+ attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
28
+
29
+
30
+ if attributes[:'docker_cache_namespace']
31
+ self.docker_cache_namespace = attributes[:'docker_cache_namespace']
32
+ end
33
+
34
+ end
35
+
36
+ end
37
+ end
@@ -0,0 +1,53 @@
1
+ module Apcera
2
+ #
3
+ class Log < BaseObject
4
+ attr_accessor :channel, :file, :jobid
5
+ # attribute mapping from ruby-style variable name to JSON key
6
+ def self.attribute_map
7
+ {
8
+
9
+ # The name of the channel that the log should be published on.
10
+ :'channel' => :'channel',
11
+
12
+ # The path to the log file within the job&#39;s container that should be collected.
13
+ :'file' => :'file',
14
+
15
+ # UUID of the job generating the log.
16
+ :'jobid' => :'jobid'
17
+
18
+ }
19
+ end
20
+
21
+ # attribute type
22
+ def self.swagger_types
23
+ {
24
+ :'channel' => :'String',
25
+ :'file' => :'String',
26
+ :'jobid' => :'String'
27
+
28
+ }
29
+ end
30
+
31
+ def initialize(attributes = {})
32
+ return if !attributes.is_a?(Hash) || attributes.empty?
33
+
34
+ # convert string to symbol for hash key
35
+ attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
36
+
37
+
38
+ if attributes[:'channel']
39
+ self.channel = attributes[:'channel']
40
+ end
41
+
42
+ if attributes[:'file']
43
+ self.file = attributes[:'file']
44
+ end
45
+
46
+ if attributes[:'jobid']
47
+ self.jobid = attributes[:'jobid']
48
+ end
49
+
50
+ end
51
+
52
+ end
53
+ end
@@ -0,0 +1,49 @@
1
+ module Apcera
2
+ #
3
+ class MetricSeries < BaseObject
4
+ attr_accessor :times, :values
5
+ # attribute mapping from ruby-style variable name to JSON key
6
+ def self.attribute_map
7
+ {
8
+
9
+ # times
10
+ :'times' => :'times',
11
+
12
+ # times
13
+ :'values' => :'values'
14
+
15
+ }
16
+ end
17
+
18
+ # attribute type
19
+ def self.swagger_types
20
+ {
21
+ :'times' => :'Array<Integer>',
22
+ :'values' => :'Array<Integer>'
23
+
24
+ }
25
+ end
26
+
27
+ def initialize(attributes = {})
28
+ return if !attributes.is_a?(Hash) || attributes.empty?
29
+
30
+ # convert string to symbol for hash key
31
+ attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
32
+
33
+
34
+ if attributes[:'times']
35
+ if (value = attributes[:'times']).is_a?(Array)
36
+ self.times = value
37
+ end
38
+ end
39
+
40
+ if attributes[:'values']
41
+ if (value = attributes[:'values']).is_a?(Array)
42
+ self.values = value
43
+ end
44
+ end
45
+
46
+ end
47
+
48
+ end
49
+ end
@@ -0,0 +1,29 @@
1
+ module Apcera
2
+ #
3
+ class MetricSeriesHash < BaseObject
4
+ attr_accessor
5
+ # attribute mapping from ruby-style variable name to JSON key
6
+ def self.attribute_map
7
+ {
8
+
9
+ }
10
+ end
11
+
12
+ # attribute type
13
+ def self.swagger_types
14
+ {
15
+
16
+ }
17
+ end
18
+
19
+ def initialize(attributes = {})
20
+ return if !attributes.is_a?(Hash) || attributes.empty?
21
+
22
+ # convert string to symbol for hash key
23
+ attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
24
+
25
+
26
+ end
27
+
28
+ end
29
+ end
@@ -0,0 +1,49 @@
1
+ module Apcera
2
+ #
3
+ class Metrics < BaseObject
4
+ attr_accessor :errors, :metrics
5
+ # attribute mapping from ruby-style variable name to JSON key
6
+ def self.attribute_map
7
+ {
8
+
9
+ # A hash list of errors
10
+ :'errors' => :'errors',
11
+
12
+ #
13
+ :'metrics' => :'metrics'
14
+
15
+ }
16
+ end
17
+
18
+ # attribute type
19
+ def self.swagger_types
20
+ {
21
+ :'errors' => :'Hash<String, String>',
22
+ :'metrics' => :'Hash<String, MetricSeriesHash>'
23
+
24
+ }
25
+ end
26
+
27
+ def initialize(attributes = {})
28
+ return if !attributes.is_a?(Hash) || attributes.empty?
29
+
30
+ # convert string to symbol for hash key
31
+ attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
32
+
33
+
34
+ if attributes[:'errors']
35
+ if (value = attributes[:'errors']).is_a?(Array)
36
+ self.errors = value
37
+ end
38
+ end
39
+
40
+ if attributes[:'metrics']
41
+ if (value = attributes[:'metrics']).is_a?(Array)
42
+ self.metrics = value
43
+ end
44
+ end
45
+
46
+ end
47
+
48
+ end
49
+ end
@@ -0,0 +1,37 @@
1
+ module Apcera
2
+ #
3
+ class Namespace < BaseObject
4
+ attr_accessor :namespace
5
+ # attribute mapping from ruby-style variable name to JSON key
6
+ def self.attribute_map
7
+ {
8
+
9
+ # Default namespace.
10
+ :'namespace' => :'namespace'
11
+
12
+ }
13
+ end
14
+
15
+ # attribute type
16
+ def self.swagger_types
17
+ {
18
+ :'namespace' => :'String'
19
+
20
+ }
21
+ end
22
+
23
+ def initialize(attributes = {})
24
+ return if !attributes.is_a?(Hash) || attributes.empty?
25
+
26
+ # convert string to symbol for hash key
27
+ attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo}
28
+
29
+
30
+ if attributes[:'namespace']
31
+ self.namespace = attributes[:'namespace']
32
+ end
33
+
34
+ end
35
+
36
+ end
37
+ end