Class: Apcera::CreateDockerJobRequest

Inherits:
BaseObject
  • Object
show all
Defined in:
lib/apcera/models/create_docker_job_request.rb

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseObject

#_deserialize, #_to_hash, #build_from_hash, #to_body, #to_hash, #to_s

Constructor Details

#initialize(attributes = {}) ⇒ CreateDockerJobRequest

Returns a new instance of CreateDockerJobRequest.



95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
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
# File 'lib/apcera/models/create_docker_job_request.rb', line 95

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[:'allow_egress']
    self.allow_egress = attributes[:'allow_egress']
  end
  
  if attributes[:'env']
    if (value = attributes[:'env']).is_a?(Array)
      self.env = value
    end
  end
  
  if attributes[:'exposed_ports']
    if (value = attributes[:'exposed_ports']).is_a?(Array)
      self.exposed_ports = value
    end
  end
  
  if attributes[:'group']
    self.group = attributes[:'group']
  end
  
  if attributes[:'hard_scheduling_tags']
    if (value = attributes[:'hard_scheduling_tags']).is_a?(Array)
      self.hard_scheduling_tags = value
    end
  end
  
  if attributes[:'ignore_volumes']
    self.ignore_volumes = attributes[:'ignore_volumes']
  end
  
  if attributes[:'image_url']
    self.image_url = attributes[:'image_url']
  end
  
  if attributes[:'interactive']
    self.interactive = attributes[:'interactive']
  end
  
  if attributes[:'job_fqn']
    self.job_fqn = attributes[:'job_fqn']
  end
  
  if attributes[:'resources']
    self.resources = attributes[:'resources']
  end
  
  if attributes[:'restart']
    self.restart = attributes[:'restart']
  end
  
  if attributes[:'routes']
    if (value = attributes[:'routes']).is_a?(Array)
      self.routes = value
    end
  end
  
  if attributes[:'soft_scheduling_tags']
    if (value = attributes[:'soft_scheduling_tags']).is_a?(Array)
      self.soft_scheduling_tags = value
    end
  end
  
  if attributes[:'start']
    self.start = attributes[:'start']
  end
  
  if attributes[:'start_command']
    if (value = attributes[:'start_command']).is_a?(Array)
      self.start_command = value
    end
  end
  
  if attributes[:'stop_command']
    if (value = attributes[:'stop_command']).is_a?(Array)
      self.stop_command = value
    end
  end
  
  if attributes[:'user']
    self.user = attributes[:'user']
  end
  
  if attributes[:'volume_provider_fqn']
    self.volume_provider_fqn = attributes[:'volume_provider_fqn']
  end
  
  if attributes[:'volumes']
    if (value = attributes[:'volumes']).is_a?(Array)
      self.volumes = value
    end
  end
  
end

Instance Attribute Details

#allow_egressObject

Returns the value of attribute allow_egress.



4
5
6
# File 'lib/apcera/models/create_docker_job_request.rb', line 4

def allow_egress
  @allow_egress
end

#envObject

Returns the value of attribute env.



4
5
6
# File 'lib/apcera/models/create_docker_job_request.rb', line 4

def env
  @env
end

#exposed_portsObject

Returns the value of attribute exposed_ports.



4
5
6
# File 'lib/apcera/models/create_docker_job_request.rb', line 4

def exposed_ports
  @exposed_ports
end

#groupObject

Returns the value of attribute group.



4
5
6
# File 'lib/apcera/models/create_docker_job_request.rb', line 4

def group
  @group
end

#hard_scheduling_tagsObject

Returns the value of attribute hard_scheduling_tags.



4
5
6
# File 'lib/apcera/models/create_docker_job_request.rb', line 4

def hard_scheduling_tags
  @hard_scheduling_tags
end

#ignore_volumesObject

Returns the value of attribute ignore_volumes.



4
5
6
# File 'lib/apcera/models/create_docker_job_request.rb', line 4

def ignore_volumes
  @ignore_volumes
end

#image_urlObject

Returns the value of attribute image_url.



4
5
6
# File 'lib/apcera/models/create_docker_job_request.rb', line 4

def image_url
  @image_url
end

#interactiveObject

Returns the value of attribute interactive.



4
5
6
# File 'lib/apcera/models/create_docker_job_request.rb', line 4

def interactive
  @interactive
end

#job_fqnObject

Returns the value of attribute job_fqn.



4
5
6
# File 'lib/apcera/models/create_docker_job_request.rb', line 4

def job_fqn
  @job_fqn
end

#resourcesObject

Returns the value of attribute resources.



4
5
6
# File 'lib/apcera/models/create_docker_job_request.rb', line 4

def resources
  @resources
end

#restartObject

Returns the value of attribute restart.



