Class: ApolloDeploySignalSdkRails::ValidateLinksResponse
- Inherits:
-
Object
- Object
- ApolloDeploySignalSdkRails::ValidateLinksResponse
- Defined in:
- lib/apollo_deploy_signal_sdk_rails/types.rb
Overview
Schema type: ValidateLinksResponse
Instance Attribute Summary collapse
- #broken_links ⇒ Integer
- #error_links ⇒ Integer
- #links ⇒ Array<LinkResultItem>
- #total_links ⇒ Integer
Class Method Summary collapse
-
.from_json(attributes) ⇒ ValidateLinksResponse
Create an instance from a parsed JSON hash.
Instance Method Summary collapse
-
#initialize(links:, total_links:, broken_links:, error_links:) ⇒ ValidateLinksResponse
constructor
A new instance of ValidateLinksResponse.
-
#to_h ⇒ Hash
A hash representation of this object.
Constructor Details
#initialize(links:, total_links:, broken_links:, error_links:) ⇒ ValidateLinksResponse
Returns a new instance of ValidateLinksResponse.
756 757 758 759 760 761 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 756 def initialize(links: , total_links: , broken_links: , error_links: ) @links = links @total_links = total_links @broken_links = broken_links @error_links = error_links end |
Instance Attribute Details
#broken_links ⇒ Integer
751 752 753 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 751 def broken_links @broken_links end |
#error_links ⇒ Integer
753 754 755 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 753 def error_links @error_links end |
#links ⇒ Array<LinkResultItem>
747 748 749 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 747 def links @links end |
#total_links ⇒ Integer
749 750 751 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 749 def total_links @total_links end |
Class Method Details
.from_json(attributes) ⇒ ValidateLinksResponse
Create an instance from a parsed JSON hash.
776 777 778 779 780 781 782 783 784 785 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 776 def self.from_json(attributes) return nil unless attributes.is_a?(Hash) new( links: attributes.key?("links") ? attributes["links"] : attributes[:links], total_links: attributes.key?("totalLinks") ? attributes["totalLinks"] : attributes[:total_links], broken_links: attributes.key?("brokenLinks") ? attributes["brokenLinks"] : attributes[:broken_links], error_links: attributes.key?("errorLinks") ? attributes["errorLinks"] : attributes[:error_links], ) end |
Instance Method Details
#to_h ⇒ Hash
Returns a hash representation of this object.
764 765 766 767 768 769 770 771 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 764 def to_h { links: @links, total_links: @total_links, broken_links: @broken_links, error_links: @error_links, }.compact end |