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
Instance Method Summary collapse
-
#account_sid ⇒ String
The SID of the [Account](www.twilio.com/docs/iam/api/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 date and time in GMT when the Build resource was created specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
-
#date_updated ⇒ Time
The date and time in GMT when the Build resource was last updated specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
-
#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 ⇒ Hash
- #runtime ⇒ Runtime
-
#service_sid ⇒ String
The SID of the Service that the Build resource is associated with.
-
#sid ⇒ String
The unique string that we created to identify the Build resource.
- #status ⇒ Status
-
#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
267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/build.rb', line 267 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 || @properties['service_sid'] ,'sid' => sid || @properties['sid'] , } end |
Instance Method Details
#account_sid ⇒ String
Returns The SID of the [Account](www.twilio.com/docs/iam/api/account) that created the Build resource.
310 311 312 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/build.rb', line 310 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.
328 329 330 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/build.rb', line 328 def asset_versions @properties['asset_versions'] end |
#build_status ⇒ build_status
Access the build_status
393 394 395 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/build.rb', line 393 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
295 296 297 298 299 300 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/build.rb', line 295 def context unless @instance_context @instance_context = BuildContext.new(@version , @params['service_sid'], @params['sid']) end @instance_context end |
#date_created ⇒ Time
Returns The date and time in GMT when the Build resource was created specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
352 353 354 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/build.rb', line 352 def date_created @properties['date_created'] end |
#date_updated ⇒ Time
Returns The date and time in GMT when the Build resource was last updated specified in [ISO 8601](en.wikipedia.org/wiki/ISO_8601) format.
358 359 360 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/build.rb', line 358 def date_updated @properties['date_updated'] end |
#delete ⇒ Boolean
Delete the BuildInstance
377 378 379 380 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/build.rb', line 377 def delete context.delete end |
#dependencies ⇒ Array<Hash>
Returns A list of objects that describe the Dependencies included in the Build. Each object contains the ‘name` and `version` of the dependency.
340 341 342 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/build.rb', line 340 def dependencies @properties['dependencies'] end |
#fetch ⇒ BuildInstance
Fetch the BuildInstance
385 386 387 388 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/build.rb', line 385 def fetch context.fetch end |
#function_versions ⇒ Array<Hash>
Returns The list of Function Version resource SIDs that are included in the Build.
334 335 336 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/build.rb', line 334 def function_versions @properties['function_versions'] end |
#inspect ⇒ Object
Provide a detailed, user friendly representation
406 407 408 409 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/build.rb', line 406 def inspect values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ") "<Twilio.Serverless.V1.BuildInstance #{values}>" end |
#links ⇒ Hash
370 371 372 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/build.rb', line 370 def links @properties['links'] end |
#runtime ⇒ Runtime
346 347 348 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/build.rb', line 346 def runtime @properties['runtime'] end |
#service_sid ⇒ String
Returns The SID of the Service that the Build resource is associated with.
316 317 318 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/build.rb', line 316 def service_sid @properties['service_sid'] end |
#sid ⇒ String
Returns The unique string that we created to identify the Build resource.
304 305 306 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/build.rb', line 304 def sid @properties['sid'] end |
#status ⇒ Status
322 323 324 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/build.rb', line 322 def status @properties['status'] end |
#to_s ⇒ Object
Provide a user friendly representation
399 400 401 402 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/build.rb', line 399 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.
364 365 366 |
# File 'lib/twilio-ruby/rest/serverless/v1/service/build.rb', line 364 def url @properties['url'] end |