# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
from typing import TYPE_CHECKING
import warnings

from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
from azure.core.paging import ItemPaged
from azure.core.pipeline import PipelineResponse
from azure.core.pipeline.transport import HttpRequest, HttpResponse
from azure.mgmt.core.exceptions import ARMErrorFormat

from .. import models

if TYPE_CHECKING:
    # pylint: disable=unused-import,ungrouped-imports
    from typing import Any, Callable, Dict, Generic, Iterable, List, Optional, TypeVar, Union

    T = TypeVar('T')
    ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]

class PrintOperations(object):
    """PrintOperations operations.

    You should not instantiate this class directly. Instead, you should create a Client instance that
    instantiates it for you and attaches it as an attribute.

    :ivar models: Alias to model classes used in this operation group.
    :type models: ~devices_cloud_print.models
    :param client: Client for service requests.
    :param config: Configuration of service client.
    :param serializer: An object model serializer.
    :param deserializer: An object model deserializer.
    """

    models = models

    def __init__(self, client, config, serializer, deserializer):
        self._client = client
        self._serialize = serializer
        self._deserialize = deserializer
        self._config = config

    def list_connectors(
        self,
        orderby=None,  # type: Optional[List[Union[str, "models.Get5ItemsItem"]]]
        select=None,  # type: Optional[List[Union[str, "models.Get6ItemsItem"]]]
        expand=None,  # type: Optional[List[str]]
        **kwargs  # type: Any
    ):
        # type: (...) -> Iterable["models.CollectionOfPrintConnector"]
        """Get connectors from print.

        Get connectors from print.

        :param orderby: Order items by property values.
        :type orderby: list[str or ~devices_cloud_print.models.Get5ItemsItem]
        :param select: Select properties to be returned.
        :type select: list[str or ~devices_cloud_print.models.Get6ItemsItem]
        :param expand: Expand related entities.
        :type expand: list[str]
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: An iterator like instance of either CollectionOfPrintConnector or the result of cls(response)
        :rtype: ~azure.core.paging.ItemPaged[~devices_cloud_print.models.CollectionOfPrintConnector]
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType["models.CollectionOfPrintConnector"]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        accept = "application/json"

        def prepare_request(next_link=None):
            # Construct headers
            header_parameters = {}  # type: Dict[str, Any]
            header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

            if not next_link:
                # Construct URL
                url = self.list_connectors.metadata['url']  # type: ignore
                # Construct parameters
                query_parameters = {}  # type: Dict[str, Any]
                if self._config.top is not None:
                    query_parameters['$top'] = self._serialize.query("self._config.top", self._config.top, 'int', minimum=0)
                if self._config.skip is not None:
                    query_parameters['$skip'] = self._serialize.query("self._config.skip", self._config.skip, 'int', minimum=0)
                if self._config.search is not None:
                    query_parameters['$search'] = self._serialize.query("self._config.search", self._config.search, 'str')
                if self._config.filter is not None:
                    query_parameters['$filter'] = self._serialize.query("self._config.filter", self._config.filter, 'str')
                if self._config.count is not None:
                    query_parameters['$count'] = self._serialize.query("self._config.count", self._config.count, 'bool')
                if orderby is not None:
                    query_parameters['$orderby'] = self._serialize.query("orderby", orderby, '[str]', div=',')
                if select is not None:
                    query_parameters['$select'] = self._serialize.query("select", select, '[str]', div=',')
                if expand is not None:
                    query_parameters['$expand'] = self._serialize.query("expand", expand, '[str]', div=',')

                request = self._client.get(url, query_parameters, header_parameters)
            else:
                url = next_link
                query_parameters = {}  # type: Dict[str, Any]
                request = self._client.get(url, query_parameters, header_parameters)
            return request

        def extract_data(pipeline_response):
            deserialized = self._deserialize('CollectionOfPrintConnector', pipeline_response)
            list_of_elem = deserialized.value
            if cls:
                list_of_elem = cls(list_of_elem)
            return deserialized.odata_next_link or None, iter(list_of_elem)

        def get_next(next_link=None):
            request = prepare_request(next_link)

            pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
            response = pipeline_response.http_response

            if response.status_code not in [200]:
                error = self._deserialize(models.OdataError, response)
                map_error(status_code=response.status_code, response=response, error_map=error_map)
                raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

            return pipeline_response

        return ItemPaged(
            get_next, extract_data
        )
    list_connectors.metadata = {'url': '/print/connectors'}  # type: ignore

    def create_connectors(
        self,
        body,  # type: "models.MicrosoftGraphPrintConnector"
        **kwargs  # type: Any
    ):
        # type: (...) -> "models.MicrosoftGraphPrintConnector"
        """Create new navigation property to connectors for print.

        Create new navigation property to connectors for print.

        :param body: New navigation property.
        :type body: ~devices_cloud_print.models.MicrosoftGraphPrintConnector
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: MicrosoftGraphPrintConnector, or the result of cls(response)
        :rtype: ~devices_cloud_print.models.MicrosoftGraphPrintConnector
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType["models.MicrosoftGraphPrintConnector"]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        content_type = kwargs.pop("content_type", "application/json")
        accept = "application/json"

        # Construct URL
        url = self.create_connectors.metadata['url']  # type: ignore

        # Construct parameters
        query_parameters = {}  # type: Dict[str, Any]

        # Construct headers
        header_parameters = {}  # type: Dict[str, Any]
        header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
        header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

        body_content_kwargs = {}  # type: Dict[str, Any]
        body_content = self._serialize.body(body, 'MicrosoftGraphPrintConnector')
        body_content_kwargs['content'] = body_content
        request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs)
        pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
        response = pipeline_response.http_response

        if response.status_code not in [201]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            error = self._deserialize(models.OdataError, response)
            raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

        deserialized = self._deserialize('MicrosoftGraphPrintConnector', pipeline_response)

        if cls:
            return cls(pipeline_response, deserialized, {})

        return deserialized
    create_connectors.metadata = {'url': '/print/connectors'}  # type: ignore

    def get_connectors(
        self,
        print_connector_id,  # type: str
        select=None,  # type: Optional[List[Union[str, "models.Enum28"]]]
        expand=None,  # type: Optional[List[str]]
        **kwargs  # type: Any
    ):
        # type: (...) -> "models.MicrosoftGraphPrintConnector"
        """Get connectors from print.

        Get connectors from print.

        :param print_connector_id: key: id of printConnector.
        :type print_connector_id: str
        :param select: Select properties to be returned.
        :type select: list[str or ~devices_cloud_print.models.Enum28]
        :param expand: Expand related entities.
        :type expand: list[str]
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: MicrosoftGraphPrintConnector, or the result of cls(response)
        :rtype: ~devices_cloud_print.models.MicrosoftGraphPrintConnector
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType["models.MicrosoftGraphPrintConnector"]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        accept = "application/json"

        # Construct URL
        url = self.get_connectors.metadata['url']  # type: ignore
        path_format_arguments = {
            'printConnector-id': self._serialize.url("print_connector_id", print_connector_id, 'str'),
        }
        url = self._client.format_url(url, **path_format_arguments)

        # Construct parameters
        query_parameters = {}  # type: Dict[str, Any]
        if select is not None:
            query_parameters['$select'] = self._serialize.query("select", select, '[str]', div=',')
        if expand is not None:
            query_parameters['$expand'] = self._serialize.query("expand", expand, '[str]', div=',')

        # Construct headers
        header_parameters = {}  # type: Dict[str, Any]
        header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

        request = self._client.get(url, query_parameters, header_parameters)
        pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
        response = pipeline_response.http_response

        if response.status_code not in [200]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            error = self._deserialize(models.OdataError, response)
            raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

        deserialized = self._deserialize('MicrosoftGraphPrintConnector', pipeline_response)

        if cls:
            return cls(pipeline_response, deserialized, {})

        return deserialized
    get_connectors.metadata = {'url': '/print/connectors/{printConnector-id}'}  # type: ignore

    def update_connectors(
        self,
        print_connector_id,  # type: str
        body,  # type: "models.MicrosoftGraphPrintConnector"
        **kwargs  # type: Any
    ):
        # type: (...) -> None
        """Update the navigation property connectors in print.

        Update the navigation property connectors in print.

        :param print_connector_id: key: id of printConnector.
        :type print_connector_id: str
        :param body: New navigation property values.
        :type body: ~devices_cloud_print.models.MicrosoftGraphPrintConnector
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: None, or the result of cls(response)
        :rtype: None
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType[None]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        content_type = kwargs.pop("content_type", "application/json")
        accept = "application/json"

        # Construct URL
        url = self.update_connectors.metadata['url']  # type: ignore
        path_format_arguments = {
            'printConnector-id': self._serialize.url("print_connector_id", print_connector_id, 'str'),
        }
        url = self._client.format_url(url, **path_format_arguments)

        # Construct parameters
        query_parameters = {}  # type: Dict[str, Any]

        # Construct headers
        header_parameters = {}  # type: Dict[str, Any]
        header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
        header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

        body_content_kwargs = {}  # type: Dict[str, Any]
        body_content = self._serialize.body(body, 'MicrosoftGraphPrintConnector')
        body_content_kwargs['content'] = body_content
        request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs)
        pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
        response = pipeline_response.http_response

        if response.status_code not in [204]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            error = self._deserialize(models.OdataError, response)
            raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

        if cls:
            return cls(pipeline_response, None, {})

    update_connectors.metadata = {'url': '/print/connectors/{printConnector-id}'}  # type: ignore

    def delete_connectors(
        self,
        print_connector_id,  # type: str
        if_match=None,  # type: Optional[str]
        **kwargs  # type: Any
    ):
        # type: (...) -> None
        """Delete navigation property connectors for print.

        Delete navigation property connectors for print.

        :param print_connector_id: key: id of printConnector.
        :type print_connector_id: str
        :param if_match: ETag.
        :type if_match: str
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: None, or the result of cls(response)
        :rtype: None
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType[None]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        accept = "application/json"

        # Construct URL
        url = self.delete_connectors.metadata['url']  # type: ignore
        path_format_arguments = {
            'printConnector-id': self._serialize.url("print_connector_id", print_connector_id, 'str'),
        }
        url = self._client.format_url(url, **path_format_arguments)

        # Construct parameters
        query_parameters = {}  # type: Dict[str, Any]

        # Construct headers
        header_parameters = {}  # type: Dict[str, Any]
        if if_match is not None:
            header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str')
        header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

        request = self._client.delete(url, query_parameters, header_parameters)
        pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
        response = pipeline_response.http_response

        if response.status_code not in [204]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            error = self._deserialize(models.OdataError, response)
            raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

        if cls:
            return cls(pipeline_response, None, {})

    delete_connectors.metadata = {'url': '/print/connectors/{printConnector-id}'}  # type: ignore

    def list_operations(
        self,
        orderby=None,  # type: Optional[List[Union[str, "models.Enum29"]]]
        select=None,  # type: Optional[List[Union[str, "models.Enum30"]]]
        expand=None,  # type: Optional[List[str]]
        **kwargs  # type: Any
    ):
        # type: (...) -> Iterable["models.CollectionOfPrintOperation"]
        """Get operations from print.

        Get operations from print.

        :param orderby: Order items by property values.
        :type orderby: list[str or ~devices_cloud_print.models.Enum29]
        :param select: Select properties to be returned.
        :type select: list[str or ~devices_cloud_print.models.Enum30]
        :param expand: Expand related entities.
        :type expand: list[str]
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: An iterator like instance of either CollectionOfPrintOperation or the result of cls(response)
        :rtype: ~azure.core.paging.ItemPaged[~devices_cloud_print.models.CollectionOfPrintOperation]
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType["models.CollectionOfPrintOperation"]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        accept = "application/json"

        def prepare_request(next_link=None):
            # Construct headers
            header_parameters = {}  # type: Dict[str, Any]
            header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

            if not next_link:
                # Construct URL
                url = self.list_operations.metadata['url']  # type: ignore
                # Construct parameters
                query_parameters = {}  # type: Dict[str, Any]
                if self._config.top is not None:
                    query_parameters['$top'] = self._serialize.query("self._config.top", self._config.top, 'int', minimum=0)
                if self._config.skip is not None:
                    query_parameters['$skip'] = self._serialize.query("self._config.skip", self._config.skip, 'int', minimum=0)
                if self._config.search is not None:
                    query_parameters['$search'] = self._serialize.query("self._config.search", self._config.search, 'str')
                if self._config.filter is not None:
                    query_parameters['$filter'] = self._serialize.query("self._config.filter", self._config.filter, 'str')
                if self._config.count is not None:
                    query_parameters['$count'] = self._serialize.query("self._config.count", self._config.count, 'bool')
                if orderby is not None:
                    query_parameters['$orderby'] = self._serialize.query("orderby", orderby, '[str]', div=',')
                if select is not None:
                    query_parameters['$select'] = self._serialize.query("select", select, '[str]', div=',')
                if expand is not None:
                    query_parameters['$expand'] = self._serialize.query("expand", expand, '[str]', div=',')

                request = self._client.get(url, query_parameters, header_parameters)
            else:
                url = next_link
                query_parameters = {}  # type: Dict[str, Any]
                request = self._client.get(url, query_parameters, header_parameters)
            return request

        def extract_data(pipeline_response):
            deserialized = self._deserialize('CollectionOfPrintOperation', pipeline_response)
            list_of_elem = deserialized.value
            if cls:
                list_of_elem = cls(list_of_elem)
            return deserialized.odata_next_link or None, iter(list_of_elem)

        def get_next(next_link=None):
            request = prepare_request(next_link)

            pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
            response = pipeline_response.http_response

            if response.status_code not in [200]:
                error = self._deserialize(models.OdataError, response)
                map_error(status_code=response.status_code, response=response, error_map=error_map)
                raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

            return pipeline_response

        return ItemPaged(
            get_next, extract_data
        )
    list_operations.metadata = {'url': '/print/operations'}  # type: ignore

    def create_operations(
        self,
        body,  # type: "models.MicrosoftGraphPrintOperation"
        **kwargs  # type: Any
    ):
        # type: (...) -> "models.MicrosoftGraphPrintOperation"
        """Create new navigation property to operations for print.

        Create new navigation property to operations for print.

        :param body: New navigation property.
        :type body: ~devices_cloud_print.models.MicrosoftGraphPrintOperation
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: MicrosoftGraphPrintOperation, or the result of cls(response)
        :rtype: ~devices_cloud_print.models.MicrosoftGraphPrintOperation
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType["models.MicrosoftGraphPrintOperation"]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        content_type = kwargs.pop("content_type", "application/json")
        accept = "application/json"

        # Construct URL
        url = self.create_operations.metadata['url']  # type: ignore

        # Construct parameters
        query_parameters = {}  # type: Dict[str, Any]

        # Construct headers
        header_parameters = {}  # type: Dict[str, Any]
        header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
        header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

        body_content_kwargs = {}  # type: Dict[str, Any]
        body_content = self._serialize.body(body, 'MicrosoftGraphPrintOperation')
        body_content_kwargs['content'] = body_content
        request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs)
        pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
        response = pipeline_response.http_response

        if response.status_code not in [201]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            error = self._deserialize(models.OdataError, response)
            raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

        deserialized = self._deserialize('MicrosoftGraphPrintOperation', pipeline_response)

        if cls:
            return cls(pipeline_response, deserialized, {})

        return deserialized
    create_operations.metadata = {'url': '/print/operations'}  # type: ignore

    def get_operations(
        self,
        print_operation_id,  # type: str
        select=None,  # type: Optional[List[Union[str, "models.Enum31"]]]
        expand=None,  # type: Optional[List[str]]
        **kwargs  # type: Any
    ):
        # type: (...) -> "models.MicrosoftGraphPrintOperation"
        """Get operations from print.

        Get operations from print.

        :param print_operation_id: key: id of printOperation.
        :type print_operation_id: str
        :param select: Select properties to be returned.
        :type select: list[str or ~devices_cloud_print.models.Enum31]
        :param expand: Expand related entities.
        :type expand: list[str]
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: MicrosoftGraphPrintOperation, or the result of cls(response)
        :rtype: ~devices_cloud_print.models.MicrosoftGraphPrintOperation
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType["models.MicrosoftGraphPrintOperation"]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        accept = "application/json"

        # Construct URL
        url = self.get_operations.metadata['url']  # type: ignore
        path_format_arguments = {
            'printOperation-id': self._serialize.url("print_operation_id", print_operation_id, 'str'),
        }
        url = self._client.format_url(url, **path_format_arguments)

        # Construct parameters
        query_parameters = {}  # type: Dict[str, Any]
        if select is not None:
            query_parameters['$select'] = self._serialize.query("select", select, '[str]', div=',')
        if expand is not None:
            query_parameters['$expand'] = self._serialize.query("expand", expand, '[str]', div=',')

        # Construct headers
        header_parameters = {}  # type: Dict[str, Any]
        header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

        request = self._client.get(url, query_parameters, header_parameters)
        pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
        response = pipeline_response.http_response

        if response.status_code not in [200]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            error = self._deserialize(models.OdataError, response)
            raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

        deserialized = self._deserialize('MicrosoftGraphPrintOperation', pipeline_response)

        if cls:
            return cls(pipeline_response, deserialized, {})

        return deserialized
    get_operations.metadata = {'url': '/print/operations/{printOperation-id}'}  # type: ignore

    def update_operations(
        self,
        print_operation_id,  # type: str
        body,  # type: "models.MicrosoftGraphPrintOperation"
        **kwargs  # type: Any
    ):
        # type: (...) -> None
        """Update the navigation property operations in print.

        Update the navigation property operations in print.

        :param print_operation_id: key: id of printOperation.
        :type print_operation_id: str
        :param body: New navigation property values.
        :type body: ~devices_cloud_print.models.MicrosoftGraphPrintOperation
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: None, or the result of cls(response)
        :rtype: None
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType[None]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        content_type = kwargs.pop("content_type", "application/json")
        accept = "application/json"

        # Construct URL
        url = self.update_operations.metadata['url']  # type: ignore
        path_format_arguments = {
            'printOperation-id': self._serialize.url("print_operation_id", print_operation_id, 'str'),
        }
        url = self._client.format_url(url, **path_format_arguments)

        # Construct parameters
        query_parameters = {}  # type: Dict[str, Any]

        # Construct headers
        header_parameters = {}  # type: Dict[str, Any]
        header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
        header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

        body_content_kwargs = {}  # type: Dict[str, Any]
        body_content = self._serialize.body(body, 'MicrosoftGraphPrintOperation')
        body_content_kwargs['content'] = body_content
        request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs)
        pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
        response = pipeline_response.http_response

        if response.status_code not in [204]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            error = self._deserialize(models.OdataError, response)
            raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

        if cls:
            return cls(pipeline_response, None, {})

    update_operations.metadata = {'url': '/print/operations/{printOperation-id}'}  # type: ignore

    def delete_operations(
        self,
        print_operation_id,  # type: str
        if_match=None,  # type: Optional[str]
        **kwargs  # type: Any
    ):
        # type: (...) -> None
        """Delete navigation property operations for print.

        Delete navigation property operations for print.

        :param print_operation_id: key: id of printOperation.
        :type print_operation_id: str
        :param if_match: ETag.
        :type if_match: str
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: None, or the result of cls(response)
        :rtype: None
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType[None]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        accept = "application/json"

        # Construct URL
        url = self.delete_operations.metadata['url']  # type: ignore
        path_format_arguments = {
            'printOperation-id': self._serialize.url("print_operation_id", print_operation_id, 'str'),
        }
        url = self._client.format_url(url, **path_format_arguments)

        # Construct parameters
        query_parameters = {}  # type: Dict[str, Any]

        # Construct headers
        header_parameters = {}  # type: Dict[str, Any]
        if if_match is not None:
            header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str')
        header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

        request = self._client.delete(url, query_parameters, header_parameters)
        pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
        response = pipeline_response.http_response

        if response.status_code not in [204]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            error = self._deserialize(models.OdataError, response)
            raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

        if cls:
            return cls(pipeline_response, None, {})

    delete_operations.metadata = {'url': '/print/operations/{printOperation-id}'}  # type: ignore

    def list_printers(
        self,
        orderby=None,  # type: Optional[List[Union[str, "models.Enum32"]]]
        select=None,  # type: Optional[List[Union[str, "models.Enum33"]]]
        expand=None,  # type: Optional[List[Union[str, "models.Enum34"]]]
        **kwargs  # type: Any
    ):
        # type: (...) -> Iterable["models.CollectionOfPrinter"]
        """Get printers from print.

        Get printers from print.

        :param orderby: Order items by property values.
        :type orderby: list[str or ~devices_cloud_print.models.Enum32]
        :param select: Select properties to be returned.
        :type select: list[str or ~devices_cloud_print.models.Enum33]
        :param expand: Expand related entities.
        :type expand: list[str or ~devices_cloud_print.models.Enum34]
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: An iterator like instance of either CollectionOfPrinter or the result of cls(response)
        :rtype: ~azure.core.paging.ItemPaged[~devices_cloud_print.models.CollectionOfPrinter]
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType["models.CollectionOfPrinter"]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        accept = "application/json"

        def prepare_request(next_link=None):
            # Construct headers
            header_parameters = {}  # type: Dict[str, Any]
            header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

            if not next_link:
                # Construct URL
                url = self.list_printers.metadata['url']  # type: ignore
                # Construct parameters
                query_parameters = {}  # type: Dict[str, Any]
                if self._config.top is not None:
                    query_parameters['$top'] = self._serialize.query("self._config.top", self._config.top, 'int', minimum=0)
                if self._config.skip is not None:
                    query_parameters['$skip'] = self._serialize.query("self._config.skip", self._config.skip, 'int', minimum=0)
                if self._config.search is not None:
                    query_parameters['$search'] = self._serialize.query("self._config.search", self._config.search, 'str')
                if self._config.filter is not None:
                    query_parameters['$filter'] = self._serialize.query("self._config.filter", self._config.filter, 'str')
                if self._config.count is not None:
                    query_parameters['$count'] = self._serialize.query("self._config.count", self._config.count, 'bool')
                if orderby is not None:
                    query_parameters['$orderby'] = self._serialize.query("orderby", orderby, '[str]', div=',')
                if select is not None:
                    query_parameters['$select'] = self._serialize.query("select", select, '[str]', div=',')
                if expand is not None:
                    query_parameters['$expand'] = self._serialize.query("expand", expand, '[str]', div=',')

                request = self._client.get(url, query_parameters, header_parameters)
            else:
                url = next_link
                query_parameters = {}  # type: Dict[str, Any]
                request = self._client.get(url, query_parameters, header_parameters)
            return request

        def extract_data(pipeline_response):
            deserialized = self._deserialize('CollectionOfPrinter', pipeline_response)
            list_of_elem = deserialized.value
            if cls:
                list_of_elem = cls(list_of_elem)
            return deserialized.odata_next_link or None, iter(list_of_elem)

        def get_next(next_link=None):
            request = prepare_request(next_link)

            pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
            response = pipeline_response.http_response

            if response.status_code not in [200]:
                error = self._deserialize(models.OdataError, response)
                map_error(status_code=response.status_code, response=response, error_map=error_map)
                raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

            return pipeline_response

        return ItemPaged(
            get_next, extract_data
        )
    list_printers.metadata = {'url': '/print/printers'}  # type: ignore

    def create_printers(
        self,
        body,  # type: "models.MicrosoftGraphPrinter"
        **kwargs  # type: Any
    ):
        # type: (...) -> "models.MicrosoftGraphPrinter"
        """Create new navigation property to printers for print.

        Create new navigation property to printers for print.

        :param body: New navigation property.
        :type body: ~devices_cloud_print.models.MicrosoftGraphPrinter
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: MicrosoftGraphPrinter, or the result of cls(response)
        :rtype: ~devices_cloud_print.models.MicrosoftGraphPrinter
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType["models.MicrosoftGraphPrinter"]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        content_type = kwargs.pop("content_type", "application/json")
        accept = "application/json"

        # Construct URL
        url = self.create_printers.metadata['url']  # type: ignore

        # Construct parameters
        query_parameters = {}  # type: Dict[str, Any]

        # Construct headers
        header_parameters = {}  # type: Dict[str, Any]
        header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
        header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

        body_content_kwargs = {}  # type: Dict[str, Any]
        body_content = self._serialize.body(body, 'MicrosoftGraphPrinter')
        body_content_kwargs['content'] = body_content
        request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs)
        pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
        response = pipeline_response.http_response

        if response.status_code not in [201]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            error = self._deserialize(models.OdataError, response)
            raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

        deserialized = self._deserialize('MicrosoftGraphPrinter', pipeline_response)

        if cls:
            return cls(pipeline_response, deserialized, {})

        return deserialized
    create_printers.metadata = {'url': '/print/printers'}  # type: ignore

    def get_printers(
        self,
        printer_id,  # type: str
        select=None,  # type: Optional[List[Union[str, "models.Enum35"]]]
        expand=None,  # type: Optional[List[Union[str, "models.Enum36"]]]
        **kwargs  # type: Any
    ):
        # type: (...) -> "models.MicrosoftGraphPrinter"
        """Get printers from print.

        Get printers from print.

        :param printer_id: key: id of printer.
        :type printer_id: str
        :param select: Select properties to be returned.
        :type select: list[str or ~devices_cloud_print.models.Enum35]
        :param expand: Expand related entities.
        :type expand: list[str or ~devices_cloud_print.models.Enum36]
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: MicrosoftGraphPrinter, or the result of cls(response)
        :rtype: ~devices_cloud_print.models.MicrosoftGraphPrinter
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType["models.MicrosoftGraphPrinter"]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        accept = "application/json"

        # Construct URL
        url = self.get_printers.metadata['url']  # type: ignore
        path_format_arguments = {
            'printer-id': self._serialize.url("printer_id", printer_id, 'str'),
        }
        url = self._client.format_url(url, **path_format_arguments)

        # Construct parameters
        query_parameters = {}  # type: Dict[str, Any]
        if select is not None:
            query_parameters['$select'] = self._serialize.query("select", select, '[str]', div=',')
        if expand is not None:
            query_parameters['$expand'] = self._serialize.query("expand", expand, '[str]', div=',')

        # Construct headers
        header_parameters = {}  # type: Dict[str, Any]
        header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

        request = self._client.get(url, query_parameters, header_parameters)
        pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
        response = pipeline_response.http_response

        if response.status_code not in [200]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            error = self._deserialize(models.OdataError, response)
            raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

        deserialized = self._deserialize('MicrosoftGraphPrinter', pipeline_response)

        if cls:
            return cls(pipeline_response, deserialized, {})

        return deserialized
    get_printers.metadata = {'url': '/print/printers/{printer-id}'}  # type: ignore

    def update_printers(
        self,
        printer_id,  # type: str
        body,  # type: "models.MicrosoftGraphPrinter"
        **kwargs  # type: Any
    ):
        # type: (...) -> None
        """Update the navigation property printers in print.

        Update the navigation property printers in print.

        :param printer_id: key: id of printer.
        :type printer_id: str
        :param body: New navigation property values.
        :type body: ~devices_cloud_print.models.MicrosoftGraphPrinter
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: None, or the result of cls(response)
        :rtype: None
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType[None]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        content_type = kwargs.pop("content_type", "application/json")
        accept = "application/json"

        # Construct URL
        url = self.update_printers.metadata['url']  # type: ignore
        path_format_arguments = {
            'printer-id': self._serialize.url("printer_id", printer_id, 'str'),
        }
        url = self._client.format_url(url, **path_format_arguments)

        # Construct parameters
        query_parameters = {}  # type: Dict[str, Any]

        # Construct headers
        header_parameters = {}  # type: Dict[str, Any]
        header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
        header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

        body_content_kwargs = {}  # type: Dict[str, Any]
        body_content = self._serialize.body(body, 'MicrosoftGraphPrinter')
        body_content_kwargs['content'] = body_content
        request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs)
        pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
        response = pipeline_response.http_response

        if response.status_code not in [204]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            error = self._deserialize(models.OdataError, response)
            raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

        if cls:
            return cls(pipeline_response, None, {})

    update_printers.metadata = {'url': '/print/printers/{printer-id}'}  # type: ignore

    def delete_printers(
        self,
        printer_id,  # type: str
        if_match=None,  # type: Optional[str]
        **kwargs  # type: Any
    ):
        # type: (...) -> None
        """Delete navigation property printers for print.

        Delete navigation property printers for print.

        :param printer_id: key: id of printer.
        :type printer_id: str
        :param if_match: ETag.
        :type if_match: str
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: None, or the result of cls(response)
        :rtype: None
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType[None]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        accept = "application/json"

        # Construct URL
        url = self.delete_printers.metadata['url']  # type: ignore
        path_format_arguments = {
            'printer-id': self._serialize.url("printer_id", printer_id, 'str'),
        }
        url = self._client.format_url(url, **path_format_arguments)

        # Construct parameters
        query_parameters = {}  # type: Dict[str, Any]

        # Construct headers
        header_parameters = {}  # type: Dict[str, Any]
        if if_match is not None:
            header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str')
        header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

        request = self._client.delete(url, query_parameters, header_parameters)
        pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
        response = pipeline_response.http_response

        if response.status_code not in [204]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            error = self._deserialize(models.OdataError, response)
            raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

        if cls:
            return cls(pipeline_response, None, {})

    delete_printers.metadata = {'url': '/print/printers/{printer-id}'}  # type: ignore

    def list_printer_shares(
        self,
        orderby=None,  # type: Optional[List[Union[str, "models.Enum59"]]]
        select=None,  # type: Optional[List[Union[str, "models.Enum60"]]]
        expand=None,  # type: Optional[List[Union[str, "models.Enum61"]]]
        **kwargs  # type: Any
    ):
        # type: (...) -> Iterable["models.CollectionOfPrinterShare0"]
        """Get printerShares from print.

        Get printerShares from print.

        :param orderby: Order items by property values.
        :type orderby: list[str or ~devices_cloud_print.models.Enum59]
        :param select: Select properties to be returned.
        :type select: list[str or ~devices_cloud_print.models.Enum60]
        :param expand: Expand related entities.
        :type expand: list[str or ~devices_cloud_print.models.Enum61]
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: An iterator like instance of either CollectionOfPrinterShare0 or the result of cls(response)
        :rtype: ~azure.core.paging.ItemPaged[~devices_cloud_print.models.CollectionOfPrinterShare0]
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType["models.CollectionOfPrinterShare0"]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        accept = "application/json"

        def prepare_request(next_link=None):
            # Construct headers
            header_parameters = {}  # type: Dict[str, Any]
            header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

            if not next_link:
                # Construct URL
                url = self.list_printer_shares.metadata['url']  # type: ignore
                # Construct parameters
                query_parameters = {}  # type: Dict[str, Any]
                if self._config.top is not None:
                    query_parameters['$top'] = self._serialize.query("self._config.top", self._config.top, 'int', minimum=0)
                if self._config.skip is not None:
                    query_parameters['$skip'] = self._serialize.query("self._config.skip", self._config.skip, 'int', minimum=0)
                if self._config.search is not None:
                    query_parameters['$search'] = self._serialize.query("self._config.search", self._config.search, 'str')
                if self._config.filter is not None:
                    query_parameters['$filter'] = self._serialize.query("self._config.filter", self._config.filter, 'str')
                if self._config.count is not None:
                    query_parameters['$count'] = self._serialize.query("self._config.count", self._config.count, 'bool')
                if orderby is not None:
                    query_parameters['$orderby'] = self._serialize.query("orderby", orderby, '[str]', div=',')
                if select is not None:
                    query_parameters['$select'] = self._serialize.query("select", select, '[str]', div=',')
                if expand is not None:
                    query_parameters['$expand'] = self._serialize.query("expand", expand, '[str]', div=',')

                request = self._client.get(url, query_parameters, header_parameters)
            else:
                url = next_link
                query_parameters = {}  # type: Dict[str, Any]
                request = self._client.get(url, query_parameters, header_parameters)
            return request

        def extract_data(pipeline_response):
            deserialized = self._deserialize('CollectionOfPrinterShare0', pipeline_response)
            list_of_elem = deserialized.value
            if cls:
                list_of_elem = cls(list_of_elem)
            return deserialized.odata_next_link or None, iter(list_of_elem)

        def get_next(next_link=None):
            request = prepare_request(next_link)

            pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
            response = pipeline_response.http_response

            if response.status_code not in [200]:
                error = self._deserialize(models.OdataError, response)
                map_error(status_code=response.status_code, response=response, error_map=error_map)
                raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

            return pipeline_response

        return ItemPaged(
            get_next, extract_data
        )
    list_printer_shares.metadata = {'url': '/print/printerShares'}  # type: ignore

    def create_printer_shares(
        self,
        body,  # type: "models.MicrosoftGraphPrinterShare"
        **kwargs  # type: Any
    ):
        # type: (...) -> "models.MicrosoftGraphPrinterShare"
        """Create new navigation property to printerShares for print.

        Create new navigation property to printerShares for print.

        :param body: New navigation property.
        :type body: ~devices_cloud_print.models.MicrosoftGraphPrinterShare
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: MicrosoftGraphPrinterShare, or the result of cls(response)
        :rtype: ~devices_cloud_print.models.MicrosoftGraphPrinterShare
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType["models.MicrosoftGraphPrinterShare"]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        content_type = kwargs.pop("content_type", "application/json")
        accept = "application/json"

        # Construct URL
        url = self.create_printer_shares.metadata['url']  # type: ignore

        # Construct parameters
        query_parameters = {}  # type: Dict[str, Any]

        # Construct headers
        header_parameters = {}  # type: Dict[str, Any]
        header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
        header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

        body_content_kwargs = {}  # type: Dict[str, Any]
        body_content = self._serialize.body(body, 'MicrosoftGraphPrinterShare')
        body_content_kwargs['content'] = body_content
        request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs)
        pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
        response = pipeline_response.http_response

        if response.status_code not in [201]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            error = self._deserialize(models.OdataError, response)
            raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

        deserialized = self._deserialize('MicrosoftGraphPrinterShare', pipeline_response)

        if cls:
            return cls(pipeline_response, deserialized, {})

        return deserialized
    create_printer_shares.metadata = {'url': '/print/printerShares'}  # type: ignore

    def get_printer_shares(
        self,
        printer_share_id,  # type: str
        select=None,  # type: Optional[List[Union[str, "models.Enum62"]]]
        expand=None,  # type: Optional[List[Union[str, "models.Enum63"]]]
        **kwargs  # type: Any
    ):
        # type: (...) -> "models.MicrosoftGraphPrinterShare"
        """Get printerShares from print.

        Get printerShares from print.

        :param printer_share_id: key: id of printerShare.
        :type printer_share_id: str
        :param select: Select properties to be returned.
        :type select: list[str or ~devices_cloud_print.models.Enum62]
        :param expand: Expand related entities.
        :type expand: list[str or ~devices_cloud_print.models.Enum63]
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: MicrosoftGraphPrinterShare, or the result of cls(response)
        :rtype: ~devices_cloud_print.models.MicrosoftGraphPrinterShare
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType["models.MicrosoftGraphPrinterShare"]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        accept = "application/json"

        # Construct URL
        url = self.get_printer_shares.metadata['url']  # type: ignore
        path_format_arguments = {
            'printerShare-id': self._serialize.url("printer_share_id", printer_share_id, 'str'),
        }
        url = self._client.format_url(url, **path_format_arguments)

        # Construct parameters
        query_parameters = {}  # type: Dict[str, Any]
        if select is not None:
            query_parameters['$select'] = self._serialize.query("select", select, '[str]', div=',')
        if expand is not None:
            query_parameters['$expand'] = self._serialize.query("expand", expand, '[str]', div=',')

        # Construct headers
        header_parameters = {}  # type: Dict[str, Any]
        header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

        request = self._client.get(url, query_parameters, header_parameters)
        pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
        response = pipeline_response.http_response

        if response.status_code not in [200]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            error = self._deserialize(models.OdataError, response)
            raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

        deserialized = self._deserialize('MicrosoftGraphPrinterShare', pipeline_response)

        if cls:
            return cls(pipeline_response, deserialized, {})

        return deserialized
    get_printer_shares.metadata = {'url': '/print/printerShares/{printerShare-id}'}  # type: ignore

    def update_printer_shares(
        self,
        printer_share_id,  # type: str
        body,  # type: "models.MicrosoftGraphPrinterShare"
        **kwargs  # type: Any
    ):
        # type: (...) -> None
        """Update the navigation property printerShares in print.

        Update the navigation property printerShares in print.

        :param printer_share_id: key: id of printerShare.
        :type printer_share_id: str
        :param body: New navigation property values.
        :type body: ~devices_cloud_print.models.MicrosoftGraphPrinterShare
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: None, or the result of cls(response)
        :rtype: None
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType[None]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        content_type = kwargs.pop("content_type", "application/json")
        accept = "application/json"

        # Construct URL
        url = self.update_printer_shares.metadata['url']  # type: ignore
        path_format_arguments = {
            'printerShare-id': self._serialize.url("printer_share_id", printer_share_id, 'str'),
        }
        url = self._client.format_url(url, **path_format_arguments)

        # Construct parameters
        query_parameters = {}  # type: Dict[str, Any]

        # Construct headers
        header_parameters = {}  # type: Dict[str, Any]
        header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
        header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

        body_content_kwargs = {}  # type: Dict[str, Any]
        body_content = self._serialize.body(body, 'MicrosoftGraphPrinterShare')
        body_content_kwargs['content'] = body_content
        request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs)
        pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
        response = pipeline_response.http_response

        if response.status_code not in [204]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            error = self._deserialize(models.OdataError, response)
            raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

        if cls:
            return cls(pipeline_response, None, {})

    update_printer_shares.metadata = {'url': '/print/printerShares/{printerShare-id}'}  # type: ignore

    def delete_printer_shares(
        self,
        printer_share_id,  # type: str
        if_match=None,  # type: Optional[str]
        **kwargs  # type: Any
    ):
        # type: (...) -> None
        """Delete navigation property printerShares for print.

        Delete navigation property printerShares for print.

        :param printer_share_id: key: id of printerShare.
        :type printer_share_id: str
        :param if_match: ETag.
        :type if_match: str
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: None, or the result of cls(response)
        :rtype: None
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType[None]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        accept = "application/json"

        # Construct URL
        url = self.delete_printer_shares.metadata['url']  # type: ignore
        path_format_arguments = {
            'printerShare-id': self._serialize.url("printer_share_id", printer_share_id, 'str'),
        }
        url = self._client.format_url(url, **path_format_arguments)

        # Construct parameters
        query_parameters = {}  # type: Dict[str, Any]

        # Construct headers
        header_parameters = {}  # type: Dict[str, Any]
        if if_match is not None:
            header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str')
        header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

        request = self._client.delete(url, query_parameters, header_parameters)
        pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
        response = pipeline_response.http_response

        if response.status_code not in [204]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            error = self._deserialize(models.OdataError, response)
            raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

        if cls:
            return cls(pipeline_response, None, {})

    delete_printer_shares.metadata = {'url': '/print/printerShares/{printerShare-id}'}  # type: ignore

    def list_reports(
        self,
        orderby=None,  # type: Optional[List[Union[str, "models.Enum72"]]]
        select=None,  # type: Optional[List[Union[str, "models.Enum73"]]]
        expand=None,  # type: Optional[List[Union[str, "models.Enum74"]]]
        **kwargs  # type: Any
    ):
        # type: (...) -> Iterable["models.CollectionOfReportRoot"]
        """Get reports from print.

        Get reports from print.

        :param orderby: Order items by property values.
        :type orderby: list[str or ~devices_cloud_print.models.Enum72]
        :param select: Select properties to be returned.
        :type select: list[str or ~devices_cloud_print.models.Enum73]
        :param expand: Expand related entities.
        :type expand: list[str or ~devices_cloud_print.models.Enum74]
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: An iterator like instance of either CollectionOfReportRoot or the result of cls(response)
        :rtype: ~azure.core.paging.ItemPaged[~devices_cloud_print.models.CollectionOfReportRoot]
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType["models.CollectionOfReportRoot"]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        accept = "application/json"

        def prepare_request(next_link=None):
            # Construct headers
            header_parameters = {}  # type: Dict[str, Any]
            header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

            if not next_link:
                # Construct URL
                url = self.list_reports.metadata['url']  # type: ignore
                # Construct parameters
                query_parameters = {}  # type: Dict[str, Any]
                if self._config.top is not None:
                    query_parameters['$top'] = self._serialize.query("self._config.top", self._config.top, 'int', minimum=0)
                if self._config.skip is not None:
                    query_parameters['$skip'] = self._serialize.query("self._config.skip", self._config.skip, 'int', minimum=0)
                if self._config.search is not None:
                    query_parameters['$search'] = self._serialize.query("self._config.search", self._config.search, 'str')
                if self._config.filter is not None:
                    query_parameters['$filter'] = self._serialize.query("self._config.filter", self._config.filter, 'str')
                if self._config.count is not None:
                    query_parameters['$count'] = self._serialize.query("self._config.count", self._config.count, 'bool')
                if orderby is not None:
                    query_parameters['$orderby'] = self._serialize.query("orderby", orderby, '[str]', div=',')
                if select is not None:
                    query_parameters['$select'] = self._serialize.query("select", select, '[str]', div=',')
                if expand is not None:
                    query_parameters['$expand'] = self._serialize.query("expand", expand, '[str]', div=',')

                request = self._client.get(url, query_parameters, header_parameters)
            else:
                url = next_link
                query_parameters = {}  # type: Dict[str, Any]
                request = self._client.get(url, query_parameters, header_parameters)
            return request

        def extract_data(pipeline_response):
            deserialized = self._deserialize('CollectionOfReportRoot', pipeline_response)
            list_of_elem = deserialized.value
            if cls:
                list_of_elem = cls(list_of_elem)
            return deserialized.odata_next_link or None, iter(list_of_elem)

        def get_next(next_link=None):
            request = prepare_request(next_link)

            pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
            response = pipeline_response.http_response

            if response.status_code not in [200]:
                error = self._deserialize(models.OdataError, response)
                map_error(status_code=response.status_code, response=response, error_map=error_map)
                raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

            return pipeline_response

        return ItemPaged(
            get_next, extract_data
        )
    list_reports.metadata = {'url': '/print/reports'}  # type: ignore

    def create_reports(
        self,
        body,  # type: "models.MicrosoftGraphReportRoot"
        **kwargs  # type: Any
    ):
        # type: (...) -> "models.MicrosoftGraphReportRoot"
        """Create new navigation property to reports for print.

        Create new navigation property to reports for print.

        :param body: New navigation property.
        :type body: ~devices_cloud_print.models.MicrosoftGraphReportRoot
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: MicrosoftGraphReportRoot, or the result of cls(response)
        :rtype: ~devices_cloud_print.models.MicrosoftGraphReportRoot
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType["models.MicrosoftGraphReportRoot"]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        content_type = kwargs.pop("content_type", "application/json")
        accept = "application/json"

        # Construct URL
        url = self.create_reports.metadata['url']  # type: ignore

        # Construct parameters
        query_parameters = {}  # type: Dict[str, Any]

        # Construct headers
        header_parameters = {}  # type: Dict[str, Any]
        header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
        header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

        body_content_kwargs = {}  # type: Dict[str, Any]
        body_content = self._serialize.body(body, 'MicrosoftGraphReportRoot')
        body_content_kwargs['content'] = body_content
        request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs)
        pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
        response = pipeline_response.http_response

        if response.status_code not in [201]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            error = self._deserialize(models.OdataError, response)
            raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

        deserialized = self._deserialize('MicrosoftGraphReportRoot', pipeline_response)

        if cls:
            return cls(pipeline_response, deserialized, {})

        return deserialized
    create_reports.metadata = {'url': '/print/reports'}  # type: ignore

    def get_reports(
        self,
        report_root_id,  # type: str
        select=None,  # type: Optional[List[Union[str, "models.Enum75"]]]
        expand=None,  # type: Optional[List[Union[str, "models.Enum76"]]]
        **kwargs  # type: Any
    ):
        # type: (...) -> "models.MicrosoftGraphReportRoot"
        """Get reports from print.

        Get reports from print.

        :param report_root_id: key: id of reportRoot.
        :type report_root_id: str
        :param select: Select properties to be returned.
        :type select: list[str or ~devices_cloud_print.models.Enum75]
        :param expand: Expand related entities.
        :type expand: list[str or ~devices_cloud_print.models.Enum76]
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: MicrosoftGraphReportRoot, or the result of cls(response)
        :rtype: ~devices_cloud_print.models.MicrosoftGraphReportRoot
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType["models.MicrosoftGraphReportRoot"]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        accept = "application/json"

        # Construct URL
        url = self.get_reports.metadata['url']  # type: ignore
        path_format_arguments = {
            'reportRoot-id': self._serialize.url("report_root_id", report_root_id, 'str'),
        }
        url = self._client.format_url(url, **path_format_arguments)

        # Construct parameters
        query_parameters = {}  # type: Dict[str, Any]
        if select is not None:
            query_parameters['$select'] = self._serialize.query("select", select, '[str]', div=',')
        if expand is not None:
            query_parameters['$expand'] = self._serialize.query("expand", expand, '[str]', div=',')

        # Construct headers
        header_parameters = {}  # type: Dict[str, Any]
        header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

        request = self._client.get(url, query_parameters, header_parameters)
        pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
        response = pipeline_response.http_response

        if response.status_code not in [200]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            error = self._deserialize(models.OdataError, response)
            raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

        deserialized = self._deserialize('MicrosoftGraphReportRoot', pipeline_response)

        if cls:
            return cls(pipeline_response, deserialized, {})

        return deserialized
    get_reports.metadata = {'url': '/print/reports/{reportRoot-id}'}  # type: ignore

    def update_reports(
        self,
        report_root_id,  # type: str
        body,  # type: "models.MicrosoftGraphReportRoot"
        **kwargs  # type: Any
    ):
        # type: (...) -> None
        """Update the navigation property reports in print.

        Update the navigation property reports in print.

        :param report_root_id: key: id of reportRoot.
        :type report_root_id: str
        :param body: New navigation property values.
        :type body: ~devices_cloud_print.models.MicrosoftGraphReportRoot
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: None, or the result of cls(response)
        :rtype: None
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType[None]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        content_type = kwargs.pop("content_type", "application/json")
        accept = "application/json"

        # Construct URL
        url = self.update_reports.metadata['url']  # type: ignore
        path_format_arguments = {
            'reportRoot-id': self._serialize.url("report_root_id", report_root_id, 'str'),
        }
        url = self._client.format_url(url, **path_format_arguments)

        # Construct parameters
        query_parameters = {}  # type: Dict[str, Any]

        # Construct headers
        header_parameters = {}  # type: Dict[str, Any]
        header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
        header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

        body_content_kwargs = {}  # type: Dict[str, Any]
        body_content = self._serialize.body(body, 'MicrosoftGraphReportRoot')
        body_content_kwargs['content'] = body_content
        request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs)
        pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
        response = pipeline_response.http_response

        if response.status_code not in [204]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            error = self._deserialize(models.OdataError, response)
            raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

        if cls:
            return cls(pipeline_response, None, {})

    update_reports.metadata = {'url': '/print/reports/{reportRoot-id}'}  # type: ignore

    def delete_reports(
        self,
        report_root_id,  # type: str
        if_match=None,  # type: Optional[str]
        **kwargs  # type: Any
    ):
        # type: (...) -> None
        """Delete navigation property reports for print.

        Delete navigation property reports for print.

        :param report_root_id: key: id of reportRoot.
        :type report_root_id: str
        :param if_match: ETag.
        :type if_match: str
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: None, or the result of cls(response)
        :rtype: None
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType[None]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        accept = "application/json"

        # Construct URL
        url = self.delete_reports.metadata['url']  # type: ignore
        path_format_arguments = {
            'reportRoot-id': self._serialize.url("report_root_id", report_root_id, 'str'),
        }
        url = self._client.format_url(url, **path_format_arguments)

        # Construct parameters
        query_parameters = {}  # type: Dict[str, Any]

        # Construct headers
        header_parameters = {}  # type: Dict[str, Any]
        if if_match is not None:
            header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str')
        header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

        request = self._client.delete(url, query_parameters, header_parameters)
        pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
        response = pipeline_response.http_response

        if response.status_code not in [204]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            error = self._deserialize(models.OdataError, response)
            raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

        if cls:
            return cls(pipeline_response, None, {})

    delete_reports.metadata = {'url': '/print/reports/{reportRoot-id}'}  # type: ignore

    def list_services(
        self,
        orderby=None,  # type: Optional[List[Union[str, "models.Enum77"]]]
        select=None,  # type: Optional[List[Union[str, "models.Enum78"]]]
        expand=None,  # type: Optional[List[Union[str, "models.Enum79"]]]
        **kwargs  # type: Any
    ):
        # type: (...) -> Iterable["models.CollectionOfPrintService"]
        """Get services from print.

        Get services from print.

        :param orderby: Order items by property values.
        :type orderby: list[str or ~devices_cloud_print.models.Enum77]
        :param select: Select properties to be returned.
        :type select: list[str or ~devices_cloud_print.models.Enum78]
        :param expand: Expand related entities.
        :type expand: list[str or ~devices_cloud_print.models.Enum79]
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: An iterator like instance of either CollectionOfPrintService or the result of cls(response)
        :rtype: ~azure.core.paging.ItemPaged[~devices_cloud_print.models.CollectionOfPrintService]
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType["models.CollectionOfPrintService"]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        accept = "application/json"

        def prepare_request(next_link=None):
            # Construct headers
            header_parameters = {}  # type: Dict[str, Any]
            header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

            if not next_link:
                # Construct URL
                url = self.list_services.metadata['url']  # type: ignore
                # Construct parameters
                query_parameters = {}  # type: Dict[str, Any]
                if self._config.top is not None:
                    query_parameters['$top'] = self._serialize.query("self._config.top", self._config.top, 'int', minimum=0)
                if self._config.skip is not None:
                    query_parameters['$skip'] = self._serialize.query("self._config.skip", self._config.skip, 'int', minimum=0)
                if self._config.search is not None:
                    query_parameters['$search'] = self._serialize.query("self._config.search", self._config.search, 'str')
                if self._config.filter is not None:
                    query_parameters['$filter'] = self._serialize.query("self._config.filter", self._config.filter, 'str')
                if self._config.count is not None:
                    query_parameters['$count'] = self._serialize.query("self._config.count", self._config.count, 'bool')
                if orderby is not None:
                    query_parameters['$orderby'] = self._serialize.query("orderby", orderby, '[str]', div=',')
                if select is not None:
                    query_parameters['$select'] = self._serialize.query("select", select, '[str]', div=',')
                if expand is not None:
                    query_parameters['$expand'] = self._serialize.query("expand", expand, '[str]', div=',')

                request = self._client.get(url, query_parameters, header_parameters)
            else:
                url = next_link
                query_parameters = {}  # type: Dict[str, Any]
                request = self._client.get(url, query_parameters, header_parameters)
            return request

        def extract_data(pipeline_response):
            deserialized = self._deserialize('CollectionOfPrintService', pipeline_response)
            list_of_elem = deserialized.value
            if cls:
                list_of_elem = cls(list_of_elem)
            return deserialized.odata_next_link or None, iter(list_of_elem)

        def get_next(next_link=None):
            request = prepare_request(next_link)

            pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
            response = pipeline_response.http_response

            if response.status_code not in [200]:
                error = self._deserialize(models.OdataError, response)
                map_error(status_code=response.status_code, response=response, error_map=error_map)
                raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

            return pipeline_response

        return ItemPaged(
            get_next, extract_data
        )
    list_services.metadata = {'url': '/print/services'}  # type: ignore

    def create_services(
        self,
        body,  # type: "models.MicrosoftGraphPrintService"
        **kwargs  # type: Any
    ):
        # type: (...) -> "models.MicrosoftGraphPrintService"
        """Create new navigation property to services for print.

        Create new navigation property to services for print.

        :param body: New navigation property.
        :type body: ~devices_cloud_print.models.MicrosoftGraphPrintService
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: MicrosoftGraphPrintService, or the result of cls(response)
        :rtype: ~devices_cloud_print.models.MicrosoftGraphPrintService
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType["models.MicrosoftGraphPrintService"]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        content_type = kwargs.pop("content_type", "application/json")
        accept = "application/json"

        # Construct URL
        url = self.create_services.metadata['url']  # type: ignore

        # Construct parameters
        query_parameters = {}  # type: Dict[str, Any]

        # Construct headers
        header_parameters = {}  # type: Dict[str, Any]
        header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
        header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

        body_content_kwargs = {}  # type: Dict[str, Any]
        body_content = self._serialize.body(body, 'MicrosoftGraphPrintService')
        body_content_kwargs['content'] = body_content
        request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs)
        pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
        response = pipeline_response.http_response

        if response.status_code not in [201]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            error = self._deserialize(models.OdataError, response)
            raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

        deserialized = self._deserialize('MicrosoftGraphPrintService', pipeline_response)

        if cls:
            return cls(pipeline_response, deserialized, {})

        return deserialized
    create_services.metadata = {'url': '/print/services'}  # type: ignore

    def get_services(
        self,
        print_service_id,  # type: str
        select=None,  # type: Optional[List[Union[str, "models.Enum80"]]]
        expand=None,  # type: Optional[List[Union[str, "models.Enum81"]]]
        **kwargs  # type: Any
    ):
        # type: (...) -> "models.MicrosoftGraphPrintService"
        """Get services from print.

        Get services from print.

        :param print_service_id: key: id of printService.
        :type print_service_id: str
        :param select: Select properties to be returned.
        :type select: list[str or ~devices_cloud_print.models.Enum80]
        :param expand: Expand related entities.
        :type expand: list[str or ~devices_cloud_print.models.Enum81]
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: MicrosoftGraphPrintService, or the result of cls(response)
        :rtype: ~devices_cloud_print.models.MicrosoftGraphPrintService
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType["models.MicrosoftGraphPrintService"]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        accept = "application/json"

        # Construct URL
        url = self.get_services.metadata['url']  # type: ignore
        path_format_arguments = {
            'printService-id': self._serialize.url("print_service_id", print_service_id, 'str'),
        }
        url = self._client.format_url(url, **path_format_arguments)

        # Construct parameters
        query_parameters = {}  # type: Dict[str, Any]
        if select is not None:
            query_parameters['$select'] = self._serialize.query("select", select, '[str]', div=',')
        if expand is not None:
            query_parameters['$expand'] = self._serialize.query("expand", expand, '[str]', div=',')

        # Construct headers
        header_parameters = {}  # type: Dict[str, Any]
        header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

        request = self._client.get(url, query_parameters, header_parameters)
        pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
        response = pipeline_response.http_response

        if response.status_code not in [200]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            error = self._deserialize(models.OdataError, response)
            raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

        deserialized = self._deserialize('MicrosoftGraphPrintService', pipeline_response)

        if cls:
            return cls(pipeline_response, deserialized, {})

        return deserialized
    get_services.metadata = {'url': '/print/services/{printService-id}'}  # type: ignore

    def update_services(
        self,
        print_service_id,  # type: str
        body,  # type: "models.MicrosoftGraphPrintService"
        **kwargs  # type: Any
    ):
        # type: (...) -> None
        """Update the navigation property services in print.

        Update the navigation property services in print.

        :param print_service_id: key: id of printService.
        :type print_service_id: str
        :param body: New navigation property values.
        :type body: ~devices_cloud_print.models.MicrosoftGraphPrintService
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: None, or the result of cls(response)
        :rtype: None
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType[None]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        content_type = kwargs.pop("content_type", "application/json")
        accept = "application/json"

        # Construct URL
        url = self.update_services.metadata['url']  # type: ignore
        path_format_arguments = {
            'printService-id': self._serialize.url("print_service_id", print_service_id, 'str'),
        }
        url = self._client.format_url(url, **path_format_arguments)

        # Construct parameters
        query_parameters = {}  # type: Dict[str, Any]

        # Construct headers
        header_parameters = {}  # type: Dict[str, Any]
        header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
        header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

        body_content_kwargs = {}  # type: Dict[str, Any]
        body_content = self._serialize.body(body, 'MicrosoftGraphPrintService')
        body_content_kwargs['content'] = body_content
        request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs)
        pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
        response = pipeline_response.http_response

        if response.status_code not in [204]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            error = self._deserialize(models.OdataError, response)
            raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

        if cls:
            return cls(pipeline_response, None, {})

    update_services.metadata = {'url': '/print/services/{printService-id}'}  # type: ignore

    def delete_services(
        self,
        print_service_id,  # type: str
        if_match=None,  # type: Optional[str]
        **kwargs  # type: Any
    ):
        # type: (...) -> None
        """Delete navigation property services for print.

        Delete navigation property services for print.

        :param print_service_id: key: id of printService.
        :type print_service_id: str
        :param if_match: ETag.
        :type if_match: str
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: None, or the result of cls(response)
        :rtype: None
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType[None]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        accept = "application/json"

        # Construct URL
        url = self.delete_services.metadata['url']  # type: ignore
        path_format_arguments = {
            'printService-id': self._serialize.url("print_service_id", print_service_id, 'str'),
        }
        url = self._client.format_url(url, **path_format_arguments)

        # Construct parameters
        query_parameters = {}  # type: Dict[str, Any]

        # Construct headers
        header_parameters = {}  # type: Dict[str, Any]
        if if_match is not None:
            header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str')
        header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

        request = self._client.delete(url, query_parameters, header_parameters)
        pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
        response = pipeline_response.http_response

        if response.status_code not in [204]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            error = self._deserialize(models.OdataError, response)
            raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

        if cls:
            return cls(pipeline_response, None, {})

    delete_services.metadata = {'url': '/print/services/{printService-id}'}  # type: ignore

    def list_shares(
        self,
        orderby=None,  # type: Optional[List[Union[str, "models.Enum85"]]]
        select=None,  # type: Optional[List[Union[str, "models.Enum86"]]]
        expand=None,  # type: Optional[List[Union[str, "models.Enum87"]]]
        **kwargs  # type: Any
    ):
        # type: (...) -> Iterable["models.CollectionOfPrinterShare1"]
        """Get shares from print.

        Get shares from print.

        :param orderby: Order items by property values.
        :type orderby: list[str or ~devices_cloud_print.models.Enum85]
        :param select: Select properties to be returned.
        :type select: list[str or ~devices_cloud_print.models.Enum86]
        :param expand: Expand related entities.
        :type expand: list[str or ~devices_cloud_print.models.Enum87]
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: An iterator like instance of either CollectionOfPrinterShare1 or the result of cls(response)
        :rtype: ~azure.core.paging.ItemPaged[~devices_cloud_print.models.CollectionOfPrinterShare1]
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType["models.CollectionOfPrinterShare1"]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        accept = "application/json"

        def prepare_request(next_link=None):
            # Construct headers
            header_parameters = {}  # type: Dict[str, Any]
            header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

            if not next_link:
                # Construct URL
                url = self.list_shares.metadata['url']  # type: ignore
                # Construct parameters
                query_parameters = {}  # type: Dict[str, Any]
                if self._config.top is not None:
                    query_parameters['$top'] = self._serialize.query("self._config.top", self._config.top, 'int', minimum=0)
                if self._config.skip is not None:
                    query_parameters['$skip'] = self._serialize.query("self._config.skip", self._config.skip, 'int', minimum=0)
                if self._config.search is not None:
                    query_parameters['$search'] = self._serialize.query("self._config.search", self._config.search, 'str')
                if self._config.filter is not None:
                    query_parameters['$filter'] = self._serialize.query("self._config.filter", self._config.filter, 'str')
                if self._config.count is not None:
                    query_parameters['$count'] = self._serialize.query("self._config.count", self._config.count, 'bool')
                if orderby is not None:
                    query_parameters['$orderby'] = self._serialize.query("orderby", orderby, '[str]', div=',')
                if select is not None:
                    query_parameters['$select'] = self._serialize.query("select", select, '[str]', div=',')
                if expand is not None:
                    query_parameters['$expand'] = self._serialize.query("expand", expand, '[str]', div=',')

                request = self._client.get(url, query_parameters, header_parameters)
            else:
                url = next_link
                query_parameters = {}  # type: Dict[str, Any]
                request = self._client.get(url, query_parameters, header_parameters)
            return request

        def extract_data(pipeline_response):
            deserialized = self._deserialize('CollectionOfPrinterShare1', pipeline_response)
            list_of_elem = deserialized.value
            if cls:
                list_of_elem = cls(list_of_elem)
            return deserialized.odata_next_link or None, iter(list_of_elem)

        def get_next(next_link=None):
            request = prepare_request(next_link)

            pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
            response = pipeline_response.http_response

            if response.status_code not in [200]:
                error = self._deserialize(models.OdataError, response)
                map_error(status_code=response.status_code, response=response, error_map=error_map)
                raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

            return pipeline_response

        return ItemPaged(
            get_next, extract_data
        )
    list_shares.metadata = {'url': '/print/shares'}  # type: ignore

    def create_shares(
        self,
        body,  # type: "models.MicrosoftGraphPrinterShare"
        **kwargs  # type: Any
    ):
        # type: (...) -> "models.MicrosoftGraphPrinterShare"
        """Create new navigation property to shares for print.

        Create new navigation property to shares for print.

        :param body: New navigation property.
        :type body: ~devices_cloud_print.models.MicrosoftGraphPrinterShare
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: MicrosoftGraphPrinterShare, or the result of cls(response)
        :rtype: ~devices_cloud_print.models.MicrosoftGraphPrinterShare
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType["models.MicrosoftGraphPrinterShare"]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        content_type = kwargs.pop("content_type", "application/json")
        accept = "application/json"

        # Construct URL
        url = self.create_shares.metadata['url']  # type: ignore

        # Construct parameters
        query_parameters = {}  # type: Dict[str, Any]

        # Construct headers
        header_parameters = {}  # type: Dict[str, Any]
        header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
        header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

        body_content_kwargs = {}  # type: Dict[str, Any]
        body_content = self._serialize.body(body, 'MicrosoftGraphPrinterShare')
        body_content_kwargs['content'] = body_content
        request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs)
        pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
        response = pipeline_response.http_response

        if response.status_code not in [201]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            error = self._deserialize(models.OdataError, response)
            raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

        deserialized = self._deserialize('MicrosoftGraphPrinterShare', pipeline_response)

        if cls:
            return cls(pipeline_response, deserialized, {})

        return deserialized
    create_shares.metadata = {'url': '/print/shares'}  # type: ignore

    def get_shares(
        self,
        printer_share_id,  # type: str
        select=None,  # type: Optional[List[Union[str, "models.Enum88"]]]
        expand=None,  # type: Optional[List[Union[str, "models.Enum89"]]]
        **kwargs  # type: Any
    ):
        # type: (...) -> "models.MicrosoftGraphPrinterShare"
        """Get shares from print.

        Get shares from print.

        :param printer_share_id: key: id of printerShare.
        :type printer_share_id: str
        :param select: Select properties to be returned.
        :type select: list[str or ~devices_cloud_print.models.Enum88]
        :param expand: Expand related entities.
        :type expand: list[str or ~devices_cloud_print.models.Enum89]
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: MicrosoftGraphPrinterShare, or the result of cls(response)
        :rtype: ~devices_cloud_print.models.MicrosoftGraphPrinterShare
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType["models.MicrosoftGraphPrinterShare"]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        accept = "application/json"

        # Construct URL
        url = self.get_shares.metadata['url']  # type: ignore
        path_format_arguments = {
            'printerShare-id': self._serialize.url("printer_share_id", printer_share_id, 'str'),
        }
        url = self._client.format_url(url, **path_format_arguments)

        # Construct parameters
        query_parameters = {}  # type: Dict[str, Any]
        if select is not None:
            query_parameters['$select'] = self._serialize.query("select", select, '[str]', div=',')
        if expand is not None:
            query_parameters['$expand'] = self._serialize.query("expand", expand, '[str]', div=',')

        # Construct headers
        header_parameters = {}  # type: Dict[str, Any]
        header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

        request = self._client.get(url, query_parameters, header_parameters)
        pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
        response = pipeline_response.http_response

        if response.status_code not in [200]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            error = self._deserialize(models.OdataError, response)
            raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

        deserialized = self._deserialize('MicrosoftGraphPrinterShare', pipeline_response)

        if cls:
            return cls(pipeline_response, deserialized, {})

        return deserialized
    get_shares.metadata = {'url': '/print/shares/{printerShare-id}'}  # type: ignore

    def update_shares(
        self,
        printer_share_id,  # type: str
        body,  # type: "models.MicrosoftGraphPrinterShare"
        **kwargs  # type: Any
    ):
        # type: (...) -> None
        """Update the navigation property shares in print.

        Update the navigation property shares in print.

        :param printer_share_id: key: id of printerShare.
        :type printer_share_id: str
        :param body: New navigation property values.
        :type body: ~devices_cloud_print.models.MicrosoftGraphPrinterShare
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: None, or the result of cls(response)
        :rtype: None
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType[None]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        content_type = kwargs.pop("content_type", "application/json")
        accept = "application/json"

        # Construct URL
        url = self.update_shares.metadata['url']  # type: ignore
        path_format_arguments = {
            'printerShare-id': self._serialize.url("printer_share_id", printer_share_id, 'str'),
        }
        url = self._client.format_url(url, **path_format_arguments)

        # Construct parameters
        query_parameters = {}  # type: Dict[str, Any]

        # Construct headers
        header_parameters = {}  # type: Dict[str, Any]
        header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
        header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

        body_content_kwargs = {}  # type: Dict[str, Any]
        body_content = self._serialize.body(body, 'MicrosoftGraphPrinterShare')
        body_content_kwargs['content'] = body_content
        request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs)
        pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
        response = pipeline_response.http_response

        if response.status_code not in [204]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            error = self._deserialize(models.OdataError, response)
            raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

        if cls:
            return cls(pipeline_response, None, {})

    update_shares.metadata = {'url': '/print/shares/{printerShare-id}'}  # type: ignore

    def delete_shares(
        self,
        printer_share_id,  # type: str
        if_match=None,  # type: Optional[str]
        **kwargs  # type: Any
    ):
        # type: (...) -> None
        """Delete navigation property shares for print.

        Delete navigation property shares for print.

        :param printer_share_id: key: id of printerShare.
        :type printer_share_id: str
        :param if_match: ETag.
        :type if_match: str
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: None, or the result of cls(response)
        :rtype: None
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType[None]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        accept = "application/json"

        # Construct URL
        url = self.delete_shares.metadata['url']  # type: ignore
        path_format_arguments = {
            'printerShare-id': self._serialize.url("printer_share_id", printer_share_id, 'str'),
        }
        url = self._client.format_url(url, **path_format_arguments)

        # Construct parameters
        query_parameters = {}  # type: Dict[str, Any]

        # Construct headers
        header_parameters = {}  # type: Dict[str, Any]
        if if_match is not None:
            header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str')
        header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

        request = self._client.delete(url, query_parameters, header_parameters)
        pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
        response = pipeline_response.http_response

        if response.status_code not in [204]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            error = self._deserialize(models.OdataError, response)
            raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

        if cls:
            return cls(pipeline_response, None, {})

    delete_shares.metadata = {'url': '/print/shares/{printerShare-id}'}  # type: ignore

    def list_task_definitions(
        self,
        orderby=None,  # type: Optional[List[Union[str, "models.Enum98"]]]
        select=None,  # type: Optional[List[Union[str, "models.Enum99"]]]
        expand=None,  # type: Optional[List[Union[str, "models.Enum100"]]]
        **kwargs  # type: Any
    ):
        # type: (...) -> Iterable["models.CollectionOfPrintTaskDefinition"]
        """Get taskDefinitions from print.

        Get taskDefinitions from print.

        :param orderby: Order items by property values.
        :type orderby: list[str or ~devices_cloud_print.models.Enum98]
        :param select: Select properties to be returned.
        :type select: list[str or ~devices_cloud_print.models.Enum99]
        :param expand: Expand related entities.
        :type expand: list[str or ~devices_cloud_print.models.Enum100]
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: An iterator like instance of either CollectionOfPrintTaskDefinition or the result of cls(response)
        :rtype: ~azure.core.paging.ItemPaged[~devices_cloud_print.models.CollectionOfPrintTaskDefinition]
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType["models.CollectionOfPrintTaskDefinition"]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        accept = "application/json"

        def prepare_request(next_link=None):
            # Construct headers
            header_parameters = {}  # type: Dict[str, Any]
            header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

            if not next_link:
                # Construct URL
                url = self.list_task_definitions.metadata['url']  # type: ignore
                # Construct parameters
                query_parameters = {}  # type: Dict[str, Any]
                if self._config.top is not None:
                    query_parameters['$top'] = self._serialize.query("self._config.top", self._config.top, 'int', minimum=0)
                if self._config.skip is not None:
                    query_parameters['$skip'] = self._serialize.query("self._config.skip", self._config.skip, 'int', minimum=0)
                if self._config.search is not None:
                    query_parameters['$search'] = self._serialize.query("self._config.search", self._config.search, 'str')
                if self._config.filter is not None:
                    query_parameters['$filter'] = self._serialize.query("self._config.filter", self._config.filter, 'str')
                if self._config.count is not None:
                    query_parameters['$count'] = self._serialize.query("self._config.count", self._config.count, 'bool')
                if orderby is not None:
                    query_parameters['$orderby'] = self._serialize.query("orderby", orderby, '[str]', div=',')
                if select is not None:
                    query_parameters['$select'] = self._serialize.query("select", select, '[str]', div=',')
                if expand is not None:
                    query_parameters['$expand'] = self._serialize.query("expand", expand, '[str]', div=',')

                request = self._client.get(url, query_parameters, header_parameters)
            else:
                url = next_link
                query_parameters = {}  # type: Dict[str, Any]
                request = self._client.get(url, query_parameters, header_parameters)
            return request

        def extract_data(pipeline_response):
            deserialized = self._deserialize('CollectionOfPrintTaskDefinition', pipeline_response)
            list_of_elem = deserialized.value
            if cls:
                list_of_elem = cls(list_of_elem)
            return deserialized.odata_next_link or None, iter(list_of_elem)

        def get_next(next_link=None):
            request = prepare_request(next_link)

            pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
            response = pipeline_response.http_response

            if response.status_code not in [200]:
                error = self._deserialize(models.OdataError, response)
                map_error(status_code=response.status_code, response=response, error_map=error_map)
                raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

            return pipeline_response

        return ItemPaged(
            get_next, extract_data
        )
    list_task_definitions.metadata = {'url': '/print/taskDefinitions'}  # type: ignore

    def create_task_definitions(
        self,
        body,  # type: "models.MicrosoftGraphPrintTaskDefinition"
        **kwargs  # type: Any
    ):
        # type: (...) -> "models.MicrosoftGraphPrintTaskDefinition"
        """Create new navigation property to taskDefinitions for print.

        Create new navigation property to taskDefinitions for print.

        :param body: New navigation property.
        :type body: ~devices_cloud_print.models.MicrosoftGraphPrintTaskDefinition
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: MicrosoftGraphPrintTaskDefinition, or the result of cls(response)
        :rtype: ~devices_cloud_print.models.MicrosoftGraphPrintTaskDefinition
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType["models.MicrosoftGraphPrintTaskDefinition"]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        content_type = kwargs.pop("content_type", "application/json")
        accept = "application/json"

        # Construct URL
        url = self.create_task_definitions.metadata['url']  # type: ignore

        # Construct parameters
        query_parameters = {}  # type: Dict[str, Any]

        # Construct headers
        header_parameters = {}  # type: Dict[str, Any]
        header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
        header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

        body_content_kwargs = {}  # type: Dict[str, Any]
        body_content = self._serialize.body(body, 'MicrosoftGraphPrintTaskDefinition')
        body_content_kwargs['content'] = body_content
        request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs)
        pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
        response = pipeline_response.http_response

        if response.status_code not in [201]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            error = self._deserialize(models.OdataError, response)
            raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

        deserialized = self._deserialize('MicrosoftGraphPrintTaskDefinition', pipeline_response)

        if cls:
            return cls(pipeline_response, deserialized, {})

        return deserialized
    create_task_definitions.metadata = {'url': '/print/taskDefinitions'}  # type: ignore

    def get_task_definitions(
        self,
        print_task_definition_id,  # type: str
        select=None,  # type: Optional[List[Union[str, "models.Enum101"]]]
        expand=None,  # type: Optional[List[Union[str, "models.Enum102"]]]
        **kwargs  # type: Any
    ):
        # type: (...) -> "models.MicrosoftGraphPrintTaskDefinition"
        """Get taskDefinitions from print.

        Get taskDefinitions from print.

        :param print_task_definition_id: key: id of printTaskDefinition.
        :type print_task_definition_id: str
        :param select: Select properties to be returned.
        :type select: list[str or ~devices_cloud_print.models.Enum101]
        :param expand: Expand related entities.
        :type expand: list[str or ~devices_cloud_print.models.Enum102]
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: MicrosoftGraphPrintTaskDefinition, or the result of cls(response)
        :rtype: ~devices_cloud_print.models.MicrosoftGraphPrintTaskDefinition
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType["models.MicrosoftGraphPrintTaskDefinition"]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        accept = "application/json"

        # Construct URL
        url = self.get_task_definitions.metadata['url']  # type: ignore
        path_format_arguments = {
            'printTaskDefinition-id': self._serialize.url("print_task_definition_id", print_task_definition_id, 'str'),
        }
        url = self._client.format_url(url, **path_format_arguments)

        # Construct parameters
        query_parameters = {}  # type: Dict[str, Any]
        if select is not None:
            query_parameters['$select'] = self._serialize.query("select", select, '[str]', div=',')
        if expand is not None:
            query_parameters['$expand'] = self._serialize.query("expand", expand, '[str]', div=',')

        # Construct headers
        header_parameters = {}  # type: Dict[str, Any]
        header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

        request = self._client.get(url, query_parameters, header_parameters)
        pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
        response = pipeline_response.http_response

        if response.status_code not in [200]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            error = self._deserialize(models.OdataError, response)
            raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

        deserialized = self._deserialize('MicrosoftGraphPrintTaskDefinition', pipeline_response)

        if cls:
            return cls(pipeline_response, deserialized, {})

        return deserialized
    get_task_definitions.metadata = {'url': '/print/taskDefinitions/{printTaskDefinition-id}'}  # type: ignore

    def update_task_definitions(
        self,
        print_task_definition_id,  # type: str
        body,  # type: "models.MicrosoftGraphPrintTaskDefinition"
        **kwargs  # type: Any
    ):
        # type: (...) -> None
        """Update the navigation property taskDefinitions in print.

        Update the navigation property taskDefinitions in print.

        :param print_task_definition_id: key: id of printTaskDefinition.
        :type print_task_definition_id: str
        :param body: New navigation property values.
        :type body: ~devices_cloud_print.models.MicrosoftGraphPrintTaskDefinition
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: None, or the result of cls(response)
        :rtype: None
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType[None]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        content_type = kwargs.pop("content_type", "application/json")
        accept = "application/json"

        # Construct URL
        url = self.update_task_definitions.metadata['url']  # type: ignore
        path_format_arguments = {
            'printTaskDefinition-id': self._serialize.url("print_task_definition_id", print_task_definition_id, 'str'),
        }
        url = self._client.format_url(url, **path_format_arguments)

        # Construct parameters
        query_parameters = {}  # type: Dict[str, Any]

        # Construct headers
        header_parameters = {}  # type: Dict[str, Any]
        header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
        header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

        body_content_kwargs = {}  # type: Dict[str, Any]
        body_content = self._serialize.body(body, 'MicrosoftGraphPrintTaskDefinition')
        body_content_kwargs['content'] = body_content
        request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs)
        pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
        response = pipeline_response.http_response

        if response.status_code not in [204]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            error = self._deserialize(models.OdataError, response)
            raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

        if cls:
            return cls(pipeline_response, None, {})

    update_task_definitions.metadata = {'url': '/print/taskDefinitions/{printTaskDefinition-id}'}  # type: ignore

    def delete_task_definitions(
        self,
        print_task_definition_id,  # type: str
        if_match=None,  # type: Optional[str]
        **kwargs  # type: Any
    ):
        # type: (...) -> None
        """Delete navigation property taskDefinitions for print.

        Delete navigation property taskDefinitions for print.

        :param print_task_definition_id: key: id of printTaskDefinition.
        :type print_task_definition_id: str
        :param if_match: ETag.
        :type if_match: str
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: None, or the result of cls(response)
        :rtype: None
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType[None]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        accept = "application/json"

        # Construct URL
        url = self.delete_task_definitions.metadata['url']  # type: ignore
        path_format_arguments = {
            'printTaskDefinition-id': self._serialize.url("print_task_definition_id", print_task_definition_id, 'str'),
        }
        url = self._client.format_url(url, **path_format_arguments)

        # Construct parameters
        query_parameters = {}  # type: Dict[str, Any]

        # Construct headers
        header_parameters = {}  # type: Dict[str, Any]
        if if_match is not None:
            header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str')
        header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

        request = self._client.delete(url, query_parameters, header_parameters)
        pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
        response = pipeline_response.http_response

        if response.status_code not in [204]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            error = self._deserialize(models.OdataError, response)
            raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

        if cls:
            return cls(pipeline_response, None, {})

    delete_task_definitions.metadata = {'url': '/print/taskDefinitions/{printTaskDefinition-id}'}  # type: ignore

