if hasattr(v, "<STR_LIT>"):<EOL><INDENT>v = v._utype(v)<EOL><DEDENT>try:<EOL><INDENT>t = YANGDynClass(<EOL>v,<EOL>base=config.config,<EOL>is_container="<STR_LIT>",<EOL>yang_name="<STR_LIT>",<EOL>parent=self,<EOL>path_helper=self._path_helper,<EOL>extmethods=self._extmethods,<EOL>register_paths=True,<EOL>extensions=None,<EOL>namespace="<STR_LIT>",<EOL>defining_module="<STR_LIT>",<EOL>yang_type="<STR_LIT>",<EOL>is_config=True,<EOL>)<EOL><DEDENT>except (TypeError, ValueError):<EOL><INDENT>raise ValueError(<EOL>{<EOL>"<STR_LIT>": """<STR_LIT>""",<EOL>"<STR_LIT>": "<STR_LIT>",<EOL>"<STR_LIT>": """<STR_LIT>""",<EOL>}<EOL>)<EOL><DEDENT>self.__config = t<EOL>if hasattr(self, "<STR_LIT>"):<EOL><INDENT>self._set()<EOL><DEDENT>

Setter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/confederation/config (container)
If this variable is read-only (config: false) in the
source YANG file, then _set_config is considered as a private
method. Backends looking to populate this variable should
do so via calling thisObj._set_config() directly.

YANG Description: Configuration parameters relating to BGP confederations


return self.__state<EOL>

Getter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/confederation/state (container)

YANG Description: State information relating to the BGP confederations


if hasattr(v, "<STR_LIT>"):<EOL><INDENT>v = v._utype(v)<EOL><DEDENT>try:<EOL><INDENT>t = YANGDynClass(<EOL>v,<EOL>base=state.state,<EOL>is_container="<STR_LIT>",<EOL>yang_name="<STR_LIT:state>",<EOL>parent=self,<EOL>path_helper=self._path_helper,<EOL>extmethods=self._extmethods,<EOL>register_paths=True,<EOL>extensions=None,<EOL>namespace="<STR_LIT>",<EOL>defining_module="<STR_LIT>",<EOL>yang_type="<STR_LIT>",<EOL>is_config=True,<EOL>)<EOL><DEDENT>except (TypeError, ValueError):<EOL><INDENT>raise ValueError(<EOL>{<EOL>"<STR_LIT>": """<STR_LIT>""",<EOL>"<STR_LIT>": "<STR_LIT>",<EOL>"<STR_LIT>": """<STR_LIT>""",<EOL>}<EOL>)<EOL><DEDENT>self.__state = t<EOL>if hasattr(self, "<STR_LIT>"):<EOL><INDENT>self._set()<EOL><DEDENT>

Setter method for state, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/confederation/state (container)
If this variable is read-only (config: false) in the
source YANG file, then _set_state is considered as a private
method. Backends looking to populate this variable should
do so via calling thisObj._set_state() directly.

YANG Description: State information relating to the BGP confederations


return self.__config<EOL>

Getter method for config, mapped from YANG variable /network_instances/network_instance/protocols/protocol/bgp/global/confederation/config (container)

YANG Description: Configuration parameters relating to BGP confederations


return self.__state<EOL>


return self.__protocol<EOL>

Getter method for protocol, mapped from YANG variable /network_instances/network_instance/protocols/protocol (list)

    YANG Description: A process (instance) of a routing protocol. Some
systems may not support more than one instance of
a particular routing protocol


Setter method for protocol, mapped from YANG variable /network_instances/network_instance/protocols/protocol (list)
    If this variable is read-only (config: false) in the
    source YANG file, then _set_protocol is considered as a private
    method. Backends looking to populate this variable should
    do so via calling thisObj._set_protocol() directly.

    YANG Description: A process (instance) of a routing protocol. Some
systems may not support more than one instance of
a particular routing protocol


return self.__protocol<EOL>


return self.__network_instance<EOL>

Getter method for network_instance, mapped from YANG variable /network_instances/network_instance (list)

YANG Description: Network instances configured on the local system


def _set_network_instance(self, v, load=False):

Setter method for network_instance, mapped from YANG variable /network_instances/network_instance (list)
If this variable is read-only (config: false) in the
source YANG file, then _set_network_instance is considered as a private
method. Backends looking to populate this variable should
do so via calling thisObj._set_network_instance() directly.

YANG Description: Network instances configured on the local system


return self.__network_instance<EOL>


def add_model(self, model, force=False):

if isinstance(model, str):<EOL><INDENT>self._load_model(model)<EOL>return<EOL><DEDENT>try:<EOL><INDENT>model = model()<EOL><DEDENT>except Exception:<EOL><INDENT>pass<EOL><DEDENT>if model._yang_name not in [a[<NUM_LIT:0>] for a in SUPPORTED_MODELS] and not force:<EOL><INDENT>raise ValueError(<EOL>"<STR_LIT>"<EOL>)<EOL><DEDENT>for k, v in model:<EOL><INDENT>self._elements[k] = v<EOL>setattr(self, k, v)<EOL><DEDENT>

Add a model.

The model will be asssigned to a class attribute with the YANG name of the model.

Args:
    model (PybindBase): Model to add.
    force (bool): If not set, verify the model is in SUPPORTED_MODELS

Examples:

    >>> import napalm_yang
    >>> config = napalm_yang.base.Root()
    >>> config.add_model(napalm_yang.models.openconfig_interfaces)
    >>> config.interfaces
    <pyangbind.lib.yangtypes.YANGBaseClass object at 0x10bef6680>


result = {}<EOL>for k, v in self.elements().items():<EOL><INDENT>intermediate = v.get(filter=filter)<EOL>if intermediate:<EOL><INDENT>result[k] = intermediate<EOL><DEDENT><DEDENT>return result<EOL>

Returns a dictionary with the values of the model. Note that the values
of the leafs are YANG classes.

Args:
    filter (bool): If set to ``True``, show only values that have been set.

Returns:
    dict: A dictionary with the values of the model.

Example:

    >>> pretty_print(config.get(filter=True))
    >>> {
    >>>     "interfaces": {
    >>>         "interface": {
    >>>             "et1": {
    >>>                 "config": {
    >>>                     "description": "My description",
    >>>                     "mtu": 1500
    >>>                 },
    >>>                 "name": "et1"
    >>>             },
    >>>             "et2": {
    >>>                 "config": {
    >>>                     "description": "Another description",
    >>>                     "mtu": 9000
    >>>                 },
    >>>                 "name": "et2"
    >>>             }
    >>>         }
    >>>     }
    >>> }


def load_dict(self, data, overwrite=False, auto_load_model=True):

for k, v in data.items():<EOL><INDENT>if k not in self._elements.keys() and not auto_load_model:<EOL><INDENT>raise AttributeError("<STR_LIT>".format(k))<EOL><DEDENT>elif k not in self._elements.keys() and auto_load_model:<EOL><INDENT>self._load_model(k)<EOL><DEDENT>attr = getattr(self, k)<EOL>_load_dict(attr, v)<EOL><DEDENT>

Load a dictionary into the model.

Args:
    data(dict): Dictionary to load
    overwrite(bool): Whether the data present in the model should be overwritten by the
        data in the dict or not.
    auto_load_model(bool): If set to true models will be loaded as they are needed

Examples:

    >>> vlans_dict = {
    >>>     "vlans": { "vlan": { 100: {
    >>>                             "config": {
    >>>                                 "vlan_id": 100, "name": "production"}},
    >>>                          200: {
    >>>                             "config": {
    >>>                                 "vlan_id": 200, "name": "dev"}}}}}
    >>> config.load_dict(vlans_dict)
    >>> print(config.vlans.vlan.keys())
    ... [200, 100]
    >>> print(100, config.vlans.vlan[100].config.name)
    ... (100, u'production')
    >>> print(200, config.vlans.vlan[200].config.name)
    ... (200, u'dev')


result = {}<EOL>for k, v in self:<EOL><INDENT>r = _to_dict(v, filter)<EOL>if r:<EOL><INDENT>result[k] = r<EOL><DEDENT><DEDENT>return result<EOL>

Returns a dictionary with the values of the model. Note that the values
of the leafs are evaluated to python types.

Args:
    filter (bool): If set to ``True``, show only values that have been set.

Returns:
    dict: A dictionary with the values of the model.

Example:

    >>> pretty_print(config.to_dict(filter=True))
    >>> {
    >>>     "interfaces": {
    >>>         "interface": {
    >>>             "et1": {
    >>>                 "config": {
    >>>                     "description": "My description",
    >>>                     "mtu": 1500
    >>>                 },
    >>>                 "name": "et1"
    >>>             },
    >>>             "et2": {
    >>>                 "config": {
    >>>                     "description": "Another description",
    >>>                     "mtu": 9000
    >>>                 },
    >>>                 "name": "et2"
    >>>             }
    >>>         }
    >>>     }
    >>> }


def parse_config(self, device=None, profile=None, native=None, attrs=None):

if attrs is None:<EOL><INDENT>attrs = self.elements().values()<EOL><DEDENT>for v in attrs:<EOL><INDENT>parser = Parser(<EOL>v, device=device, profile=profile, native=native, is_config=True<EOL>)<EOL>parser.parse()<EOL><DEDENT>

