Class: Google::Apis::BooksV1::ConcurrentAccessRestriction

Inherits:
Object
  • Object
show all
Includes:
Core::Hashable, Core::JsonObjectSupport
Defined in:
generated/google/apis/books_v1/classes.rb,
generated/google/apis/books_v1/representations.rb,
generated/google/apis/books_v1/representations.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Core::JsonObjectSupport

#to_json

Methods included from Core::Hashable

process_value, #to_h

Constructor Details

#initialize(**args) ⇒ ConcurrentAccessRestriction

Returns a new instance of ConcurrentAccessRestriction.


786
787
788
# File 'generated/google/apis/books_v1/classes.rb', line 786

def initialize(**args)
   update!(**args)
end

Instance Attribute Details

#device_allowedBoolean Also known as: device_allowed?

Whether access is granted for this (user, device, volume). Corresponds to the JSON property deviceAllowed

Returns:

  • (Boolean)

731
732
733
# File 'generated/google/apis/books_v1/classes.rb', line 731

def device_allowed
  @device_allowed
end

#kindString

Resource type. Corresponds to the JSON property kind

Returns:

  • (String)

737
738
739
# File 'generated/google/apis/books_v1/classes.rb', line 737

def kind
  @kind
end

#max_concurrent_devicesFixnum

The maximum number of concurrent access licenses for this volume. Corresponds to the JSON property maxConcurrentDevices

Returns:

  • (Fixnum)

742
743
744
# File 'generated/google/apis/books_v1/classes.rb', line 742

def max_concurrent_devices
  @max_concurrent_devices
end

#messageString

Error/warning message. Corresponds to the JSON property message

Returns:

  • (String)

747
748
749
# File 'generated/google/apis/books_v1/classes.rb', line 747

def message
  @message
end

#nonceString

Client nonce for verification. Download access and client-validation only. Corresponds to the JSON property nonce

Returns:

  • (String)

752
753
754
# File 'generated/google/apis/books_v1/classes.rb', line 752

def nonce
  @nonce
end

#reason_codeString

Error/warning reason code. Corresponds to the JSON property reasonCode

Returns:

  • (String)

757
758
759
# File 'generated/google/apis/books_v1/classes.rb', line 757

def reason_code
  @reason_code
end

#restrictedBoolean Also known as: restricted?

Whether this volume has any concurrent access restrictions. Corresponds to the JSON property restricted

Returns:

  • (Boolean)

762
763
764
# File 'generated/google/apis/books_v1/classes.rb', line 762

def restricted
  @restricted
end

#signatureString

Response signature. Corresponds to the JSON property signature

Returns:

  • (String)

768
769
770
# File 'generated/google/apis/books_v1/classes.rb', line 768

def signature
  @signature
end

#sourceString

Client app identifier for verification. Download access and client-validation only. Corresponds to the JSON property source

Returns:

  • (String)

774
775
776
# File 'generated/google/apis/books_v1/classes.rb', line 774

def source
  @source
end

#time_window_secondsFixnum

Time in seconds for license auto-expiration. Corresponds to the JSON property timeWindowSeconds

Returns:

  • (Fixnum)

779
780
781
# File 'generated/google/apis/books_v1/classes.rb', line 779

def time_window_seconds
  @time_window_seconds
end

#volume_idString

Identifies the volume for which this entry applies. Corresponds to the JSON property volumeId

Returns:

  • (String)

784
785
786
# File 'generated/google/apis/books_v1/classes.rb', line 784

def volume_id
  @volume_id
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object


791
792
793
794
795
796
797
798
799
800
801
802
803
# File 'generated/google/apis/books_v1/classes.rb', line 791

def update!(**args)
  @device_allowed = args[:device_allowed] if args.key?(:device_allowed)
  @kind = args[:kind] if args.key?(:kind)
  @max_concurrent_devices = args[:max_concurrent_devices] if args.key?(:max_concurrent_devices)
  @message = args[:message] if args.key?(:message)
  @nonce = args[:nonce] if args.key?(:nonce)
  @reason_code = args[:reason_code] if args.key?(:reason_code)
  @restricted = args[:restricted] if args.key?(:restricted)
  @signature = args[:signature] if args.key?(:signature)
  @source = args[:source] if args.key?(:source)
  @time_window_seconds = args[:time_window_seconds] if args.key?(:time_window_seconds)
  @volume_id = args[:volume_id] if args.key?(:volume_id)
end