Sha256: 150ba7b4ecd32fe0fa9dfa91fef19a18d89cbff39b1b3c3bd70c4faf0cb13a28

Contents?: true

Size: 915 Bytes

Versions: 14

Compression:

Stored size: 915 Bytes

Contents

module Fog
  module DNS
    class Google
      ##
      # Represents a Change resource
      #
      # @see https://developers.google.com/cloud-dns/api/v1/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?
          status == PENDING_STATE
        end

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

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
fog-google-0.6.0 lib/fog/dns/google/models/change.rb
fog-google-0.5.5 lib/fog/dns/google/models/change.rb
fog-google-0.5.4 lib/fog/dns/google/models/change.rb
fog-google-0.5.3 lib/fog/dns/google/models/change.rb
fog-google-0.5.2 lib/fog/dns/google/models/change.rb
fog-google-0.5.1 lib/fog/dns/google/models/change.rb
fog-google-0.5.0 lib/fog/dns/google/models/change.rb
fog-google-0.4.2 lib/fog/dns/google/models/change.rb
fog-google-0.4.1 lib/fog/dns/google/models/change.rb
fog-google-0.4.0 lib/fog/dns/google/models/change.rb
fog-google-0.3.2 lib/fog/dns/google/models/change.rb
fog-google-0.3.1 lib/fog/dns/google/models/change.rb
fog-google-0.3.0 lib/fog/dns/google/models/change.rb
fog-google-0.2.0 lib/fog/dns/google/models/change.rb