Source code for models_v2.register_source_common_request_parameters

# -*- coding: utf-8 -*-


[docs]class RegisterSourceCommonRequestParameters(object): """Implementation of the 'Register source common request parameters.' model. Specifies common parameters to register a source. Attributes: username (string): Specifies the username to access target entity. password (string): Specifies the password to access target entity. endpoint (string): Specifies the endpoint IPaddress, URL or hostname of the host. description (string): Specifies the description of the source being registered. """ # Create a mapping from Model property names to API property names _names = { "username":'username', "password":'password', "endpoint":'endpoint', "description":'description' } def __init__(self, username=None, password=None, endpoint=None, description=None): """Constructor for the RegisterSourceCommonRequestParameters class""" # Initialize members of the class self.username = username self.password = password self.endpoint = endpoint self.description = description
[docs] @classmethod def from_dictionary(cls, dictionary): """Creates an instance of this model from a dictionary Args: dictionary (dictionary): A dictionary representation of the object as obtained from the deserialization of the server's response. The keys MUST match property names in the API description. Returns: object: An instance of this structure class. """ if dictionary is None: return None # Extract variables from the dictionary username = dictionary.get('username') password = dictionary.get('password') endpoint = dictionary.get('endpoint') description = dictionary.get('description') # Return an object of this model return cls(username, password, endpoint, description)