Class: Apcera::Package

Inherits:
BaseObject show all
Defined in:
lib/apcera/models/package.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 = {}) ⇒ Package

Returns a new instance of Package.



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

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[:'created_at']
    self.created_at = attributes[:'created_at']
  end
  
  if attributes[:'created_by']
    self.created_by = attributes[:'created_by']
  end
  
  if attributes[:'dependencies']
    if (value = attributes[:'dependencies']).is_a?(Array)
      self.dependencies = value
    end
  end
  
  if attributes[:'environment']
    if (value = attributes[:'environment']).is_a?(Array)
      self.environment = value
    end
  end
  
  if attributes[:'error_message']
    self.error_message = attributes[:'error_message']
  end
  
  if attributes[:'fqn']
    self.fqn = attributes[:'fqn']
  end
  
  if attributes[:'name']
    self.name = attributes[:'name']
  end
  
  if attributes[:'provides']
    if (value = attributes[:'provides']).is_a?(Array)
      self.provides = value
    end
  end
  
  if attributes[:'resource']
    self.resource = attributes[:'resource']
  end
  
  if attributes[:'resources']
    if (value = attributes[:'resources']).is_a?(Array)
      self.resources = value
    end
  end
  
  if attributes[:'staging_pipeline']
    self.staging_pipeline = attributes[:'staging_pipeline']
  end
  
  if attributes[:'staging_pipeline_fqn']
    self.staging_pipeline_fqn = attributes[:'staging_pipeline_fqn']
  end
  
  if attributes[:'state']
    self.state = attributes[:'state']
  end
  
  if attributes[:'tags']
    if (value = attributes[:'tags']).is_a?(Array)
      self.tags = 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
  
end

Instance Attribute Details

#created_atObject

Returns the value of attribute created_at.



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

def created_at
  @created_at
end

#created_byObject

Returns the value of attribute created_by.



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

def created_by
  @created_by
end

#dependenciesObject

Returns the value of attribute dependencies.



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

def dependencies
  @dependencies
end

#environmentObject

Returns the value of attribute environment.



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

def environment
  @environment
end

#error_messageObject

Returns the value of attribute error_message.



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

def error_message
  @error_message
end

#fqnObject

Returns the value of attribute fqn.



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

def fqn
  @fqn
end

#nameObject

Returns the value of attribute name.



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

def name
  @name
end

#providesObject

Returns the value of attribute provides.



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

def provides
  @provides
end

#resourceObject

Returns the value of attribute resource.



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

def resource
  @resource
end

#resourcesObject

Returns the value of attribute resources.



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

def resources
  @resources
end

#staging_pipelineObject

Returns the value of attribute staging_pipeline.



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

def staging_pipeline
  @staging_pipeline
end

#staging_pipeline_fqnObject

Returns the value of attribute staging_pipeline_fqn.



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

def staging_pipeline_fqn
  @staging_pipeline_fqn
end

#stateObject

Returns the value of attribute state.



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

def state
  @state
end

#tagsObject

Returns the value of attribute tags.



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

def tags
  @tags
end

#updated_atObject

Returns the value of attribute updated_at.



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

def updated_at
  @updated_at
end

#updated_byObject

Returns the value of attribute updated_by.



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

def updated_by
  @updated_by
end

#uuidObject

Returns the value of attribute uuid.



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

def uuid
  @uuid
end

#version_idObject

Returns the value of attribute version_id.



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

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

def self.attribute_map
  {
    
    # The date and time when the package was created.
    :'created_at' => :'created_at',
    
    # Principal name of the user who created the package.
    :'created_by' => :'created_by',
    
    # List of dependencies that the package has in order to be used. A dependency expresses a requirement that a package has on an other package.
    :'dependencies' => :'dependencies',
    
    # List of environment variables that are added to any process that uses the package.
    :'environment' => :'environment',
    
    # Error encountered during an asynchronous operation on the package. An example is a failure encountered during instance snapshot; the ErrorMessage field on the created snapshot package would contain more information.
    :'error_message' => :'error_message',
    
    # Package's fully-qualified name.
    :'fqn' => :'fqn',
    
    # Package name.
    :'name' => :'name',
    
    # List of 'provides' that the package provides for other packages to use. A 'provide' expresses a named resource that other packages or jobs can add as a dependency.
    :'provides' => :'provides',
    
    # Deprecated. Use `resources`. An object that describes the package's associated binary resource.
    :'resource' => :'resource',
    
    # An list of objects that describes the package's associated binary resources.
    :'resources' => :'resources',
    
    # The UUID of the staging pipeline used to stage this package into a runnable state.
    :'staging_pipeline' => :'staging_pipeline',
    
    # The fully-qualified name of the staging pipeline used to stage the package.
    :'staging_pipeline_fqn' => :'staging_pipeline_fqn',
    
    # Package state. Possible values are `uploading`, 'staging`, `failed`, `ready`, `deleted`, and `unknown`.
    :'state' => :'state',
    
    # Map of tags by tag name.
    :'tags' => :'tags',
    
    # The date and time when the package was most recently updated.
    :'updated_at' => :'updated_at',
    
    # Principal name of the last user to update the package.
    :'updated_by' => :'updated_by',
    
    # The package's unique identifier.
    :'uuid' => :'uuid',
    
    # Package's auto-incremented version number.
    :'version_id' => :'version_id'
    
  }
end

.swagger_typesObject

attribute type



67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
# File 'lib/apcera/models/package.rb', line 67

def self.swagger_types
  {
    :'created_at' => :'DateTime',
    :'created_by' => :'String',
    :'dependencies' => :'Array<Dependency>',
    :'environment' => :'Hash<String, String>',
    :'error_message' => :'String',
    :'fqn' => :'String',
    :'name' => :'String',
    :'provides' => :'Array<Provide>',
    :'resource' => :'PackageResource',
    :'resources' => :'Array<PackageResource>',
    :'staging_pipeline' => :'String',
    :'staging_pipeline_fqn' => :'String',
    :'state' => :'String',
    :'tags' => :'Hash<String, String>',
    :'updated_at' => :'DateTime',
    :'updated_by' => :'String',
    :'uuid' => :'String',
    :'version_id' => :'Integer'
    
  }
end