Class: MicrosoftGraph::Print::Printers::Create::CreatePostRequestBody

Inherits:
Object
  • Object
show all
Includes:
MicrosoftKiotaAbstractions::AdditionalDataHolder, MicrosoftKiotaAbstractions::Parsable
Defined in:
lib/print/printers/create/create_post_request_body.rb

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeObject

Instantiates a new createPostRequestBody and sets the default values.



87
88
89
# File 'lib/print/printers/create/create_post_request_body.rb', line 87

def initialize()
    @additional_data = Hash.new
end

Class Method Details

.create_from_discriminator_value(parse_node) ⇒ Object

Creates a new instance of the appropriate class based on discriminator value

Parameters:

  • parse_node

    The parse node to use to read the discriminator value and create the object

Returns:

  • a create_post_request_body

Raises:

  • (StandardError)


95
96
97
98
# File 'lib/print/printers/create/create_post_request_body.rb', line 95

def self.create_from_discriminator_value(parse_node)
    raise StandardError, 'parse_node cannot be null' if parse_node.nil?
    return CreatePostRequestBody.new
end

Instance Method Details

#additional_dataObject

Gets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.

Returns:

  • a i_dictionary



42
43
44
# File 'lib/print/printers/create/create_post_request_body.rb', line 42

def additional_data
    return @additional_data
end

#additional_data=(value) ⇒ Object

Sets the additionalData property value. Stores additional data not described in the OpenAPI description found when deserializing. Can be used for serialization as well.

Parameters:

  • value

    Value to set for the additionalData property.

Returns:

  • a void



50
51
52
# File 'lib/print/printers/create/create_post_request_body.rb', line 50

def additional_data=(value)
    @additional_data = value
end

#certificate_signing_requestObject

Gets the certificateSigningRequest property value. The certificateSigningRequest property

Returns:

  • a print_certificate_signing_request



57
58
59
# File 'lib/print/printers/create/create_post_request_body.rb', line 57

def certificate_signing_request
    return @certificate_signing_request
end

#certificate_signing_request=(value) ⇒ Object

Sets the certificateSigningRequest property value. The certificateSigningRequest property

Parameters:

  • value

    Value to set for the certificateSigningRequest property.

Returns:

  • a void



65
66
67
# File 'lib/print/printers/create/create_post_request_body.rb', line 65

def certificate_signing_request=(value)
    @certificate_signing_request = value
end

#connector_idObject

Gets the connectorId property value. The connectorId property

Returns:

  • a string



72
73
74
# File 'lib/print/printers/create/create_post_request_body.rb', line 72

def connector_id
    return @connector_id
end

#connector_id=(value) ⇒ Object

Sets the connectorId property value. The connectorId property

Parameters:

  • value

    Value to set for the connectorId property.

Returns:

  • a void



80
81
82
# File 'lib/print/printers/create/create_post_request_body.rb', line 80

def connector_id=(value)
    @connector_id = value
end

#display_nameObject

Gets the displayName property value. The displayName property

Returns:

  • a string



103
104
105
# File 'lib/print/printers/create/create_post_request_body.rb', line 103

def display_name
    return @display_name
end

#display_name=(value) ⇒ Object

Sets the displayName property value. The displayName property

Parameters:

  • value

    Value to set for the displayName property.

Returns:

  • a void



111
112
113
# File 'lib/print/printers/create/create_post_request_body.rb', line 111

def display_name=(value)
    @display_name = value
end

#get_field_deserializersObject

The deserialization information for the current model

Returns:

  • a i_dictionary



118
119
120
121
122
123
124
125
126
127
128
# File 'lib/print/printers/create/create_post_request_body.rb', line 118

def get_field_deserializers()
    return {
        "certificateSigningRequest" => lambda {|n| @certificate_signing_request = n.get_object_value(lambda {|pn| MicrosoftGraph::Models::PrintCertificateSigningRequest.create_from_discriminator_value(pn) }) },
        "connectorId" => lambda {|n| @connector_id = n.get_string_value() },
        "displayName" => lambda {|n| @display_name = n.get_string_value() },
        "hasPhysicalDevice" => lambda {|n| @has_physical_device = n.get_boolean_value() },
        "manufacturer" => lambda {|n| @manufacturer = n.get_string_value() },
        "model" => lambda {|n| @model = n.get_string_value() },
        "physicalDeviceId" => lambda {|n| @physical_device_id = n.get_string_value() },
    }
end

#has_physical_deviceObject

Gets the hasPhysicalDevice property value. The hasPhysicalDevice property

Returns:

  • a boolean



133
134
135
# File 'lib/print/printers/create/create_post_request_body.rb', line 133

def has_physical_device
    return @has_physical_device
end

#has_physical_device=(value) ⇒ Object

Sets the hasPhysicalDevice property value. The hasPhysicalDevice property

Parameters:

  • value

    Value to set for the hasPhysicalDevice property.

Returns:

  • a void



141
142
143
# File 'lib/print/printers/create/create_post_request_body.rb', line 141

def has_physical_device=(value)
    @has_physical_device = value
end

#manufacturerObject

Gets the manufacturer property value. The manufacturer property

Returns:

  • a string



148
149
150
# File 'lib/print/printers/create/create_post_request_body.rb', line 148

def manufacturer
    return @manufacturer
end

#manufacturer=(value) ⇒ Object

Sets the manufacturer property value. The manufacturer property

Parameters:

  • value

    Value to set for the manufacturer property.

Returns:

  • a void



156
157
158
# File 'lib/print/printers/create/create_post_request_body.rb', line 156

def manufacturer=(value)
    @manufacturer = value
end

#modelObject

Gets the model property value. The model property

Returns:

  • a string



163
164
165
# File 'lib/print/printers/create/create_post_request_body.rb', line 163

def model
    return @model
end

#model=(value) ⇒ Object

Sets the model property value. The model property

Parameters:

  • value

    Value to set for the model property.

Returns:

  • a void



171
172
173
# File 'lib/print/printers/create/create_post_request_body.rb', line 171

def model=(value)
    @model = value
end

#physical_device_idObject

Gets the physicalDeviceId property value. The physicalDeviceId property

Returns:

  • a string



178
179
180
# File 'lib/print/printers/create/create_post_request_body.rb', line 178

def physical_device_id
    return @physical_device_id
end

#physical_device_id=(value) ⇒ Object

Sets the physicalDeviceId property value. The physicalDeviceId property

Parameters:

  • value

    Value to set for the physicalDeviceId property.

Returns:

  • a void



186
187
188
# File 'lib/print/printers/create/create_post_request_body.rb', line 186

def physical_device_id=(value)
    @physical_device_id = value
end

#serialize(writer) ⇒ Object

Serializes information the current object

Parameters:

  • writer

    Serialization writer to use to serialize this model

Returns:

  • a void

Raises:

  • (StandardError)


194
195
196
197
198
199
200
201
202
203
204
# File 'lib/print/printers/create/create_post_request_body.rb', line 194

def serialize(writer)
    raise StandardError, 'writer cannot be null' if writer.nil?
    writer.write_object_value("certificateSigningRequest", @certificate_signing_request)
    writer.write_string_value("connectorId", @connector_id)
    writer.write_string_value("displayName", @display_name)
    writer.write_boolean_value("hasPhysicalDevice", @has_physical_device)
    writer.write_string_value("manufacturer", @manufacturer)
    writer.write_string_value("model", @model)
    writer.write_string_value("physicalDeviceId", @physical_device_id)
    writer.write_additional_data(@additional_data)
end