ShareProtocolSettings Class
Protocol Settings class used by the set and get service properties methods in the share service.
Contains protocol properties of the share service such as the SMB and NFS setting of the share service.
Constructor
ShareProtocolSettings(*, smb: ShareSmbSettings | None = None, nfs: ShareNfsSettings | None = None, **kwargs: Any)
Keyword-Only Parameters
| Name | Description |
|---|---|
|
smb
|
Sets SMB settings. Default value: None
|
|
nfs
|
Sets NFS settings. Default value: None
|
Methods
| as_dict |
Return a dict that can be serialized using json.dump. |
| deserialize |
Deserialize this model from a dictionary. |
| enable_additional_properties_sending |
Add |
| from_dict |
Parse a dict using a given key extractor and return a model. |
| is_xml_model |
Whether this model is serialized as XML. |
| serialize |
Serialize this model to a dictionary. |
as_dict
Return a dict that can be serialized using json.dump.
as_dict(keep_readonly: bool = True, key_transformer: ~typing.Callable[[str, dict[str, typing.Any], ~typing.Any], ~typing.Any] = <function attribute_transformer>, **kwargs: ~typing.Any) -> MutableMapping[str, Any]
Parameters
| Name | Description |
|---|---|
|
keep_readonly
|
If you want to serialize the readonly attributes. Default value: True
|
|
key_transformer
|
A function that takes an attribute name, the attribute map, and the value, and returns the key to use in the output dict. |
Returns
| Type | Description |
|---|---|
|
<xref:JSON>
|
A dict JSON compatible object. |
deserialize
Deserialize this model from a dictionary.
deserialize(data: Any, content_type: str | None = None) -> Self
Parameters
| Name | Description |
|---|---|
|
data
Required
|
A str using RestAPI structure. JSON by default. |
|
content_type
|
JSON by default, set application/xml if XML. Default value: None
|
Returns
| Type | Description |
|---|---|
|
An instance of this model. |
enable_additional_properties_sending
Add additional_properties to the attribute map so they are sent to the service.
enable_additional_properties_sending() -> None
Returns
| Type | Description |
|---|---|
|
None |
from_dict
Parse a dict using a given key extractor and return a model.
from_dict(data: Any, key_extractors: Callable[[str, dict[str, Any], Any], Any] | None = None, content_type: str | None = None) -> Self
Parameters
| Name | Description |
|---|---|
|
data
Required
|
A dict using RestAPI structure. |
|
key_extractors
|
A key extractor function. Default value: None
|
|
content_type
|
JSON by default, set application/xml if XML. Default value: None
|
Returns
| Type | Description |
|---|---|
|
An instance of this model. |
is_xml_model
Whether this model is serialized as XML.
is_xml_model() -> bool
Returns
| Type | Description |
|---|---|
|
True if this model is serialized as XML, otherwise False. |
serialize
Serialize this model to a dictionary.
serialize(keep_readonly: bool = False, **kwargs: Any) -> MutableMapping[str, Any]
Parameters
| Name | Description |
|---|---|
|
keep_readonly
|
If you want to serialize the readonly attributes. Default value: False
|
Returns
| Type | Description |
|---|---|
|
<xref:JSON>
|
A dict JSON compatible object. |
Attributes
nfs
Sets the NFS settings.
nfs: ShareNfsSettings | None
smb
Sets the SMB settings.
smb: ShareSmbSettings | None