4
5
6
# File 'lib/apcera/models/create_docker_job_request.rb', line 4

def restart
  @restart
end

#routesObject

Returns the value of attribute routes.



4
5
6
# File 'lib/apcera/models/create_docker_job_request.rb', line 4

def routes
  @routes
end

#soft_scheduling_tagsObject

Returns the value of attribute soft_scheduling_tags.



4
5
6
# File 'lib/apcera/models/create_docker_job_request.rb', line 4

def soft_scheduling_tags
  @soft_scheduling_tags
end

#startObject

Returns the value of attribute start.



4
5
6
# File 'lib/apcera/models/create_docker_job_request.rb', line 4

def start
  @start
end

#start_commandObject

Returns the value of attribute start_command.



4
5
6
# File 'lib/apcera/models/create_docker_job_request.rb', line 4

def start_command
  @start_command
end

#stop_commandObject

Returns the value of attribute stop_command.



4
5
6
# File 'lib/apcera/models/create_docker_job_request.rb', line 4

def stop_command
  @stop_command
end

#userObject

Returns the value of attribute user.



4
5
6
# File 'lib/apcera/models/create_docker_job_request.rb', line 4

def user
  @user
end

#volume_provider_fqnObject

Returns the value of attribute volume_provider_fqn.



4
5
6
# File 'lib/apcera/models/create_docker_job_request.rb', line 4

def volume_provider_fqn
  @volume_provider_fqn
end

#volumesObject

Returns the value of attribute volumes.



4
5
6
# File 'lib/apcera/models/create_docker_job_request.rb', line 4

def volumes
  @volumes
end

Class Method Details

.attribute_mapObject

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
# File 'lib/apcera/models/create_docker_job_request.rb', line 6

def self.attribute_map
  {
    
    # If `true`, the job is allowed outbound network connectivity.
    :'allow_egress' => :'allow_egress',
    
    # List of environment variables that are added to the job.
    :'env' => :'env',
    
    # An array of ports exposed on job instances.
    :'exposed_ports' => :'exposed_ports',
    
    # Group to run Docker image as (default: picked by Apcera).
    :'group' => :'group',
    
    # 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',
    
    # If `true`, volumes specified in the Docker image spec are ignored and no data will be persisted. If `false` or not specified, and the Docker image specifies volumes, then you must supply a provider FQN in the request object's `volume_provider_fqn` property.
    :'ignore_volumes' => :'ignore_volumes',
    
    # Docker image URL.
    :'image_url' => :'image_url',
    
    # If `true`, the start command is removed from the job definition. The start command string is saved to the `DOCKER_START_COMMAND` environment variable on the job's environment.
    :'interactive' => :'interactive',
    
    # The fully-qualified name of the job to create from the Docker image.
    :'job_fqn' => :'job_fqn',
    
    # A list of compute and network resources that the job can consume.
    :'resources' => :'resources',
    
    # Configuration related to restarting the job.
    :'restart' => :'restart',
    
    # A map of routes to the ports where the routes are available.
    :'routes' => :'routes',
    
    # 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',
    
    # If `true` the job is started after its created. Default is `false`.
    :'start' => :'start',
    
    # 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.
    :'start_command' => :'start_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.
    :'stop_command' => :'stop_command',
    
    # User to run Docker image as. Defaults to user in the Docker image configuration, or 'root' if image doesn't have a user configured.
    :'user' => :'user',
    
    # Volume provider's fully-qualified name. Required if `ignore_volumes` is not set to `true`.
    :'volume_provider_fqn' => :'volume_provider_fqn',
    
    # A list of volumes used by the Docker image for persistence.
    :'volumes' => :'volumes'
    
  }
end

.swagger_typesObject

attribute type



70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# File 'lib/apcera/models/create_docker_job_request.rb', line 70

def self.swagger_types
  {
    :'allow_egress' => :'BOOLEAN',
    :'env' => :'Hash<String, String>',
    :'exposed_ports' => :'Array<Integer>',
    :'group' => :'String',
    :'hard_scheduling_tags' => :'Hash<String, BOOLEAN>',
    :'ignore_volumes' => :'BOOLEAN',
    :'image_url' => :'String',
    :'interactive' => :'BOOLEAN',
    :'job_fqn' => :'String',
    :'resources' => :'Resource',
    :'restart' => :'RestartConfig',
    :'routes' => :'Hash<String, Integer>',
    :'soft_scheduling_tags' => :'Hash<String, BOOLEAN>',
    :'start' => :'BOOLEAN',
    :'start_command' => :'Array<String>',
    :'stop_command' => :'Array<String>',
    :'user' => :'String',
    :'volume_provider_fqn' => :'String',
    :'volumes' => :'Array<String>'
    
  }
end