Base class for {WorkflowType} and {ActivityType} objects.
@return [Domain] Returns the domain this type is registered to.
@return [String] Returns the name of this type.
@return [String] Returns the version of this type.
@param [Domain] domain The domain this type is registered to. @param [String] name The name of this type. @param [String] version The version of this type.
# File lib/aws/simple_workflow/type.rb, line 23 def initialize domain, name, version, options = {} @domain = domain @name = name.to_s @version = version.to_s super end
# File lib/aws/simple_workflow/type.rb, line 78 def self.ruby_name Core::Inflection.ruby_name(name.split(%r::/).last) end
# File lib/aws/simple_workflow/type.rb, line 83 def self.type_key "#{ruby_name.split(/_/).first}Type" end
Deprecates the type.
After a type has been deprecated, you cannot create new executions of that type. Executions that were started before the type was deprecated will continue to run.
@note This operation is eventually consistent. The results are best
effort and may not exactly reflect recent updates and changes.
@return [nil]
# File lib/aws/simple_workflow/type.rb, line 50 def deprecate client.send("deprecate_#{self.class.ruby_name}", resource_options) nil end
@return [Boolean] Returns true if the type is deprecated.
# File lib/aws/simple_workflow/type.rb, line 57 def deprecated? status == :deprecated end
# File lib/aws/simple_workflow/type.rb, line 62 def resource_identifiers [[:domain,domain.name], [:name,name], [:version,version]] end
# File lib/aws/simple_workflow/type.rb, line 67 def resource_options { :domain => domain.name, :"#{self.class.ruby_name}" => { :name => name, :version => version } } end