Class: Google::Apis::BooksV1::DownloadAccessRestriction

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) ⇒ DownloadAccessRestriction

Returns a new instance of DownloadAccessRestriction.



1545
1546
1547
# File 'generated/google/apis/books_v1/classes.rb', line 1545

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

Instance Attribute Details

#device_allowedBoolean Also known as: device_allowed?

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

Returns:

  • (Boolean)


1481
1482
1483
# File 'generated/google/apis/books_v1/classes.rb', line 1481

def device_allowed
  @device_allowed
end

#downloads_acquiredFixnum

If restricted, the number of content download licenses already acquired ( including the requesting client, if licensed). Corresponds to the JSON property downloadsAcquired

Returns:

  • (Fixnum)


1488
1489
1490
# File 'generated/google/apis/books_v1/classes.rb', line 1488

def downloads_acquired
  @downloads_acquired
end

#just_acquiredBoolean Also known as: just_acquired?

If deviceAllowed, whether access was just acquired with this request. Corresponds to the JSON property justAcquired

Returns:

  • (Boolean)


1493
1494
1495
# File 'generated/google/apis/books_v1/classes.rb', line 1493

def just_acquired
  @just_acquired
end

#kindString

Resource type. Corresponds to the JSON property kind

Returns:

  • (String)


1499
1500
1501
# File 'generated/google/apis/books_v1/classes.rb', line 1499

def kind
  @kind
end

#max_download_devicesFixnum

If restricted, the maximum number of content download licenses for this volume. Corresponds to the JSON property maxDownloadDevices

Returns:

  • (Fixnum)


1504
1505
1506
# File 'generated/google/apis/books_v1/classes.rb', line 1504

def max_download_devices
  @max_download_devices
end

#messageString

Error/warning message. Corresponds to the JSON property message

Returns:

  • (String)


1509
1510
1511
# File 'generated/google/apis/books_v1/classes.rb', line 1509

def message
  @message
end

#nonceString

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

Returns:

  • (String)


1514
1515
1516
# File 'generated/google/apis/books_v1/classes.rb', line 1514

def nonce
  @nonce
end

#reason_codeString

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

Returns:

  • (String)


1521
1522
1523
# File 'generated/google/apis/books_v1/classes.rb', line 1521

def reason_code
  @reason_code
end

#restrictedBoolean Also known as: restricted?

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

Returns:

  • (Boolean)


1526
1527
1528
# File 'generated/google/apis/books_v1/classes.rb', line 1526

def restricted
  @restricted
end

#signatureString

Response signature. Corresponds to the JSON property signature

Returns:

  • (String)


1532
1533
1534
# File 'generated/google/apis/books_v1/classes.rb', line 1532

def signature
  @signature
end

#sourceString

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

Returns:

  • (String)


1538
1539
1540
# File 'generated/google/apis/books_v1/classes.rb', line 1538

def source
  @source
end

#volume_idString

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

Returns:

  • (String)


1543
1544
1545
# File 'generated/google/apis/books_v1/classes.rb', line 1543

def volume_id
  @volume_id
end

Instance Method Details

#update!(**args) ⇒ Object

Update properties of this object



1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
# File 'generated/google/apis/books_v1/classes.rb', line 1550

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