Class: ApolloDeploySignalSdkRails::SuppressionImportResponse

Inherits:
Object
  • Object
show all
Defined in:
lib/apollo_deploy_signal_sdk_rails/types.rb

Overview

Schema type: SuppressionImportResponse

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(imported:, skipped:) ⇒ SuppressionImportResponse

Returns a new instance of SuppressionImportResponse.

Parameters:

  • imported (Integer)

    , skipped [Integer]



1885
1886
1887
1888
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1885

def initialize(imported: , skipped: )
  @imported = imported
  @skipped = skipped
end

Instance Attribute Details

#importedInteger

Returns:

  • (Integer)


1880
1881
1882
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1880

def imported
  @imported
end

#skippedInteger

Returns:

  • (Integer)


1882
1883
1884
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1882

def skipped
  @skipped
end

Class Method Details

.from_json(attributes) ⇒ SuppressionImportResponse

Create an instance from a parsed JSON hash.

Parameters:

  • attributes (Hash)

Returns:



1901
1902
1903
1904
1905
1906
1907
1908
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1901

def self.from_json(attributes)
  return nil unless attributes.is_a?(Hash)

  new(
    imported: attributes.key?("imported") ? attributes["imported"] : attributes[:imported],
    skipped: attributes.key?("skipped") ? attributes["skipped"] : attributes[:skipped],
  )
end

Instance Method Details

#to_hHash

Returns a hash representation of this object.

Returns:

  • (Hash)

    a hash representation of this object



1891
1892
1893
1894
1895
1896
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1891

def to_h
  {
    imported: @imported,
    skipped: @skipped,
  }.compact
end