Parse native configuration and load it into the corresponding models. Only models
that have been added to the root object will be parsed.

If ``native`` is passed to the method that's what we will parse, otherwise, we will use the
``device`` to retrieve it.

Args:
    device (NetworkDriver): Device to load the configuration from.
    profile (list): Profiles that the device supports. If no ``profile`` is passed it will
      be read from ``device``.
    native (list of strings): Native configuration to parse.

Examples:

    >>> # Load from device
    >>> running_config = napalm_yang.base.Root()
    >>> running_config.add_model(napalm_yang.models.openconfig_interfaces)
    >>> running_config.parse_config(device=d)

    >>> # Load from file
    >>> with open("junos.config", "r") as f:
    >>>     config = f.read()
    >>>
    >>> running_config = napalm_yang.base.Root()
    >>> running_config.add_model(napalm_yang.models.openconfig_interfaces)
    >>> running_config.parse_config(native=[config], profile="junos")


def parse_state(self, device=None, profile=None, native=None, attrs=None):

if attrs is None:<EOL><INDENT>attrs = self.elements().values()<EOL><DEDENT>for v in attrs:<EOL><INDENT>parser = Parser(<EOL>v, device=device, profile=profile, native=native, is_config=False<EOL>)<EOL>parser.parse()<EOL><DEDENT>

Parse native state and load it into the corresponding models. Only models
that have been added to the root object will be parsed.

If ``native`` is passed to the method that's what we will parse, otherwise, we will use the
``device`` to retrieve it.

Args:
    device (NetworkDriver): Device to load the configuration from.
    profile (list): Profiles that the device supports. If no ``profile`` is passed it will
      be read from ``device``.
    native (list string): Native output to parse.

Examples:

    >>> # Load from device
    >>> state = napalm_yang.base.Root()
    >>> state.add_model(napalm_yang.models.openconfig_interfaces)
    >>> state.parse_config(device=d)

    >>> # Load from file
    >>> with open("junos.state", "r") as f:
    >>>     state_data = f.read()
    >>>
    >>> state = napalm_yang.base.Root()
    >>> state.add_model(napalm_yang.models.openconfig_interfaces)
    >>> state.parse_config(native=[state_data], profile="junos")


def translate_config(self, profile, merge=None, replace=None):

result = []<EOL>for k, v in self:<EOL><INDENT>other_merge = getattr(merge, k) if merge else None<EOL>other_replace = getattr(replace, k) if replace else None<EOL>translator = Translator(<EOL>v, profile, merge=other_merge, replace=other_replace<EOL>)<EOL>result.append(translator.translate())<EOL><DEDENT>return "<STR_LIT:\n>".join(result)<EOL>

Translate the object to native configuration.

In this context, merge and replace means the following:

* **Merge** - Elements that exist in both ``self`` and ``merge`` will use by default the
  values in ``merge`` unless ``self`` specifies a new one. Elements that exist only
  in ``self`` will be translated as they are and elements present only in ``merge``
  will be removed.
* **Replace** - All the elements in ``replace`` will either be removed or replaced by
  elements in ``self``.

You can specify one of ``merge``, ``replace`` or none of them. If none of them are set we
will just translate configuration.

Args:
    profile (list): Which profiles to use.
    merge (Root): Object we want to merge with.
    replace (Root): Object we want to replace.


return validate.compliance_report(self, validation_file=validation_file)<EOL>

Return a compliance report.
Verify that the device complies with the given validation file and writes a compliance
report file. See https://napalm.readthedocs.io/en/latest/validate.html.


return netaddr.IPAddress(value).netmask_bits()<EOL>

Converts a network mask to it's CIDR value.

Examples:
    >>> "{{ '255.255.255.0'|netmask_to_cidr }}" -> "24"


return str(netaddr.IPNetwork("<STR_LIT>".format(value)).netmask)<EOL>

Converts a CIDR prefix-length to a network mask.

Examples:
    >>> "{{ '24'|cidr_to_netmask }}" -> "255.255.255.0"


value = value.replace("<STR_LIT:U+0020>", "<STR_LIT:/>")<EOL>return str(netaddr.IPNetwork(value))<EOL>

Converts an IPv4 or IPv6 prefix writen in various formats to its CIDR representation.

This filter works only on prefixes. Use normalize_address if you wish to normalize an address
without a network mask.

Examples:
    >>> "{{ '192.168.0.0 255.255.255.0'|normalize_prefix }}" -> "192.168.0.0/24"
    >>> "{{ '192.168/255.255.255.0'|normalize_prefix }}" -> "192.168.0.0/24"
    >>> "{{ '2001:DB8:0:0:1:0:0:1/64'|normalize_prefix }}" -> "2001:db8::1:0:0:1/64"


return str(netaddr.IPAddress(value))<EOL>

Converts an IPv4 or IPv6 address writen in various formats to a standard textual representation.

This filter works only on addresses without network mask. Use normalize_prefix to normalize
networks.

Examples:
    >>> "{{ '192.168.0.1'|normalize_address }}" -> "192.168.0.1"
    >>> "{{ '192.168.1'|normalize_address }}" -> "192.168.0.1"
    >>> "{{ '2001:DB8:0:0:1:0:0:1'|normalize_address }}" -> "2001:db8::1:0:0:1"


prefix = netaddr.IPNetwork(value)<EOL>return "<STR_LIT>".format(prefix.ip, sep, prefix.netmask)<EOL>

Converts a CIDR formatted prefix into an address netmask representation.
Argument sep specifies the separator between the address and netmask parts.
By default it's a single space.

Examples:
    >>> "{{ '192.168.0.1/24|prefix_to_addrmask }}" -> "192.168.0.1 255.255.255.0"
    >>> "{{ '192.168.0.1/24|prefix_to_addrmask('/') }}" -> "192.168.0.1/255.255.255.0"


all_filters = {}<EOL>for m in JINJA_FILTERS:<EOL><INDENT>if hasattr(m, "<STR_LIT>"):<EOL><INDENT>all_filters.update(m.filters())<EOL><DEDENT><DEDENT>return all_filters<EOL>


def real_decorator(func):<EOL><INDENT>@wraps(func)<EOL>def wrapper(value, *args, **kwargs):<EOL><INDENT>if not value:<EOL><INDENT>return default<EOL><DEDENT>else:<EOL><INDENT>return func(value, *args, **kwargs)<EOL><DEDENT><DEDENT>return wrapper<EOL><DEDENT>return real_decorator<EOL>

Decorator that checks if a value passed to a Jinja filter evaluates to false
and returns an empty string. Otherwise calls the original Jinja filter.

Example usage:
@check_empty
def my_jinja_filter(value, arg1):


return [s.replace("<STR_LIT:->", "<STR_LIT:..>") for s in value.split("<STR_LIT:U+002C>")]<EOL>

Converts an industry standard vlan range into a list that can be
interpreted by openconfig. For example:

"1, 2, 3-10" -> ["1", "2", "3..10"]


return "<STR_LIT:U+002C>".join(["<STR_LIT:{}>".format(s).replace("<STR_LIT:..>", "<STR_LIT:->") for s in value])<EOL>

Converts an industry standard vlan range into a list that can be
interpreted by openconfig. For example:

["1", "2", "3..10"] -> "1, 2, 3-10"


def find_yang_file(profile, filename, path):

<EOL>module_dir = os.path.dirname(__file__)<EOL>full_path = os.path.join(module_dir, "<STR_LIT>", profile, path, filename)<EOL>if os.path.exists(full_path):<EOL><INDENT>return full_path<EOL><DEDENT>else:<EOL><INDENT>msg = "<STR_LIT>".format(full_path)<EOL>logger.error(msg)<EOL>raise IOError(msg)<EOL><DEDENT>

Find the necessary file for the given test case.

Args:
    device(napalm device connection): for which device
    filename(str): file to find
    path(str): where to find it relative to where the module is installed


def parse_indented_config(config, current_indent=<NUM_LIT:0>, previous_indent=<NUM_LIT:0>, nested=False):

parsed = OrderedDict()<EOL>while True:<EOL><INDENT>if not config:<EOL><INDENT>break<EOL><DEDENT>line = config.pop(<NUM_LIT:0>)<EOL>if line.lstrip().startswith("<STR_LIT:!>"):<EOL><INDENT>continue<EOL><DEDENT>last = line.lstrip()<EOL>leading_spaces = len(line) - len(last)<EOL>if leading_spaces > current_indent:<EOL><INDENT>current = parse_indented_config(<EOL>config, leading_spaces, current_indent, True<EOL>)<EOL>_attach_data_to_path(parsed, last, current, nested)<EOL><DEDENT>elif leading_spaces < current_indent:<EOL><INDENT>config.insert(<NUM_LIT:0>, line)<EOL>break<EOL><DEDENT>else:<EOL><INDENT>if not nested:<EOL><INDENT>current = parse_indented_config(<EOL>config, leading_spaces, current_indent, True<EOL>)<EOL>_attach_data_to_path(parsed, last, current, nested)<EOL><DEDENT>else:<EOL><INDENT>config.insert(<NUM_LIT:0>, line)<EOL>break<EOL><DEDENT><DEDENT><DEDENT>return parsed<EOL>

