Class: Google::Apis::BooksV1::DownloadAccessRestriction
- Inherits:
- 
      Object
      
        - Object
- Google::Apis::BooksV1::DownloadAccessRestriction
 
- 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
- 
  
    
      #device_allowed  ⇒ Boolean 
    
    
      (also: #device_allowed?)
    
  
  
  
  
    
    
  
  
  
  
  
  
    If restricted, whether access is granted for this (user, device, volume). 
- 
  
    
      #downloads_acquired  ⇒ Fixnum 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    If restricted, the number of content download licenses already acquired ( including the requesting client, if licensed). 
- 
  
    
      #just_acquired  ⇒ Boolean 
    
    
      (also: #just_acquired?)
    
  
  
  
  
    
    
  
  
  
  
  
  
    If deviceAllowed, whether access was just acquired with this request. 
- 
  
    
      #kind  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Resource type. 
- 
  
    
      #max_download_devices  ⇒ Fixnum 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    If restricted, the maximum number of content download licenses for this volume. 
- 
  
    
      #message  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Error/warning message. 
- 
  
    
      #nonce  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Client nonce for verification. 
- 
  
    
      #reason_code  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Error/warning reason code. 
- 
  
    
      #restricted  ⇒ Boolean 
    
    
      (also: #restricted?)
    
  
  
  
  
    
    
  
  
  
  
  
  
    Whether this volume has any download access restrictions. 
- 
  
    
      #signature  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Response signature. 
- 
  
    
      #source  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Client app identifier for verification. 
- 
  
    
      #volume_id  ⇒ String 
    
    
  
  
  
  
    
    
  
  
  
  
  
  
    Identifies the volume for which this entry applies. 
Instance Method Summary collapse
- 
  
    
      #initialize(**args)  ⇒ DownloadAccessRestriction 
    
    
  
  
  
    constructor
  
  
  
  
  
  
  
    A new instance of DownloadAccessRestriction. 
- 
  
    
      #update!(**args)  ⇒ Object 
    
    
  
  
  
  
  
  
  
  
  
    Update properties of this object. 
Methods included from Core::JsonObjectSupport
Methods included from Core::Hashable
Constructor Details
#initialize(**args) ⇒ DownloadAccessRestriction
Returns a new instance of DownloadAccessRestriction
| 1508 1509 1510 | # File 'generated/google/apis/books_v1/classes.rb', line 1508 def initialize(**args) update!(**args) end | 
Instance Attribute Details
#device_allowed ⇒ Boolean Also known as: device_allowed?
If restricted, whether access is granted for this (user, device, volume).
Corresponds to the JSON property deviceAllowed
| 1444 1445 1446 | # File 'generated/google/apis/books_v1/classes.rb', line 1444 def device_allowed @device_allowed end | 
#downloads_acquired ⇒ Fixnum
If restricted, the number of content download licenses already acquired (
including the requesting client, if licensed).
Corresponds to the JSON property downloadsAcquired
| 1451 1452 1453 | # File 'generated/google/apis/books_v1/classes.rb', line 1451 def downloads_acquired @downloads_acquired end | 
#just_acquired ⇒ Boolean Also known as: just_acquired?
If deviceAllowed, whether access was just acquired with this request.
Corresponds to the JSON property justAcquired
| 1456 1457 1458 | # File 'generated/google/apis/books_v1/classes.rb', line 1456 def just_acquired @just_acquired end | 
#kind ⇒ String
Resource type.
Corresponds to the JSON property kind
| 1462 1463 1464 | # File 'generated/google/apis/books_v1/classes.rb', line 1462 def kind @kind end | 
#max_download_devices ⇒ Fixnum
If restricted, the maximum number of content download licenses for this volume.
Corresponds to the JSON property maxDownloadDevices
| 1467 1468 1469 | # File 'generated/google/apis/books_v1/classes.rb', line 1467 def max_download_devices @max_download_devices end | 
#message ⇒ String
Error/warning message.
Corresponds to the JSON property message
| 1472 1473 1474 | # File 'generated/google/apis/books_v1/classes.rb', line 1472 def @message end | 
#nonce ⇒ String
Client nonce for verification. Download access and client-validation only.
Corresponds to the JSON property nonce
| 1477 1478 1479 | # File 'generated/google/apis/books_v1/classes.rb', line 1477 def nonce @nonce end | 
#reason_code ⇒ String
Error/warning reason code. Additional codes may be added in the future. 0 OK
100 ACCESS_DENIED_PUBLISHER_LIMIT 101 ACCESS_DENIED_LIMIT 200
WARNING_USED_LAST_ACCESS
Corresponds to the JSON property reasonCode
| 1484 1485 1486 | # File 'generated/google/apis/books_v1/classes.rb', line 1484 def reason_code @reason_code end | 
#restricted ⇒ Boolean Also known as: restricted?
Whether this volume has any download access restrictions.
Corresponds to the JSON property restricted
| 1489 1490 1491 | # File 'generated/google/apis/books_v1/classes.rb', line 1489 def restricted @restricted end | 
#signature ⇒ String
Response signature.
Corresponds to the JSON property signature
| 1495 1496 1497 | # File 'generated/google/apis/books_v1/classes.rb', line 1495 def signature @signature end | 
#source ⇒ String
Client app identifier for verification. Download access and client-validation
only.
Corresponds to the JSON property source
| 1501 1502 1503 | # File 'generated/google/apis/books_v1/classes.rb', line 1501 def source @source end | 
#volume_id ⇒ String
Identifies the volume for which this entry applies.
Corresponds to the JSON property volumeId
| 1506 1507 1508 | # File 'generated/google/apis/books_v1/classes.rb', line 1506 def volume_id @volume_id end | 
Instance Method Details
#update!(**args) ⇒ Object
Update properties of this object
| 1513 1514 1515 1516 1517 1518 1519 1520 1521 1522 1523 1524 1525 1526 | # File 'generated/google/apis/books_v1/classes.rb', line 1513 def update!(**args) @device_allowed = args[:device_allowed] if args.key?(:device_allowed) @downloads_acquired = args[:downloads_acquired] if args.key?(:downloads_acquired) @just_acquired = args[:just_acquired] if args.key?(:just_acquired) @kind = args[:kind] if args.key?(:kind) @max_download_devices = args[:max_download_devices] if args.key?(:max_download_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) @volume_id = args[:volume_id] if args.key?(:volume_id) end |