lib/cloudsmith-api/models/entitlements_create.rb in cloudsmith-api-0.57.1 vs lib/cloudsmith-api/models/entitlements_create.rb in cloudsmith-api-1.30.0
- old
+ new
@@ -13,10 +13,13 @@
require 'date'
module CloudsmithApi
class EntitlementsCreate
+ # If checked, a EULA acceptance is required for this token.
+ attr_accessor :eula_required
+
# If enabled, the token will allow downloads based on configured restrictions (if any).
attr_accessor :is_active
# The maximum download bandwidth allowed for the token. Values are expressed as the selected unit of bandwidth. Please note that since downloads are calculated asynchronously (after the download happens), the limit may not be imposed immediately but at a later point.
attr_accessor :limit_bandwidth
@@ -59,10 +62,11 @@
# Attribute mapping from ruby-style variable name to JSON key.
def self.attribute_map
{
+ :'eula_required' => :'eula_required',
:'is_active' => :'is_active',
:'limit_bandwidth' => :'limit_bandwidth',
:'limit_bandwidth_unit' => :'limit_bandwidth_unit',
:'limit_date_range_from' => :'limit_date_range_from',
:'limit_date_range_to' => :'limit_date_range_to',
@@ -79,10 +83,11 @@
end
# Attribute type mapping.
def self.swagger_types
{
+ :'eula_required' => :'BOOLEAN',
:'is_active' => :'BOOLEAN',
:'limit_bandwidth' => :'Integer',
:'limit_bandwidth_unit' => :'String',
:'limit_date_range_from' => :'String',
:'limit_date_range_to' => :'String',
@@ -104,10 +109,14 @@
return unless attributes.is_a?(Hash)
# convert string to symbol for hash key
attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
+ if attributes.has_key?(:'eula_required')
+ self.eula_required = attributes[:'eula_required']
+ end
+
if attributes.has_key?(:'is_active')
self.is_active = attributes[:'is_active']
end
if attributes.has_key?(:'limit_bandwidth')
@@ -185,10 +194,11 @@
# Checks equality by comparing each attribute.
# @param [Object] Object to be compared
def ==(o)
return true if self.equal?(o)
self.class == o.class &&
+ eula_required == o.eula_required &&
is_active == o.is_active &&
limit_bandwidth == o.limit_bandwidth &&
limit_bandwidth_unit == o.limit_bandwidth_unit &&
limit_date_range_from == o.limit_date_range_from &&
limit_date_range_to == o.limit_date_range_to &&
@@ -210,10 +220,10 @@
end
# Calculates hash code according to all attributes.
# @return [Fixnum] Hash code
def hash
- [is_active, limit_bandwidth, limit_bandwidth_unit, limit_date_range_from, limit_date_range_to, limit_num_clients, limit_num_downloads, limit_package_query, limit_path_query, metadata, name, scheduled_reset_at, scheduled_reset_period, token].hash
+ [eula_required, is_active, limit_bandwidth, limit_bandwidth_unit, limit_date_range_from, limit_date_range_to, limit_num_clients, limit_num_downloads, limit_package_query, limit_path_query, metadata, name, scheduled_reset_at, scheduled_reset_period, token].hash
end
# Builds the object from hash
# @param [Hash] attributes Model attributes in the form of hash
# @return [Object] Returns the model itself