Class: CalendarApi::ConferenceEntryPoint

Inherits:
BaseModel
  • Object
show all
Defined in:
lib/calendar_api/models/conference_entry_point.rb

Overview

Information about an individual conference entry point.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from BaseModel

#check_for_conflict, #process_additional_properties, #process_array, #process_basic_value, #process_hash, #to_hash, #to_json

Constructor Details

#initialize(entry_point_type: SKIP, uri: SKIP, label: SKIP, pin: SKIP, meeting_code: SKIP, password: SKIP, additional_properties: nil) ⇒ ConferenceEntryPoint

Returns a new instance of ConferenceEntryPoint.



65
66
67
68
69
70
71
72
73
74
75
76
77
78
# File 'lib/calendar_api/models/conference_entry_point.rb', line 65

def initialize(entry_point_type: SKIP, uri: SKIP, label: SKIP, pin: SKIP,
               meeting_code: SKIP, password: SKIP,
               additional_properties: nil)
  # Add additional model properties to the instance
  additional_properties = {} if additional_properties.nil?

  @entry_point_type = entry_point_type unless entry_point_type == SKIP
  @uri = uri unless uri == SKIP
  @label = label unless label == SKIP
  @pin = pin unless pin == SKIP
  @meeting_code = meeting_code unless meeting_code == SKIP
  @password = password unless password == SKIP
  @additional_properties = additional_properties
end

Instance Attribute Details

#entry_point_typeEntryPointType

The type of conference entry point.

Returns:



14
15
16
# File 'lib/calendar_api/models/conference_entry_point.rb', line 14

def entry_point_type
  @entry_point_type
end

#labelString

The label for the URI.

Returns:

  • (String)


22
23
24
# File 'lib/calendar_api/models/conference_entry_point.rb', line 22

def label
  @label
end

#meeting_codeString

The meeting code to access the conference.

Returns:

  • (String)


30
31
32
# File 'lib/calendar_api/models/conference_entry_point.rb', line 30

def meeting_code
  @meeting_code
end

#passwordString

The password to access the conference.

Returns:

  • (String)


34
35
36
# File 'lib/calendar_api/models/conference_entry_point.rb', line 34

def password
  @password
end

#pinString

The PIN to access the conference.

Returns:

  • (String)


26
27
28
# File 'lib/calendar_api/models/conference_entry_point.rb', line 26

def pin
  @pin
end

#uriString

The URI of the entry point. Maximum length is 1300 characters.

Returns:

  • (String)


18
19
20
# File 'lib/calendar_api/models/conference_entry_point.rb', line 18

def uri
  @uri
end

Class Method Details

.from_hash(hash) ⇒ Object

Creates an instance of the object from a hash.



81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
# File 'lib/calendar_api/models/conference_entry_point.rb', line 81

def self.from_hash(hash)
  return nil unless hash

  # Extract variables from the hash.
  entry_point_type =
    hash.key?('entryPointType') ? hash['entryPointType'] : SKIP
  uri = hash.key?('uri') ? hash['uri'] : SKIP
  label = hash.key?('label') ? hash['label'] : SKIP
  pin = hash.key?('pin') ? hash['pin'] : SKIP
  meeting_code = hash.key?('meetingCode') ? hash['meetingCode'] : SKIP
  password = hash.key?('password') ? hash['password'] : SKIP

  # Create a new hash for additional properties, removing known properties.
  new_hash = hash.reject { |k, _| names.value?(k) }

  additional_properties = APIHelper.get_additional_properties(
    new_hash, proc { |value| value }
  )

  # Create object from extracted values.
  ConferenceEntryPoint.new(entry_point_type: entry_point_type,
                           uri: uri,
                           label: label,
                           pin: pin,
                           meeting_code: meeting_code,
                           password: password,
                           additional_properties: additional_properties)
end

.namesObject

A mapping from model property names to API property names.



37
38
39
40
41
42
43
44
45
46
# File 'lib/calendar_api/models/conference_entry_point.rb', line 37

def self.names
  @_hash = {} if @_hash.nil?
  @_hash['entry_point_type'] = 'entryPointType'
  @_hash['uri'] = 'uri'
  @_hash['label'] = 'label'
  @_hash['pin'] = 'pin'
  @_hash['meeting_code'] = 'meetingCode'
  @_hash['password'] = 'password'
  @_hash
end

.nullablesObject

An array for nullable fields



61
62
63
# File 'lib/calendar_api/models/conference_entry_point.rb', line 61

def self.nullables
  []
end

.optionalsObject

An array for optional fields



49
50
51
52
53
54
55
56
57
58
# File 'lib/calendar_api/models/conference_entry_point.rb', line 49

def self.optionals
  %w[
    entry_point_type
    uri
    label
    pin
    meeting_code
    password
  ]
end

Instance Method Details

#inspectObject

Provides a debugging-friendly string with detailed object information.



119
120
121
122
123
124
# File 'lib/calendar_api/models/conference_entry_point.rb', line 119

def inspect
  class_name = self.class.name.split('::').last
  "<#{class_name} entry_point_type: #{@entry_point_type.inspect}, uri: #{@uri.inspect},"\
  " label: #{@label.inspect}, pin: #{@pin.inspect}, meeting_code: #{@meeting_code.inspect},"\
  " password: #{@password.inspect}, additional_properties: #{@additional_properties}>"
end

#to_sObject

Provides a human-readable string representation of the object.



111
112
113
114
115
116
# File 'lib/calendar_api/models/conference_entry_point.rb', line 111

def to_s
  class_name = self.class.name.split('::').last
  "<#{class_name} entry_point_type: #{@entry_point_type}, uri: #{@uri}, label: #{@label},"\
  " pin: #{@pin}, meeting_code: #{@meeting_code}, password: #{@password},"\
  " additional_properties: #{@additional_properties}>"
end