This methid basically reads a configuration that conforms to a very poor industry standard
and returns a nested structure that behaves like a dict. For example:
    {'enable password whatever': {},
     'interface GigabitEthernet1': {
         'description "bleh"': {},
         'fake nested': {
             'nested nested configuration': {}},
         'switchport mode trunk': {}},
     'interface GigabitEthernet2': {
         'no ip address': {}},
     'interface GigabitEthernet3': {
         'negotiation auto': {},
         'no ip address': {},
         'shutdown': {}},
     'interface Loopback0': {
         'description "blah"': {}}}


def _flatten_dictionary(obj, path, key_name):

result = []<EOL>if "<STR_LIT:>>" in key_name:<EOL><INDENT>key_name, group_key = key_name.split("<STR_LIT:>>")<EOL><DEDENT>else:<EOL><INDENT>group_key = None<EOL><DEDENT>for k, v in obj.items():<EOL><INDENT>if path:<EOL><INDENT>if k == path[<NUM_LIT:0>]:<EOL><INDENT>path.pop(<NUM_LIT:0>)<EOL><DEDENT><DEDENT>if k.startswith("<STR_LIT:#>"):<EOL><INDENT>continue<EOL><DEDENT>r = _resolve_path(v, list(path))<EOL>if isinstance(r, dict):<EOL><INDENT>r = [r]<EOL><DEDENT>for e in r:<EOL><INDENT>if group_key:<EOL><INDENT>e[group_key] = {kk: vv for kk, vv in v.items() if kk not in path}<EOL><DEDENT>e[key_name] = k<EOL>result.append(e)<EOL><DEDENT><DEDENT>return result<EOL>

This method tries to use the path `?my_field` to convert:

a:
    aa: 1
    ab: 2
b:
    ba: 3
    ba: 4

into:

- my_field: a
  aa: 1
  ab: 2
- my_field: b
  ba: 3
  ba: 4


@classmethod<EOL><INDENT>def _parse_list_nested_recursive(<EOL>cls, data, path, iterators, list_vars, cur_vars=None<EOL>):<DEDENT>

cur_vars = dict(cur_vars) if cur_vars else {}<EOL>if path:<EOL><INDENT>p = path[<NUM_LIT:0>]<EOL>path = path[<NUM_LIT:1>:]<EOL><DEDENT>else:<EOL><INDENT>for _ in data:<EOL><INDENT>list_vars.append(cur_vars)<EOL><DEDENT>iterators.append(data)<EOL>return data<EOL><DEDENT>if p.startswith("<STR_LIT:?>"):<EOL><INDENT>for x in data:<EOL><INDENT>key, var_path = p.split("<STR_LIT:.>")<EOL>cur_vars.update({key.lstrip("<STR_LIT:?>"): x.xpath(var_path)[<NUM_LIT:0>].text})<EOL>cls._parse_list_nested_recursive(<EOL>x, path, iterators, list_vars, cur_vars<EOL>)<EOL><DEDENT><DEDENT>else:<EOL><INDENT>x = data.xpath(p)<EOL>cls._parse_list_nested_recursive(x, path, iterators, list_vars, cur_vars)<EOL><DEDENT>

This helps parsing shit like:

    <protocols>
        <bgp>
            <group>
                <name>my_peers</name>
                <neighbor>
                    <name>192.168.100.2</name>
                    <description>adsasd</description>
                    <peer-as>65100</peer-as>
                </neighbor>
                <neighbor>
                    <name>192.168.100.3</name>
                    <peer-as>65100</peer-as>
                </neighbor>
            </group>
            <group>
                <name>my_other_peers</name>
                <neighbor>
                    <name>172.20.0.1</name>
                    <peer-as>65200</peer-as>
                </neighbor>
            </group>
        </bgp>
    </protocols>


def model_to_dict(model, mode="<STR_LIT>", show_defaults=False):

def is_mode(obj, mode):<EOL><INDENT>if mode == "<STR_LIT>":<EOL><INDENT>return True<EOL><DEDENT>elif mode == "<STR_LIT>":<EOL><INDENT>return obj._yang_name == "<STR_LIT>" or obj._is_config<EOL><DEDENT>elif mode == "<STR_LIT:state>":<EOL><INDENT>return obj._yang_name == "<STR_LIT:state>" or not obj._is_config<EOL><DEDENT>else:<EOL><INDENT>raise ValueError(<EOL>"<STR_LIT>".format(mode)<EOL>)<EOL><DEDENT><DEDENT>def get_key(key, model, parent_defining_module, show_defaults):<EOL><INDENT>if not show_defaults:<EOL><INDENT>key = "<STR_LIT>".format(key, "<STR_LIT>" if model._is_config else "<STR_LIT>")<EOL><DEDENT>if parent_defining_module != model._defining_module:<EOL><INDENT>key = "<STR_LIT>".format(model._defining_module, key)<EOL><DEDENT>return key<EOL><DEDENT>if model._yang_type in ("<STR_LIT>", "<STR_LIT:list>"):<EOL><INDENT>cls = model if model._yang_type in ("<STR_LIT>",) else model._contained_class()<EOL>result = {}<EOL>for k, v in cls:<EOL><INDENT>r = model_to_dict(v, mode=mode, show_defaults=show_defaults)<EOL>if r:<EOL><INDENT>result[get_key(k, v, model._defining_module, show_defaults)] = r<EOL><DEDENT><DEDENT>return result<EOL><DEDENT>else:<EOL><INDENT>if show_defaults:<EOL><INDENT>if model._default is False:<EOL><INDENT>if model._yang_type != "<STR_LIT>":<EOL><INDENT>return None<EOL><DEDENT><DEDENT>return model._default<EOL><DEDENT>return model._yang_type if is_mode(model, mode) else None<EOL><DEDENT>

Given a model, return a representation of the model in a dict.

This is mostly useful to have a quick visual represenation of the model.

Args:

    model (PybindBase): Model to transform.
    mode (string): Whether to print config, state or all elements ("" for all)

Returns:

    dict: A dictionary representing the model.

