Class: Twilio::REST::Serverless::V1::ServiceContext::BuildInstance
- Inherits:
-
InstanceResource
- Object
- InstanceResource
- Twilio::REST::Serverless::V1::ServiceContext::BuildInstance
- Defined in:
- lib/twilio-ruby/rest/serverless/v1/service/build.rb
Overview
PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
Instance Method Summary collapse
-
#account_sid ⇒ String
The SID of the Account that created the Build resource.
-
#asset_versions ⇒ Array[Hash]
The list of Asset Version resource SIDs that are included in the Build.
-
#build_status ⇒ build_status
Access the build_status.
-
#context ⇒ BuildContext
Generate an instance context for the instance, the context is capable of performing various actions.
-
#date_created ⇒ Time
The ISO 8601 date and time in GMT when the Build resource was created.
-
#date_updated ⇒ Time
The ISO 8601 date and time in GMT when the Build resource was last updated.
-
#delete ⇒ Boolean
Delete the BuildInstance.
-
#dependencies ⇒ Array[Hash]
A list of objects that describe the Dependencies included in the Build.
-
#fetch ⇒ BuildInstance
Fetch the BuildInstance.
-
#function_versions ⇒ Array[Hash]
The list of Function Version resource SIDs that are included in the Build.
-
#initialize(version, payload, service_sid: nil, sid: nil) ⇒ BuildInstance
constructor
Initialize the BuildInstance.
-
#inspect ⇒ Object
Provide a detailed, user friendly representation.
-
#links ⇒ String
The links.
-
#runtime ⇒ build.Runtime
The Runtime version that will be used to run the Build.
-
#service_sid ⇒ String
The SID of the Service that the Build resource is associated with.
-
#sid ⇒ String
The unique string that identifies the Build resource.
-
#status ⇒ build.Status
The status of the Build.
-
#to_s ⇒ Object
Provide a user friendly representation.
-
#url ⇒ String
The absolute URL of the Build resource.
Constructor Details
#initialize(version, payload, service_sid: nil, sid: nil) ⇒ BuildInstance
Initialize the BuildInstance
245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/build.rb', line 245 def initialize(version, payload, service_sid: nil, sid: nil) super(version) # Marshaled Properties @properties = { 'sid' => payload['sid'], 'account_sid' => payload['account_sid'], 'service_sid' => payload['service_sid'], 'status' => payload['status'], 'asset_versions' => payload['asset_versions'], 'function_versions' => payload['function_versions'], 'dependencies' => payload['dependencies'], 'runtime' => payload['runtime'], 'date_created' => Twilio.deserialize_iso8601_datetime(payload['date_created']), 'date_updated' => Twilio.deserialize_iso8601_datetime(payload['date_updated']), 'url' => payload['url'], 'links' => payload['links'], } # Context @instance_context = nil @params = {'service_sid' => service_sid, 'sid' => sid || @properties['sid'], } end |
Instance Method Details
#account_sid ⇒ String
Returns The SID of the Account that created the Build resource.
288 289 290 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/build.rb', line 288 def account_sid @properties['account_sid'] end |
#asset_versions ⇒ Array[Hash]
Returns The list of Asset Version resource SIDs that are included in the Build.
306 307 308 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/build.rb', line 306 def asset_versions @properties['asset_versions'] end |
#build_status ⇒ build_status
Access the build_status
369 370 371 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/build.rb', line 369 def build_status context.build_status end |
#context ⇒ BuildContext
Generate an instance context for the instance, the context is capable of performing various actions. All instance actions are proxied to the context
273 274 275 276 277 278 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/build.rb', line 273 def context unless @instance_context @instance_context = BuildContext.new(@version, @params['service_sid'], @params['sid'], ) end @instance_context end |
#date_created ⇒ Time
Returns The ISO 8601 date and time in GMT when the Build resource was created.
330 331 332 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/build.rb', line 330 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The ISO 8601 date and time in GMT when the Build resource was last updated.
336 337 338 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/build.rb', line 336 def date_updated @properties['date_updated'] end |
#delete ⇒ Boolean
Delete the BuildInstance
362 363 364 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/build.rb', line 362 def delete context.delete end |
#dependencies ⇒ Array[Hash]
Returns A list of objects that describe the Dependencies included in the Build.
318 319 320 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/build.rb', line 318 def dependencies @properties['dependencies'] end |
#fetch ⇒ BuildInstance
Fetch the BuildInstance
355 356 357 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/build.rb', line 355 def fetch context.fetch end |
#function_versions ⇒ Array[Hash]
Returns The list of Function Version resource SIDs that are included in the Build.
312 313 314 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/build.rb', line 312 def function_versions @properties['function_versions'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
382 383 384 385 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/build.rb', line 382 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Serverless.V1.BuildInstance #{values}>" end |
#links ⇒ String
Returns The links.
348 349 350 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/build.rb', line 348 def links @properties['links'] end |
#runtime ⇒ build.Runtime
Returns The Runtime version that will be used to run the Build.
324 325 326 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/build.rb', line 324 def runtime @properties['runtime'] end |
#service_sid ⇒ String
Returns The SID of the Service that the Build resource is associated with.
294 295 296 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/build.rb', line 294 def service_sid @properties['service_sid'] end |
#sid ⇒ String
Returns The unique string that identifies the Build resource.
282 283 284 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/build.rb', line 282 def sid @properties['sid'] end |
#status ⇒ build.Status
Returns The status of the Build.
300 301 302 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/build.rb', line 300 def status @properties['status'] end |
#to_s ⇒ Object
Provide a user friendly representation
375 376 377 378 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/build.rb', line 375 def to_s values = @params.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Serverless.V1.BuildInstance #{values}>" end |
#url ⇒ String
Returns The absolute URL of the Build resource.
342 343 344 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/build.rb', line 342 def url @properties['url'] end |