Class: ApolloDeploySignalSdkRails::ProjectTimelineBucketResponse
- Inherits:
-
Object
- Object
- ApolloDeploySignalSdkRails::ProjectTimelineBucketResponse
- Defined in:
- lib/apollo_deploy_signal_sdk_rails/types.rb
Overview
Schema type: ProjectTimelineBucketResponse
Instance Attribute Summary collapse
Class Method Summary collapse
-
.from_json(attributes) ⇒ ProjectTimelineBucketResponse
Create an instance from a parsed JSON hash.
Instance Method Summary collapse
-
#initialize(bucket:, type:, count:) ⇒ ProjectTimelineBucketResponse
constructor
A new instance of ProjectTimelineBucketResponse.
-
#to_h ⇒ Hash
A hash representation of this object.
Constructor Details
#initialize(bucket:, type:, count:) ⇒ ProjectTimelineBucketResponse
Returns a new instance of ProjectTimelineBucketResponse.
1318 1319 1320 1321 1322 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1318 def initialize(bucket: , type: , count: ) @bucket = bucket @type = type @count = count end |
Instance Attribute Details
#bucket ⇒ String
1311 1312 1313 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1311 def bucket @bucket end |
#count ⇒ Integer
1315 1316 1317 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1315 def count @count end |
#type ⇒ String
1313 1314 1315 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1313 def type @type end |
Class Method Details
.from_json(attributes) ⇒ ProjectTimelineBucketResponse
Create an instance from a parsed JSON hash.
1336 1337 1338 1339 1340 1341 1342 1343 1344 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1336 def self.from_json(attributes) return nil unless attributes.is_a?(Hash) new( bucket: attributes.key?("bucket") ? attributes["bucket"] : attributes[:bucket], type: attributes.key?("type") ? attributes["type"] : attributes[:type], count: attributes.key?("count") ? attributes["count"] : attributes[:count], ) end |
Instance Method Details
#to_h ⇒ Hash
Returns a hash representation of this object.
1325 1326 1327 1328 1329 1330 1331 |
# File 'lib/apollo_deploy_signal_sdk_rails/types.rb', line 1325 def to_h { bucket: @bucket, type: @type, count: @count, }.compact end |