Examples:

    >>> config = napalm_yang.base.Root()
    >>>
    >>> # Adding models to the object
    >>> config.add_model(napalm_yang.models.openconfig_interfaces())
    >>> config.add_model(napalm_yang.models.openconfig_vlan())
    >>> # Printing the model in a human readable format
    >>> pretty_print(napalm_yang.utils.model_to_dict(config))
    >>> {
    >>>     "openconfig-interfaces:interfaces [rw]": {
    >>>         "interface [rw]": {
    >>>             "config [rw]": {
    >>>                 "description [rw]": "string",
    >>>                 "enabled [rw]": "boolean",
    >>>                 "mtu [rw]": "uint16",
    >>>                 "name [rw]": "string",
    >>>                 "type [rw]": "identityref"
    >>>             },
    >>>             "hold_time [rw]": {
    >>>                 "config [rw]": {
    >>>                     "down [rw]": "uint32",
    >>>                     "up [rw]": "uint32"
        (trimmed for clarity)


if isinstance(f, base.Root) or f._yang_type in ("<STR_LIT>", None):<EOL><INDENT>result = _diff_root(f, s)<EOL><DEDENT>elif f._yang_type in ("<STR_LIT:list>",):<EOL><INDENT>result = _diff_list(f, s)<EOL><DEDENT>else:<EOL><INDENT>result = {}<EOL>first = "<STR_LIT:{}>".format(f)<EOL>second = "<STR_LIT:{}>".format(s)<EOL>if first != second:<EOL><INDENT>result = {"<STR_LIT>": first, "<STR_LIT>": second}<EOL><DEDENT><DEDENT>return result<EOL>

Given two models, return the difference between them.

Args:

    f (Pybindbase): First element.
    s (Pybindbase): Second element.

Returns:

    dict: A dictionary highlighting the differences.

Examples:

    >>> diff = napalm_yang.utils.diff(candidate, running)
    >>> pretty_print(diff)
    >>> {
    >>>     "interfaces": {
    >>>         "interface": {
    >>>             "both": {
    >>>                 "Port-Channel1": {
    >>>                     "config": {
    >>>                         "mtu": {
    >>>                             "first": "0",
    >>>                             "second": "9000"
    >>>                         }
    >>>                     }
    >>>                 }
    >>>             },
    >>>             "first_only": [
    >>>                 "Loopback0"
    >>>             ],
    >>>             "second_only": [
    >>>                 "Loopback1"
    >>>             ]
    >>>         }
    >>>     }
    >>> }


return self.__name<EOL>

Getter method for name, mapped from YANG variable /universe/individual/name (string)


parent = getattr(self, "<STR_LIT>", None)<EOL>if parent is not None and load is False:<EOL><INDENT>raise AttributeError(<EOL>"<STR_LIT>" + "<STR_LIT>"<EOL>)<EOL><DEDENT>if hasattr(v, "<STR_LIT>"):<EOL><INDENT>v = v._utype(v)<EOL><DEDENT>try:<EOL><INDENT>t = YANGDynClass(<EOL>v,<EOL>base=unicode,<EOL>is_leaf=True,<EOL>yang_name="<STR_LIT:name>",<EOL>parent=self,<EOL>path_helper=self._path_helper,<EOL>extmethods=self._extmethods,<EOL>register_paths=True,<EOL>is_keyval=True,<EOL>namespace="<STR_LIT>",<EOL>defining_module="<STR_LIT>",<EOL>yang_type="<STR_LIT:string>",<EOL>is_config=True,<EOL>)<EOL><DEDENT>except (TypeError, ValueError):<EOL><INDENT>raise ValueError(<EOL>{<EOL>"<STR_LIT>": """<STR_LIT>""",<EOL>"<STR_LIT>": "<STR_LIT:string>",<EOL>"<STR_LIT>": """<STR_LIT>""",<EOL>}<EOL>)<EOL><DEDENT>self.__name = t<EOL>if hasattr(self, "<STR_LIT>"):<EOL><INDENT>self._set()<EOL><DEDENT>

Setter method for name, mapped from YANG variable /universe/individual/name (string)
If this variable is read-only (config: false) in the
source YANG file, then _set_name is considered as a private
method. Backends looking to populate this variable should
do so via calling thisObj._set_name() directly.


return self.__age<EOL>

Getter method for age, mapped from YANG variable /universe/individual/age (age)


if hasattr(v, "<STR_LIT>"):<EOL><INDENT>v = v._utype(v)<EOL><DEDENT>try:<EOL><INDENT>t = YANGDynClass(<EOL>v,<EOL>base=RestrictedClassType(<EOL>base_type=RestrictedClassType(<EOL>base_type=int,<EOL>restriction_dict={"<STR_LIT>": ["<STR_LIT>"]},<EOL>int_size=<NUM_LIT:16>,<EOL>),<EOL>restriction_dict={"<STR_LIT>": [u"<STR_LIT>"]},<EOL>),<EOL>is_leaf=True,<EOL>yang_name="<STR_LIT>",<EOL>parent=self,<EOL>path_helper=self._path_helper,<EOL>extmethods=self._extmethods,<EOL>register_paths=True,<EOL>namespace="<STR_LIT>",<EOL>defining_module="<STR_LIT>",<EOL>yang_type="<STR_LIT>",<EOL>is_config=True,<EOL>)<EOL><DEDENT>except (TypeError, ValueError):<EOL><INDENT>raise ValueError(<EOL>{<EOL>"<STR_LIT>": """<STR_LIT>""",<EOL>"<STR_LIT>": "<STR_LIT>",<EOL>"<STR_LIT>": """<STR_LIT>""",<EOL>}<EOL>)<EOL><DEDENT>self.__age = t<EOL>if hasattr(self, "<STR_LIT>"):<EOL><INDENT>self._set()<EOL><DEDENT>

Setter method for age, mapped from YANG variable /universe/individual/age (age)
If this variable is read-only (config: false) in the
source YANG file, then _set_age is considered as a private
method. Backends looking to populate this variable should
do so via calling thisObj._set_age() directly.


return self.__affiliation<EOL>

Getter method for affiliation, mapped from YANG variable /universe/individual/affiliation (identityref)


def _set_affiliation(self, v, load=False):

if hasattr(v, "<STR_LIT>"):<EOL><INDENT>v = v._utype(v)<EOL><DEDENT>try:<EOL><INDENT>t = YANGDynClass(<EOL>v,<EOL>base=RestrictedClassType(<EOL>base_type=unicode,<EOL>restriction_type="<STR_LIT>",<EOL>restriction_arg={<EOL>u"<STR_LIT>": {<EOL>"<STR_LIT>": u"<STR_LIT>",<EOL>"<STR_LIT>": u"<STR_LIT>",<EOL>},<EOL>u"<STR_LIT>": {<EOL>"<STR_LIT>": u"<STR_LIT>",<EOL>"<STR_LIT>": u"<STR_LIT>",<EOL>},<EOL>u"<STR_LIT>": {<EOL>"<STR_LIT>": u"<STR_LIT>",<EOL>"<STR_LIT>": u"<STR_LIT>",<EOL>},<EOL>u"<STR_LIT>": {<EOL>"<STR_LIT>": u"<STR_LIT>",<EOL>"<STR_LIT>": u"<STR_LIT>",<EOL>},<EOL>u"<STR_LIT>": {<EOL>"<STR_LIT>": u"<STR_LIT>",<EOL>"<STR_LIT>": u"<STR_LIT>",<EOL>},<EOL>u"<STR_LIT>": {<EOL>"<STR_LIT>": u"<STR_LIT>",<EOL>"<STR_LIT>": u"<STR_LIT>",<EOL>},<EOL>},<EOL>),<EOL>is_leaf=True,<EOL>yang_name="<STR_LIT>",<EOL>parent=self,<EOL>path_helper=self._path_helper,<EOL>extmethods=self._extmethods,<EOL>register_paths=True,<EOL>namespace="<STR_LIT>",<EOL>defining_module="<STR_LIT>",<EOL>yang_type="<STR_LIT>",<EOL>is_config=True,<EOL>)<EOL><DEDENT>except (TypeError, ValueError):<EOL><INDENT>raise ValueError(<EOL>{<EOL>"<STR_LIT>": """<STR_LIT>""",<EOL>"<STR_LIT>": "<STR_LIT>",<EOL>"<STR_LIT>": """<STR_LIT>""",<EOL>}<EOL>)<EOL><DEDENT>self.__affiliation = t<EOL>if hasattr(self, "<STR_LIT>"):<EOL><INDENT>self._set()<EOL><DEDENT>

Setter method for affiliation, mapped from YANG variable /universe/individual/affiliation (identityref)
If this variable is read-only (config: false) in the
source YANG file, then _set_affiliation is considered as a private
method. Backends looking to populate this variable should
do so via calling thisObj._set_affiliation() directly.


return self.__status<EOL>

Getter method for status, mapped from YANG variable /universe/individual/status (enumeration)


if hasattr(v, "<STR_LIT>"):<EOL><INDENT>v = v._utype(v)<EOL><DEDENT>try:<EOL><INDENT>t = YANGDynClass(<EOL>v,<EOL>base=RestrictedClassType(<EOL>base_type=unicode,<EOL>restriction_type="<STR_LIT>",<EOL>restriction_arg={u"<STR_LIT>": {}, u"<STR_LIT>": {}},<EOL>),<EOL>is_leaf=True,<EOL>yang_name="<STR_LIT:status>",<EOL>parent=self,<EOL>path_helper=self._path_helper,<EOL>extmethods=self._extmethods,<EOL>register_paths=True,<EOL>namespace="<STR_LIT>",<EOL>defining_module="<STR_LIT>",<EOL>yang_type="<STR_LIT>",<EOL>is_config=True,<EOL>)<EOL><DEDENT>except (TypeError, ValueError):<EOL><INDENT>raise ValueError(<EOL>{<EOL>"<STR_LIT>": """<STR_LIT>""",<EOL>"<STR_LIT>": "<STR_LIT>",<EOL>"<STR_LIT>": """<STR_LIT>""",<EOL>}<EOL>)<EOL><DEDENT>self.__status = t<EOL>if hasattr(self, "<STR_LIT>"):<EOL><INDENT>self._set()<EOL><DEDENT>

Setter method for status, mapped from YANG variable /universe/individual/status (enumeration)
If this variable is read-only (config: false) in the
source YANG file, then _set_status is considered as a private
method. Backends looking to populate this variable should
do so via calling thisObj._set_status() directly.


return self.__individual<EOL>

Getter method for individual, mapped from YANG variable /universe/individual (list)


def _set_individual(self, v, load=False):

Setter method for individual, mapped from YANG variable /universe/individual (list)
If this variable is read-only (config: false) in the
source YANG file, then _set_individual is considered as a private
method. Backends looking to populate this variable should
do so via calling thisObj._set_individual() directly.


return self.__universe<EOL>

Getter method for universe, mapped from YANG variable /universe (container)


if hasattr(v, "<STR_LIT>"):<EOL><INDENT>v = v._utype(v)<EOL><DEDENT>try:<EOL><INDENT>t = YANGDynClass(<EOL>v,<EOL>base=yc_universe_napalm_star_wars__universe,<EOL>is_container="<STR_LIT>",<EOL>yang_name="<STR_LIT>",<EOL>parent=self,<EOL>path_helper=self._path_helper,<EOL>extmethods=self._extmethods,<EOL>register_paths=True,<EOL>extensions=None,<EOL>namespace="<STR_LIT>",<EOL>defining_module="<STR_LIT>",<EOL>yang_type="<STR_LIT>",<EOL>is_config=True,<EOL>)<EOL><DEDENT>except (TypeError, ValueError):<EOL><INDENT>raise ValueError(<EOL>{<EOL>"<STR_LIT>": """<STR_LIT>""",<EOL>"<STR_LIT>": "<STR_LIT>",<EOL>"<STR_LIT>": """<STR_LIT>""",<EOL>}<EOL>)<EOL><DEDENT>self.__universe = t<EOL>if hasattr(self, "<STR_LIT>"):<EOL><INDENT>self._set()<EOL><DEDENT>

Setter method for universe, mapped from YANG variable /universe (container)
If this variable is read-only (config: false) in the
source YANG file, then _set_universe is considered as a private
method. Backends looking to populate this variable should
do so via calling thisObj._set_universe() directly.


return self.__name<EOL>


return self.__age<EOL>


return self.__affiliation<EOL>


if hasattr(v, "<STR_LIT>"):<EOL><INDENT>v = v._utype(v)<EOL><DEDENT>try:<EOL><INDENT>t = YANGDynClass(<EOL>v,<EOL>base=RestrictedClassType(<EOL>base_type=unicode,<EOL>restriction_type="<STR_LIT>",<EOL>restriction_arg={<EOL>u"<STR_LIT>": {<EOL>"<STR_LIT>": u"<STR_LIT>",<EOL>"<STR_LIT>": u"<STR_LIT>",<EOL>},<EOL>u"<STR_LIT>": {<EOL>"<STR_LIT>": u"<STR_LIT>",<EOL>"<STR_LIT>": u"<STR_LIT>",<EOL>},<EOL>u"<STR_LIT>": {<EOL>"<STR_LIT>": u"<STR_LIT>",<EOL>"<STR_LIT>": u"<STR_LIT>",<EOL>},<EOL>u"<STR_LIT>": {<EOL>"<STR_LIT>": u"<STR_LIT>",<EOL>"<STR_LIT>": u"<STR_LIT>",<EOL>},<EOL>},<EOL>),<EOL>is_leaf=True,<EOL>yang_name="<STR_LIT>",<EOL>parent=self,<EOL>path_helper=self._path_helper,<EOL>extmethods=self._extmethods,<EOL>register_paths=True,<EOL>namespace="<STR_LIT>",<EOL>defining_module="<STR_LIT>",<EOL>yang_type="<STR_LIT>",<EOL>is_config=True,<EOL>)<EOL><DEDENT>except (TypeError, ValueError):<EOL><INDENT>raise ValueError(<EOL>{<EOL>"<STR_LIT>": """<STR_LIT>""",<EOL>"<STR_LIT>": "<STR_LIT>",<EOL>"<STR_LIT>": """<STR_LIT>""",<EOL>}<EOL>)<EOL><DEDENT>self.__affiliation = t<EOL>if hasattr(self, "<STR_LIT>"):<EOL><INDENT>self._set()<EOL><DEDENT>


return self.__individual<EOL>


return self.__universe<EOL>


def get(<EOL>self, location, cluster_version, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.get.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT:location>': self._serialize.url("<STR_LIT:location>", location, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.subscription_id, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", cluster_version, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", self.api_version, '<STR_LIT:str>')<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>if self.config.generate_client_request_id:<EOL><INDENT>header_parameters['<STR_LIT>'] = str(uuid.uuid1())<EOL><DEDENT>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>if self.config.accept_language is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.accept_language, '<STR_LIT:str>')<EOL><DEDENT>request = self._client.get(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>exp = CloudError(response)<EOL>exp.request_id = response.headers.get('<STR_LIT>')<EOL>raise exp<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Get cluster code versions.

        Get cluster code versions by location
        .

        :param location: The location for the cluster code versions, this is
         different from cluster location
        :type location: str
        :param cluster_version: The cluster code version
        :type cluster_version: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: ClusterCodeVersionsListResult or ClientRawResponse if
         raw=true
        :rtype: ~azure.mgmt.servicefabric.models.ClusterCodeVersionsListResult
         or ~msrest.pipeline.ClientRawResponse
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`


def get_by_environment(<EOL>self, location, environment, cluster_version, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.get_by_environment.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT:location>': self._serialize.url("<STR_LIT:location>", location, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", environment, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.subscription_id, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", cluster_version, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", self.api_version, '<STR_LIT:str>')<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>if self.config.generate_client_request_id:<EOL><INDENT>header_parameters['<STR_LIT>'] = str(uuid.uuid1())<EOL><DEDENT>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>if self.config.accept_language is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.accept_language, '<STR_LIT:str>')<EOL><DEDENT>request = self._client.get(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>exp = CloudError(response)<EOL>exp.request_id = response.headers.get('<STR_LIT>')<EOL>raise exp<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Get cluster code versions by environment.

        Get cluster code versions by environment
        .

        :param location: The location for the cluster code versions, this is
         different from cluster location
        :type location: str
        :param environment: Cluster operating system, the default means all.
         Possible values include: 'Windows', 'Linux'
        :type environment: str
        :param cluster_version: The cluster code version
        :type cluster_version: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: ClusterCodeVersionsListResult or ClientRawResponse if
         raw=true
        :rtype: ~azure.mgmt.servicefabric.models.ClusterCodeVersionsListResult
         or ~msrest.pipeline.ClientRawResponse
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`


def list(<EOL>self, location, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.list.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT:location>': self._serialize.url("<STR_LIT:location>", location, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.subscription_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", self.api_version, '<STR_LIT:str>')<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>if self.config.generate_client_request_id:<EOL><INDENT>header_parameters['<STR_LIT>'] = str(uuid.uuid1())<EOL><DEDENT>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>if self.config.accept_language is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.accept_language, '<STR_LIT:str>')<EOL><DEDENT>request = self._client.get(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>exp = CloudError(response)<EOL>exp.request_id = response.headers.get('<STR_LIT>')<EOL>raise exp<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

List cluster code versions by location.

        List cluster code versions by location
        .

        :param location: The location for the cluster code versions, this is
         different from cluster location
        :type location: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: ClusterCodeVersionsListResult or ClientRawResponse if
         raw=true
        :rtype: ~azure.mgmt.servicefabric.models.ClusterCodeVersionsListResult
         or ~msrest.pipeline.ClientRawResponse
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`


def list_by_environment(<EOL>self, location, environment, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.list_by_environment.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT:location>': self._serialize.url("<STR_LIT:location>", location, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", environment, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.subscription_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", self.api_version, '<STR_LIT:str>')<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>if self.config.generate_client_request_id:<EOL><INDENT>header_parameters['<STR_LIT>'] = str(uuid.uuid1())<EOL><DEDENT>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>if self.config.accept_language is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.accept_language, '<STR_LIT:str>')<EOL><DEDENT>request = self._client.get(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>exp = CloudError(response)<EOL>exp.request_id = response.headers.get('<STR_LIT>')<EOL>raise exp<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

List cluster code versions by environment.

        List cluster code versions by environment
        .

        :param location: The location for the cluster code versions, this is
         different from cluster location
        :type location: str
        :param environment: Cluster operating system, the default means all.
         Possible values include: 'Windows', 'Linux'
        :type environment: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: ClusterCodeVersionsListResult or ClientRawResponse if
         raw=true
        :rtype: ~azure.mgmt.servicefabric.models.ClusterCodeVersionsListResult
         or ~msrest.pipeline.ClientRawResponse
        :raises: :class:`CloudError<msrestazure.azure_exceptions.CloudError>`


def create(<EOL>self, resource_group_name, cluster_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config):

raw_result = self._create_initial(<EOL>resource_group_name=resource_group_name,<EOL>cluster_name=cluster_name,<EOL>parameters=parameters,<EOL>custom_headers=custom_headers,<EOL>raw=True,<EOL>**operation_config<EOL>)<EOL>def get_long_running_output(response):<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL><DEDENT>lro_delay = operation_config.get(<EOL>'<STR_LIT>',<EOL>self.config.long_running_operation_timeout)<EOL>if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)<EOL>elif polling is False: polling_method = NoPolling()<EOL>else: polling_method = polling<EOL>return LROPoller(self._client, raw_result, get_long_running_output, polling_method)<EOL>

Create a ServiceFabric cluster.

        Create cluster resource
        .

        :param resource_group_name: The name of the resource group.
        :type resource_group_name: str
        :param cluster_name: The name of the cluster resource
        :type cluster_name: str
        :param parameters: The cluster resource.
        :type parameters: ~azure.mgmt.servicefabric.models.Cluster
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: The poller return type is ClientRawResponse, the
         direct response alongside the deserialized response
        :param polling: True for ARMPolling, False for no polling, or a
         polling object for personal polling strategy
        :return: An instance of LROPoller that returns Cluster or
         ClientRawResponse<Cluster> if raw==True
        :rtype:
         ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.servicefabric.models.Cluster]
         or
         ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.servicefabric.models.Cluster]]
        :raises:
         :class:`ErrorModelException<azure.mgmt.servicefabric.models.ErrorModelException>`


def delete(<EOL>self, resource_group_name, cluster_name, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.delete.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", resource_group_name, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", cluster_name, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.subscription_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", self.api_version, '<STR_LIT:str>')<EOL>header_parameters = {}<EOL>if self.config.generate_client_request_id:<EOL><INDENT>header_parameters['<STR_LIT>'] = str(uuid.uuid1())<EOL><DEDENT>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>if self.config.accept_language is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.accept_language, '<STR_LIT:str>')<EOL><DEDENT>request = self._client.delete(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>, <NUM_LIT>]:<EOL><INDENT>raise models.ErrorModelException(self._deserialize, response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(None, response)<EOL>return client_raw_response<EOL><DEDENT>

Delete cluster resource.

        Delete cluster resource
        .

        :param resource_group_name: The name of the resource group.
        :type resource_group_name: str
        :param cluster_name: The name of the cluster resource
        :type cluster_name: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: None or ClientRawResponse if raw=true
        :rtype: None or ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`ErrorModelException<azure.mgmt.servicefabric.models.ErrorModelException>`


def get(<EOL>self, resource_group_name, cluster_name, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.get.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", resource_group_name, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", cluster_name, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.subscription_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", self.api_version, '<STR_LIT:str>')<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>if self.config.generate_client_request_id:<EOL><INDENT>header_parameters['<STR_LIT>'] = str(uuid.uuid1())<EOL><DEDENT>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>if self.config.accept_language is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.accept_language, '<STR_LIT:str>')<EOL><DEDENT>request = self._client.get(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>raise models.ErrorModelException(self._deserialize, response)<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Get cluster resource.

        Get cluster resource
        .

        :param resource_group_name: The name of the resource group.
        :type resource_group_name: str
        :param cluster_name: The name of the cluster resource
        :type cluster_name: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: Cluster or ClientRawResponse if raw=true
        :rtype: ~azure.mgmt.servicefabric.models.Cluster or
         ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`ErrorModelException<azure.mgmt.servicefabric.models.ErrorModelException>`


def update(<EOL>self, resource_group_name, cluster_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config):

raw_result = self._update_initial(<EOL>resource_group_name=resource_group_name,<EOL>cluster_name=cluster_name,<EOL>parameters=parameters,<EOL>custom_headers=custom_headers,<EOL>raw=True,<EOL>**operation_config<EOL>)<EOL>def get_long_running_output(response):<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL><DEDENT>lro_delay = operation_config.get(<EOL>'<STR_LIT>',<EOL>self.config.long_running_operation_timeout)<EOL>if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)<EOL>elif polling is False: polling_method = NoPolling()<EOL>else: polling_method = polling<EOL>return LROPoller(self._client, raw_result, get_long_running_output, polling_method)<EOL>

Update cluster configuration.

        Update cluster configuration
        .

        :param resource_group_name: The name of the resource group.
        :type resource_group_name: str
        :param cluster_name: The name of the cluster resource
        :type cluster_name: str
        :param parameters: The parameters which contains the property value
         and property name which used to update the cluster configuration.
        :type parameters:
         ~azure.mgmt.servicefabric.models.ClusterUpdateParameters
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: The poller return type is ClientRawResponse, the
         direct response alongside the deserialized response
        :param polling: True for ARMPolling, False for no polling, or a
         polling object for personal polling strategy
        :return: An instance of LROPoller that returns Cluster or
         ClientRawResponse<Cluster> if raw==True
        :rtype:
         ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.servicefabric.models.Cluster]
         or
         ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.servicefabric.models.Cluster]]
        :raises:
         :class:`ErrorModelException<azure.mgmt.servicefabric.models.ErrorModelException>`


def list_by_resource_group(<EOL>self, resource_group_name, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.list_by_resource_group.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", resource_group_name, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.subscription_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", self.api_version, '<STR_LIT:str>')<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>if self.config.generate_client_request_id:<EOL><INDENT>header_parameters['<STR_LIT>'] = str(uuid.uuid1())<EOL><DEDENT>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>if self.config.accept_language is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.accept_language, '<STR_LIT:str>')<EOL><DEDENT>request = self._client.get(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>raise models.ErrorModelException(self._deserialize, response)<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

List cluster resource by resource group.

        List cluster resource by resource group
        .

        :param resource_group_name: The name of the resource group.
        :type resource_group_name: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: ClusterListResult or ClientRawResponse if raw=true
        :rtype: ~azure.mgmt.servicefabric.models.ClusterListResult or
         ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`ErrorModelException<azure.mgmt.servicefabric.models.ErrorModelException>`


def list(<EOL>self, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.list.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.subscription_id, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", self.api_version, '<STR_LIT:str>')<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>if self.config.generate_client_request_id:<EOL><INDENT>header_parameters['<STR_LIT>'] = str(uuid.uuid1())<EOL><DEDENT>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>if self.config.accept_language is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.accept_language, '<STR_LIT:str>')<EOL><DEDENT>request = self._client.get(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>raise models.ErrorModelException(self._deserialize, response)<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

List cluster resource.

        List cluster resource
        .

        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: ClusterListResult or ClientRawResponse if raw=true
        :rtype: ~azure.mgmt.servicefabric.models.ClusterListResult or
         ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`ErrorModelException<azure.mgmt.servicefabric.models.ErrorModelException>`


def list(<EOL>self, api_version, custom_headers=None, raw=False, **operation_config):

def internal_paging(next_link=None, raw=False):<EOL><INDENT>if not next_link:<EOL><INDENT>url = self.list.metadata['<STR_LIT:url>']<EOL>query_parameters = {}<EOL>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", api_version, '<STR_LIT:str>')<EOL><DEDENT>else:<EOL><INDENT>url = next_link<EOL>query_parameters = {}<EOL><DEDENT>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>if self.config.generate_client_request_id:<EOL><INDENT>header_parameters['<STR_LIT>'] = str(uuid.uuid1())<EOL><DEDENT>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>if self.config.accept_language is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.accept_language, '<STR_LIT:str>')<EOL><DEDENT>request = self._client.get(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>raise models.ErrorModelException(self._deserialize, response)<EOL><DEDENT>return response<EOL><DEDENT>deserialized = models.OperationResultPaged(internal_paging, self._deserialize.dependencies)<EOL>if raw:<EOL><INDENT>header_dict = {}<EOL>client_raw_response = models.OperationResultPaged(internal_paging, self._deserialize.dependencies, header_dict)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Lists all of the available ServiceFabric Resource Manager REST API
        operations.

        :param api_version: The version of the ServiceFabric resouce provider
         api
        :type api_version: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: An iterator like instance of OperationResult
        :rtype:
         ~azure.mgmt.servicefabric.models.OperationResultPaged[~azure.mgmt.servicefabric.models.OperationResult]
        :raises:
         :class:`ErrorModelException<azure.mgmt.servicefabric.models.ErrorModelException>`


def get(<EOL>self, resource_group_name, cluster_name, application_type_name, version, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.get.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.subscription_id, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", resource_group_name, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", cluster_name, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", application_type_name, '<STR_LIT:str>'),<EOL>'<STR_LIT:version>': self._serialize.url("<STR_LIT:version>", version, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", self.api_version, '<STR_LIT:str>')<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>if self.config.generate_client_request_id:<EOL><INDENT>header_parameters['<STR_LIT>'] = str(uuid.uuid1())<EOL><DEDENT>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>if self.config.accept_language is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.accept_language, '<STR_LIT:str>')<EOL><DEDENT>request = self._client.get(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>raise models.ErrorModelException(self._deserialize, response)<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Returns an application type version resource.

        :param resource_group_name: The name of the resource group.
        :type resource_group_name: str
        :param cluster_name: The name of the cluster resource
        :type cluster_name: str
        :param application_type_name: The name of the application type name
         resource
        :type application_type_name: str
        :param version: The application type version.
        :type version: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: VersionResource or ClientRawResponse if raw=true
        :rtype: ~azure.mgmt.servicefabric.models.VersionResource or
         ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`ErrorModelException<azure.mgmt.servicefabric.models.ErrorModelException>`


def put(<EOL>self, resource_group_name, cluster_name, application_type_name, version, location, app_package_url, custom_headers=None, raw=False, polling=True, **operation_config):

raw_result = self._put_initial(<EOL>resource_group_name=resource_group_name,<EOL>cluster_name=cluster_name,<EOL>application_type_name=application_type_name,<EOL>version=version,<EOL>location=location,<EOL>app_package_url=app_package_url,<EOL>custom_headers=custom_headers,<EOL>raw=True,<EOL>**operation_config<EOL>)<EOL>def get_long_running_output(response):<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL><DEDENT>lro_delay = operation_config.get(<EOL>'<STR_LIT>',<EOL>self.config.long_running_operation_timeout)<EOL>if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)<EOL>elif polling is False: polling_method = NoPolling()<EOL>else: polling_method = polling<EOL>return LROPoller(self._client, raw_result, get_long_running_output, polling_method)<EOL>

Provisions an application type version resource.

        :param resource_group_name: The name of the resource group.
        :type resource_group_name: str
        :param cluster_name: The name of the cluster resource
        :type cluster_name: str
        :param application_type_name: The name of the application type name
         resource
        :type application_type_name: str
        :param version: The application type version.
        :type version: str
        :param location: Resource location.
        :type location: str
        :param app_package_url: The URL to the application package
        :type app_package_url: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: The poller return type is ClientRawResponse, the
         direct response alongside the deserialized response
        :param polling: True for ARMPolling, False for no polling, or a
         polling object for personal polling strategy
        :return: An instance of LROPoller that returns VersionResource or
         ClientRawResponse<VersionResource> if raw==True
        :rtype:
         ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.servicefabric.models.VersionResource]
         or
         ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.servicefabric.models.VersionResource]]
        :raises:
         :class:`ErrorModelException<azure.mgmt.servicefabric.models.ErrorModelException>`


def delete(<EOL>self, resource_group_name, cluster_name, application_type_name, version, custom_headers=None, raw=False, polling=True, **operation_config):

raw_result = self._delete_initial(<EOL>resource_group_name=resource_group_name,<EOL>cluster_name=cluster_name,<EOL>application_type_name=application_type_name,<EOL>version=version,<EOL>custom_headers=custom_headers,<EOL>raw=True,<EOL>**operation_config<EOL>)<EOL>def get_long_running_output(response):<EOL><INDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(None, response)<EOL>return client_raw_response<EOL><DEDENT><DEDENT>lro_delay = operation_config.get(<EOL>'<STR_LIT>',<EOL>self.config.long_running_operation_timeout)<EOL>if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)<EOL>elif polling is False: polling_method = NoPolling()<EOL>else: polling_method = polling<EOL>return LROPoller(self._client, raw_result, get_long_running_output, polling_method)<EOL>

Unprovisions an application type version resource.

        :param resource_group_name: The name of the resource group.
        :type resource_group_name: str
        :param cluster_name: The name of the cluster resource
        :type cluster_name: str
        :param application_type_name: The name of the application type name
         resource
        :type application_type_name: str
        :param version: The application type version.
        :type version: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: The poller return type is ClientRawResponse, the
         direct response alongside the deserialized response
        :param polling: True for ARMPolling, False for no polling, or a
         polling object for personal polling strategy
        :return: An instance of LROPoller that returns None or
         ClientRawResponse<None> if raw==True
        :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or
         ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]]
        :raises:
         :class:`ErrorModelException<azure.mgmt.servicefabric.models.ErrorModelException>`


def list(<EOL>self, resource_group_name, cluster_name, application_type_name, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.list.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.subscription_id, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", resource_group_name, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", cluster_name, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", application_type_name, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", self.api_version, '<STR_LIT:str>')<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>if self.config.generate_client_request_id:<EOL><INDENT>header_parameters['<STR_LIT>'] = str(uuid.uuid1())<EOL><DEDENT>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>if self.config.accept_language is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.accept_language, '<STR_LIT:str>')<EOL><DEDENT>request = self._client.get(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>raise models.ErrorModelException(self._deserialize, response)<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Returns all versions for the specified application type.

        :param resource_group_name: The name of the resource group.
        :type resource_group_name: str
        :param cluster_name: The name of the cluster resource
        :type cluster_name: str
        :param application_type_name: The name of the application type name
         resource
        :type application_type_name: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: VersionResourceList or ClientRawResponse if raw=true
        :rtype: ~azure.mgmt.servicefabric.models.VersionResourceList or
         ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`ErrorModelException<azure.mgmt.servicefabric.models.ErrorModelException>`


def get(<EOL>self, resource_group_name, cluster_name, application_type_name, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.get.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.subscription_id, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", resource_group_name, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", cluster_name, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", application_type_name, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", self.api_version, '<STR_LIT:str>')<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>if self.config.generate_client_request_id:<EOL><INDENT>header_parameters['<STR_LIT>'] = str(uuid.uuid1())<EOL><DEDENT>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>if self.config.accept_language is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.accept_language, '<STR_LIT:str>')<EOL><DEDENT>request = self._client.get(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>raise models.ErrorModelException(self._deserialize, response)<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Returns an application type name resource.

        :param resource_group_name: The name of the resource group.
        :type resource_group_name: str
        :param cluster_name: The name of the cluster resource
        :type cluster_name: str
        :param application_type_name: The name of the application type name
         resource
        :type application_type_name: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: ApplicationTypeResource or ClientRawResponse if raw=true
        :rtype: ~azure.mgmt.servicefabric.models.ApplicationTypeResource or
         ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`ErrorModelException<azure.mgmt.servicefabric.models.ErrorModelException>`


def put(<EOL>self, resource_group_name, cluster_name, application_type_name, location, custom_headers=None, raw=False, **operation_config):

parameters = models.ApplicationTypeResource(location=location)<EOL>url = self.put.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.subscription_id, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", resource_group_name, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", cluster_name, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", application_type_name, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", self.api_version, '<STR_LIT:str>')<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>header_parameters['<STR_LIT:Content-Type>'] = '<STR_LIT>'<EOL>if self.config.generate_client_request_id:<EOL><INDENT>header_parameters['<STR_LIT>'] = str(uuid.uuid1())<EOL><DEDENT>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>if self.config.accept_language is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.accept_language, '<STR_LIT:str>')<EOL><DEDENT>body_content = self._serialize.body(parameters, '<STR_LIT>')<EOL>request = self._client.put(url, query_parameters, header_parameters, body_content)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>raise models.ErrorModelException(self._deserialize, response)<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Creates the application type name resource.

        :param resource_group_name: The name of the resource group.
        :type resource_group_name: str
        :param cluster_name: The name of the cluster resource
        :type cluster_name: str
        :param application_type_name: The name of the application type name
         resource
        :type application_type_name: str
        :param location: Resource location.
        :type location: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: ApplicationTypeResource or ClientRawResponse if raw=true
        :rtype: ~azure.mgmt.servicefabric.models.ApplicationTypeResource or
         ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`ErrorModelException<azure.mgmt.servicefabric.models.ErrorModelException>`


def delete(<EOL>self, resource_group_name, cluster_name, application_type_name, custom_headers=None, raw=False, polling=True, **operation_config):

raw_result = self._delete_initial(<EOL>resource_group_name=resource_group_name,<EOL>cluster_name=cluster_name,<EOL>application_type_name=application_type_name,<EOL>custom_headers=custom_headers,<EOL>raw=True,<EOL>**operation_config<EOL>)<EOL>def get_long_running_output(response):<EOL><INDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(None, response)<EOL>return client_raw_response<EOL><DEDENT><DEDENT>lro_delay = operation_config.get(<EOL>'<STR_LIT>',<EOL>self.config.long_running_operation_timeout)<EOL>if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)<EOL>elif polling is False: polling_method = NoPolling()<EOL>else: polling_method = polling<EOL>return LROPoller(self._client, raw_result, get_long_running_output, polling_method)<EOL>

Deletes the application type name resource.

        :param resource_group_name: The name of the resource group.
        :type resource_group_name: str
        :param cluster_name: The name of the cluster resource
        :type cluster_name: str
        :param application_type_name: The name of the application type name
         resource
        :type application_type_name: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: The poller return type is ClientRawResponse, the
         direct response alongside the deserialized response
        :param polling: True for ARMPolling, False for no polling, or a
         polling object for personal polling strategy
        :return: An instance of LROPoller that returns None or
         ClientRawResponse<None> if raw==True
        :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or
         ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]]
        :raises:
         :class:`ErrorModelException<azure.mgmt.servicefabric.models.ErrorModelException>`


def list(<EOL>self, resource_group_name, cluster_name, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.list.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.subscription_id, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", resource_group_name, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", cluster_name, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", self.api_version, '<STR_LIT:str>')<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>if self.config.generate_client_request_id:<EOL><INDENT>header_parameters['<STR_LIT>'] = str(uuid.uuid1())<EOL><DEDENT>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>if self.config.accept_language is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.accept_language, '<STR_LIT:str>')<EOL><DEDENT>request = self._client.get(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>raise models.ErrorModelException(self._deserialize, response)<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Returns all application type names in the specified cluster.

        :param resource_group_name: The name of the resource group.
        :type resource_group_name: str
        :param cluster_name: The name of the cluster resource
        :type cluster_name: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: ApplicationTypeResourceList or ClientRawResponse if raw=true
        :rtype: ~azure.mgmt.servicefabric.models.ApplicationTypeResourceList
         or ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`ErrorModelException<azure.mgmt.servicefabric.models.ErrorModelException>`


def get(<EOL>self, resource_group_name, cluster_name, application_name, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.get.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.subscription_id, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", resource_group_name, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", cluster_name, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", application_name, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", self.api_version, '<STR_LIT:str>')<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>if self.config.generate_client_request_id:<EOL><INDENT>header_parameters['<STR_LIT>'] = str(uuid.uuid1())<EOL><DEDENT>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>if self.config.accept_language is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.accept_language, '<STR_LIT:str>')<EOL><DEDENT>request = self._client.get(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>raise models.ErrorModelException(self._deserialize, response)<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Returns an application resource with the specified name.

        :param resource_group_name: The name of the resource group.
        :type resource_group_name: str
        :param cluster_name: The name of the cluster resource
        :type cluster_name: str
        :param application_name: The name of the application resource.
        :type application_name: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: ApplicationResource or ClientRawResponse if raw=true
        :rtype: ~azure.mgmt.servicefabric.models.ApplicationResource or
         ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`ErrorModelException<azure.mgmt.servicefabric.models.ErrorModelException>`


def put(<EOL>self, resource_group_name, cluster_name, application_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config):

raw_result = self._put_initial(<EOL>resource_group_name=resource_group_name,<EOL>cluster_name=cluster_name,<EOL>application_name=application_name,<EOL>parameters=parameters,<EOL>custom_headers=custom_headers,<EOL>raw=True,<EOL>**operation_config<EOL>)<EOL>def get_long_running_output(response):<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL><DEDENT>lro_delay = operation_config.get(<EOL>'<STR_LIT>',<EOL>self.config.long_running_operation_timeout)<EOL>if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)<EOL>elif polling is False: polling_method = NoPolling()<EOL>else: polling_method = polling<EOL>return LROPoller(self._client, raw_result, get_long_running_output, polling_method)<EOL>

Creates or updates an application resource with the specified name.

        :param resource_group_name: The name of the resource group.
        :type resource_group_name: str
        :param cluster_name: The name of the cluster resource
        :type cluster_name: str
        :param application_name: The name of the application resource.
        :type application_name: str
        :param parameters: The application resource.
        :type parameters: ~azure.mgmt.servicefabric.models.ApplicationResource
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: The poller return type is ClientRawResponse, the
         direct response alongside the deserialized response
        :param polling: True for ARMPolling, False for no polling, or a
         polling object for personal polling strategy
        :return: An instance of LROPoller that returns ApplicationResource or
         ClientRawResponse<ApplicationResource> if raw==True
        :rtype:
         ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.servicefabric.models.ApplicationResource]
         or
         ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.servicefabric.models.ApplicationResource]]
        :raises:
         :class:`ErrorModelException<azure.mgmt.servicefabric.models.ErrorModelException>`


def patch(<EOL>self, resource_group_name, cluster_name, application_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config):

raw_result = self._patch_initial(<EOL>resource_group_name=resource_group_name,<EOL>cluster_name=cluster_name,<EOL>application_name=application_name,<EOL>parameters=parameters,<EOL>custom_headers=custom_headers,<EOL>raw=True,<EOL>**operation_config<EOL>)<EOL>def get_long_running_output(response):<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL><DEDENT>lro_delay = operation_config.get(<EOL>'<STR_LIT>',<EOL>self.config.long_running_operation_timeout)<EOL>if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)<EOL>elif polling is False: polling_method = NoPolling()<EOL>else: polling_method = polling<EOL>return LROPoller(self._client, raw_result, get_long_running_output, polling_method)<EOL>

Updates an application resource with the specified name.

        :param resource_group_name: The name of the resource group.
        :type resource_group_name: str
        :param cluster_name: The name of the cluster resource
        :type cluster_name: str
        :param application_name: The name of the application resource.
        :type application_name: str
        :param parameters: The application resource for patch operations.
        :type parameters:
         ~azure.mgmt.servicefabric.models.ApplicationResourceUpdate
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: The poller return type is ClientRawResponse, the
         direct response alongside the deserialized response
        :param polling: True for ARMPolling, False for no polling, or a
         polling object for personal polling strategy
        :return: An instance of LROPoller that returns
         ApplicationResourceUpdate or
         ClientRawResponse<ApplicationResourceUpdate> if raw==True
        :rtype:
         ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.servicefabric.models.ApplicationResourceUpdate]
         or
         ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.servicefabric.models.ApplicationResourceUpdate]]
        :raises:
         :class:`ErrorModelException<azure.mgmt.servicefabric.models.ErrorModelException>`


def delete(<EOL>self, resource_group_name, cluster_name, application_name, custom_headers=None, raw=False, polling=True, **operation_config):

raw_result = self._delete_initial(<EOL>resource_group_name=resource_group_name,<EOL>cluster_name=cluster_name,<EOL>application_name=application_name,<EOL>custom_headers=custom_headers,<EOL>raw=True,<EOL>**operation_config<EOL>)<EOL>def get_long_running_output(response):<EOL><INDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(None, response)<EOL>return client_raw_response<EOL><DEDENT><DEDENT>lro_delay = operation_config.get(<EOL>'<STR_LIT>',<EOL>self.config.long_running_operation_timeout)<EOL>if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)<EOL>elif polling is False: polling_method = NoPolling()<EOL>else: polling_method = polling<EOL>return LROPoller(self._client, raw_result, get_long_running_output, polling_method)<EOL>

Deletes an application resource with the specified name.

        :param resource_group_name: The name of the resource group.
        :type resource_group_name: str
        :param cluster_name: The name of the cluster resource
        :type cluster_name: str
        :param application_name: The name of the application resource.
        :type application_name: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: The poller return type is ClientRawResponse, the
         direct response alongside the deserialized response
        :param polling: True for ARMPolling, False for no polling, or a
         polling object for personal polling strategy
        :return: An instance of LROPoller that returns None or
         ClientRawResponse<None> if raw==True
        :rtype: ~msrestazure.azure_operation.AzureOperationPoller[None] or
         ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[None]]
        :raises:
         :class:`ErrorModelException<azure.mgmt.servicefabric.models.ErrorModelException>`


Returns all application resources in the specified cluster.

        :param resource_group_name: The name of the resource group.
        :type resource_group_name: str
        :param cluster_name: The name of the cluster resource
        :type cluster_name: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: ApplicationResourceList or ClientRawResponse if raw=true
        :rtype: ~azure.mgmt.servicefabric.models.ApplicationResourceList or
         ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`ErrorModelException<azure.mgmt.servicefabric.models.ErrorModelException>`


def get(<EOL>self, resource_group_name, cluster_name, application_name, service_name, custom_headers=None, raw=False, **operation_config):

<EOL>url = self.get.metadata['<STR_LIT:url>']<EOL>path_format_arguments = {<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", self.config.subscription_id, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", resource_group_name, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", cluster_name, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", application_name, '<STR_LIT:str>'),<EOL>'<STR_LIT>': self._serialize.url("<STR_LIT>", service_name, '<STR_LIT:str>')<EOL>}<EOL>url = self._client.format_url(url, **path_format_arguments)<EOL>query_parameters = {}<EOL>query_parameters['<STR_LIT>'] = self._serialize.query("<STR_LIT>", self.api_version, '<STR_LIT:str>')<EOL>header_parameters = {}<EOL>header_parameters['<STR_LIT>'] = '<STR_LIT:application/json>'<EOL>if self.config.generate_client_request_id:<EOL><INDENT>header_parameters['<STR_LIT>'] = str(uuid.uuid1())<EOL><DEDENT>if custom_headers:<EOL><INDENT>header_parameters.update(custom_headers)<EOL><DEDENT>if self.config.accept_language is not None:<EOL><INDENT>header_parameters['<STR_LIT>'] = self._serialize.header("<STR_LIT>", self.config.accept_language, '<STR_LIT:str>')<EOL><DEDENT>request = self._client.get(url, query_parameters, header_parameters)<EOL>response = self._client.send(request, stream=False, **operation_config)<EOL>if response.status_code not in [<NUM_LIT:200>]:<EOL><INDENT>raise models.ErrorModelException(self._deserialize, response)<EOL><DEDENT>deserialized = None<EOL>if response.status_code == <NUM_LIT:200>:<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL><DEDENT>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL>

Returns a service resource with the specified name.

        :param resource_group_name: The name of the resource group.
        :type resource_group_name: str
        :param cluster_name: The name of the cluster resource
        :type cluster_name: str
        :param application_name: The name of the application resource.
        :type application_name: str
        :param service_name: The name of the service resource in the format of
         {applicationName}~{serviceName}.
        :type service_name: str
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: returns the direct response alongside the
         deserialized response
        :param operation_config: :ref:`Operation configuration
         overrides<msrest:optionsforoperations>`.
        :return: ServiceResource or ClientRawResponse if raw=true
        :rtype: ~azure.mgmt.servicefabric.models.ServiceResource or
         ~msrest.pipeline.ClientRawResponse
        :raises:
         :class:`ErrorModelException<azure.mgmt.servicefabric.models.ErrorModelException>`


def put(<EOL>self, resource_group_name, cluster_name, application_name, service_name, parameters, custom_headers=None, raw=False, polling=True, **operation_config):

raw_result = self._put_initial(<EOL>resource_group_name=resource_group_name,<EOL>cluster_name=cluster_name,<EOL>application_name=application_name,<EOL>service_name=service_name,<EOL>parameters=parameters,<EOL>custom_headers=custom_headers,<EOL>raw=True,<EOL>**operation_config<EOL>)<EOL>def get_long_running_output(response):<EOL><INDENT>deserialized = self._deserialize('<STR_LIT>', response)<EOL>if raw:<EOL><INDENT>client_raw_response = ClientRawResponse(deserialized, response)<EOL>return client_raw_response<EOL><DEDENT>return deserialized<EOL><DEDENT>lro_delay = operation_config.get(<EOL>'<STR_LIT>',<EOL>self.config.long_running_operation_timeout)<EOL>if polling is True: polling_method = ARMPolling(lro_delay, **operation_config)<EOL>elif polling is False: polling_method = NoPolling()<EOL>else: polling_method = polling<EOL>return LROPoller(self._client, raw_result, get_long_running_output, polling_method)<EOL>

Creates or updates a service resource with the specified name.

        :param resource_group_name: The name of the resource group.
        :type resource_group_name: str
        :param cluster_name: The name of the cluster resource
        :type cluster_name: str
        :param application_name: The name of the application resource.
        :type application_name: str
        :param service_name: The name of the service resource in the format of
         {applicationName}~{serviceName}.
        :type service_name: str
        :param parameters: The service resource.
        :type parameters: ~azure.mgmt.servicefabric.models.ServiceResource
        :param dict custom_headers: headers that will be added to the request
        :param bool raw: The poller return type is ClientRawResponse, the
         direct response alongside the deserialized response
        :param polling: True for ARMPolling, False for no polling, or a
         polling object for personal polling strategy
        :return: An instance of LROPoller that returns ServiceResource or
         ClientRawResponse<ServiceResource> if raw==True
        :rtype:
         ~msrestazure.azure_operation.AzureOperationPoller[~azure.mgmt.servicefabric.models.ServiceResource]
         or
         ~msrestazure.azure_operation.AzureOperationPoller[~msrest.pipeline.ClientRawResponse[~azure.mgmt.servicefabric.models.ServiceResource]]
        :raises:
         :class:`ErrorModelException<azure.mgmt.servicefabric.models.ErrorModelException>`