Class: Lockally::UpdateCalendarPoliciesRequest
- Inherits:
-
ApiModelBase
- Object
- ApiModelBase
- Lockally::UpdateCalendarPoliciesRequest
- Defined in:
- lib/lockally/models/update_calendar_policies_request.rb
Defined Under Namespace
Classes: EnumAttributeValidator
Instance Attribute Summary collapse
-
#booking_window_days ⇒ Object
Returns the value of attribute booking_window_days.
-
#external_invites_allowed ⇒ Object
Returns the value of attribute external_invites_allowed.
-
#external_sharing_allowed ⇒ Object
Returns the value of attribute external_sharing_allowed.
-
#max_meeting_duration_mins ⇒ Object
Returns the value of attribute max_meeting_duration_mins.
-
#public_links_enabled ⇒ Object
Returns the value of attribute public_links_enabled.
-
#recurring_meeting_limit ⇒ Object
Returns the value of attribute recurring_meeting_limit.
-
#resource_approval_mode ⇒ Object
Returns the value of attribute resource_approval_mode.
-
#working_hours_end ⇒ Object
Returns the value of attribute working_hours_end.
-
#working_hours_start ⇒ Object
Returns the value of attribute working_hours_start.
Class Method Summary collapse
-
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about.
-
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about.
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.build_from_hash(attributes) ⇒ Object
Builds the object from hash.
-
.openapi_nullable ⇒ Object
List of attributes with nullable: true.
-
.openapi_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(o) ⇒ Object
Checks equality by comparing each attribute.
- #eql?(o) ⇒ Boolean
-
#hash ⇒ Integer
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ UpdateCalendarPoliciesRequest
constructor
Initializes the object.
-
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid.
Methods inherited from ApiModelBase
_deserialize, #_to_hash, #to_body, #to_s
Constructor Details
#initialize(attributes = {}) ⇒ UpdateCalendarPoliciesRequest
Initializes the object
106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 |
# File 'lib/lockally/models/update_calendar_policies_request.rb', line 106 def initialize(attributes = {}) if (!attributes.is_a?(Hash)) fail ArgumentError, "The input argument (attributes) must be a hash in `Lockally::UpdateCalendarPoliciesRequest` initialize method" end # check to see if the attribute exists and convert string to symbol for hash key acceptable_attribute_map = self.class.acceptable_attribute_map attributes = attributes.each_with_object({}) { |(k, v), h| if (!acceptable_attribute_map.key?(k.to_sym)) fail ArgumentError, "`#{k}` is not a valid attribute in `Lockally::UpdateCalendarPoliciesRequest`. Please check the name to make sure it's valid. List of attributes: " + acceptable_attribute_map.keys.inspect end h[k.to_sym] = v } if attributes.key?(:'max_meeting_duration_mins') self.max_meeting_duration_mins = attributes[:'max_meeting_duration_mins'] end if attributes.key?(:'working_hours_start') self.working_hours_start = attributes[:'working_hours_start'] end if attributes.key?(:'working_hours_end') self.working_hours_end = attributes[:'working_hours_end'] end if attributes.key?(:'booking_window_days') self.booking_window_days = attributes[:'booking_window_days'] end if attributes.key?(:'recurring_meeting_limit') self.recurring_meeting_limit = attributes[:'recurring_meeting_limit'] end if attributes.key?(:'resource_approval_mode') self.resource_approval_mode = attributes[:'resource_approval_mode'] end if attributes.key?(:'external_invites_allowed') self.external_invites_allowed = attributes[:'external_invites_allowed'] end if attributes.key?(:'external_sharing_allowed') self.external_sharing_allowed = attributes[:'external_sharing_allowed'] end if attributes.key?(:'public_links_enabled') self.public_links_enabled = attributes[:'public_links_enabled'] end end |
Instance Attribute Details
#booking_window_days ⇒ Object
Returns the value of attribute booking_window_days.
24 25 26 |
# File 'lib/lockally/models/update_calendar_policies_request.rb', line 24 def booking_window_days @booking_window_days end |
#external_invites_allowed ⇒ Object
Returns the value of attribute external_invites_allowed.
30 31 32 |
# File 'lib/lockally/models/update_calendar_policies_request.rb', line 30 def external_invites_allowed @external_invites_allowed end |
#external_sharing_allowed ⇒ Object
Returns the value of attribute external_sharing_allowed.
32 33 34 |
# File 'lib/lockally/models/update_calendar_policies_request.rb', line 32 def external_sharing_allowed @external_sharing_allowed end |
#max_meeting_duration_mins ⇒ Object
Returns the value of attribute max_meeting_duration_mins.
18 19 20 |
# File 'lib/lockally/models/update_calendar_policies_request.rb', line 18 def max_meeting_duration_mins @max_meeting_duration_mins end |
#public_links_enabled ⇒ Object
Returns the value of attribute public_links_enabled.
34 35 36 |
# File 'lib/lockally/models/update_calendar_policies_request.rb', line 34 def public_links_enabled @public_links_enabled end |
#recurring_meeting_limit ⇒ Object
Returns the value of attribute recurring_meeting_limit.
26 27 28 |
# File 'lib/lockally/models/update_calendar_policies_request.rb', line 26 def recurring_meeting_limit @recurring_meeting_limit end |
#resource_approval_mode ⇒ Object
Returns the value of attribute resource_approval_mode.
28 29 30 |
# File 'lib/lockally/models/update_calendar_policies_request.rb', line 28 def resource_approval_mode @resource_approval_mode end |
#working_hours_end ⇒ Object
Returns the value of attribute working_hours_end.
22 23 24 |
# File 'lib/lockally/models/update_calendar_policies_request.rb', line 22 def working_hours_end @working_hours_end end |
#working_hours_start ⇒ Object
Returns the value of attribute working_hours_start.
20 21 22 |
# File 'lib/lockally/models/update_calendar_policies_request.rb', line 20 def working_hours_start @working_hours_start end |
Class Method Details
.acceptable_attribute_map ⇒ Object
Returns attribute mapping this model knows about
74 75 76 |
# File 'lib/lockally/models/update_calendar_policies_request.rb', line 74 def self.acceptable_attribute_map attribute_map end |
.acceptable_attributes ⇒ Object
Returns all the JSON keys this model knows about
79 80 81 |
# File 'lib/lockally/models/update_calendar_policies_request.rb', line 79 def self.acceptable_attributes acceptable_attribute_map.values end |
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
59 60 61 62 63 64 65 66 67 68 69 70 71 |
# File 'lib/lockally/models/update_calendar_policies_request.rb', line 59 def self.attribute_map { :'max_meeting_duration_mins' => :'max_meeting_duration_mins', :'working_hours_start' => :'working_hours_start', :'working_hours_end' => :'working_hours_end', :'booking_window_days' => :'booking_window_days', :'recurring_meeting_limit' => :'recurring_meeting_limit', :'resource_approval_mode' => :'resource_approval_mode', :'external_invites_allowed' => :'external_invites_allowed', :'external_sharing_allowed' => :'external_sharing_allowed', :'public_links_enabled' => :'public_links_enabled' } end |
.build_from_hash(attributes) ⇒ Object
Builds the object from hash
299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 |
# File 'lib/lockally/models/update_calendar_policies_request.rb', line 299 def self.build_from_hash(attributes) return nil unless attributes.is_a?(Hash) attributes = attributes.transform_keys(&:to_sym) transformed_hash = {} openapi_types.each_pair do |key, type| if attributes.key?(attribute_map[key]) && attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = nil elsif type =~ /\AArray<(.*)>/i # check to ensure the input is an array given that the attribute # is documented as an array but the input is not if attributes[attribute_map[key]].is_a?(Array) transformed_hash["#{key}"] = attributes[attribute_map[key]].map { |v| _deserialize($1, v) } end elsif !attributes[attribute_map[key]].nil? transformed_hash["#{key}"] = _deserialize(type, attributes[attribute_map[key]]) end end new(transformed_hash) end |
.openapi_nullable ⇒ Object
List of attributes with nullable: true
99 100 101 102 |
# File 'lib/lockally/models/update_calendar_policies_request.rb', line 99 def self.openapi_nullable Set.new([ ]) end |
.openapi_types ⇒ Object
Attribute type mapping.
84 85 86 87 88 89 90 91 92 93 94 95 96 |
# File 'lib/lockally/models/update_calendar_policies_request.rb', line 84 def self.openapi_types { :'max_meeting_duration_mins' => :'Integer', :'working_hours_start' => :'String', :'working_hours_end' => :'String', :'booking_window_days' => :'Integer', :'recurring_meeting_limit' => :'Integer', :'resource_approval_mode' => :'String', :'external_invites_allowed' => :'Boolean', :'external_sharing_allowed' => :'Boolean', :'public_links_enabled' => :'Boolean' } end |
Instance Method Details
#==(o) ⇒ Object
Checks equality by comparing each attribute.
270 271 272 273 274 275 276 277 278 279 280 281 282 |
# File 'lib/lockally/models/update_calendar_policies_request.rb', line 270 def ==(o) return true if self.equal?(o) self.class == o.class && max_meeting_duration_mins == o.max_meeting_duration_mins && working_hours_start == o.working_hours_start && working_hours_end == o.working_hours_end && booking_window_days == o.booking_window_days && recurring_meeting_limit == o.recurring_meeting_limit && resource_approval_mode == o.resource_approval_mode && external_invites_allowed == o.external_invites_allowed && external_sharing_allowed == o.external_sharing_allowed && public_links_enabled == o.public_links_enabled end |
#eql?(o) ⇒ Boolean
286 287 288 |
# File 'lib/lockally/models/update_calendar_policies_request.rb', line 286 def eql?(o) self == o end |
#hash ⇒ Integer
Calculates hash code according to all attributes.
292 293 294 |
# File 'lib/lockally/models/update_calendar_policies_request.rb', line 292 def hash [max_meeting_duration_mins, working_hours_start, working_hours_end, booking_window_days, recurring_meeting_limit, resource_approval_mode, external_invites_allowed, external_sharing_allowed, public_links_enabled].hash end |
#list_invalid_properties ⇒ Object
Show invalid properties with the reasons. Usually used together with valid?
159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 |
# File 'lib/lockally/models/update_calendar_policies_request.rb', line 159 def list_invalid_properties warn '[DEPRECATED] the `list_invalid_properties` method is obsolete' invalid_properties = Array.new if !@max_meeting_duration_mins.nil? && @max_meeting_duration_mins > 1440 invalid_properties.push('invalid value for "max_meeting_duration_mins", must be smaller than or equal to 1440.') end if !@max_meeting_duration_mins.nil? && @max_meeting_duration_mins < 15 invalid_properties.push('invalid value for "max_meeting_duration_mins", must be greater than or equal to 15.') end if !@booking_window_days.nil? && @booking_window_days > 365 invalid_properties.push('invalid value for "booking_window_days", must be smaller than or equal to 365.') end if !@booking_window_days.nil? && @booking_window_days < 1 invalid_properties.push('invalid value for "booking_window_days", must be greater than or equal to 1.') end if !@recurring_meeting_limit.nil? && @recurring_meeting_limit > 365 invalid_properties.push('invalid value for "recurring_meeting_limit", must be smaller than or equal to 365.') end if !@recurring_meeting_limit.nil? && @recurring_meeting_limit < 1 invalid_properties.push('invalid value for "recurring_meeting_limit", must be greater than or equal to 1.') end invalid_properties end |
#to_hash ⇒ Hash
Returns the object in the form of hash
321 322 323 324 325 326 327 328 329 330 331 332 333 |
# File 'lib/lockally/models/update_calendar_policies_request.rb', line 321 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = self.send(attr) if value.nil? is_nullable = self.class.openapi_nullable.include?(attr) next if !is_nullable || (is_nullable && !instance_variable_defined?(:"@#{attr}")) end hash[param] = _to_hash(value) end hash end |
#valid? ⇒ Boolean
Check to see if the all the properties in the model are valid
191 192 193 194 195 196 197 198 199 200 201 202 |
# File 'lib/lockally/models/update_calendar_policies_request.rb', line 191 def valid? warn '[DEPRECATED] the `valid?` method is obsolete' return false if !@max_meeting_duration_mins.nil? && @max_meeting_duration_mins > 1440 return false if !@max_meeting_duration_mins.nil? && @max_meeting_duration_mins < 15 return false if !@booking_window_days.nil? && @booking_window_days > 365 return false if !@booking_window_days.nil? && @booking_window_days < 1 return false if !@recurring_meeting_limit.nil? && @recurring_meeting_limit > 365 return false if !@recurring_meeting_limit.nil? && @recurring_meeting_limit < 1 resource_approval_mode_validator = EnumAttributeValidator.new('String', ["auto_approve", "require_approval", "restricted"]) return false unless resource_approval_mode_validator.valid?(@resource_approval_mode) true end |