# coding=utf-8
# --------------------------------------------------------------------------
# Copyright (c) Microsoft Corporation. All rights reserved.
# Licensed under the MIT License. See License.txt in the project root for license information.
# Code generated by Microsoft (R) AutoRest Code Generator.
# Changes may cause incorrect behavior and will be lost if the code is regenerated.
# --------------------------------------------------------------------------
from typing import TYPE_CHECKING
import warnings

from azure.core.exceptions import ClientAuthenticationError, HttpResponseError, ResourceExistsError, ResourceNotFoundError, map_error
from azure.core.paging import ItemPaged
from azure.core.pipeline import PipelineResponse
from azure.core.pipeline.transport import HttpRequest, HttpResponse
from azure.mgmt.core.exceptions import ARMErrorFormat

from .. import models

if TYPE_CHECKING:
    # pylint: disable=unused-import,ungrouped-imports
    from typing import Any, Callable, Dict, Generic, Iterable, List, Optional, TypeVar, Union

    T = TypeVar('T')
    ClsType = Optional[Callable[[PipelineResponse[HttpRequest, HttpResponse], T, Dict[str, Any]], Any]]

class PrintOperations(object):
    """PrintOperations operations.

    You should not instantiate this class directly. Instead, you should create a Client instance that
    instantiates it for you and attaches it as an attribute.

    :ivar models: Alias to model classes used in this operation group.
    :type models: ~devices_cloud_print.models
    :param client: Client for service requests.
    :param config: Configuration of service client.
    :param serializer: An object model serializer.
    :param deserializer: An object model deserializer.
    """

    models = models

    def __init__(self, client, config, serializer, deserializer):
        self._client = client
        self._serialize = serializer
        self._deserialize = deserializer
        self._config = config

    def list_connectors(
        self,
        orderby=None,  # type: Optional[List[Union[str, "models.Get5ItemsItem"]]]
        select=None,  # type: Optional[List[Union[str, "models.Get6ItemsItem"]]]
        expand=None,  # type: Optional[List[str]]
        **kwargs  # type: Any
    ):
        # type: (...) -> Iterable["models.CollectionOfPrintConnector"]
        """Get connectors from print.

        Get connectors from print.

        :param orderby: Order items by property values.
        :type orderby: list[str or ~devices_cloud_print.models.Get5ItemsItem]
        :param select: Select properties to be returned.
        :type select: list[str or ~devices_cloud_print.models.Get6ItemsItem]
        :param expand: Expand related entities.
        :type expand: list[str]
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: An iterator like instance of either CollectionOfPrintConnector or the result of cls(response)
        :rtype: ~azure.core.paging.ItemPaged[~devices_cloud_print.models.CollectionOfPrintConnector]
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType["models.CollectionOfPrintConnector"]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        accept = "application/json"

        def prepare_request(next_link=None):
            # Construct headers
            header_parameters = {}  # type: Dict[str, Any]
            header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

            if not next_link:
                # Construct URL
                url = self.list_connectors.metadata['url']  # type: ignore
                # Construct parameters
                query_parameters = {}  # type: Dict[str, Any]
                if self._config.top is not None:
                    query_parameters['$top'] = self._serialize.query("self._config.top", self._config.top, 'int', minimum=0)
                if self._config.skip is not None:
                    query_parameters['$skip'] = self._serialize.query("self._config.skip", self._config.skip, 'int', minimum=0)
                if self._config.search is not None:
                    query_parameters['$search'] = self._serialize.query("self._config.search", self._config.search, 'str')
                if self._config.filter is not None:
                    query_parameters['$filter'] = self._serialize.query("self._config.filter", self._config.filter, 'str')
                if self._config.count is not None:
                    query_parameters['$count'] = self._serialize.query("self._config.count", self._config.count, 'bool')
                if orderby is not None:
                    query_parameters['$orderby'] = self._serialize.query("orderby", orderby, '[str]', div=',')
                if select is not None:
                    query_parameters['$select'] = self._serialize.query("select", select, '[str]', div=',')
                if expand is not None:
                    query_parameters['$expand'] = self._serialize.query("expand", expand, '[str]', div=',')

                request = self._client.get(url, query_parameters, header_parameters)
            else:
                url = next_link
                query_parameters = {}  # type: Dict[str, Any]
                request = self._client.get(url, query_parameters, header_parameters)
            return request

        def extract_data(pipeline_response):
            deserialized = self._deserialize('CollectionOfPrintConnector', pipeline_response)
            list_of_elem = deserialized.value
            if cls:
                list_of_elem = cls(list_of_elem)
            return deserialized.odata_next_link or None, iter(list_of_elem)

        def get_next(next_link=None):
            request = prepare_request(next_link)

            pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
            response = pipeline_response.http_response

            if response.status_code not in [200]:
                error = self._deserialize(models.OdataError, response)
                map_error(status_code=response.status_code, response=response, error_map=error_map)
                raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

            return pipeline_response

        return ItemPaged(
            get_next, extract_data
        )
    list_connectors.metadata = {'url': '/print/connectors'}  # type: ignore

    def create_connectors(
        self,
        body,  # type: "models.MicrosoftGraphPrintConnector"
        **kwargs  # type: Any
    ):
        # type: (...) -> "models.MicrosoftGraphPrintConnector"
        """Create new navigation property to connectors for print.

        Create new navigation property to connectors for print.

        :param body: New navigation property.
        :type body: ~devices_cloud_print.models.MicrosoftGraphPrintConnector
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: MicrosoftGraphPrintConnector, or the result of cls(response)
        :rtype: ~devices_cloud_print.models.MicrosoftGraphPrintConnector
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType["models.MicrosoftGraphPrintConnector"]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        content_type = kwargs.pop("content_type", "application/json")
        accept = "application/json"

        # Construct URL
        url = self.create_connectors.metadata['url']  # type: ignore

        # Construct parameters
        query_parameters = {}  # type: Dict[str, Any]

        # Construct headers
        header_parameters = {}  # type: Dict[str, Any]
        header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
        header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

        body_content_kwargs = {}  # type: Dict[str, Any]
        body_content = self._serialize.body(body, 'MicrosoftGraphPrintConnector')
        body_content_kwargs['content'] = body_content
        request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs)
        pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
        response = pipeline_response.http_response

        if response.status_code not in [201]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            error = self._deserialize(models.OdataError, response)
            raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

        deserialized = self._deserialize('MicrosoftGraphPrintConnector', pipeline_response)

        if cls:
            return cls(pipeline_response, deserialized, {})

        return deserialized
    create_connectors.metadata = {'url': '/print/connectors'}  # type: ignore

    def get_connectors(
        self,
        print_connector_id,  # type: str
        select=None,  # type: Optional[List[Union[str, "models.Enum28"]]]
        expand=None,  # type: Optional[List[str]]
        **kwargs  # type: Any
    ):
        # type: (...) -> "models.MicrosoftGraphPrintConnector"
        """Get connectors from print.

        Get connectors from print.

        :param print_connector_id: key: id of printConnector.
        :type print_connector_id: str
        :param select: Select properties to be returned.
        :type select: list[str or ~devices_cloud_print.models.Enum28]
        :param expand: Expand related entities.
        :type expand: list[str]
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: MicrosoftGraphPrintConnector, or the result of cls(response)
        :rtype: ~devices_cloud_print.models.MicrosoftGraphPrintConnector
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType["models.MicrosoftGraphPrintConnector"]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        accept = "application/json"

        # Construct URL
        url = self.get_connectors.metadata['url']  # type: ignore
        path_format_arguments = {
            'printConnector-id': self._serialize.url("print_connector_id", print_connector_id, 'str'),
        }
        url = self._client.format_url(url, **path_format_arguments)

        # Construct parameters
        query_parameters = {}  # type: Dict[str, Any]
        if select is not None:
            query_parameters['$select'] = self._serialize.query("select", select, '[str]', div=',')
        if expand is not None:
            query_parameters['$expand'] = self._serialize.query("expand", expand, '[str]', div=',')

        # Construct headers
        header_parameters = {}  # type: Dict[str, Any]
        header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

        request = self._client.get(url, query_parameters, header_parameters)
        pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
        response = pipeline_response.http_response

        if response.status_code not in [200]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            error = self._deserialize(models.OdataError, response)
            raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

        deserialized = self._deserialize('MicrosoftGraphPrintConnector', pipeline_response)

        if cls:
            return cls(pipeline_response, deserialized, {})

        return deserialized
    get_connectors.metadata = {'url': '/print/connectors/{printConnector-id}'}  # type: ignore

    def update_connectors(
        self,
        print_connector_id,  # type: str
        body,  # type: "models.MicrosoftGraphPrintConnector"
        **kwargs  # type: Any
    ):
        # type: (...) -> None
        """Update the navigation property connectors in print.

        Update the navigation property connectors in print.

        :param print_connector_id: key: id of printConnector.
        :type print_connector_id: str
        :param body: New navigation property values.
        :type body: ~devices_cloud_print.models.MicrosoftGraphPrintConnector
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: None, or the result of cls(response)
        :rtype: None
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType[None]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        content_type = kwargs.pop("content_type", "application/json")
        accept = "application/json"

        # Construct URL
        url = self.update_connectors.metadata['url']  # type: ignore
        path_format_arguments = {
            'printConnector-id': self._serialize.url("print_connector_id", print_connector_id, 'str'),
        }
        url = self._client.format_url(url, **path_format_arguments)

        # Construct parameters
        query_parameters = {}  # type: Dict[str, Any]

        # Construct headers
        header_parameters = {}  # type: Dict[str, Any]
        header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
        header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

        body_content_kwargs = {}  # type: Dict[str, Any]
        body_content = self._serialize.body(body, 'MicrosoftGraphPrintConnector')
        body_content_kwargs['content'] = body_content
        request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs)
        pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
        response = pipeline_response.http_response

        if response.status_code not in [204]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            error = self._deserialize(models.OdataError, response)
            raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

        if cls:
            return cls(pipeline_response, None, {})

    update_connectors.metadata = {'url': '/print/connectors/{printConnector-id}'}  # type: ignore

    def delete_connectors(
        self,
        print_connector_id,  # type: str
        if_match=None,  # type: Optional[str]
        **kwargs  # type: Any
    ):
        # type: (...) -> None
        """Delete navigation property connectors for print.

        Delete navigation property connectors for print.

        :param print_connector_id: key: id of printConnector.
        :type print_connector_id: str
        :param if_match: ETag.
        :type if_match: str
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: None, or the result of cls(response)
        :rtype: None
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType[None]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        accept = "application/json"

        # Construct URL
        url = self.delete_connectors.metadata['url']  # type: ignore
        path_format_arguments = {
            'printConnector-id': self._serialize.url("print_connector_id", print_connector_id, 'str'),
        }
        url = self._client.format_url(url, **path_format_arguments)

        # Construct parameters
        query_parameters = {}  # type: Dict[str, Any]

        # Construct headers
        header_parameters = {}  # type: Dict[str, Any]
        if if_match is not None:
            header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str')
        header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

        request = self._client.delete(url, query_parameters, header_parameters)
        pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
        response = pipeline_response.http_response

        if response.status_code not in [204]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            error = self._deserialize(models.OdataError, response)
            raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

        if cls:
            return cls(pipeline_response, None, {})

    delete_connectors.metadata = {'url': '/print/connectors/{printConnector-id}'}  # type: ignore

    def list_operations(
        self,
        orderby=None,  # type: Optional[List[Union[str, "models.Enum29"]]]
        select=None,  # type: Optional[List[Union[str, "models.Enum30"]]]
        expand=None,  # type: Optional[List[str]]
        **kwargs  # type: Any
    ):
        # type: (...) -> Iterable["models.CollectionOfPrintOperation"]
        """Get operations from print.

        Get operations from print.

        :param orderby: Order items by property values.
        :type orderby: list[str or ~devices_cloud_print.models.Enum29]
        :param select: Select properties to be returned.
        :type select: list[str or ~devices_cloud_print.models.Enum30]
        :param expand: Expand related entities.
        :type expand: list[str]
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: An iterator like instance of either CollectionOfPrintOperation or the result of cls(response)
        :rtype: ~azure.core.paging.ItemPaged[~devices_cloud_print.models.CollectionOfPrintOperation]
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType["models.CollectionOfPrintOperation"]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        accept = "application/json"

        def prepare_request(next_link=None):
            # Construct headers
            header_parameters = {}  # type: Dict[str, Any]
            header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

            if not next_link:
                # Construct URL
                url = self.list_operations.metadata['url']  # type: ignore
                # Construct parameters
                query_parameters = {}  # type: Dict[str, Any]
                if self._config.top is not None:
                    query_parameters['$top'] = self._serialize.query("self._config.top", self._config.top, 'int', minimum=0)
                if self._config.skip is not None:
                    query_parameters['$skip'] = self._serialize.query("self._config.skip", self._config.skip, 'int', minimum=0)
                if self._config.search is not None:
                    query_parameters['$search'] = self._serialize.query("self._config.search", self._config.search, 'str')
                if self._config.filter is not None:
                    query_parameters['$filter'] = self._serialize.query("self._config.filter", self._config.filter, 'str')
                if self._config.count is not None:
                    query_parameters['$count'] = self._serialize.query("self._config.count", self._config.count, 'bool')
                if orderby is not None:
                    query_parameters['$orderby'] = self._serialize.query("orderby", orderby, '[str]', div=',')
                if select is not None:
                    query_parameters['$select'] = self._serialize.query("select", select, '[str]', div=',')
                if expand is not None:
                    query_parameters['$expand'] = self._serialize.query("expand", expand, '[str]', div=',')

                request = self._client.get(url, query_parameters, header_parameters)
            else:
                url = next_link
                query_parameters = {}  # type: Dict[str, Any]
                request = self._client.get(url, query_parameters, header_parameters)
            return request

        def extract_data(pipeline_response):
            deserialized = self._deserialize('CollectionOfPrintOperation', pipeline_response)
            list_of_elem = deserialized.value
            if cls:
                list_of_elem = cls(list_of_elem)
            return deserialized.odata_next_link or None, iter(list_of_elem)

        def get_next(next_link=None):
            request = prepare_request(next_link)

            pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
            response = pipeline_response.http_response

            if response.status_code not in [200]:
                error = self._deserialize(models.OdataError, response)
                map_error(status_code=response.status_code, response=response, error_map=error_map)
                raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

            return pipeline_response

        return ItemPaged(
            get_next, extract_data
        )
    list_operations.metadata = {'url': '/print/operations'}  # type: ignore

    def create_operations(
        self,
        body,  # type: "models.MicrosoftGraphPrintOperation"
        **kwargs  # type: Any
    ):
        # type: (...) -> "models.MicrosoftGraphPrintOperation"
        """Create new navigation property to operations for print.

        Create new navigation property to operations for print.

        :param body: New navigation property.
        :type body: ~devices_cloud_print.models.MicrosoftGraphPrintOperation
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: MicrosoftGraphPrintOperation, or the result of cls(response)
        :rtype: ~devices_cloud_print.models.MicrosoftGraphPrintOperation
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType["models.MicrosoftGraphPrintOperation"]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        content_type = kwargs.pop("content_type", "application/json")
        accept = "application/json"

        # Construct URL
        url = self.create_operations.metadata['url']  # type: ignore

        # Construct parameters
        query_parameters = {}  # type: Dict[str, Any]

        # Construct headers
        header_parameters = {}  # type: Dict[str, Any]
        header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
        header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

        body_content_kwargs = {}  # type: Dict[str, Any]
        body_content = self._serialize.body(body, 'MicrosoftGraphPrintOperation')
        body_content_kwargs['content'] = body_content
        request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs)
        pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
        response = pipeline_response.http_response

        if response.status_code not in [201]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            error = self._deserialize(models.OdataError, response)
            raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

        deserialized = self._deserialize('MicrosoftGraphPrintOperation', pipeline_response)

        if cls:
            return cls(pipeline_response, deserialized, {})

        return deserialized
    create_operations.metadata = {'url': '/print/operations'}  # type: ignore

    def get_operations(
        self,
        print_operation_id,  # type: str
        select=None,  # type: Optional[List[Union[str, "models.Enum31"]]]
        expand=None,  # type: Optional[List[str]]
        **kwargs  # type: Any
    ):
        # type: (...) -> "models.MicrosoftGraphPrintOperation"
        """Get operations from print.

        Get operations from print.

        :param print_operation_id: key: id of printOperation.
        :type print_operation_id: str
        :param select: Select properties to be returned.
        :type select: list[str or ~devices_cloud_print.models.Enum31]
        :param expand: Expand related entities.
        :type expand: list[str]
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: MicrosoftGraphPrintOperation, or the result of cls(response)
        :rtype: ~devices_cloud_print.models.MicrosoftGraphPrintOperation
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType["models.MicrosoftGraphPrintOperation"]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        accept = "application/json"

        # Construct URL
        url = self.get_operations.metadata['url']  # type: ignore
        path_format_arguments = {
            'printOperation-id': self._serialize.url("print_operation_id", print_operation_id, 'str'),
        }
        url = self._client.format_url(url, **path_format_arguments)

        # Construct parameters
        query_parameters = {}  # type: Dict[str, Any]
        if select is not None:
            query_parameters['$select'] = self._serialize.query("select", select, '[str]', div=',')
        if expand is not None:
            query_parameters['$expand'] = self._serialize.query("expand", expand, '[str]', div=',')

        # Construct headers
        header_parameters = {}  # type: Dict[str, Any]
        header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

        request = self._client.get(url, query_parameters, header_parameters)
        pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
        response = pipeline_response.http_response

        if response.status_code not in [200]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            error = self._deserialize(models.OdataError, response)
            raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

        deserialized = self._deserialize('MicrosoftGraphPrintOperation', pipeline_response)

        if cls:
            return cls(pipeline_response, deserialized, {})

        return deserialized
    get_operations.metadata = {'url': '/print/operations/{printOperation-id}'}  # type: ignore

    def update_operations(
        self,
        print_operation_id,  # type: str
        body,  # type: "models.MicrosoftGraphPrintOperation"
        **kwargs  # type: Any
    ):
        # type: (...) -> None
        """Update the navigation property operations in print.

        Update the navigation property operations in print.

        :param print_operation_id: key: id of printOperation.
        :type print_operation_id: str
        :param body: New navigation property values.
        :type body: ~devices_cloud_print.models.MicrosoftGraphPrintOperation
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: None, or the result of cls(response)
        :rtype: None
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType[None]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        content_type = kwargs.pop("content_type", "application/json")
        accept = "application/json"

        # Construct URL
        url = self.update_operations.metadata['url']  # type: ignore
        path_format_arguments = {
            'printOperation-id': self._serialize.url("print_operation_id", print_operation_id, 'str'),
        }
        url = self._client.format_url(url, **path_format_arguments)

        # Construct parameters
        query_parameters = {}  # type: Dict[str, Any]

        # Construct headers
        header_parameters = {}  # type: Dict[str, Any]
        header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
        header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

        body_content_kwargs = {}  # type: Dict[str, Any]
        body_content = self._serialize.body(body, 'MicrosoftGraphPrintOperation')
        body_content_kwargs['content'] = body_content
        request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs)
        pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
        response = pipeline_response.http_response

        if response.status_code not in [204]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            error = self._deserialize(models.OdataError, response)
            raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

        if cls:
            return cls(pipeline_response, None, {})

    update_operations.metadata = {'url': '/print/operations/{printOperation-id}'}  # type: ignore

    def delete_operations(
        self,
        print_operation_id,  # type: str
        if_match=None,  # type: Optional[str]
        **kwargs  # type: Any
    ):
        # type: (...) -> None
        """Delete navigation property operations for print.

        Delete navigation property operations for print.

        :param print_operation_id: key: id of printOperation.
        :type print_operation_id: str
        :param if_match: ETag.
        :type if_match: str
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: None, or the result of cls(response)
        :rtype: None
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType[None]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        accept = "application/json"

        # Construct URL
        url = self.delete_operations.metadata['url']  # type: ignore
        path_format_arguments = {
            'printOperation-id': self._serialize.url("print_operation_id", print_operation_id, 'str'),
        }
        url = self._client.format_url(url, **path_format_arguments)

        # Construct parameters
        query_parameters = {}  # type: Dict[str, Any]

        # Construct headers
        header_parameters = {}  # type: Dict[str, Any]
        if if_match is not None:
            header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str')
        header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

        request = self._client.delete(url, query_parameters, header_parameters)
        pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
        response = pipeline_response.http_response

        if response.status_code not in [204]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            error = self._deserialize(models.OdataError, response)
            raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

        if cls:
            return cls(pipeline_response, None, {})

    delete_operations.metadata = {'url': '/print/operations/{printOperation-id}'}  # type: ignore

    def list_printers(
        self,
        orderby=None,  # type: Optional[List[Union[str, "models.Enum32"]]]
        select=None,  # type: Optional[List[Union[str, "models.Enum33"]]]
        expand=None,  # type: Optional[List[Union[str, "models.Enum34"]]]
        **kwargs  # type: Any
    ):
        # type: (...) -> Iterable["models.CollectionOfPrinter"]
        """Get printers from print.

        Get printers from print.

        :param orderby: Order items by property values.
        :type orderby: list[str or ~devices_cloud_print.models.Enum32]
        :param select: Select properties to be returned.
        :type select: list[str or ~devices_cloud_print.models.Enum33]
        :param expand: Expand related entities.
        :type expand: list[str or ~devices_cloud_print.models.Enum34]
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: An iterator like instance of either CollectionOfPrinter or the result of cls(response)
        :rtype: ~azure.core.paging.ItemPaged[~devices_cloud_print.models.CollectionOfPrinter]
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType["models.CollectionOfPrinter"]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        accept = "application/json"

        def prepare_request(next_link=None):
            # Construct headers
            header_parameters = {}  # type: Dict[str, Any]
            header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

            if not next_link:
                # Construct URL
                url = self.list_printers.metadata['url']  # type: ignore
                # Construct parameters
                query_parameters = {}  # type: Dict[str, Any]
                if self._config.top is not None:
                    query_parameters['$top'] = self._serialize.query("self._config.top", self._config.top, 'int', minimum=0)
                if self._config.skip is not None:
                    query_parameters['$skip'] = self._serialize.query("self._config.skip", self._config.skip, 'int', minimum=0)
                if self._config.search is not None:
                    query_parameters['$search'] = self._serialize.query("self._config.search", self._config.search, 'str')
                if self._config.filter is not None:
                    query_parameters['$filter'] = self._serialize.query("self._config.filter", self._config.filter, 'str')
                if self._config.count is not None:
                    query_parameters['$count'] = self._serialize.query("self._config.count", self._config.count, 'bool')
                if orderby is not None:
                    query_parameters['$orderby'] = self._serialize.query("orderby", orderby, '[str]', div=',')
                if select is not None:
                    query_parameters['$select'] = self._serialize.query("select", select, '[str]', div=',')
                if expand is not None:
                    query_parameters['$expand'] = self._serialize.query("expand", expand, '[str]', div=',')

                request = self._client.get(url, query_parameters, header_parameters)
            else:
                url = next_link
                query_parameters = {}  # type: Dict[str, Any]
                request = self._client.get(url, query_parameters, header_parameters)
            return request

        def extract_data(pipeline_response):
            deserialized = self._deserialize('CollectionOfPrinter', pipeline_response)
            list_of_elem = deserialized.value
            if cls:
                list_of_elem = cls(list_of_elem)
            return deserialized.odata_next_link or None, iter(list_of_elem)

        def get_next(next_link=None):
            request = prepare_request(next_link)

            pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
            response = pipeline_response.http_response

            if response.status_code not in [200]:
                error = self._deserialize(models.OdataError, response)
                map_error(status_code=response.status_code, response=response, error_map=error_map)
                raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

            return pipeline_response

        return ItemPaged(
            get_next, extract_data
        )
    list_printers.metadata = {'url': '/print/printers'}  # type: ignore

    def create_printers(
        self,
        body,  # type: "models.MicrosoftGraphPrinter"
        **kwargs  # type: Any
    ):
        # type: (...) -> "models.MicrosoftGraphPrinter"
        """Create new navigation property to printers for print.

        Create new navigation property to printers for print.

        :param body: New navigation property.
        :type body: ~devices_cloud_print.models.MicrosoftGraphPrinter
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: MicrosoftGraphPrinter, or the result of cls(response)
        :rtype: ~devices_cloud_print.models.MicrosoftGraphPrinter
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType["models.MicrosoftGraphPrinter"]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        content_type = kwargs.pop("content_type", "application/json")
        accept = "application/json"

        # Construct URL
        url = self.create_printers.metadata['url']  # type: ignore

        # Construct parameters
        query_parameters = {}  # type: Dict[str, Any]

        # Construct headers
        header_parameters = {}  # type: Dict[str, Any]
        header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
        header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

        body_content_kwargs = {}  # type: Dict[str, Any]
        body_content = self._serialize.body(body, 'MicrosoftGraphPrinter')
        body_content_kwargs['content'] = body_content
        request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs)
        pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
        response = pipeline_response.http_response

        if response.status_code not in [201]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            error = self._deserialize(models.OdataError, response)
            raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

        deserialized = self._deserialize('MicrosoftGraphPrinter', pipeline_response)

        if cls:
            return cls(pipeline_response, deserialized, {})

        return deserialized
    create_printers.metadata = {'url': '/print/printers'}  # type: ignore

    def get_printers(
        self,
        printer_id,  # type: str
        select=None,  # type: Optional[List[Union[str, "models.Enum35"]]]
        expand=None,  # type: Optional[List[Union[str, "models.Enum36"]]]
        **kwargs  # type: Any
    ):
        # type: (...) -> "models.MicrosoftGraphPrinter"
        """Get printers from print.

        Get printers from print.

        :param printer_id: key: id of printer.
        :type printer_id: str
        :param select: Select properties to be returned.
        :type select: list[str or ~devices_cloud_print.models.Enum35]
        :param expand: Expand related entities.
        :type expand: list[str or ~devices_cloud_print.models.Enum36]
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: MicrosoftGraphPrinter, or the result of cls(response)
        :rtype: ~devices_cloud_print.models.MicrosoftGraphPrinter
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType["models.MicrosoftGraphPrinter"]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        accept = "application/json"

        # Construct URL
        url = self.get_printers.metadata['url']  # type: ignore
        path_format_arguments = {
            'printer-id': self._serialize.url("printer_id", printer_id, 'str'),
        }
        url = self._client.format_url(url, **path_format_arguments)

        # Construct parameters
        query_parameters = {}  # type: Dict[str, Any]
        if select is not None:
            query_parameters['$select'] = self._serialize.query("select", select, '[str]', div=',')
        if expand is not None:
            query_parameters['$expand'] = self._serialize.query("expand", expand, '[str]', div=',')

        # Construct headers
        header_parameters = {}  # type: Dict[str, Any]
        header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

        request = self._client.get(url, query_parameters, header_parameters)
        pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
        response = pipeline_response.http_response

        if response.status_code not in [200]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            error = self._deserialize(models.OdataError, response)
            raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

        deserialized = self._deserialize('MicrosoftGraphPrinter', pipeline_response)

        if cls:
            return cls(pipeline_response, deserialized, {})

        return deserialized
    get_printers.metadata = {'url': '/print/printers/{printer-id}'}  # type: ignore

    def update_printers(
        self,
        printer_id,  # type: str
        body,  # type: "models.MicrosoftGraphPrinter"
        **kwargs  # type: Any
    ):
        # type: (...) -> None
        """Update the navigation property printers in print.

        Update the navigation property printers in print.

        :param printer_id: key: id of printer.
        :type printer_id: str
        :param body: New navigation property values.
        :type body: ~devices_cloud_print.models.MicrosoftGraphPrinter
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: None, or the result of cls(response)
        :rtype: None
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType[None]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        content_type = kwargs.pop("content_type", "application/json")
        accept = "application/json"

        # Construct URL
        url = self.update_printers.metadata['url']  # type: ignore
        path_format_arguments = {
            'printer-id': self._serialize.url("printer_id", printer_id, 'str'),
        }
        url = self._client.format_url(url, **path_format_arguments)

        # Construct parameters
        query_parameters = {}  # type: Dict[str, Any]

        # Construct headers
        header_parameters = {}  # type: Dict[str, Any]
        header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
        header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

        body_content_kwargs = {}  # type: Dict[str, Any]
        body_content = self._serialize.body(body, 'MicrosoftGraphPrinter')
        body_content_kwargs['content'] = body_content
        request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs)
        pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
        response = pipeline_response.http_response

        if response.status_code not in [204]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            error = self._deserialize(models.OdataError, response)
            raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

        if cls:
            return cls(pipeline_response, None, {})

    update_printers.metadata = {'url': '/print/printers/{printer-id}'}  # type: ignore

    def delete_printers(
        self,
        printer_id,  # type: str
        if_match=None,  # type: Optional[str]
        **kwargs  # type: Any
    ):
        # type: (...) -> None
        """Delete navigation property printers for print.

        Delete navigation property printers for print.

        :param printer_id: key: id of printer.
        :type printer_id: str
        :param if_match: ETag.
        :type if_match: str
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: None, or the result of cls(response)
        :rtype: None
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType[None]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        accept = "application/json"

        # Construct URL
        url = self.delete_printers.metadata['url']  # type: ignore
        path_format_arguments = {
            'printer-id': self._serialize.url("printer_id", printer_id, 'str'),
        }
        url = self._client.format_url(url, **path_format_arguments)

        # Construct parameters
        query_parameters = {}  # type: Dict[str, Any]

        # Construct headers
        header_parameters = {}  # type: Dict[str, Any]
        if if_match is not None:
            header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str')
        header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

        request = self._client.delete(url, query_parameters, header_parameters)
        pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
        response = pipeline_response.http_response

        if response.status_code not in [204]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            error = self._deserialize(models.OdataError, response)
            raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

        if cls:
            return cls(pipeline_response, None, {})

    delete_printers.metadata = {'url': '/print/printers/{printer-id}'}  # type: ignore

    def list_printer_shares(
        self,
        orderby=None,  # type: Optional[List[Union[str, "models.Enum59"]]]
        select=None,  # type: Optional[List[Union[str, "models.Enum60"]]]
        expand=None,  # type: Optional[List[Union[str, "models.Enum61"]]]
        **kwargs  # type: Any
    ):
        # type: (...) -> Iterable["models.CollectionOfPrinterShare0"]
        """Get printerShares from print.

        Get printerShares from print.

        :param orderby: Order items by property values.
        :type orderby: list[str or ~devices_cloud_print.models.Enum59]
        :param select: Select properties to be returned.
        :type select: list[str or ~devices_cloud_print.models.Enum60]
        :param expand: Expand related entities.
        :type expand: list[str or ~devices_cloud_print.models.Enum61]
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: An iterator like instance of either CollectionOfPrinterShare0 or the result of cls(response)
        :rtype: ~azure.core.paging.ItemPaged[~devices_cloud_print.models.CollectionOfPrinterShare0]
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType["models.CollectionOfPrinterShare0"]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        accept = "application/json"

        def prepare_request(next_link=None):
            # Construct headers
            header_parameters = {}  # type: Dict[str, Any]
            header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

            if not next_link:
                # Construct URL
                url = self.list_printer_shares.metadata['url']  # type: ignore
                # Construct parameters
                query_parameters = {}  # type: Dict[str, Any]
                if self._config.top is not None:
                    query_parameters['$top'] = self._serialize.query("self._config.top", self._config.top, 'int', minimum=0)
                if self._config.skip is not None:
                    query_parameters['$skip'] = self._serialize.query("self._config.skip", self._config.skip, 'int', minimum=0)
                if self._config.search is not None:
                    query_parameters['$search'] = self._serialize.query("self._config.search", self._config.search, 'str')
                if self._config.filter is not None:
                    query_parameters['$filter'] = self._serialize.query("self._config.filter", self._config.filter, 'str')
                if self._config.count is not None:
                    query_parameters['$count'] = self._serialize.query("self._config.count", self._config.count, 'bool')
                if orderby is not None:
                    query_parameters['$orderby'] = self._serialize.query("orderby", orderby, '[str]', div=',')
                if select is not None:
                    query_parameters['$select'] = self._serialize.query("select", select, '[str]', div=',')
                if expand is not None:
                    query_parameters['$expand'] = self._serialize.query("expand", expand, '[str]', div=',')

                request = self._client.get(url, query_parameters, header_parameters)
            else:
                url = next_link
                query_parameters = {}  # type: Dict[str, Any]
                request = self._client.get(url, query_parameters, header_parameters)
            return request

        def extract_data(pipeline_response):
            deserialized = self._deserialize('CollectionOfPrinterShare0', pipeline_response)
            list_of_elem = deserialized.value
            if cls:
                list_of_elem = cls(list_of_elem)
            return deserialized.odata_next_link or None, iter(list_of_elem)

        def get_next(next_link=None):
            request = prepare_request(next_link)

            pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
            response = pipeline_response.http_response

            if response.status_code not in [200]:
                error = self._deserialize(models.OdataError, response)
                map_error(status_code=response.status_code, response=response, error_map=error_map)
                raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

            return pipeline_response

        return ItemPaged(
            get_next, extract_data
        )
    list_printer_shares.metadata = {'url': '/print/printerShares'}  # type: ignore

    def create_printer_shares(
        self,
        body,  # type: "models.MicrosoftGraphPrinterShare"
        **kwargs  # type: Any
    ):
        # type: (...) -> "models.MicrosoftGraphPrinterShare"
        """Create new navigation property to printerShares for print.

        Create new navigation property to printerShares for print.

        :param body: New navigation property.
        :type body: ~devices_cloud_print.models.MicrosoftGraphPrinterShare
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: MicrosoftGraphPrinterShare, or the result of cls(response)
        :rtype: ~devices_cloud_print.models.MicrosoftGraphPrinterShare
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType["models.MicrosoftGraphPrinterShare"]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        content_type = kwargs.pop("content_type", "application/json")
        accept = "application/json"

        # Construct URL
        url = self.create_printer_shares.metadata['url']  # type: ignore

        # Construct parameters
        query_parameters = {}  # type: Dict[str, Any]

        # Construct headers
        header_parameters = {}  # type: Dict[str, Any]
        header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
        header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

        body_content_kwargs = {}  # type: Dict[str, Any]
        body_content = self._serialize.body(body, 'MicrosoftGraphPrinterShare')
        body_content_kwargs['content'] = body_content
        request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs)
        pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
        response = pipeline_response.http_response

        if response.status_code not in [201]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            error = self._deserialize(models.OdataError, response)
            raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

        deserialized = self._deserialize('MicrosoftGraphPrinterShare', pipeline_response)

        if cls:
            return cls(pipeline_response, deserialized, {})

        return deserialized
    create_printer_shares.metadata = {'url': '/print/printerShares'}  # type: ignore

    def get_printer_shares(
        self,
        printer_share_id,  # type: str
        select=None,  # type: Optional[List[Union[str, "models.Enum62"]]]
        expand=None,  # type: Optional[List[Union[str, "models.Enum63"]]]
        **kwargs  # type: Any
    ):
        # type: (...) -> "models.MicrosoftGraphPrinterShare"
        """Get printerShares from print.

        Get printerShares from print.

        :param printer_share_id: key: id of printerShare.
        :type printer_share_id: str
        :param select: Select properties to be returned.
        :type select: list[str or ~devices_cloud_print.models.Enum62]
        :param expand: Expand related entities.
        :type expand: list[str or ~devices_cloud_print.models.Enum63]
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: MicrosoftGraphPrinterShare, or the result of cls(response)
        :rtype: ~devices_cloud_print.models.MicrosoftGraphPrinterShare
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType["models.MicrosoftGraphPrinterShare"]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        accept = "application/json"

        # Construct URL
        url = self.get_printer_shares.metadata['url']  # type: ignore
        path_format_arguments = {
            'printerShare-id': self._serialize.url("printer_share_id", printer_share_id, 'str'),
        }
        url = self._client.format_url(url, **path_format_arguments)

        # Construct parameters
        query_parameters = {}  # type: Dict[str, Any]
        if select is not None:
            query_parameters['$select'] = self._serialize.query("select", select, '[str]', div=',')
        if expand is not None:
            query_parameters['$expand'] = self._serialize.query("expand", expand, '[str]', div=',')

        # Construct headers
        header_parameters = {}  # type: Dict[str, Any]
        header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

        request = self._client.get(url, query_parameters, header_parameters)
        pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
        response = pipeline_response.http_response

        if response.status_code not in [200]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            error = self._deserialize(models.OdataError, response)
            raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

        deserialized = self._deserialize('MicrosoftGraphPrinterShare', pipeline_response)

        if cls:
            return cls(pipeline_response, deserialized, {})

        return deserialized
    get_printer_shares.metadata = {'url': '/print/printerShares/{printerShare-id}'}  # type: ignore

    def update_printer_shares(
        self,
        printer_share_id,  # type: str
        body,  # type: "models.MicrosoftGraphPrinterShare"
        **kwargs  # type: Any
    ):
        # type: (...) -> None
        """Update the navigation property printerShares in print.

        Update the navigation property printerShares in print.

        :param printer_share_id: key: id of printerShare.
        :type printer_share_id: str
        :param body: New navigation property values.
        :type body: ~devices_cloud_print.models.MicrosoftGraphPrinterShare
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: None, or the result of cls(response)
        :rtype: None
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType[None]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        content_type = kwargs.pop("content_type", "application/json")
        accept = "application/json"

        # Construct URL
        url = self.update_printer_shares.metadata['url']  # type: ignore
        path_format_arguments = {
            'printerShare-id': self._serialize.url("printer_share_id", printer_share_id, 'str'),
        }
        url = self._client.format_url(url, **path_format_arguments)

        # Construct parameters
        query_parameters = {}  # type: Dict[str, Any]

        # Construct headers
        header_parameters = {}  # type: Dict[str, Any]
        header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
        header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

        body_content_kwargs = {}  # type: Dict[str, Any]
        body_content = self._serialize.body(body, 'MicrosoftGraphPrinterShare')
        body_content_kwargs['content'] = body_content
        request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs)
        pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
        response = pipeline_response.http_response

        if response.status_code not in [204]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            error = self._deserialize(models.OdataError, response)
            raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

        if cls:
            return cls(pipeline_response, None, {})

    update_printer_shares.metadata = {'url': '/print/printerShares/{printerShare-id}'}  # type: ignore

    def delete_printer_shares(
        self,
        printer_share_id,  # type: str
        if_match=None,  # type: Optional[str]
        **kwargs  # type: Any
    ):
        # type: (...) -> None
        """Delete navigation property printerShares for print.

        Delete navigation property printerShares for print.

        :param printer_share_id: key: id of printerShare.
        :type printer_share_id: str
        :param if_match: ETag.
        :type if_match: str
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: None, or the result of cls(response)
        :rtype: None
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType[None]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        accept = "application/json"

        # Construct URL
        url = self.delete_printer_shares.metadata['url']  # type: ignore
        path_format_arguments = {
            'printerShare-id': self._serialize.url("printer_share_id", printer_share_id, 'str'),
        }
        url = self._client.format_url(url, **path_format_arguments)

        # Construct parameters
        query_parameters = {}  # type: Dict[str, Any]

        # Construct headers
        header_parameters = {}  # type: Dict[str, Any]
        if if_match is not None:
            header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str')
        header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

        request = self._client.delete(url, query_parameters, header_parameters)
        pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
        response = pipeline_response.http_response

        if response.status_code not in [204]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            error = self._deserialize(models.OdataError, response)
            raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

        if cls:
            return cls(pipeline_response, None, {})

    delete_printer_shares.metadata = {'url': '/print/printerShares/{printerShare-id}'}  # type: ignore

    def list_reports(
        self,
        orderby=None,  # type: Optional[List[Union[str, "models.Enum72"]]]
        select=None,  # type: Optional[List[Union[str, "models.Enum73"]]]
        expand=None,  # type: Optional[List[Union[str, "models.Enum74"]]]
        **kwargs  # type: Any
    ):
        # type: (...) -> Iterable["models.CollectionOfReportRoot"]
        """Get reports from print.

        Get reports from print.

        :param orderby: Order items by property values.
        :type orderby: list[str or ~devices_cloud_print.models.Enum72]
        :param select: Select properties to be returned.
        :type select: list[str or ~devices_cloud_print.models.Enum73]
        :param expand: Expand related entities.
        :type expand: list[str or ~devices_cloud_print.models.Enum74]
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: An iterator like instance of either CollectionOfReportRoot or the result of cls(response)
        :rtype: ~azure.core.paging.ItemPaged[~devices_cloud_print.models.CollectionOfReportRoot]
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType["models.CollectionOfReportRoot"]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        accept = "application/json"

        def prepare_request(next_link=None):
            # Construct headers
            header_parameters = {}  # type: Dict[str, Any]
            header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

            if not next_link:
                # Construct URL
                url = self.list_reports.metadata['url']  # type: ignore
                # Construct parameters
                query_parameters = {}  # type: Dict[str, Any]
                if self._config.top is not None:
                    query_parameters['$top'] = self._serialize.query("self._config.top", self._config.top, 'int', minimum=0)
                if self._config.skip is not None:
                    query_parameters['$skip'] = self._serialize.query("self._config.skip", self._config.skip, 'int', minimum=0)
                if self._config.search is not None:
                    query_parameters['$search'] = self._serialize.query("self._config.search", self._config.search, 'str')
                if self._config.filter is not None:
                    query_parameters['$filter'] = self._serialize.query("self._config.filter", self._config.filter, 'str')
                if self._config.count is not None:
                    query_parameters['$count'] = self._serialize.query("self._config.count", self._config.count, 'bool')
                if orderby is not None:
                    query_parameters['$orderby'] = self._serialize.query("orderby", orderby, '[str]', div=',')
                if select is not None:
                    query_parameters['$select'] = self._serialize.query("select", select, '[str]', div=',')
                if expand is not None:
                    query_parameters['$expand'] = self._serialize.query("expand", expand, '[str]', div=',')

                request = self._client.get(url, query_parameters, header_parameters)
            else:
                url = next_link
                query_parameters = {}  # type: Dict[str, Any]
                request = self._client.get(url, query_parameters, header_parameters)
            return request

        def extract_data(pipeline_response):
            deserialized = self._deserialize('CollectionOfReportRoot', pipeline_response)
            list_of_elem = deserialized.value
            if cls:
                list_of_elem = cls(list_of_elem)
            return deserialized.odata_next_link or None, iter(list_of_elem)

        def get_next(next_link=None):
            request = prepare_request(next_link)

            pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
            response = pipeline_response.http_response

            if response.status_code not in [200]:
                error = self._deserialize(models.OdataError, response)
                map_error(status_code=response.status_code, response=response, error_map=error_map)
                raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

            return pipeline_response

        return ItemPaged(
            get_next, extract_data
        )
    list_reports.metadata = {'url': '/print/reports'}  # type: ignore

    def create_reports(
        self,
        body,  # type: "models.MicrosoftGraphReportRoot"
        **kwargs  # type: Any
    ):
        # type: (...) -> "models.MicrosoftGraphReportRoot"
        """Create new navigation property to reports for print.

        Create new navigation property to reports for print.

        :param body: New navigation property.
        :type body: ~devices_cloud_print.models.MicrosoftGraphReportRoot
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: MicrosoftGraphReportRoot, or the result of cls(response)
        :rtype: ~devices_cloud_print.models.MicrosoftGraphReportRoot
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType["models.MicrosoftGraphReportRoot"]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        content_type = kwargs.pop("content_type", "application/json")
        accept = "application/json"

        # Construct URL
        url = self.create_reports.metadata['url']  # type: ignore

        # Construct parameters
        query_parameters = {}  # type: Dict[str, Any]

        # Construct headers
        header_parameters = {}  # type: Dict[str, Any]
        header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
        header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

        body_content_kwargs = {}  # type: Dict[str, Any]
        body_content = self._serialize.body(body, 'MicrosoftGraphReportRoot')
        body_content_kwargs['content'] = body_content
        request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs)
        pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
        response = pipeline_response.http_response

        if response.status_code not in [201]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            error = self._deserialize(models.OdataError, response)
            raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

        deserialized = self._deserialize('MicrosoftGraphReportRoot', pipeline_response)

        if cls:
            return cls(pipeline_response, deserialized, {})

        return deserialized
    create_reports.metadata = {'url': '/print/reports'}  # type: ignore

    def get_reports(
        self,
        report_root_id,  # type: str
        select=None,  # type: Optional[List[Union[str, "models.Enum75"]]]
        expand=None,  # type: Optional[List[Union[str, "models.Enum76"]]]
        **kwargs  # type: Any
    ):
        # type: (...) -> "models.MicrosoftGraphReportRoot"
        """Get reports from print.

        Get reports from print.

        :param report_root_id: key: id of reportRoot.
        :type report_root_id: str
        :param select: Select properties to be returned.
        :type select: list[str or ~devices_cloud_print.models.Enum75]
        :param expand: Expand related entities.
        :type expand: list[str or ~devices_cloud_print.models.Enum76]
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: MicrosoftGraphReportRoot, or the result of cls(response)
        :rtype: ~devices_cloud_print.models.MicrosoftGraphReportRoot
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType["models.MicrosoftGraphReportRoot"]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        accept = "application/json"

        # Construct URL
        url = self.get_reports.metadata['url']  # type: ignore
        path_format_arguments = {
            'reportRoot-id': self._serialize.url("report_root_id", report_root_id, 'str'),
        }
        url = self._client.format_url(url, **path_format_arguments)

        # Construct parameters
        query_parameters = {}  # type: Dict[str, Any]
        if select is not None:
            query_parameters['$select'] = self._serialize.query("select", select, '[str]', div=',')
        if expand is not None:
            query_parameters['$expand'] = self._serialize.query("expand", expand, '[str]', div=',')

        # Construct headers
        header_parameters = {}  # type: Dict[str, Any]
        header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

        request = self._client.get(url, query_parameters, header_parameters)
        pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
        response = pipeline_response.http_response

        if response.status_code not in [200]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            error = self._deserialize(models.OdataError, response)
            raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

        deserialized = self._deserialize('MicrosoftGraphReportRoot', pipeline_response)

        if cls:
            return cls(pipeline_response, deserialized, {})

        return deserialized
    get_reports.metadata = {'url': '/print/reports/{reportRoot-id}'}  # type: ignore

    def update_reports(
        self,
        report_root_id,  # type: str
        body,  # type: "models.MicrosoftGraphReportRoot"
        **kwargs  # type: Any
    ):
        # type: (...) -> None
        """Update the navigation property reports in print.

        Update the navigation property reports in print.

        :param report_root_id: key: id of reportRoot.
        :type report_root_id: str
        :param body: New navigation property values.
        :type body: ~devices_cloud_print.models.MicrosoftGraphReportRoot
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: None, or the result of cls(response)
        :rtype: None
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType[None]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        content_type = kwargs.pop("content_type", "application/json")
        accept = "application/json"

        # Construct URL
        url = self.update_reports.metadata['url']  # type: ignore
        path_format_arguments = {
            'reportRoot-id': self._serialize.url("report_root_id", report_root_id, 'str'),
        }
        url = self._client.format_url(url, **path_format_arguments)

        # Construct parameters
        query_parameters = {}  # type: Dict[str, Any]

        # Construct headers
        header_parameters = {}  # type: Dict[str, Any]
        header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
        header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

        body_content_kwargs = {}  # type: Dict[str, Any]
        body_content = self._serialize.body(body, 'MicrosoftGraphReportRoot')
        body_content_kwargs['content'] = body_content
        request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs)
        pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
        response = pipeline_response.http_response

        if response.status_code not in [204]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            error = self._deserialize(models.OdataError, response)
            raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

        if cls:
            return cls(pipeline_response, None, {})

    update_reports.metadata = {'url': '/print/reports/{reportRoot-id}'}  # type: ignore

    def delete_reports(
        self,
        report_root_id,  # type: str
        if_match=None,  # type: Optional[str]
        **kwargs  # type: Any
    ):
        # type: (...) -> None
        """Delete navigation property reports for print.

        Delete navigation property reports for print.

        :param report_root_id: key: id of reportRoot.
        :type report_root_id: str
        :param if_match: ETag.
        :type if_match: str
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: None, or the result of cls(response)
        :rtype: None
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType[None]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        accept = "application/json"

        # Construct URL
        url = self.delete_reports.metadata['url']  # type: ignore
        path_format_arguments = {
            'reportRoot-id': self._serialize.url("report_root_id", report_root_id, 'str'),
        }
        url = self._client.format_url(url, **path_format_arguments)

        # Construct parameters
        query_parameters = {}  # type: Dict[str, Any]

        # Construct headers
        header_parameters = {}  # type: Dict[str, Any]
        if if_match is not None:
            header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str')
        header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

        request = self._client.delete(url, query_parameters, header_parameters)
        pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
        response = pipeline_response.http_response

        if response.status_code not in [204]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            error = self._deserialize(models.OdataError, response)
            raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

        if cls:
            return cls(pipeline_response, None, {})

    delete_reports.metadata = {'url': '/print/reports/{reportRoot-id}'}  # type: ignore

    def list_services(
        self,
        orderby=None,  # type: Optional[List[Union[str, "models.Enum77"]]]
        select=None,  # type: Optional[List[Union[str, "models.Enum78"]]]
        expand=None,  # type: Optional[List[Union[str, "models.Enum79"]]]
        **kwargs  # type: Any
    ):
        # type: (...) -> Iterable["models.CollectionOfPrintService"]
        """Get services from print.

        Get services from print.

        :param orderby: Order items by property values.
        :type orderby: list[str or ~devices_cloud_print.models.Enum77]
        :param select: Select properties to be returned.
        :type select: list[str or ~devices_cloud_print.models.Enum78]
        :param expand: Expand related entities.
        :type expand: list[str or ~devices_cloud_print.models.Enum79]
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: An iterator like instance of either CollectionOfPrintService or the result of cls(response)
        :rtype: ~azure.core.paging.ItemPaged[~devices_cloud_print.models.CollectionOfPrintService]
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType["models.CollectionOfPrintService"]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        accept = "application/json"

        def prepare_request(next_link=None):
            # Construct headers
            header_parameters = {}  # type: Dict[str, Any]
            header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

            if not next_link:
                # Construct URL
                url = self.list_services.metadata['url']  # type: ignore
                # Construct parameters
                query_parameters = {}  # type: Dict[str, Any]
                if self._config.top is not None:
                    query_parameters['$top'] = self._serialize.query("self._config.top", self._config.top, 'int', minimum=0)
                if self._config.skip is not None:
                    query_parameters['$skip'] = self._serialize.query("self._config.skip", self._config.skip, 'int', minimum=0)
                if self._config.search is not None:
                    query_parameters['$search'] = self._serialize.query("self._config.search", self._config.search, 'str')
                if self._config.filter is not None:
                    query_parameters['$filter'] = self._serialize.query("self._config.filter", self._config.filter, 'str')
                if self._config.count is not None:
                    query_parameters['$count'] = self._serialize.query("self._config.count", self._config.count, 'bool')
                if orderby is not None:
                    query_parameters['$orderby'] = self._serialize.query("orderby", orderby, '[str]', div=',')
                if select is not None:
                    query_parameters['$select'] = self._serialize.query("select", select, '[str]', div=',')
                if expand is not None:
                    query_parameters['$expand'] = self._serialize.query("expand", expand, '[str]', div=',')

                request = self._client.get(url, query_parameters, header_parameters)
            else:
                url = next_link
                query_parameters = {}  # type: Dict[str, Any]
                request = self._client.get(url, query_parameters, header_parameters)
            return request

        def extract_data(pipeline_response):
            deserialized = self._deserialize('CollectionOfPrintService', pipeline_response)
            list_of_elem = deserialized.value
            if cls:
                list_of_elem = cls(list_of_elem)
            return deserialized.odata_next_link or None, iter(list_of_elem)

        def get_next(next_link=None):
            request = prepare_request(next_link)

            pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
            response = pipeline_response.http_response

            if response.status_code not in [200]:
                error = self._deserialize(models.OdataError, response)
                map_error(status_code=response.status_code, response=response, error_map=error_map)
                raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

            return pipeline_response

        return ItemPaged(
            get_next, extract_data
        )
    list_services.metadata = {'url': '/print/services'}  # type: ignore

    def create_services(
        self,
        body,  # type: "models.MicrosoftGraphPrintService"
        **kwargs  # type: Any
    ):
        # type: (...) -> "models.MicrosoftGraphPrintService"
        """Create new navigation property to services for print.

        Create new navigation property to services for print.

        :param body: New navigation property.
        :type body: ~devices_cloud_print.models.MicrosoftGraphPrintService
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: MicrosoftGraphPrintService, or the result of cls(response)
        :rtype: ~devices_cloud_print.models.MicrosoftGraphPrintService
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType["models.MicrosoftGraphPrintService"]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        content_type = kwargs.pop("content_type", "application/json")
        accept = "application/json"

        # Construct URL
        url = self.create_services.metadata['url']  # type: ignore

        # Construct parameters
        query_parameters = {}  # type: Dict[str, Any]

        # Construct headers
        header_parameters = {}  # type: Dict[str, Any]
        header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
        header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

        body_content_kwargs = {}  # type: Dict[str, Any]
        body_content = self._serialize.body(body, 'MicrosoftGraphPrintService')
        body_content_kwargs['content'] = body_content
        request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs)
        pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
        response = pipeline_response.http_response

        if response.status_code not in [201]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            error = self._deserialize(models.OdataError, response)
            raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

        deserialized = self._deserialize('MicrosoftGraphPrintService', pipeline_response)

        if cls:
            return cls(pipeline_response, deserialized, {})

        return deserialized
    create_services.metadata = {'url': '/print/services'}  # type: ignore

    def get_services(
        self,
        print_service_id,  # type: str
        select=None,  # type: Optional[List[Union[str, "models.Enum80"]]]
        expand=None,  # type: Optional[List[Union[str, "models.Enum81"]]]
        **kwargs  # type: Any
    ):
        # type: (...) -> "models.MicrosoftGraphPrintService"
        """Get services from print.

        Get services from print.

        :param print_service_id: key: id of printService.
        :type print_service_id: str
        :param select: Select properties to be returned.
        :type select: list[str or ~devices_cloud_print.models.Enum80]
        :param expand: Expand related entities.
        :type expand: list[str or ~devices_cloud_print.models.Enum81]
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: MicrosoftGraphPrintService, or the result of cls(response)
        :rtype: ~devices_cloud_print.models.MicrosoftGraphPrintService
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType["models.MicrosoftGraphPrintService"]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        accept = "application/json"

        # Construct URL
        url = self.get_services.metadata['url']  # type: ignore
        path_format_arguments = {
            'printService-id': self._serialize.url("print_service_id", print_service_id, 'str'),
        }
        url = self._client.format_url(url, **path_format_arguments)

        # Construct parameters
        query_parameters = {}  # type: Dict[str, Any]
        if select is not None:
            query_parameters['$select'] = self._serialize.query("select", select, '[str]', div=',')
        if expand is not None:
            query_parameters['$expand'] = self._serialize.query("expand", expand, '[str]', div=',')

        # Construct headers
        header_parameters = {}  # type: Dict[str, Any]
        header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

        request = self._client.get(url, query_parameters, header_parameters)
        pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
        response = pipeline_response.http_response

        if response.status_code not in [200]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            error = self._deserialize(models.OdataError, response)
            raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

        deserialized = self._deserialize('MicrosoftGraphPrintService', pipeline_response)

        if cls:
            return cls(pipeline_response, deserialized, {})

        return deserialized
    get_services.metadata = {'url': '/print/services/{printService-id}'}  # type: ignore

    def update_services(
        self,
        print_service_id,  # type: str
        body,  # type: "models.MicrosoftGraphPrintService"
        **kwargs  # type: Any
    ):
        # type: (...) -> None
        """Update the navigation property services in print.

        Update the navigation property services in print.

        :param print_service_id: key: id of printService.
        :type print_service_id: str
        :param body: New navigation property values.
        :type body: ~devices_cloud_print.models.MicrosoftGraphPrintService
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: None, or the result of cls(response)
        :rtype: None
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType[None]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        content_type = kwargs.pop("content_type", "application/json")
        accept = "application/json"

        # Construct URL
        url = self.update_services.metadata['url']  # type: ignore
        path_format_arguments = {
            'printService-id': self._serialize.url("print_service_id", print_service_id, 'str'),
        }
        url = self._client.format_url(url, **path_format_arguments)

        # Construct parameters
        query_parameters = {}  # type: Dict[str, Any]

        # Construct headers
        header_parameters = {}  # type: Dict[str, Any]
        header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
        header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

        body_content_kwargs = {}  # type: Dict[str, Any]
        body_content = self._serialize.body(body, 'MicrosoftGraphPrintService')
        body_content_kwargs['content'] = body_content
        request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs)
        pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
        response = pipeline_response.http_response

        if response.status_code not in [204]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            error = self._deserialize(models.OdataError, response)
            raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

        if cls:
            return cls(pipeline_response, None, {})

    update_services.metadata = {'url': '/print/services/{printService-id}'}  # type: ignore

    def delete_services(
        self,
        print_service_id,  # type: str
        if_match=None,  # type: Optional[str]
        **kwargs  # type: Any
    ):
        # type: (...) -> None
        """Delete navigation property services for print.

        Delete navigation property services for print.

        :param print_service_id: key: id of printService.
        :type print_service_id: str
        :param if_match: ETag.
        :type if_match: str
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: None, or the result of cls(response)
        :rtype: None
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType[None]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        accept = "application/json"

        # Construct URL
        url = self.delete_services.metadata['url']  # type: ignore
        path_format_arguments = {
            'printService-id': self._serialize.url("print_service_id", print_service_id, 'str'),
        }
        url = self._client.format_url(url, **path_format_arguments)

        # Construct parameters
        query_parameters = {}  # type: Dict[str, Any]

        # Construct headers
        header_parameters = {}  # type: Dict[str, Any]
        if if_match is not None:
            header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str')
        header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

        request = self._client.delete(url, query_parameters, header_parameters)
        pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
        response = pipeline_response.http_response

        if response.status_code not in [204]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            error = self._deserialize(models.OdataError, response)
            raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

        if cls:
            return cls(pipeline_response, None, {})

    delete_services.metadata = {'url': '/print/services/{printService-id}'}  # type: ignore

    def list_shares(
        self,
        orderby=None,  # type: Optional[List[Union[str, "models.Enum85"]]]
        select=None,  # type: Optional[List[Union[str, "models.Enum86"]]]
        expand=None,  # type: Optional[List[Union[str, "models.Enum87"]]]
        **kwargs  # type: Any
    ):
        # type: (...) -> Iterable["models.CollectionOfPrinterShare1"]
        """Get shares from print.

        Get shares from print.

        :param orderby: Order items by property values.
        :type orderby: list[str or ~devices_cloud_print.models.Enum85]
        :param select: Select properties to be returned.
        :type select: list[str or ~devices_cloud_print.models.Enum86]
        :param expand: Expand related entities.
        :type expand: list[str or ~devices_cloud_print.models.Enum87]
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: An iterator like instance of either CollectionOfPrinterShare1 or the result of cls(response)
        :rtype: ~azure.core.paging.ItemPaged[~devices_cloud_print.models.CollectionOfPrinterShare1]
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType["models.CollectionOfPrinterShare1"]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        accept = "application/json"

        def prepare_request(next_link=None):
            # Construct headers
            header_parameters = {}  # type: Dict[str, Any]
            header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

            if not next_link:
                # Construct URL
                url = self.list_shares.metadata['url']  # type: ignore
                # Construct parameters
                query_parameters = {}  # type: Dict[str, Any]
                if self._config.top is not None:
                    query_parameters['$top'] = self._serialize.query("self._config.top", self._config.top, 'int', minimum=0)
                if self._config.skip is not None:
                    query_parameters['$skip'] = self._serialize.query("self._config.skip", self._config.skip, 'int', minimum=0)
                if self._config.search is not None:
                    query_parameters['$search'] = self._serialize.query("self._config.search", self._config.search, 'str')
                if self._config.filter is not None:
                    query_parameters['$filter'] = self._serialize.query("self._config.filter", self._config.filter, 'str')
                if self._config.count is not None:
                    query_parameters['$count'] = self._serialize.query("self._config.count", self._config.count, 'bool')
                if orderby is not None:
                    query_parameters['$orderby'] = self._serialize.query("orderby", orderby, '[str]', div=',')
                if select is not None:
                    query_parameters['$select'] = self._serialize.query("select", select, '[str]', div=',')
                if expand is not None:
                    query_parameters['$expand'] = self._serialize.query("expand", expand, '[str]', div=',')

                request = self._client.get(url, query_parameters, header_parameters)
            else:
                url = next_link
                query_parameters = {}  # type: Dict[str, Any]
                request = self._client.get(url, query_parameters, header_parameters)
            return request

        def extract_data(pipeline_response):
            deserialized = self._deserialize('CollectionOfPrinterShare1', pipeline_response)
            list_of_elem = deserialized.value
            if cls:
                list_of_elem = cls(list_of_elem)
            return deserialized.odata_next_link or None, iter(list_of_elem)

        def get_next(next_link=None):
            request = prepare_request(next_link)

            pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
            response = pipeline_response.http_response

            if response.status_code not in [200]:
                error = self._deserialize(models.OdataError, response)
                map_error(status_code=response.status_code, response=response, error_map=error_map)
                raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

            return pipeline_response

        return ItemPaged(
            get_next, extract_data
        )
    list_shares.metadata = {'url': '/print/shares'}  # type: ignore

    def create_shares(
        self,
        body,  # type: "models.MicrosoftGraphPrinterShare"
        **kwargs  # type: Any
    ):
        # type: (...) -> "models.MicrosoftGraphPrinterShare"
        """Create new navigation property to shares for print.

        Create new navigation property to shares for print.

        :param body: New navigation property.
        :type body: ~devices_cloud_print.models.MicrosoftGraphPrinterShare
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: MicrosoftGraphPrinterShare, or the result of cls(response)
        :rtype: ~devices_cloud_print.models.MicrosoftGraphPrinterShare
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType["models.MicrosoftGraphPrinterShare"]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        content_type = kwargs.pop("content_type", "application/json")
        accept = "application/json"

        # Construct URL
        url = self.create_shares.metadata['url']  # type: ignore

        # Construct parameters
        query_parameters = {}  # type: Dict[str, Any]

        # Construct headers
        header_parameters = {}  # type: Dict[str, Any]
        header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
        header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

        body_content_kwargs = {}  # type: Dict[str, Any]
        body_content = self._serialize.body(body, 'MicrosoftGraphPrinterShare')
        body_content_kwargs['content'] = body_content
        request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs)
        pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
        response = pipeline_response.http_response

        if response.status_code not in [201]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            error = self._deserialize(models.OdataError, response)
            raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

        deserialized = self._deserialize('MicrosoftGraphPrinterShare', pipeline_response)

        if cls:
            return cls(pipeline_response, deserialized, {})

        return deserialized
    create_shares.metadata = {'url': '/print/shares'}  # type: ignore

    def get_shares(
        self,
        printer_share_id,  # type: str
        select=None,  # type: Optional[List[Union[str, "models.Enum88"]]]
        expand=None,  # type: Optional[List[Union[str, "models.Enum89"]]]
        **kwargs  # type: Any
    ):
        # type: (...) -> "models.MicrosoftGraphPrinterShare"
        """Get shares from print.

        Get shares from print.

        :param printer_share_id: key: id of printerShare.
        :type printer_share_id: str
        :param select: Select properties to be returned.
        :type select: list[str or ~devices_cloud_print.models.Enum88]
        :param expand: Expand related entities.
        :type expand: list[str or ~devices_cloud_print.models.Enum89]
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: MicrosoftGraphPrinterShare, or the result of cls(response)
        :rtype: ~devices_cloud_print.models.MicrosoftGraphPrinterShare
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType["models.MicrosoftGraphPrinterShare"]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        accept = "application/json"

        # Construct URL
        url = self.get_shares.metadata['url']  # type: ignore
        path_format_arguments = {
            'printerShare-id': self._serialize.url("printer_share_id", printer_share_id, 'str'),
        }
        url = self._client.format_url(url, **path_format_arguments)

        # Construct parameters
        query_parameters = {}  # type: Dict[str, Any]
        if select is not None:
            query_parameters['$select'] = self._serialize.query("select", select, '[str]', div=',')
        if expand is not None:
            query_parameters['$expand'] = self._serialize.query("expand", expand, '[str]', div=',')

        # Construct headers
        header_parameters = {}  # type: Dict[str, Any]
        header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

        request = self._client.get(url, query_parameters, header_parameters)
        pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
        response = pipeline_response.http_response

        if response.status_code not in [200]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            error = self._deserialize(models.OdataError, response)
            raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

        deserialized = self._deserialize('MicrosoftGraphPrinterShare', pipeline_response)

        if cls:
            return cls(pipeline_response, deserialized, {})

        return deserialized
    get_shares.metadata = {'url': '/print/shares/{printerShare-id}'}  # type: ignore

    def update_shares(
        self,
        printer_share_id,  # type: str
        body,  # type: "models.MicrosoftGraphPrinterShare"
        **kwargs  # type: Any
    ):
        # type: (...) -> None
        """Update the navigation property shares in print.

        Update the navigation property shares in print.

        :param printer_share_id: key: id of printerShare.
        :type printer_share_id: str
        :param body: New navigation property values.
        :type body: ~devices_cloud_print.models.MicrosoftGraphPrinterShare
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: None, or the result of cls(response)
        :rtype: None
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType[None]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        content_type = kwargs.pop("content_type", "application/json")
        accept = "application/json"

        # Construct URL
        url = self.update_shares.metadata['url']  # type: ignore
        path_format_arguments = {
            'printerShare-id': self._serialize.url("printer_share_id", printer_share_id, 'str'),
        }
        url = self._client.format_url(url, **path_format_arguments)

        # Construct parameters
        query_parameters = {}  # type: Dict[str, Any]

        # Construct headers
        header_parameters = {}  # type: Dict[str, Any]
        header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
        header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

        body_content_kwargs = {}  # type: Dict[str, Any]
        body_content = self._serialize.body(body, 'MicrosoftGraphPrinterShare')
        body_content_kwargs['content'] = body_content
        request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs)
        pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
        response = pipeline_response.http_response

        if response.status_code not in [204]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            error = self._deserialize(models.OdataError, response)
            raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

        if cls:
            return cls(pipeline_response, None, {})

    update_shares.metadata = {'url': '/print/shares/{printerShare-id}'}  # type: ignore

    def delete_shares(
        self,
        printer_share_id,  # type: str
        if_match=None,  # type: Optional[str]
        **kwargs  # type: Any
    ):
        # type: (...) -> None
        """Delete navigation property shares for print.

        Delete navigation property shares for print.

        :param printer_share_id: key: id of printerShare.
        :type printer_share_id: str
        :param if_match: ETag.
        :type if_match: str
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: None, or the result of cls(response)
        :rtype: None
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType[None]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        accept = "application/json"

        # Construct URL
        url = self.delete_shares.metadata['url']  # type: ignore
        path_format_arguments = {
            'printerShare-id': self._serialize.url("printer_share_id", printer_share_id, 'str'),
        }
        url = self._client.format_url(url, **path_format_arguments)

        # Construct parameters
        query_parameters = {}  # type: Dict[str, Any]

        # Construct headers
        header_parameters = {}  # type: Dict[str, Any]
        if if_match is not None:
            header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str')
        header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

        request = self._client.delete(url, query_parameters, header_parameters)
        pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
        response = pipeline_response.http_response

        if response.status_code not in [204]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            error = self._deserialize(models.OdataError, response)
            raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

        if cls:
            return cls(pipeline_response, None, {})

    delete_shares.metadata = {'url': '/print/shares/{printerShare-id}'}  # type: ignore

    def list_task_definitions(
        self,
        orderby=None,  # type: Optional[List[Union[str, "models.Enum98"]]]
        select=None,  # type: Optional[List[Union[str, "models.Enum99"]]]
        expand=None,  # type: Optional[List[Union[str, "models.Enum100"]]]
        **kwargs  # type: Any
    ):
        # type: (...) -> Iterable["models.CollectionOfPrintTaskDefinition"]
        """Get taskDefinitions from print.

        Get taskDefinitions from print.

        :param orderby: Order items by property values.
        :type orderby: list[str or ~devices_cloud_print.models.Enum98]
        :param select: Select properties to be returned.
        :type select: list[str or ~devices_cloud_print.models.Enum99]
        :param expand: Expand related entities.
        :type expand: list[str or ~devices_cloud_print.models.Enum100]
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: An iterator like instance of either CollectionOfPrintTaskDefinition or the result of cls(response)
        :rtype: ~azure.core.paging.ItemPaged[~devices_cloud_print.models.CollectionOfPrintTaskDefinition]
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType["models.CollectionOfPrintTaskDefinition"]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        accept = "application/json"

        def prepare_request(next_link=None):
            # Construct headers
            header_parameters = {}  # type: Dict[str, Any]
            header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

            if not next_link:
                # Construct URL
                url = self.list_task_definitions.metadata['url']  # type: ignore
                # Construct parameters
                query_parameters = {}  # type: Dict[str, Any]
                if self._config.top is not None:
                    query_parameters['$top'] = self._serialize.query("self._config.top", self._config.top, 'int', minimum=0)
                if self._config.skip is not None:
                    query_parameters['$skip'] = self._serialize.query("self._config.skip", self._config.skip, 'int', minimum=0)
                if self._config.search is not None:
                    query_parameters['$search'] = self._serialize.query("self._config.search", self._config.search, 'str')
                if self._config.filter is not None:
                    query_parameters['$filter'] = self._serialize.query("self._config.filter", self._config.filter, 'str')
                if self._config.count is not None:
                    query_parameters['$count'] = self._serialize.query("self._config.count", self._config.count, 'bool')
                if orderby is not None:
                    query_parameters['$orderby'] = self._serialize.query("orderby", orderby, '[str]', div=',')
                if select is not None:
                    query_parameters['$select'] = self._serialize.query("select", select, '[str]', div=',')
                if expand is not None:
                    query_parameters['$expand'] = self._serialize.query("expand", expand, '[str]', div=',')

                request = self._client.get(url, query_parameters, header_parameters)
            else:
                url = next_link
                query_parameters = {}  # type: Dict[str, Any]
                request = self._client.get(url, query_parameters, header_parameters)
            return request

        def extract_data(pipeline_response):
            deserialized = self._deserialize('CollectionOfPrintTaskDefinition', pipeline_response)
            list_of_elem = deserialized.value
            if cls:
                list_of_elem = cls(list_of_elem)
            return deserialized.odata_next_link or None, iter(list_of_elem)

        def get_next(next_link=None):
            request = prepare_request(next_link)

            pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
            response = pipeline_response.http_response

            if response.status_code not in [200]:
                error = self._deserialize(models.OdataError, response)
                map_error(status_code=response.status_code, response=response, error_map=error_map)
                raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

            return pipeline_response

        return ItemPaged(
            get_next, extract_data
        )
    list_task_definitions.metadata = {'url': '/print/taskDefinitions'}  # type: ignore

    def create_task_definitions(
        self,
        body,  # type: "models.MicrosoftGraphPrintTaskDefinition"
        **kwargs  # type: Any
    ):
        # type: (...) -> "models.MicrosoftGraphPrintTaskDefinition"
        """Create new navigation property to taskDefinitions for print.

        Create new navigation property to taskDefinitions for print.

        :param body: New navigation property.
        :type body: ~devices_cloud_print.models.MicrosoftGraphPrintTaskDefinition
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: MicrosoftGraphPrintTaskDefinition, or the result of cls(response)
        :rtype: ~devices_cloud_print.models.MicrosoftGraphPrintTaskDefinition
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType["models.MicrosoftGraphPrintTaskDefinition"]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        content_type = kwargs.pop("content_type", "application/json")
        accept = "application/json"

        # Construct URL
        url = self.create_task_definitions.metadata['url']  # type: ignore

        # Construct parameters
        query_parameters = {}  # type: Dict[str, Any]

        # Construct headers
        header_parameters = {}  # type: Dict[str, Any]
        header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
        header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

        body_content_kwargs = {}  # type: Dict[str, Any]
        body_content = self._serialize.body(body, 'MicrosoftGraphPrintTaskDefinition')
        body_content_kwargs['content'] = body_content
        request = self._client.post(url, query_parameters, header_parameters, **body_content_kwargs)
        pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
        response = pipeline_response.http_response

        if response.status_code not in [201]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            error = self._deserialize(models.OdataError, response)
            raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

        deserialized = self._deserialize('MicrosoftGraphPrintTaskDefinition', pipeline_response)

        if cls:
            return cls(pipeline_response, deserialized, {})

        return deserialized
    create_task_definitions.metadata = {'url': '/print/taskDefinitions'}  # type: ignore

    def get_task_definitions(
        self,
        print_task_definition_id,  # type: str
        select=None,  # type: Optional[List[Union[str, "models.Enum101"]]]
        expand=None,  # type: Optional[List[Union[str, "models.Enum102"]]]
        **kwargs  # type: Any
    ):
        # type: (...) -> "models.MicrosoftGraphPrintTaskDefinition"
        """Get taskDefinitions from print.

        Get taskDefinitions from print.

        :param print_task_definition_id: key: id of printTaskDefinition.
        :type print_task_definition_id: str
        :param select: Select properties to be returned.
        :type select: list[str or ~devices_cloud_print.models.Enum101]
        :param expand: Expand related entities.
        :type expand: list[str or ~devices_cloud_print.models.Enum102]
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: MicrosoftGraphPrintTaskDefinition, or the result of cls(response)
        :rtype: ~devices_cloud_print.models.MicrosoftGraphPrintTaskDefinition
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType["models.MicrosoftGraphPrintTaskDefinition"]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        accept = "application/json"

        # Construct URL
        url = self.get_task_definitions.metadata['url']  # type: ignore
        path_format_arguments = {
            'printTaskDefinition-id': self._serialize.url("print_task_definition_id", print_task_definition_id, 'str'),
        }
        url = self._client.format_url(url, **path_format_arguments)

        # Construct parameters
        query_parameters = {}  # type: Dict[str, Any]
        if select is not None:
            query_parameters['$select'] = self._serialize.query("select", select, '[str]', div=',')
        if expand is not None:
            query_parameters['$expand'] = self._serialize.query("expand", expand, '[str]', div=',')

        # Construct headers
        header_parameters = {}  # type: Dict[str, Any]
        header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

        request = self._client.get(url, query_parameters, header_parameters)
        pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
        response = pipeline_response.http_response

        if response.status_code not in [200]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            error = self._deserialize(models.OdataError, response)
            raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

        deserialized = self._deserialize('MicrosoftGraphPrintTaskDefinition', pipeline_response)

        if cls:
            return cls(pipeline_response, deserialized, {})

        return deserialized
    get_task_definitions.metadata = {'url': '/print/taskDefinitions/{printTaskDefinition-id}'}  # type: ignore

    def update_task_definitions(
        self,
        print_task_definition_id,  # type: str
        body,  # type: "models.MicrosoftGraphPrintTaskDefinition"
        **kwargs  # type: Any
    ):
        # type: (...) -> None
        """Update the navigation property taskDefinitions in print.

        Update the navigation property taskDefinitions in print.

        :param print_task_definition_id: key: id of printTaskDefinition.
        :type print_task_definition_id: str
        :param body: New navigation property values.
        :type body: ~devices_cloud_print.models.MicrosoftGraphPrintTaskDefinition
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: None, or the result of cls(response)
        :rtype: None
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType[None]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        content_type = kwargs.pop("content_type", "application/json")
        accept = "application/json"

        # Construct URL
        url = self.update_task_definitions.metadata['url']  # type: ignore
        path_format_arguments = {
            'printTaskDefinition-id': self._serialize.url("print_task_definition_id", print_task_definition_id, 'str'),
        }
        url = self._client.format_url(url, **path_format_arguments)

        # Construct parameters
        query_parameters = {}  # type: Dict[str, Any]

        # Construct headers
        header_parameters = {}  # type: Dict[str, Any]
        header_parameters['Content-Type'] = self._serialize.header("content_type", content_type, 'str')
        header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

        body_content_kwargs = {}  # type: Dict[str, Any]
        body_content = self._serialize.body(body, 'MicrosoftGraphPrintTaskDefinition')
        body_content_kwargs['content'] = body_content
        request = self._client.patch(url, query_parameters, header_parameters, **body_content_kwargs)
        pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
        response = pipeline_response.http_response

        if response.status_code not in [204]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            error = self._deserialize(models.OdataError, response)
            raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

        if cls:
            return cls(pipeline_response, None, {})

    update_task_definitions.metadata = {'url': '/print/taskDefinitions/{printTaskDefinition-id}'}  # type: ignore

    def delete_task_definitions(
        self,
        print_task_definition_id,  # type: str
        if_match=None,  # type: Optional[str]
        **kwargs  # type: Any
    ):
        # type: (...) -> None
        """Delete navigation property taskDefinitions for print.

        Delete navigation property taskDefinitions for print.

        :param print_task_definition_id: key: id of printTaskDefinition.
        :type print_task_definition_id: str
        :param if_match: ETag.
        :type if_match: str
        :keyword callable cls: A custom type or function that will be passed the direct response
        :return: None, or the result of cls(response)
        :rtype: None
        :raises: ~azure.core.exceptions.HttpResponseError
        """
        cls = kwargs.pop('cls', None)  # type: ClsType[None]
        error_map = {
            401: ClientAuthenticationError, 404: ResourceNotFoundError, 409: ResourceExistsError
        }
        error_map.update(kwargs.pop('error_map', {}))
        accept = "application/json"

        # Construct URL
        url = self.delete_task_definitions.metadata['url']  # type: ignore
        path_format_arguments = {
            'printTaskDefinition-id': self._serialize.url("print_task_definition_id", print_task_definition_id, 'str'),
        }
        url = self._client.format_url(url, **path_format_arguments)

        # Construct parameters
        query_parameters = {}  # type: Dict[str, Any]

        # Construct headers
        header_parameters = {}  # type: Dict[str, Any]
        if if_match is not None:
            header_parameters['If-Match'] = self._serialize.header("if_match", if_match, 'str')
        header_parameters['Accept'] = self._serialize.header("accept", accept, 'str')

        request = self._client.delete(url, query_parameters, header_parameters)
        pipeline_response = self._client._pipeline.run(request, stream=False, **kwargs)
        response = pipeline_response.http_response

        if response.status_code not in [204]:
            map_error(status_code=response.status_code, response=response, error_map=error_map)
            error = self._deserialize(models.OdataError, response)
            raise HttpResponseError(response=response, model=error, error_format=ARMErrorFormat)

        if cls:
            return cls(pipeline_response, None, {})

    delete_task_definitions.metadata = {'url': '/print/taskDefinitions/{printTaskDefinition-id}'}  # type: ignore

# coding=utf-8 # -------------------------------------------------------------------------- # Copyright (c) Microsoft Corporation. All rights reserved. # Licensed under the MIT License. See License.txt in the project root for license information. # Code generated by Microsoft (R) AutoRest Code Generator. # Changes may cause incorrect behavior and will be lost if the code is regenerated. # -------------------------------------------------------------------------- # pylint: disable=unused-import,ungrouped-imports PrintOperations operations.      You should not instantiate this class directly. Instead, you should create a Client instance that     instantiates it for you and attaches it as an attribute.      :ivar models: Alias to model classes used in this operation group.     :type models: ~devices_cloud_print.models     :param client: Client for service requests.     :param config: Configuration of service client.     :param serializer: An object model serializer.     :param deserializer: An object model deserializer. # type: Optional[List[Union[str, "models.Get5ItemsItem"]]] # type: Optional[List[Union[str, "models.Get6ItemsItem"]]] # type: Optional[List[str]] # type: Any # type: (...) -> Iterable["models.CollectionOfPrintConnector"] Get connectors from print.          Get connectors from print.          :param orderby: Order items by property values.         :type orderby: list[str or ~devices_cloud_print.models.Get5ItemsItem]         :param select: Select properties to be returned.         :type select: list[str or ~devices_cloud_print.models.Get6ItemsItem]         :param expand: Expand related entities.         :type expand: list[str]         :keyword callable cls: A custom type or function that will be passed the direct response         :return: An iterator like instance of either CollectionOfPrintConnector or the result of cls(response)         :rtype: ~azure.core.paging.ItemPaged[~devices_cloud_print.models.CollectionOfPrintConnector]         :raises: ~azure.core.exceptions.HttpResponseError # type: ClsType["models.CollectionOfPrintConnector"] # Construct headers # type: Dict[str, Any] # Construct URL # type: ignore # Construct parameters # type: Dict[str, Any] # type: Dict[str, Any] # type: ignore # type: "models.MicrosoftGraphPrintConnector" # type: Any # type: (...) -> "models.MicrosoftGraphPrintConnector" Create new navigation property to connectors for print.          Create new navigation property to connectors for print.          :param body: New navigation property.         :type body: ~devices_cloud_print.models.MicrosoftGraphPrintConnector         :keyword callable cls: A custom type or function that will be passed the direct response         :return: MicrosoftGraphPrintConnector, or the result of cls(response)         :rtype: ~devices_cloud_print.models.MicrosoftGraphPrintConnector         :raises: ~azure.core.exceptions.HttpResponseError # type: ClsType["models.MicrosoftGraphPrintConnector"] # Construct URL # type: ignore # Construct parameters # type: Dict[str, Any] # Construct headers # type: Dict[str, Any] # type: Dict[str, Any] # type: ignore # type: str # type: Optional[List[Union[str, "models.Enum28"]]] # type: Optional[List[str]] # type: Any # type: (...) -> "models.MicrosoftGraphPrintConnector" Get connectors from print.          Get connectors from print.          :param print_connector_id: key: id of printConnector.         :type print_connector_id: str         :param select: Select properties to be returned.         :type select: list[str or ~devices_cloud_print.models.Enum28]         :param expand: Expand related entities.         :type expand: list[str]         :keyword callable cls: A custom type or function that will be passed the direct response         :return: MicrosoftGraphPrintConnector, or the result of cls(response)         :rtype: ~devices_cloud_print.models.MicrosoftGraphPrintConnector         :raises: ~azure.core.exceptions.HttpResponseError # type: ClsType["models.MicrosoftGraphPrintConnector"] # Construct URL # type: ignore # Construct parameters # type: Dict[str, Any] # Construct headers # type: Dict[str, Any] # type: ignore # type: str # type: "models.MicrosoftGraphPrintConnector" # type: Any # type: (...) -> None Update the navigation property connectors in print.          Update the navigation property connectors in print.          :param print_connector_id: key: id of printConnector.         :type print_connector_id: str         :param body: New navigation property values.         :type body: ~devices_cloud_print.models.MicrosoftGraphPrintConnector         :keyword callable cls: A custom type or function that will be passed the direct response         :return: None, or the result of cls(response)         :rtype: None         :raises: ~azure.core.exceptions.HttpResponseError # type: ClsType[None] # Construct URL # type: ignore # Construct parameters # type: Dict[str, Any] # Construct headers # type: Dict[str, Any] # type: Dict[str, Any] # type: ignore # type: str # type: Optional[str] # type: Any # type: (...) -> None Delete navigation property connectors for print.          Delete navigation property connectors for print.          :param print_connector_id: key: id of printConnector.         :type print_connector_id: str         :param if_match: ETag.         :type if_match: str         :keyword callable cls: A custom type or function that will be passed the direct response         :return: None, or the result of cls(response)         :rtype: None         :raises: ~azure.core.exceptions.HttpResponseError # type: ClsType[None] # Construct URL # type: ignore # Construct parameters # type: Dict[str, Any] # Construct headers # type: Dict[str, Any] # type: ignore # type: Optional[List[Union[str, "models.Enum29"]]] # type: Optional[List[Union[str, "models.Enum30"]]] # type: Optional[List[str]] # type: Any # type: (...) -> Iterable["models.CollectionOfPrintOperation"] Get operations from print.          Get operations from print.          :param orderby: Order items by property values.         :type orderby: list[str or ~devices_cloud_print.models.Enum29]         :param select: Select properties to be returned.         :type select: list[str or ~devices_cloud_print.models.Enum30]         :param expand: Expand related entities.         :type expand: list[str]         :keyword callable cls: A custom type or function that will be passed the direct response         :return: An iterator like instance of either CollectionOfPrintOperation or the result of cls(response)         :rtype: ~azure.core.paging.ItemPaged[~devices_cloud_print.models.CollectionOfPrintOperation]         :raises: ~azure.core.exceptions.HttpResponseError # type: ClsType["models.CollectionOfPrintOperation"] # Construct headers # type: Dict[str, Any] # Construct URL # type: ignore # Construct parameters # type: Dict[str, Any] # type: Dict[str, Any] # type: ignore # type: "models.MicrosoftGraphPrintOperation" # type: Any # type: (...) -> "models.MicrosoftGraphPrintOperation" Create new navigation property to operations for print.          Create new navigation property to operations for print.          :param body: New navigation property.         :type body: ~devices_cloud_print.models.MicrosoftGraphPrintOperation         :keyword callable cls: A custom type or function that will be passed the direct response         :return: MicrosoftGraphPrintOperation, or the result of cls(response)         :rtype: ~devices_cloud_print.models.MicrosoftGraphPrintOperation         :raises: ~azure.core.exceptions.HttpResponseError # type: ClsType["models.MicrosoftGraphPrintOperation"] # Construct URL # type: ignore # Construct parameters # type: Dict[str, Any] # Construct headers # type: Dict[str, Any] # type: Dict[str, Any] # type: ignore # type: str # type: Optional[List[Union[str, "models.Enum31"]]] # type: Optional[List[str]] # type: Any # type: (...) -> "models.MicrosoftGraphPrintOperation" Get operations from print.          Get operations from print.          :param print_operation_id: key: id of printOperation.         :type print_operation_id: str         :param select: Select properties to be returned.         :type select: list[str or ~devices_cloud_print.models.Enum31]         :param expand: Expand related entities.         :type expand: list[str]         :keyword callable cls: A custom type or function that will be passed the direct response         :return: MicrosoftGraphPrintOperation, or the result of cls(response)         :rtype: ~devices_cloud_print.models.MicrosoftGraphPrintOperation         :raises: ~azure.core.exceptions.HttpResponseError # type: ClsType["models.MicrosoftGraphPrintOperation"] # Construct URL # type: ignore # Construct parameters # type: Dict[str, Any] # Construct headers # type: Dict[str, Any] # type: ignore # type: str # type: "models.MicrosoftGraphPrintOperation" # type: Any # type: (...) -> None Update the navigation property operations in print.          Update the navigation property operations in print.          :param print_operation_id: key: id of printOperation.         :type print_operation_id: str         :param body: New navigation property values.         :type body: ~devices_cloud_print.models.MicrosoftGraphPrintOperation         :keyword callable cls: A custom type or function that will be passed the direct response         :return: None, or the result of cls(response)         :rtype: None         :raises: ~azure.core.exceptions.HttpResponseError # type: ClsType[None] # Construct URL # type: ignore # Construct parameters # type: Dict[str, Any] # Construct headers # type: Dict[str, Any] # type: Dict[str, Any] # type: ignore # type: str # type: Optional[str] # type: Any # type: (...) -> None Delete navigation property operations for print.          Delete navigation property operations for print.          :param print_operation_id: key: id of printOperation.         :type print_operation_id: str         :param if_match: ETag.         :type if_match: str         :keyword callable cls: A custom type or function that will be passed the direct response         :return: None, or the result of cls(response)         :rtype: None         :raises: ~azure.core.exceptions.HttpResponseError # type: ClsType[None] # Construct URL # type: ignore # Construct parameters # type: Dict[str, Any] # Construct headers # type: Dict[str, Any] # type: ignore # type: Optional[List[Union[str, "models.Enum32"]]] # type: Optional[List[Union[str, "models.Enum33"]]] # type: Optional[List[Union[str, "models.Enum34"]]] # type: Any # type: (...) -> Iterable["models.CollectionOfPrinter"] Get printers from print.          Get printers from print.          :param orderby: Order items by property values.         :type orderby: list[str or ~devices_cloud_print.models.Enum32]         :param select: Select properties to be returned.         :type select: list[str or ~devices_cloud_print.models.Enum33]         :param expand: Expand related entities.         :type expand: list[str or ~devices_cloud_print.models.Enum34]         :keyword callable cls: A custom type or function that will be passed the direct response         :return: An iterator like instance of either CollectionOfPrinter or the result of cls(response)         :rtype: ~azure.core.paging.ItemPaged[~devices_cloud_print.models.CollectionOfPrinter]         :raises: ~azure.core.exceptions.HttpResponseError # type: ClsType["models.CollectionOfPrinter"] # Construct headers # type: Dict[str, Any] # Construct URL # type: ignore # Construct parameters # type: Dict[str, Any] # type: Dict[str, Any] # type: ignore # type: "models.MicrosoftGraphPrinter" # type: Any # type: (...) -> "models.MicrosoftGraphPrinter" Create new navigation property to printers for print.          Create new navigation property to printers for print.          :param body: New navigation property.         :type body: ~devices_cloud_print.models.MicrosoftGraphPrinter         :keyword callable cls: A custom type or function that will be passed the direct response         :return: MicrosoftGraphPrinter, or the result of cls(response)         :rtype: ~devices_cloud_print.models.MicrosoftGraphPrinter         :raises: ~azure.core.exceptions.HttpResponseError # type: ClsType["models.MicrosoftGraphPrinter"] # Construct URL # type: ignore # Construct parameters # type: Dict[str, Any] # Construct headers # type: Dict[str, Any] # type: Dict[str, Any] # type: ignore # type: str # type: Optional[List[Union[str, "models.Enum35"]]] # type: Optional[List[Union[str, "models.Enum36"]]] # type: Any # type: (...) -> "models.MicrosoftGraphPrinter" Get printers from print.          Get printers from print.          :param printer_id: key: id of printer.         :type printer_id: str         :param select: Select properties to be returned.         :type select: list[str or ~devices_cloud_print.models.Enum35]         :param expand: Expand related entities.         :type expand: list[str or ~devices_cloud_print.models.Enum36]         :keyword callable cls: A custom type or function that will be passed the direct response         :return: MicrosoftGraphPrinter, or the result of cls(response)         :rtype: ~devices_cloud_print.models.MicrosoftGraphPrinter         :raises: ~azure.core.exceptions.HttpResponseError # type: ClsType["models.MicrosoftGraphPrinter"] # Construct URL # type: ignore # Construct parameters # type: Dict[str, Any] # Construct headers # type: Dict[str, Any] # type: ignore # type: str # type: "models.MicrosoftGraphPrinter" # type: Any # type: (...) -> None Update the navigation property printers in print.          Update the navigation property printers in print.          :param printer_id: key: id of printer.         :type printer_id: str         :param body: New navigation property values.         :type body: ~devices_cloud_print.models.MicrosoftGraphPrinter         :keyword callable cls: A custom type or function that will be passed the direct response         :return: None, or the result of cls(response)         :rtype: None         :raises: ~azure.core.exceptions.HttpResponseError # type: ClsType[None] # Construct URL # type: ignore # Construct parameters # type: Dict[str, Any] # Construct headers # type: Dict[str, Any] # type: Dict[str, Any] # type: ignore # type: str # type: Optional[str] # type: Any # type: (...) -> None Delete navigation property printers for print.          Delete navigation property printers for print.          :param printer_id: key: id of printer.         :type printer_id: str         :param if_match: ETag.         :type if_match: str         :keyword callable cls: A custom type or function that will be passed the direct response         :return: None, or the result of cls(response)         :rtype: None         :raises: ~azure.core.exceptions.HttpResponseError # type: ClsType[None] # Construct URL # type: ignore # Construct parameters # type: Dict[str, Any] # Construct headers # type: Dict[str, Any] # type: ignore # type: Optional[List[Union[str, "models.Enum59"]]] # type: Optional[List[Union[str, "models.Enum60"]]] # type: Optional[List[Union[str, "models.Enum61"]]] # type: Any # type: (...) -> Iterable["models.CollectionOfPrinterShare0"] Get printerShares from print.          Get printerShares from print.          :param orderby: Order items by property values.         :type orderby: list[str or ~devices_cloud_print.models.Enum59]         :param select: Select properties to be returned.         :type select: list[str or ~devices_cloud_print.models.Enum60]         :param expand: Expand related entities.         :type expand: list[str or ~devices_cloud_print.models.Enum61]         :keyword callable cls: A custom type or function that will be passed the direct response         :return: An iterator like instance of either CollectionOfPrinterShare0 or the result of cls(response)         :rtype: ~azure.core.paging.ItemPaged[~devices_cloud_print.models.CollectionOfPrinterShare0]         :raises: ~azure.core.exceptions.HttpResponseError # type: ClsType["models.CollectionOfPrinterShare0"] # Construct headers # type: Dict[str, Any] # Construct URL # type: ignore # Construct parameters # type: Dict[str, Any] # type: Dict[str, Any] # type: ignore # type: "models.MicrosoftGraphPrinterShare" # type: Any # type: (...) -> "models.MicrosoftGraphPrinterShare" Create new navigation property to printerShares for print.          Create new navigation property to printerShares for print.          :param body: New navigation property.         :type body: ~devices_cloud_print.models.MicrosoftGraphPrinterShare         :keyword callable cls: A custom type or function that will be passed the direct response         :return: MicrosoftGraphPrinterShare, or the result of cls(response)         :rtype: ~devices_cloud_print.models.MicrosoftGraphPrinterShare         :raises: ~azure.core.exceptions.HttpResponseError # type: ClsType["models.MicrosoftGraphPrinterShare"] # Construct URL # type: ignore # Construct parameters # type: Dict[str, Any] # Construct headers # type: Dict[str, Any] # type: Dict[str, Any] # type: ignore # type: str # type: Optional[List[Union[str, "models.Enum62"]]] # type: Optional[List[Union[str, "models.Enum63"]]] # type: Any # type: (...) -> "models.MicrosoftGraphPrinterShare" Get printerShares from print.          Get printerShares from print.          :param printer_share_id: key: id of printerShare.         :type printer_share_id: str         :param select: Select properties to be returned.         :type select: list[str or ~devices_cloud_print.models.Enum62]         :param expand: Expand related entities.         :type expand: list[str or ~devices_cloud_print.models.Enum63]         :keyword callable cls: A custom type or function that will be passed the direct response         :return: MicrosoftGraphPrinterShare, or the result of cls(response)         :rtype: ~devices_cloud_print.models.MicrosoftGraphPrinterShare         :raises: ~azure.core.exceptions.HttpResponseError # type: ClsType["models.MicrosoftGraphPrinterShare"] # Construct URL # type: ignore # Construct parameters # type: Dict[str, Any] # Construct headers # type: Dict[str, Any] # type: ignore # type: str # type: "models.MicrosoftGraphPrinterShare" # type: Any # type: (...) -> None Update the navigation property printerShares in print.          Update the navigation property printerShares in print.          :param printer_share_id: key: id of printerShare.         :type printer_share_id: str         :param body: New navigation property values.         :type body: ~devices_cloud_print.models.MicrosoftGraphPrinterShare         :keyword callable cls: A custom type or function that will be passed the direct response         :return: None, or the result of cls(response)         :rtype: None         :raises: ~azure.core.exceptions.HttpResponseError # type: ClsType[None] # Construct URL # type: ignore # Construct parameters # type: Dict[str, Any] # Construct headers # type: Dict[str, Any] # type: Dict[str, Any] # type: ignore # type: str # type: Optional[str] # type: Any # type: (...) -> None Delete navigation property printerShares for print.          Delete navigation property printerShares for print.          :param printer_share_id: key: id of printerShare.         :type printer_share_id: str         :param if_match: ETag.         :type if_match: str         :keyword callable cls: A custom type or function that will be passed the direct response         :return: None, or the result of cls(response)         :rtype: None         :raises: ~azure.core.exceptions.HttpResponseError # type: ClsType[None] # Construct URL # type: ignore # Construct parameters # type: Dict[str, Any] # Construct headers # type: Dict[str, Any] # type: ignore # type: Optional[List[Union[str, "models.Enum72"]]] # type: Optional[List[Union[str, "models.Enum73"]]] # type: Optional[List[Union[str, "models.Enum74"]]] # type: Any # type: (...) -> Iterable["models.CollectionOfReportRoot"] Get reports from print.          Get reports from print.          :param orderby: Order items by property values.         :type orderby: list[str or ~devices_cloud_print.models.Enum72]         :param select: Select properties to be returned.         :type select: list[str or ~devices_cloud_print.models.Enum73]         :param expand: Expand related entities.         :type expand: list[str or ~devices_cloud_print.models.Enum74]         :keyword callable cls: A custom type or function that will be passed the direct response         :return: An iterator like instance of either CollectionOfReportRoot or the result of cls(response)         :rtype: ~azure.core.paging.ItemPaged[~devices_cloud_print.models.CollectionOfReportRoot]         :raises: ~azure.core.exceptions.HttpResponseError # type: ClsType["models.CollectionOfReportRoot"] # Construct headers # type: Dict[str, Any] # Construct URL # type: ignore # Construct parameters # type: Dict[str, Any] # type: Dict[str, Any] # type: ignore # type: "models.MicrosoftGraphReportRoot" # type: Any # type: (...) -> "models.MicrosoftGraphReportRoot" Create new navigation property to reports for print.          Create new navigation property to reports for print.          :param body: New navigation property.         :type body: ~devices_cloud_print.models.MicrosoftGraphReportRoot         :keyword callable cls: A custom type or function that will be passed the direct response         :return: MicrosoftGraphReportRoot, or the result of cls(response)         :rtype: ~devices_cloud_print.models.MicrosoftGraphReportRoot         :raises: ~azure.core.exceptions.HttpResponseError # type: ClsType["models.MicrosoftGraphReportRoot"] # Construct URL # type: ignore # Construct parameters # type: Dict[str, Any] # Construct headers # type: Dict[str, Any] # type: Dict[str, Any] # type: ignore # type: str # type: Optional[List[Union[str, "models.Enum75"]]] # type: Optional[List[Union[str, "models.Enum76"]]] # type: Any # type: (...) -> "models.MicrosoftGraphReportRoot" Get reports from print.          Get reports from print.          :param report_root_id: key: id of reportRoot.         :type report_root_id: str         :param select: Select properties to be returned.         :type select: list[str or ~devices_cloud_print.models.Enum75]         :param expand: Expand related entities.         :type expand: list[str or ~devices_cloud_print.models.Enum76]         :keyword callable cls: A custom type or function that will be passed the direct response         :return: MicrosoftGraphReportRoot, or the result of cls(response)         :rtype: ~devices_cloud_print.models.MicrosoftGraphReportRoot         :raises: ~azure.core.exceptions.HttpResponseError # type: ClsType["models.MicrosoftGraphReportRoot"] # Construct URL # type: ignore # Construct parameters # type: Dict[str, Any] # Construct headers # type: Dict[str, Any] # type: ignore # type: str # type: "models.MicrosoftGraphReportRoot" # type: Any # type: (...) -> None Update the navigation property reports in print.          Update the navigation property reports in print.          :param report_root_id: key: id of reportRoot.         :type report_root_id: str         :param body: New navigation property values.         :type body: ~devices_cloud_print.models.MicrosoftGraphReportRoot         :keyword callable cls: A custom type or function that will be passed the direct response         :return: None, or the result of cls(response)         :rtype: None         :raises: ~azure.core.exceptions.HttpResponseError # type: ClsType[None] # Construct URL # type: ignore # Construct parameters # type: Dict[str, Any] # Construct headers # type: Dict[str, Any] # type: Dict[str, Any] # type: ignore # type: str # type: Optional[str] # type: Any # type: (...) -> None Delete navigation property reports for print.          Delete navigation property reports for print.          :param report_root_id: key: id of reportRoot.         :type report_root_id: str         :param if_match: ETag.         :type if_match: str         :keyword callable cls: A custom type or function that will be passed the direct response         :return: None, or the result of cls(response)         :rtype: None         :raises: ~azure.core.exceptions.HttpResponseError # type: ClsType[None] # Construct URL # type: ignore # Construct parameters # type: Dict[str, Any] # Construct headers # type: Dict[str, Any] # type: ignore # type: Optional[List[Union[str, "models.Enum77"]]] # type: Optional[List[Union[str, "models.Enum78"]]] # type: Optional[List[Union[str, "models.Enum79"]]] # type: Any # type: (...) -> Iterable["models.CollectionOfPrintService"] Get services from print.          Get services from print.          :param orderby: Order items by property values.         :type orderby: list[str or ~devices_cloud_print.models.Enum77]         :param select: Select properties to be returned.         :type select: list[str or ~devices_cloud_print.models.Enum78]         :param expand: Expand related entities.         :type expand: list[str or ~devices_cloud_print.models.Enum79]         :keyword callable cls: A custom type or function that will be passed the direct response         :return: An iterator like instance of either CollectionOfPrintService or the result of cls(response)         :rtype: ~azure.core.paging.ItemPaged[~devices_cloud_print.models.CollectionOfPrintService]         :raises: ~azure.core.exceptions.HttpResponseError # type: ClsType["models.CollectionOfPrintService"] # Construct headers # type: Dict[str, Any] # Construct URL # type: ignore # Construct parameters # type: Dict[str, Any] # type: Dict[str, Any] # type: ignore # type: "models.MicrosoftGraphPrintService" # type: Any # type: (...) -> "models.MicrosoftGraphPrintService" Create new navigation property to services for print.          Create new navigation property to services for print.          :param body: New navigation property.         :type body: ~devices_cloud_print.models.MicrosoftGraphPrintService         :keyword callable cls: A custom type or function that will be passed the direct response         :return: MicrosoftGraphPrintService, or the result of cls(response)         :rtype: ~devices_cloud_print.models.MicrosoftGraphPrintService         :raises: ~azure.core.exceptions.HttpResponseError # type: ClsType["models.MicrosoftGraphPrintService"] # Construct URL # type: ignore # Construct parameters # type: Dict[str, Any] # Construct headers # type: Dict[str, Any] # type: Dict[str, Any] # type: ignore # type: str # type: Optional[List[Union[str, "models.Enum80"]]] # type: Optional[List[Union[str, "models.Enum81"]]] # type: Any # type: (...) -> "models.MicrosoftGraphPrintService" Get services from print.          Get services from print.          :param print_service_id: key: id of printService.         :type print_service_id: str         :param select: Select properties to be returned.         :type select: list[str or ~devices_cloud_print.models.Enum80]         :param expand: Expand related entities.         :type expand: list[str or ~devices_cloud_print.models.Enum81]         :keyword callable cls: A custom type or function that will be passed the direct response         :return: MicrosoftGraphPrintService, or the result of cls(response)         :rtype: ~devices_cloud_print.models.MicrosoftGraphPrintService         :raises: ~azure.core.exceptions.HttpResponseError # type: ClsType["models.MicrosoftGraphPrintService"] # Construct URL # type: ignore # Construct parameters # type: Dict[str, Any] # Construct headers # type: Dict[str, Any] # type: ignore # type: str # type: "models.MicrosoftGraphPrintService" # type: Any # type: (...) -> None Update the navigation property services in print.          Update the navigation property services in print.          :param print_service_id: key: id of printService.         :type print_service_id: str         :param body: New navigation property values.         :type body: ~devices_cloud_print.models.MicrosoftGraphPrintService         :keyword callable cls: A custom type or function that will be passed the direct response         :return: None, or the result of cls(response)         :rtype: None         :raises: ~azure.core.exceptions.HttpResponseError # type: ClsType[None] # Construct URL # type: ignore # Construct parameters # type: Dict[str, Any] # Construct headers # type: Dict[str, Any] # type: Dict[str, Any] # type: ignore # type: str # type: Optional[str] # type: Any # type: (...) -> None Delete navigation property services for print.          Delete navigation property services for print.          :param print_service_id: key: id of printService.         :type print_service_id: str         :param if_match: ETag.         :type if_match: str         :keyword callable cls: A custom type or function that will be passed the direct response         :return: None, or the result of cls(response)         :rtype: None         :raises: ~azure.core.exceptions.HttpResponseError # type: ClsType[None] # Construct URL # type: ignore # Construct parameters # type: Dict[str, Any] # Construct headers # type: Dict[str, Any] # type: ignore # type: Optional[List[Union[str, "models.Enum85"]]] # type: Optional[List[Union[str, "models.Enum86"]]] # type: Optional[List[Union[str, "models.Enum87"]]] # type: Any # type: (...) -> Iterable["models.CollectionOfPrinterShare1"] Get shares from print.          Get shares from print.          :param orderby: Order items by property values.         :type orderby: list[str or ~devices_cloud_print.models.Enum85]         :param select: Select properties to be returned.         :type select: list[str or ~devices_cloud_print.models.Enum86]         :param expand: Expand related entities.         :type expand: list[str or ~devices_cloud_print.models.Enum87]         :keyword callable cls: A custom type or function that will be passed the direct response         :return: An iterator like instance of either CollectionOfPrinterShare1 or the result of cls(response)         :rtype: ~azure.core.paging.ItemPaged[~devices_cloud_print.models.CollectionOfPrinterShare1]         :raises: ~azure.core.exceptions.HttpResponseError # type: ClsType["models.CollectionOfPrinterShare1"] # Construct headers # type: Dict[str, Any] # Construct URL # type: ignore # Construct parameters # type: Dict[str, Any] # type: Dict[str, Any] # type: ignore # type: "models.MicrosoftGraphPrinterShare" # type: Any # type: (...) -> "models.MicrosoftGraphPrinterShare" Create new navigation property to shares for print.          Create new navigation property to shares for print.          :param body: New navigation property.         :type body: ~devices_cloud_print.models.MicrosoftGraphPrinterShare         :keyword callable cls: A custom type or function that will be passed the direct response         :return: MicrosoftGraphPrinterShare, or the result of cls(response)         :rtype: ~devices_cloud_print.models.MicrosoftGraphPrinterShare         :raises: ~azure.core.exceptions.HttpResponseError # type: ClsType["models.MicrosoftGraphPrinterShare"] # Construct URL # type: ignore # Construct parameters # type: Dict[str, Any] # Construct headers # type: Dict[str, Any] # type: Dict[str, Any] # type: ignore # type: str # type: Optional[List[Union[str, "models.Enum88"]]] # type: Optional[List[Union[str, "models.Enum89"]]] # type: Any # type: (...) -> "models.MicrosoftGraphPrinterShare" Get shares from print.          Get shares from print.          :param printer_share_id: key: id of printerShare.         :type printer_share_id: str         :param select: Select properties to be returned.         :type select: list[str or ~devices_cloud_print.models.Enum88]         :param expand: Expand related entities.         :type expand: list[str or ~devices_cloud_print.models.Enum89]         :keyword callable cls: A custom type or function that will be passed the direct response         :return: MicrosoftGraphPrinterShare, or the result of cls(response)         :rtype: ~devices_cloud_print.models.MicrosoftGraphPrinterShare         :raises: ~azure.core.exceptions.HttpResponseError # type: ClsType["models.MicrosoftGraphPrinterShare"] # Construct URL # type: ignore # Construct parameters # type: Dict[str, Any] # Construct headers # type: Dict[str, Any] # type: ignore # type: str # type: "models.MicrosoftGraphPrinterShare" # type: Any # type: (...) -> None Update the navigation property shares in print.          Update the navigation property shares in print.          :param printer_share_id: key: id of printerShare.         :type printer_share_id: str         :param body: New navigation property values.         :type body: ~devices_cloud_print.models.MicrosoftGraphPrinterShare         :keyword callable cls: A custom type or function that will be passed the direct response         :return: None, or the result of cls(response)         :rtype: None         :raises: ~azure.core.exceptions.HttpResponseError # type: ClsType[None] # Construct URL # type: ignore # Construct parameters # type: Dict[str, Any] # Construct headers # type: Dict[str, Any] # type: Dict[str, Any] # type: ignore # type: str # type: Optional[str] # type: Any # type: (...) -> None Delete navigation property shares for print.          Delete navigation property shares for print.          :param printer_share_id: key: id of printerShare.         :type printer_share_id: str         :param if_match: ETag.         :type if_match: str         :keyword callable cls: A custom type or function that will be passed the direct response         :return: None, or the result of cls(response)         :rtype: None         :raises: ~azure.core.exceptions.HttpResponseError # type: ClsType[None] # Construct URL # type: ignore # Construct parameters # type: Dict[str, Any] # Construct headers # type: Dict[str, Any] # type: ignore # type: Optional[List[Union[str, "models.Enum98"]]] # type: Optional[List[Union[str, "models.Enum99"]]] # type: Optional[List[Union[str, "models.Enum100"]]] # type: Any # type: (...) -> Iterable["models.CollectionOfPrintTaskDefinition"] Get taskDefinitions from print.          Get taskDefinitions from print.          :param orderby: Order items by property values.         :type orderby: list[str or ~devices_cloud_print.models.Enum98]         :param select: Select properties to be returned.         :type select: list[str or ~devices_cloud_print.models.Enum99]         :param expand: Expand related entities.         :type expand: list[str or ~devices_cloud_print.models.Enum100]         :keyword callable cls: A custom type or function that will be passed the direct response         :return: An iterator like instance of either CollectionOfPrintTaskDefinition or the result of cls(response)         :rtype: ~azure.core.paging.ItemPaged[~devices_cloud_print.models.CollectionOfPrintTaskDefinition]         :raises: ~azure.core.exceptions.HttpResponseError # type: ClsType["models.CollectionOfPrintTaskDefinition"] # Construct headers # type: Dict[str, Any] # Construct URL # type: ignore # Construct parameters # type: Dict[str, Any] # type: Dict[str, Any] # type: ignore # type: "models.MicrosoftGraphPrintTaskDefinition" # type: Any # type: (...) -> "models.MicrosoftGraphPrintTaskDefinition" Create new navigation property to taskDefinitions for print.          Create new navigation property to taskDefinitions for print.          :param body: New navigation property.         :type body: ~devices_cloud_print.models.MicrosoftGraphPrintTaskDefinition         :keyword callable cls: A custom type or function that will be passed the direct response         :return: MicrosoftGraphPrintTaskDefinition, or the result of cls(response)         :rtype: ~devices_cloud_print.models.MicrosoftGraphPrintTaskDefinition         :raises: ~azure.core.exceptions.HttpResponseError # type: ClsType["models.MicrosoftGraphPrintTaskDefinition"] # Construct URL # type: ignore # Construct parameters # type: Dict[str, Any] # Construct headers # type: Dict[str, Any] # type: Dict[str, Any] # type: ignore # type: str # type: Optional[List[Union[str, "models.Enum101"]]] # type: Optional[List[Union[str, "models.Enum102"]]] # type: Any # type: (...) -> "models.MicrosoftGraphPrintTaskDefinition" Get taskDefinitions from print.          Get taskDefinitions from print.          :param print_task_definition_id: key: id of printTaskDefinition.         :type print_task_definition_id: str         :param select: Select properties to be returned.         :type select: list[str or ~devices_cloud_print.models.Enum101]         :param expand: Expand related entities.         :type expand: list[str or ~devices_cloud_print.models.Enum102]         :keyword callable cls: A custom type or function that will be passed the direct response         :return: MicrosoftGraphPrintTaskDefinition, or the result of cls(response)         :rtype: ~devices_cloud_print.models.MicrosoftGraphPrintTaskDefinition         :raises: ~azure.core.exceptions.HttpResponseError # type: ClsType["models.MicrosoftGraphPrintTaskDefinition"] # Construct URL # type: ignore # Construct parameters # type: Dict[str, Any] # Construct headers # type: Dict[str, Any] # type: ignore # type: str # type: "models.MicrosoftGraphPrintTaskDefinition" # type: Any # type: (...) -> None Update the navigation property taskDefinitions in print.          Update the navigation property taskDefinitions in print.          :param print_task_definition_id: key: id of printTaskDefinition.         :type print_task_definition_id: str         :param body: New navigation property values.         :type body: ~devices_cloud_print.models.MicrosoftGraphPrintTaskDefinition         :keyword callable cls: A custom type or function that will be passed the direct response         :return: None, or the result of cls(response)         :rtype: None         :raises: ~azure.core.exceptions.HttpResponseError # type: ClsType[None] # Construct URL # type: ignore # Construct parameters # type: Dict[str, Any] # Construct headers # type: Dict[str, Any] # type: Dict[str, Any] # type: ignore # type: str # type: Optional[str] # type: Any # type: (...) -> None Delete navigation property taskDefinitions for print.          Delete navigation property taskDefinitions for print.          :param print_task_definition_id: key: id of printTaskDefinition.         :type print_task_definition_id: str         :param if_match: ETag.         :type if_match: str         :keyword callable cls: A custom type or function that will be passed the direct response         :return: None, or the result of cls(response)         :rtype: None         :raises: ~azure.core.exceptions.HttpResponseError # type: ClsType[None] # Construct URL # type: ignore # Construct parameters # type: Dict[str, Any] # Construct headers # type: Dict[str, Any] # type: ignore