Class: Apcera::ProcessObject
- Inherits:
-
BaseObject
- Object
- BaseObject
- Apcera::ProcessObject
- Defined in:
- lib/apcera/models/process_object.rb
Instance Attribute Summary collapse
-
#environment ⇒ Object
Returns the value of attribute environment.
-
#group ⇒ Object
Returns the value of attribute group.
-
#heavy ⇒ Object
Returns the value of attribute heavy.
-
#start_command ⇒ Object
Returns the value of attribute start_command.
-
#start_command_raw ⇒ Object
Returns the value of attribute start_command_raw.
-
#start_command_timeout ⇒ Object
Returns the value of attribute start_command_timeout.
-
#stop_command ⇒ Object
Returns the value of attribute stop_command.
-
#stop_command_raw ⇒ Object
Returns the value of attribute stop_command_raw.
-
#stop_timeout ⇒ Object
Returns the value of attribute stop_timeout.
-
#user ⇒ Object
Returns the value of attribute user.
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 = {}) ⇒ ProcessObject
constructor
A new instance of ProcessObject.
Methods inherited from BaseObject
#_deserialize, #_to_hash, #build_from_hash, #to_body, #to_hash, #to_s
Constructor Details
#initialize(attributes = {}) ⇒ ProcessObject
Returns a new instance of ProcessObject.
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 86 87 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 |
# File 'lib/apcera/models/process_object.rb', line 59 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[:'environment'] if (value = attributes[:'environment']).is_a?(Array) self.environment = value end end if attributes[:'group'] self.group = attributes[:'group'] end if attributes[:'heavy'] self.heavy = attributes[:'heavy'] end if attributes[:'start_command'] self.start_command = attributes[:'start_command'] end if attributes[:'start_command_raw'] if (value = attributes[:'start_command_raw']).is_a?(Array) self.start_command_raw = value end end if attributes[:'start_command_timeout'] self.start_command_timeout = attributes[:'start_command_timeout'] end if attributes[:'stop_command'] self.stop_command = attributes[:'stop_command'] end if attributes[:'stop_command_raw'] if (value = attributes[:'stop_command_raw']).is_a?(Array) self.stop_command_raw = value end end if attributes[:'stop_timeout'] self.stop_timeout = attributes[:'stop_timeout'] end if attributes[:'user'] self.user = attributes[:'user'] end end |
Instance Attribute Details
#environment ⇒ Object
Returns the value of attribute environment.
4 5 6 |
# File 'lib/apcera/models/process_object.rb', line 4 def environment @environment end |
#group ⇒ Object
Returns the value of attribute group.
4 5 6 |
# File 'lib/apcera/models/process_object.rb', line 4 def group @group end |
#heavy ⇒ Object
Returns the value of attribute heavy.
4 5 6 |
# File 'lib/apcera/models/process_object.rb', line 4 def heavy @heavy end |
#start_command ⇒ Object
Returns the value of attribute start_command.
4 5 6 |
# File 'lib/apcera/models/process_object.rb', line 4 def start_command @start_command end |
#start_command_raw ⇒ Object
Returns the value of attribute start_command_raw.
4 5 6 |
# File 'lib/apcera/models/process_object.rb', line 4 def start_command_raw @start_command_raw end |
#start_command_timeout ⇒ Object
Returns the value of attribute start_command_timeout.
4 5 6 |
# File 'lib/apcera/models/process_object.rb', line 4 def start_command_timeout @start_command_timeout end |
#stop_command ⇒ Object
Returns the value of attribute stop_command.
4 5 6 |
# File 'lib/apcera/models/process_object.rb', line 4 def stop_command @stop_command end |
#stop_command_raw ⇒ Object
Returns the value of attribute stop_command_raw.
4 5 6 |
# File 'lib/apcera/models/process_object.rb', line 4 def stop_command_raw @stop_command_raw end |
#stop_timeout ⇒ Object
Returns the value of attribute stop_timeout.
4 5 6 |
# File 'lib/apcera/models/process_object.rb', line 4 def stop_timeout @stop_timeout end |
#user ⇒ Object
Returns the value of attribute user.
4 5 6 |
# File 'lib/apcera/models/process_object.rb', line 4 def user @user 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 |
# File 'lib/apcera/models/process_object.rb', line 6 def self.attribute_map { # An optional list of environment values to attach to the process within the job. :'environment' => :'environment', # Name of the group used to run the process within a container. An empty string lets the the instance manager choose a group. :'group' => :'group', # Start the process in \"heavy\" mode: giving it pid 1. Only one process within the job can set this flag to true. :'heavy' => :'heavy', # The command used to start the process within the container's isolation context. :'start_command' => :'start_command', # The command used to start the process, specified as an array. The first element in the array is the command/binary to execute, and subsequent array elements are command arguments. The expanded command string is passed directly to `exec()` without shell or template interpretation. If `start_command_raw` is provided then `start_command`, if specified, is ignored. This property is typically used with exact processes that have an extremely well-known start command. :'start_command_raw' => :'start_command_raw', # The number of seconds that the system will wait for startup to complete. This includes the time that it will take for ports to become available. :'start_command_timeout' => :'start_command_timeout', # The command used to stop the process within the container's isolation context. If not defined, OS-level signals (like `TERM`) may be used to shut down the process. :'stop_command' => :'stop_command', # The command used to stop the process, specified as an array. The first element in the array is the command/binary to execute, and subsequent array elements are command arguments. The expanded command string is passed directly to `exec()` without shell or template interpretation. If `stop_command_raw` is provided then `stop_command`, if specified, is ignored. This property is typically used with exact processes that have an extremely well-known start command. :'stop_command_raw' => :'stop_command_raw', # The number of seconds to give the process after `stop_command` has been run before forcing the command to shutdown via OS-level signals, such as `TERM`. If no `stop_command` is provided for the process, OS-level signals (like `TERM`) may be used to terminate the process. :'stop_timeout' => :'stop_timeout', # Name of the user used to run the process within a container. An empty string lets the the instance manager choose a user. :'user' => :'user' } end |
.swagger_types ⇒ Object
attribute type
43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# File 'lib/apcera/models/process_object.rb', line 43 def self.swagger_types { :'environment' => :'Hash<String, String>', :'group' => :'String', :'heavy' => :'BOOLEAN', :'start_command' => :'String', :'start_command_raw' => :'Array<String>', :'start_command_timeout' => :'Integer', :'stop_command' => :'String', :'stop_command_raw' => :'Array<String>', :'stop_timeout' => :'Integer', :'user' => :'String' } end |