Class: Apcera::Job
- Inherits:
-
BaseObject
- Object
- BaseObject
- Apcera::Job
- Defined in:
- lib/apcera/models/job.rb
Instance Attribute Summary collapse
-
#bindings ⇒ Object
Returns the value of attribute bindings.
-
#created_at ⇒ Object
Returns the value of attribute created_at.
-
#created_by ⇒ Object
Returns the value of attribute created_by.
-
#docker_origin ⇒ Object
Returns the value of attribute docker_origin.
-
#fqn ⇒ Object
Returns the value of attribute fqn.
-
#hard_scheduling_tags ⇒ Object
Returns the value of attribute hard_scheduling_tags.
-
#health ⇒ Object
Returns the value of attribute health.
-
#logs ⇒ Object
Returns the value of attribute logs.
-
#name ⇒ Object
Returns the value of attribute name.
-
#network_ref ⇒ Object
Returns the value of attribute network_ref.
-
#num_instances ⇒ Object
Returns the value of attribute num_instances.
-
#packages ⇒ Object
Returns the value of attribute packages.
-
#ports ⇒ Object
Returns the value of attribute ports.
-
#processes ⇒ Object
Returns the value of attribute processes.
-
#resources ⇒ Object
Returns the value of attribute resources.
-
#restart ⇒ Object
Returns the value of attribute restart.
-
#rollout ⇒ Object
Returns the value of attribute rollout.
-
#soft_scheduling_tags ⇒ Object
Returns the value of attribute soft_scheduling_tags.
-
#state ⇒ Object
Returns the value of attribute state.
-
#tags ⇒ Object
Returns the value of attribute tags.
-
#updated_at ⇒ Object
Returns the value of attribute updated_at.
-
#updated_by ⇒ Object
Returns the value of attribute updated_by.
-
#uuid ⇒ Object
Returns the value of attribute uuid.
-
#version_id ⇒ Object
Returns the value of attribute version_id.
-
#weight ⇒ Object
Returns the value of attribute weight.
Class Method Summary collapse
-
.attribute_map ⇒ Object
attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
attribute type.
Instance Method Summary collapse
-
#initialize(attributes = {}) ⇒ Job
constructor
A new instance of Job.
Methods inherited from BaseObject
#_deserialize, #_to_hash, #build_from_hash, #to_body, #to_hash, #to_s
Constructor Details
#initialize(attributes = {}) ⇒ Job
Returns a new instance of Job.
119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 |
# File 'lib/apcera/models/job.rb', line 119 def initialize(attributes = {}) return if !attributes.is_a?(Hash) || attributes.empty? # convert string to symbol for hash key attributes = attributes.inject({}){|memo,(k,v)| memo[k.to_sym] = v; memo} if attributes[:'bindings'] if (value = attributes[:'bindings']).is_a?(Array) self.bindings = value end end if attributes[:'created_at'] self.created_at = attributes[:'created_at'] end if attributes[:'created_by'] self.created_by = attributes[:'created_by'] end if attributes[:'docker_origin'] self.docker_origin = attributes[:'docker_origin'] end if attributes[:'fqn'] self.fqn = attributes[:'fqn'] end if attributes[:'hard_scheduling_tags'] if (value = attributes[:'hard_scheduling_tags']).is_a?(Array) self. = value end end if attributes[:'health'] self.health = attributes[:'health'] end if attributes[:'logs'] if (value = attributes[:'logs']).is_a?(Array) self.logs = value end end if attributes[:'name'] self.name = attributes[:'name'] end if attributes[:'network_ref'] self.network_ref = attributes[:'network_ref'] end if attributes[:'num_instances'] self.num_instances = attributes[:'num_instances'] end if attributes[:'packages'] if (value = attributes[:'packages']).is_a?(Array) self.packages = value end end if attributes[:'ports'] if (value = attributes[:'ports']).is_a?(Array) self.ports = value end end if attributes[:'processes'] self.processes = attributes[:'processes'] end if attributes[:'resources'] self.resources = attributes[:'resources'] end if attributes[:'restart'] self.restart = attributes[:'restart'] end if attributes[:'rollout'] self.rollout = attributes[:'rollout'] end if attributes[:'soft_scheduling_tags'] if (value = attributes[:'soft_scheduling_tags']).is_a?(Array) self. = value end end if attributes[:'state'] self.state = attributes[:'state'] end if attributes[:'tags'] if (value = attributes[:'tags']).is_a?(Array) self. = value end end if attributes[:'updated_at'] self.updated_at = attributes[:'updated_at'] end if attributes[:'updated_by'] self.updated_by = attributes[:'updated_by'] end if attributes[:'uuid'] self.uuid = attributes[:'uuid'] end if attributes[:'version_id'] self.version_id = attributes[:'version_id'] end if attributes[:'weight'] self.weight = attributes[:'weight'] end end |
Instance Attribute Details
#bindings ⇒ Object
Returns the value of attribute bindings.
4 5 6 |
# File 'lib/apcera/models/job.rb', line 4 def bindings @bindings end |
#created_at ⇒ Object
Returns the value of attribute created_at.
4 5 6 |
# File 'lib/apcera/models/job.rb', line 4 def created_at @created_at end |
#created_by ⇒ Object
Returns the value of attribute created_by.
4 5 6 |
# File 'lib/apcera/models/job.rb', line 4 def created_by @created_by end |
#docker_origin ⇒ Object
Returns the value of attribute docker_origin.
4 5 6 |
# File 'lib/apcera/models/job.rb', line 4 def docker_origin @docker_origin end |
#fqn ⇒ Object
Returns the value of attribute fqn.
4 5 6 |
# File 'lib/apcera/models/job.rb', line 4 def fqn @fqn end |
#hard_scheduling_tags ⇒ Object
Returns the value of attribute hard_scheduling_tags.
4 5 6 |
# File 'lib/apcera/models/job.rb', line 4 def @hard_scheduling_tags end |
#health ⇒ Object
Returns the value of attribute health.
4 5 6 |
# File 'lib/apcera/models/job.rb', line 4 def health @health end |
#logs ⇒ Object
Returns the value of attribute logs.
4 5 6 |
# File 'lib/apcera/models/job.rb', line 4 def logs @logs end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/apcera/models/job.rb', line 4 def name @name end |
#network_ref ⇒ Object
Returns the value of attribute network_ref.
4 5 6 |
# File 'lib/apcera/models/job.rb', line 4 def network_ref @network_ref end |
#num_instances ⇒ Object
Returns the value of attribute num_instances.
4 5 6 |
# File 'lib/apcera/models/job.rb', line 4 def num_instances @num_instances end |
#packages ⇒ Object
Returns the value of attribute packages.
4 5 6 |
# File 'lib/apcera/models/job.rb', line 4 def packages @packages end |
#ports ⇒ Object
Returns the value of attribute ports.
4 5 6 |
# File 'lib/apcera/models/job.rb', line 4 def ports @ports end |
#processes ⇒ Object
Returns the value of attribute processes.
4 5 6 |
# File 'lib/apcera/models/job.rb', line 4 def processes @processes end |
#resources ⇒ Object
Returns the value of attribute resources.
4 5 6 |
# File 'lib/apcera/models/job.rb', line 4 def resources @resources end |
#restart ⇒ Object
Returns the value of attribute restart.
4 5 6 |
# File 'lib/apcera/models/job.rb', line 4 def restart @restart end |
#rollout ⇒ Object
Returns the value of attribute rollout.
4 5 6 |
# File 'lib/apcera/models/job.rb', line 4 def rollout @rollout end |
#soft_scheduling_tags ⇒ Object
Returns the value of attribute soft_scheduling_tags.
4 5 6 |
# File 'lib/apcera/models/job.rb', line 4 def @soft_scheduling_tags end |
#state ⇒ Object
Returns the value of attribute state.
4 5 6 |
# File 'lib/apcera/models/job.rb', line 4 def state @state end |
#tags ⇒ Object
Returns the value of attribute tags.
4 5 6 |
# File 'lib/apcera/models/job.rb', line 4 def @tags end |
#updated_at ⇒ Object
Returns the value of attribute updated_at.
4 5 6 |
# File 'lib/apcera/models/job.rb', line 4 def updated_at @updated_at end |
#updated_by ⇒ Object
Returns the value of attribute updated_by.
4 5 6 |
# File 'lib/apcera/models/job.rb', line 4 def updated_by @updated_by end |
#uuid ⇒ Object
Returns the value of attribute uuid.
4 5 6 |
# File 'lib/apcera/models/job.rb', line 4 def uuid @uuid end |
#version_id ⇒ Object
Returns the value of attribute version_id.
4 5 6 |
# File 'lib/apcera/models/job.rb', line 4 def version_id @version_id end |
#weight ⇒ Object
Returns the value of attribute weight.
4 5 6 |
# File 'lib/apcera/models/job.rb', line 4 def weight @weight end |
Class Method Details
.attribute_map ⇒ Object
attribute mapping from ruby-style variable name to JSON key
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 |
# File 'lib/apcera/models/job.rb', line 6 def self.attribute_map { # A list of service bindings associated with the job. :'bindings' => :'bindings', # Time at which the job was created. :'created_at' => :'created_at', # The principal name of user who created the job. :'created_by' => :'created_by', # For jobs that run Docker images, specifies the Docker registry, image name and tag that were used to create the job. This field can't be changed after the job is created. :'docker_origin' => :'docker_origin', # Job's fully-qualified name. :'fqn' => :'fqn', # List of hard scheduling tags. See [Hard Tags](http://enterprise-docs.apcera.com/other/job-scheduling/#hard-tags) for more information. :'hard_scheduling_tags' => :'hard_scheduling_tags', # Indicates the health of the job. If empty then the job's health has not been retrieved from the health manager yet. :'health' => :'health', # An array of logs the job will be producing that should be collected for aggregation or streaming. :'logs' => :'logs', # Name of the job. :'name' => :'name', # An object that contains information about the [virtual network](#virtualnetwork) the job belongs to. :'network_ref' => :'network_ref', # The number of job instances currently running. :'num_instances' => :'num_instances', # Array of packages for this Job. Includes both user-specified packages and the packages calculated by the package manager. :'packages' => :'packages', # An array of ports associated with the job. :'ports' => :'ports', # A list of processes associated with the job. :'processes' => :'processes', # A list of compute and network resources that this job can consume. :'resources' => :'resources', # Configuration related to restarting the job. :'restart' => :'restart', # Configuration related to rolling updates of the job. :'rollout' => :'rollout', # List of soft scheduling tags. See [Soft Tags](http://enterprise-docs.apcera.com/other/job-scheduling/#soft-tags) for more information. :'soft_scheduling_tags' => :'soft_scheduling_tags', # General state of this Job in the system. :'state' => :'state', # Map of tags (arbitrary strings) to values. :'tags' => :'tags', # Time at which the job was most recently updated. :'updated_at' => :'updated_at', # The principal name of the last user to update the job. :'updated_by' => :'updated_by', # The job's unique identifier. :'uuid' => :'uuid', # An auto-incremented number that indicates the revision of the object. :'version_id' => :'version_id', # A job'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). :'weight' => :'weight' } end |
.swagger_types ⇒ Object
attribute type
88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 |
# File 'lib/apcera/models/job.rb', line 88 def self.swagger_types { :'bindings' => :'Hash<String, Binding>', :'created_at' => :'DateTime', :'created_by' => :'String', :'docker_origin' => :'DockerOrigin', :'fqn' => :'String', :'hard_scheduling_tags' => :'Hash<String, BOOLEAN>', :'health' => :'JobHealth', :'logs' => :'Array<Log>', :'name' => :'String', :'network_ref' => :'JobNetworkReference', :'num_instances' => :'Integer', :'packages' => :'Array<PackageInfo>', :'ports' => :'Array<Port>', :'processes' => :'Process', :'resources' => :'Resource', :'restart' => :'RestartConfig', :'rollout' => :'RolloutConfig', :'soft_scheduling_tags' => :'Hash<String, BOOLEAN>', :'state' => :'String', :'tags' => :'Hash<String, String>', :'updated_at' => :'DateTime', :'updated_by' => :'String', :'uuid' => :'String', :'version_id' => :'Integer', :'weight' => :'Integer' } end |