Sha256: 1d92a0b237d4d571db4cdffe6da94b1f0fd5818eea4b28c488a78d3e5aabd3f9

Contents?: true

Size: 956 Bytes

Versions: 14

Compression:

Stored size: 956 Bytes

Contents

require 'fog/core/model'

module Fog
  module DNS
    class Google
      ##
      # Represents a Change resource
      #
      # @see https://developers.google.com/cloud-dns/api/v1beta1/changes
      class Change < Fog::Model
        identity :id

        attribute :kind
        attribute :start_time, :aliases => 'startTime'
        attribute :status
        attribute :additions
        attribute :deletions

        DONE_STATE    = 'done'
        PENDING_STATE = 'pending'

        ##
        # Checks if the change operation is pending
        #
        # @return [Boolean] True if the change operation is pending; False otherwise
        def pending?
          self.status == PENDING_STATE
        end

        ##
        # Checks if the change operation is done
        #
        # @return [Boolean] True if the change operation is done; False otherwise
        def ready?
          self.status == DONE_STATE
        end
      end
    end
  end
end

Version data entries

14 entries across 14 versions & 4 rubygems

Version Path
fog-google-0.0.9 lib/fog/google/models/dns/change.rb
vagrant-cloudstack-1.2.0 vendor/bundle/gems/fog-google-0.0.7/lib/fog/google/models/dns/change.rb
fog-google-0.0.7 lib/fog/google/models/dns/change.rb
fog-google-0.0.6 lib/fog/google/models/dns/change.rb
fog-google-0.0.5 lib/fog/google/models/dns/change.rb
fog-google-0.0.4 lib/fog/google/models/dns/change.rb
fog-google-0.0.3 lib/fog/google/models/dns/change.rb
fog-google-0.0.2 lib/fog/google/models/dns/change.rb
fog-1.29.0 lib/fog/google/models/dns/change.rb
fog-1.28.0 lib/fog/google/models/dns/change.rb
fog-1.27.0 lib/fog/google/models/dns/change.rb
fog-1.26.0 lib/fog/google/models/dns/change.rb
fog-1.25.0 lib/fog/google/models/dns/change.rb
nsidc-fog-1.24.1 lib/fog/google/models/dns/change.rb