Class: OCI::Desktops::Models::DesktopDevicePolicy
- Inherits:
-
Object
- Object
- OCI::Desktops::Models::DesktopDevicePolicy
- Defined in:
- lib/oci/desktops/models/desktop_device_policy.rb
Overview
Provides the settings for desktop and client device options, such as audio in and out, client drive mapping, and clipboard access.
Constant Summary collapse
- CLIPBOARD_MODE_ENUM =
[ CLIPBOARD_MODE_NONE = 'NONE'.freeze, CLIPBOARD_MODE_TODESKTOP = 'TODESKTOP'.freeze, CLIPBOARD_MODE_FROMDESKTOP = 'FROMDESKTOP'.freeze, CLIPBOARD_MODE_FULL = 'FULL'.freeze, CLIPBOARD_MODE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- AUDIO_MODE_ENUM =
[ AUDIO_MODE_NONE = 'NONE'.freeze, AUDIO_MODE_TODESKTOP = 'TODESKTOP'.freeze, AUDIO_MODE_FROMDESKTOP = 'FROMDESKTOP'.freeze, AUDIO_MODE_FULL = 'FULL'.freeze, AUDIO_MODE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
- CDM_MODE_ENUM =
[ CDM_MODE_NONE = 'NONE'.freeze, CDM_MODE_READONLY = 'READONLY'.freeze, CDM_MODE_FULL = 'FULL'.freeze, CDM_MODE_UNKNOWN_ENUM_VALUE = 'UNKNOWN_ENUM_VALUE'.freeze ].freeze
Instance Attribute Summary collapse
-
#audio_mode ⇒ String
[Required] The audio mode.
-
#cdm_mode ⇒ String
[Required] The client local drive access mode.
-
#clipboard_mode ⇒ String
[Required] The clipboard mode.
-
#is_display_enabled ⇒ BOOLEAN
[Required] Indicates whether the display is enabled.
-
#is_keyboard_enabled ⇒ BOOLEAN
[Required] Indicates whether the keyboard is enabled.
-
#is_pointer_enabled ⇒ BOOLEAN
[Required] Indicates whether the pointer is enabled.
-
#is_printing_enabled ⇒ BOOLEAN
[Required] Indicates whether printing is enabled.
Class Method Summary collapse
-
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
-
.swagger_types ⇒ Object
Attribute type mapping.
Instance Method Summary collapse
-
#==(other) ⇒ Object
Checks equality by comparing each attribute.
-
#build_from_hash(attributes) ⇒ Object
Builds the object from hash.
- #eql?(other) ⇒ Boolean
-
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
-
#initialize(attributes = {}) ⇒ DesktopDevicePolicy
constructor
Initializes the object.
-
#to_hash ⇒ Hash
Returns the object in the form of hash.
-
#to_s ⇒ String
Returns the string representation of the object.
Constructor Details
#initialize(attributes = {}) ⇒ DesktopDevicePolicy
Initializes the object
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 156 157 158 159 160 161 162 163 164 165 166 167 168 |
# File 'lib/oci/desktops/models/desktop_device_policy.rb', line 121 def initialize(attributes = {}) 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 } self.clipboard_mode = attributes[:'clipboardMode'] if attributes[:'clipboardMode'] raise 'You cannot provide both :clipboardMode and :clipboard_mode' if attributes.key?(:'clipboardMode') && attributes.key?(:'clipboard_mode') self.clipboard_mode = attributes[:'clipboard_mode'] if attributes[:'clipboard_mode'] self.audio_mode = attributes[:'audioMode'] if attributes[:'audioMode'] raise 'You cannot provide both :audioMode and :audio_mode' if attributes.key?(:'audioMode') && attributes.key?(:'audio_mode') self.audio_mode = attributes[:'audio_mode'] if attributes[:'audio_mode'] self.cdm_mode = attributes[:'cdmMode'] if attributes[:'cdmMode'] raise 'You cannot provide both :cdmMode and :cdm_mode' if attributes.key?(:'cdmMode') && attributes.key?(:'cdm_mode') self.cdm_mode = attributes[:'cdm_mode'] if attributes[:'cdm_mode'] self.is_printing_enabled = attributes[:'isPrintingEnabled'] unless attributes[:'isPrintingEnabled'].nil? raise 'You cannot provide both :isPrintingEnabled and :is_printing_enabled' if attributes.key?(:'isPrintingEnabled') && attributes.key?(:'is_printing_enabled') self.is_printing_enabled = attributes[:'is_printing_enabled'] unless attributes[:'is_printing_enabled'].nil? self.is_pointer_enabled = attributes[:'isPointerEnabled'] unless attributes[:'isPointerEnabled'].nil? raise 'You cannot provide both :isPointerEnabled and :is_pointer_enabled' if attributes.key?(:'isPointerEnabled') && attributes.key?(:'is_pointer_enabled') self.is_pointer_enabled = attributes[:'is_pointer_enabled'] unless attributes[:'is_pointer_enabled'].nil? self.is_keyboard_enabled = attributes[:'isKeyboardEnabled'] unless attributes[:'isKeyboardEnabled'].nil? raise 'You cannot provide both :isKeyboardEnabled and :is_keyboard_enabled' if attributes.key?(:'isKeyboardEnabled') && attributes.key?(:'is_keyboard_enabled') self.is_keyboard_enabled = attributes[:'is_keyboard_enabled'] unless attributes[:'is_keyboard_enabled'].nil? self.is_display_enabled = attributes[:'isDisplayEnabled'] unless attributes[:'isDisplayEnabled'].nil? raise 'You cannot provide both :isDisplayEnabled and :is_display_enabled' if attributes.key?(:'isDisplayEnabled') && attributes.key?(:'is_display_enabled') self.is_display_enabled = attributes[:'is_display_enabled'] unless attributes[:'is_display_enabled'].nil? end |
Instance Attribute Details
#audio_mode ⇒ String
[Required] The audio mode. NONE: No access to the local audio devices is permitted. TODESKTOP: The user may record audio on their desktop. FROMDESKTOP: The user may play audio on their desktop. FULL: The user may play and record audio on their desktop.
52 53 54 |
# File 'lib/oci/desktops/models/desktop_device_policy.rb', line 52 def audio_mode @audio_mode end |
#cdm_mode ⇒ String
[Required] The client local drive access mode. NONE: No access to local drives permitted. READONLY: The user may read from local drives on their desktop. FULL: The user may read from and write to their local drives on their desktop.
60 61 62 |
# File 'lib/oci/desktops/models/desktop_device_policy.rb', line 60 def cdm_mode @cdm_mode end |
#clipboard_mode ⇒ String
[Required] The clipboard mode. NONE: No access to the local clipboard is permitted. TODESKTOP: The clipboard can be used to transfer data to the desktop only. FROMDESKTOP: The clipboard can be used to transfer data from the desktop only. FULL: The clipboard can be used to transfer data to and from the desktop.
43 44 45 |
# File 'lib/oci/desktops/models/desktop_device_policy.rb', line 43 def clipboard_mode @clipboard_mode end |
#is_display_enabled ⇒ BOOLEAN
[Required] Indicates whether the display is enabled.
76 77 78 |
# File 'lib/oci/desktops/models/desktop_device_policy.rb', line 76 def is_display_enabled @is_display_enabled end |
#is_keyboard_enabled ⇒ BOOLEAN
[Required] Indicates whether the keyboard is enabled.
72 73 74 |
# File 'lib/oci/desktops/models/desktop_device_policy.rb', line 72 def is_keyboard_enabled @is_keyboard_enabled end |
#is_pointer_enabled ⇒ BOOLEAN
[Required] Indicates whether the pointer is enabled.
68 69 70 |
# File 'lib/oci/desktops/models/desktop_device_policy.rb', line 68 def is_pointer_enabled @is_pointer_enabled end |
#is_printing_enabled ⇒ BOOLEAN
[Required] Indicates whether printing is enabled.
64 65 66 |
# File 'lib/oci/desktops/models/desktop_device_policy.rb', line 64 def is_printing_enabled @is_printing_enabled end |
Class Method Details
.attribute_map ⇒ Object
Attribute mapping from ruby-style variable name to JSON key.
79 80 81 82 83 84 85 86 87 88 89 90 91 |
# File 'lib/oci/desktops/models/desktop_device_policy.rb', line 79 def self.attribute_map { # rubocop:disable Style/SymbolLiteral 'clipboard_mode': :'clipboardMode', 'audio_mode': :'audioMode', 'cdm_mode': :'cdmMode', 'is_printing_enabled': :'isPrintingEnabled', 'is_pointer_enabled': :'isPointerEnabled', 'is_keyboard_enabled': :'isKeyboardEnabled', 'is_display_enabled': :'isDisplayEnabled' # rubocop:enable Style/SymbolLiteral } end |
.swagger_types ⇒ Object
Attribute type mapping.
94 95 96 97 98 99 100 101 102 103 104 105 106 |
# File 'lib/oci/desktops/models/desktop_device_policy.rb', line 94 def self.swagger_types { # rubocop:disable Style/SymbolLiteral 'clipboard_mode': :'String', 'audio_mode': :'String', 'cdm_mode': :'String', 'is_printing_enabled': :'BOOLEAN', 'is_pointer_enabled': :'BOOLEAN', 'is_keyboard_enabled': :'BOOLEAN', 'is_display_enabled': :'BOOLEAN' # rubocop:enable Style/SymbolLiteral } end |
Instance Method Details
#==(other) ⇒ Object
Checks equality by comparing each attribute.
216 217 218 219 220 221 222 223 224 225 226 227 |
# File 'lib/oci/desktops/models/desktop_device_policy.rb', line 216 def ==(other) return true if equal?(other) self.class == other.class && clipboard_mode == other.clipboard_mode && audio_mode == other.audio_mode && cdm_mode == other.cdm_mode && is_printing_enabled == other.is_printing_enabled && is_pointer_enabled == other.is_pointer_enabled && is_keyboard_enabled == other.is_keyboard_enabled && is_display_enabled == other.is_display_enabled end |
#build_from_hash(attributes) ⇒ Object
Builds the object from hash
252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 |
# File 'lib/oci/desktops/models/desktop_device_policy.rb', line 252 def build_from_hash(attributes) return nil unless attributes.is_a?(Hash) self.class.swagger_types.each_pair do |key, type| if type =~ /^Array<(.*)>/i # check to ensure the input is an array given that the the attribute # is documented as an array but the input is not if attributes[self.class.attribute_map[key]].is_a?(Array) public_method("#{key}=").call( attributes[self.class.attribute_map[key]] .map { |v| OCI::Internal::Util.convert_to_type(Regexp.last_match(1), v) } ) end elsif !attributes[self.class.attribute_map[key]].nil? public_method("#{key}=").call( OCI::Internal::Util.convert_to_type(type, attributes[self.class.attribute_map[key]]) ) end # or else data not found in attributes(hash), not an issue as the data can be optional end self end |
#eql?(other) ⇒ Boolean
232 233 234 |
# File 'lib/oci/desktops/models/desktop_device_policy.rb', line 232 def eql?(other) self == other end |
#hash ⇒ Fixnum
Calculates hash code according to all attributes.
241 242 243 |
# File 'lib/oci/desktops/models/desktop_device_policy.rb', line 241 def hash [clipboard_mode, audio_mode, cdm_mode, is_printing_enabled, is_pointer_enabled, is_keyboard_enabled, is_display_enabled].hash end |
#to_hash ⇒ Hash
Returns the object in the form of hash
285 286 287 288 289 290 291 292 293 294 |
# File 'lib/oci/desktops/models/desktop_device_policy.rb', line 285 def to_hash hash = {} self.class.attribute_map.each_pair do |attr, param| value = public_method(attr).call next if value.nil? && !instance_variable_defined?("@#{attr}") hash[param] = _to_hash(value) end hash end |
#to_s ⇒ String
Returns the string representation of the object
279 280 281 |
# File 'lib/oci/desktops/models/desktop_device_policy.rb', line 279 def to_s to_hash.to_s end |