lib/twilio-ruby/rest/serverless/v1/service/build/build_status.rb in twilio-ruby-5.77.0 vs lib/twilio-ruby/rest/serverless/v1/service/build/build_status.rb in twilio-ruby-6.0.0.pre.rc.1
- old
+ new
@@ -1,219 +1,219 @@
##
-# This code was generated by
-# \ / _ _ _| _ _
-# | (_)\/(_)(_|\/| |(/_ v1.0.0
-# / /
+# This code was generated by
+# ___ _ _ _ _ _ _ ____ ____ ____ _ ____ ____ _ _ ____ ____ ____ ___ __ __
+# | | | | | | | | | __ | | |__| | __ | __ |___ |\ | |___ |__/ |__| | | | |__/
+# | |_|_| | |___ | |__| |__| | | | |__] |___ | \| |___ | \ | | | |__| | \
#
-# frozen_string_literal: true
+# Twilio - Serverless
+# This is the public Twilio REST API.
+#
+# NOTE: This class is auto generated by OpenAPI Generator.
+# https://openapi-generator.tech
+# Do not edit the class manually.
+#
+
module Twilio
- module REST
- class Serverless < Domain
- class V1 < Version
- class ServiceContext < InstanceContext
- class BuildContext < InstanceContext
- ##
- # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- class BuildStatusList < ListResource
- ##
- # Initialize the BuildStatusList
- # @param [Version] version Version that contains the resource
- # @param [String] service_sid The SID of the Service that the Build resource is
- # associated with.
- # @param [String] sid The unique string that we created to identify the Build
- # resource.
- # @return [BuildStatusList] BuildStatusList
- def initialize(version, service_sid: nil, sid: nil)
- super(version)
+ module REST
+ class Serverless < ServerlessBase
+ class V1 < Version
+ class ServiceContext < InstanceContext
+ class BuildContext < InstanceContext
- # Path Solution
- @solution = {service_sid: service_sid, sid: sid}
- end
+ class BuildStatusList < ListResource
+ ##
+ # Initialize the BuildStatusList
+ # @param [Version] version Version that contains the resource
+ # @return [BuildStatusList] BuildStatusList
+ def initialize(version, service_sid: nil, sid: nil)
+ super(version)
+ # Path Solution
+ @solution = { service_sid: service_sid, sid: sid }
+
+
+ end
+
- ##
- # Provide a user friendly representation
- def to_s
- '#<Twilio.Serverless.V1.BuildStatusList>'
- end
- end
- ##
- # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- class BuildStatusPage < Page
- ##
- # Initialize the BuildStatusPage
- # @param [Version] version Version that contains the resource
- # @param [Response] response Response from the API
- # @param [Hash] solution Path solution for the resource
- # @return [BuildStatusPage] BuildStatusPage
- def initialize(version, response, solution)
- super(version, response)
+ # Provide a user friendly representation
+ def to_s
+ '#<Twilio.Serverless.V1.BuildStatusList>'
+ end
+ end
- # Path Solution
- @solution = solution
- end
- ##
- # Build an instance of BuildStatusInstance
- # @param [Hash] payload Payload response from the API
- # @return [BuildStatusInstance] BuildStatusInstance
- def get_instance(payload)
- BuildStatusInstance.new(
- @version,
- payload,
- service_sid: @solution[:service_sid],
- sid: @solution[:sid],
- )
- end
+ ##
+ #PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
+ class BuildStatusContext < InstanceContext
+ ##
+ # Initialize the BuildStatusContext
+ # @param [Version] version Version that contains the resource
+ # @param [String] service_sid The SID of the Service to fetch the Build resource from.
+ # @param [String] sid The SID of the Build resource to fetch.
+ # @return [BuildStatusContext] BuildStatusContext
+ def initialize(version, service_sid, sid)
+ super(version)
- ##
- # Provide a user friendly representation
- def to_s
- '<Twilio.Serverless.V1.BuildStatusPage>'
- end
- end
+ # Path Solution
+ @solution = { service_sid: service_sid, sid: sid, }
+ @uri = "/Services/#{@solution[:service_sid]}/Builds/#{@solution[:sid]}/Status"
- ##
- # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- class BuildStatusContext < InstanceContext
- ##
- # Initialize the BuildStatusContext
- # @param [Version] version Version that contains the resource
- # @param [String] service_sid The SID of the Service to fetch the Build resource
- # from.
- # @param [String] sid The SID of the Build resource to fetch.
- # @return [BuildStatusContext] BuildStatusContext
- def initialize(version, service_sid, sid)
- super(version)
+
+ end
+ ##
+ # Fetch the BuildStatusInstance
+ # @return [BuildStatusInstance] Fetched BuildStatusInstance
+ def fetch
- # Path Solution
- @solution = {service_sid: service_sid, sid: sid, }
- @uri = "/Services/#{@solution[:service_sid]}/Builds/#{@solution[:sid]}/Status"
- end
+ payload = @version.fetch('GET', @uri)
+ BuildStatusInstance.new(
+ @version,
+ payload,
+ service_sid: @solution[:service_sid],
+ sid: @solution[:sid],
+ )
+ end
- ##
- # Fetch the BuildStatusInstance
- # @return [BuildStatusInstance] Fetched BuildStatusInstance
- def fetch
- payload = @version.fetch('GET', @uri)
- BuildStatusInstance.new(
- @version,
- payload,
- service_sid: @solution[:service_sid],
- sid: @solution[:sid],
- )
- end
+ ##
+ # Provide a user friendly representation
+ def to_s
+ context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
+ "#<Twilio.Serverless.V1.BuildStatusContext #{context}>"
+ end
- ##
- # Provide a user friendly representation
- def to_s
- context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
- "#<Twilio.Serverless.V1.BuildStatusContext #{context}>"
- end
+ ##
+ # Provide a detailed, user friendly representation
+ def inspect
+ context = @solution.map{|k, v| "#{k}: #{v}"}.join(',')
+ "#<Twilio.Serverless.V1.BuildStatusContext #{context}>"
+ end
+ end
- ##
- # Provide a detailed, user friendly representation
- def inspect
- context = @solution.map {|k, v| "#{k}: #{v}"}.join(',')
- "#<Twilio.Serverless.V1.BuildStatusContext #{context}>"
- end
- end
+ class BuildStatusPage < Page
+ ##
+ # Initialize the BuildStatusPage
+ # @param [Version] version Version that contains the resource
+ # @param [Response] response Response from the API
+ # @param [Hash] solution Path solution for the resource
+ # @return [BuildStatusPage] BuildStatusPage
+ def initialize(version, response, solution)
+ super(version, response)
- ##
- # PLEASE NOTE that this class contains beta products that are subject to change. Use them with caution.
- class BuildStatusInstance < InstanceResource
- ##
- # Initialize the BuildStatusInstance
- # @param [Version] version Version that contains the resource
- # @param [Hash] payload payload that contains response from Twilio
- # @param [String] service_sid The SID of the Service that the Build resource is
- # associated with.
- # @param [String] sid The unique string that we created to identify the Build
- # resource.
- # @return [BuildStatusInstance] BuildStatusInstance
- def initialize(version, payload, service_sid: nil, sid: nil)
- super(version)
+ # Path Solution
+ @solution = solution
+ end
- # Marshaled Properties
- @properties = {
- 'sid' => payload['sid'],
- 'account_sid' => payload['account_sid'],
- 'service_sid' => payload['service_sid'],
- 'status' => payload['status'],
- 'url' => payload['url'],
- }
+ ##
+ # Build an instance of BuildStatusInstance
+ # @param [Hash] payload Payload response from the API
+ # @return [BuildStatusInstance] BuildStatusInstance
+ def get_instance(payload)
+ BuildStatusInstance.new(@version, payload, service_sid: @solution[:service_sid], sid: @solution[:sid])
+ end
- # Context
- @instance_context = nil
- @params = {'service_sid' => service_sid, 'sid' => sid, }
- end
-
- ##
- # Generate an instance context for the instance, the context is capable of
- # performing various actions. All instance actions are proxied to the context
- # @return [BuildStatusContext] BuildStatusContext for this BuildStatusInstance
- def context
- unless @instance_context
- @instance_context = BuildStatusContext.new(@version, @params['service_sid'], @params['sid'], )
+ ##
+ # Provide a user friendly representation
+ def to_s
+ '<Twilio.Serverless.V1.BuildStatusPage>'
+ end
end
- @instance_context
- end
+ class BuildStatusInstance < InstanceResource
+ ##
+ # Initialize the BuildStatusInstance
+ # @param [Version] version Version that contains the resource
+ # @param [Hash] payload payload that contains response from Twilio
+ # @param [String] account_sid The SID of the
+ # {Account}[https://www.twilio.com/docs/iam/api/account] that created this BuildStatus
+ # resource.
+ # @param [String] sid The SID of the Call resource to fetch.
+ # @return [BuildStatusInstance] BuildStatusInstance
+ 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'],
+ 'url' => payload['url'],
+ }
- ##
- # @return [String] The unique string that identifies the Build resource
- def sid
- @properties['sid']
- end
+ # Context
+ @instance_context = nil
+ @params = { 'service_sid' => service_sid || @properties['service_sid'] ,'sid' => sid || @properties['sid'] , }
+ end
- ##
- # @return [String] The SID of the Account that created the Build resource
- def account_sid
- @properties['account_sid']
- end
+ ##
+ # Generate an instance context for the instance, the context is capable of
+ # performing various actions. All instance actions are proxied to the context
+ # @return [BuildStatusContext] CallContext for this CallInstance
+ def context
+ unless @instance_context
+ @instance_context = BuildStatusContext.new(@version , @params['service_sid'], @params['sid'])
+ end
+ @instance_context
+ end
+
+ ##
+ # @return [String] The unique string that we created to identify the Build resource.
+ def sid
+ @properties['sid']
+ end
+
+ ##
+ # @return [String] The SID of the [Account](https://www.twilio.com/docs/iam/api/account) that created the Build resource.
+ def account_sid
+ @properties['account_sid']
+ end
+
+ ##
+ # @return [String] The SID of the Service that the Build resource is associated with.
+ def service_sid
+ @properties['service_sid']
+ end
+
+ ##
+ # @return [Status]
+ def status
+ @properties['status']
+ end
+
+ ##
+ # @return [String] The absolute URL of the Build Status resource.
+ def url
+ @properties['url']
+ end
+
+ ##
+ # Fetch the BuildStatusInstance
+ # @return [BuildStatusInstance] Fetched BuildStatusInstance
+ def fetch
- ##
- # @return [String] The SID of the Service that the Build resource is associated with
- def service_sid
- @properties['service_sid']
- end
+ context.fetch
+ end
- ##
- # @return [build_status.Status] The status of the Build
- def status
- @properties['status']
- end
+ ##
+ # Provide a user friendly representation
+ def to_s
+ values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
+ "<Twilio.Serverless.V1.BuildStatusInstance #{values}>"
+ end
- ##
- # @return [String] The absolute URL of the Build Status resource
- def url
- @properties['url']
- end
+ ##
+ # Provide a detailed, user friendly representation
+ def inspect
+ values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
+ "<Twilio.Serverless.V1.BuildStatusInstance #{values}>"
+ end
+ end
- ##
- # Fetch the BuildStatusInstance
- # @return [BuildStatusInstance] Fetched BuildStatusInstance
- def fetch
- context.fetch
- end
-
- ##
- # Provide a user friendly representation
- def to_s
- values = @params.map{|k, v| "#{k}: #{v}"}.join(" ")
- "<Twilio.Serverless.V1.BuildStatusInstance #{values}>"
- end
-
- ##
- # Provide a detailed, user friendly representation
- def inspect
- values = @properties.map{|k, v| "#{k}: #{v}"}.join(" ")
- "<Twilio.Serverless.V1.BuildStatusInstance #{values}>"
- end
+ end
+ end
end
- end
end
- end
end
- end
-end
\ No newline at end of file
+end
+
+