# coding: utf-8 """ Univention Directory Manager REST interface Schema definition for the objects in the Univention Directory Manager REST interface. # noqa: E501 The version of the OpenAPI document: 1.0.2 Generated by: https://openapi-generator.tech """ from __future__ import absolute_import import re # noqa: F401 # python 2 and python 3 compatibility library import six from openapi_client_udm.api_client import ApiClient from openapi_client_udm.exceptions import ( # noqa: F401 ApiTypeError, ApiValueError ) class ContainerDcApi(object): """NOTE: This class is auto generated by OpenAPI Generator Ref: https://openapi-generator.tech Do not edit the class manually. """ def __init__(self, api_client=None): if api_client is None: api_client = ApiClient() self.api_client = api_client def udm_container_dc_object(self, dn, **kwargs): # noqa: E501 """ Get a representation of the Domain Container object with all its properties, policies, options, metadata and references. Includes also instructions how to modify, remove or move the object. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.udm_container_dc_object(dn, async_req=True) >>> result = thread.get() :param dn: The (urlencoded) LDAP Distinguished Name (DN). (required) :type dn: str :param user_agent: The user agent. :type user_agent: str :param accept_language: The accepted response languages. :type accept_language: str :param if_none_match: Use request from cache by using the Etag entity tag if it matches. :type if_none_match: str :param if_modified_since: Use request from cache by using the Last-Modified date if it matches. :type if_modified_since: str :param x_request_id: A request-ID used for logging and tracing. :type x_request_id: str :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: ContainerDc """ kwargs['_return_http_data_only'] = True return self.udm_container_dc_object_with_http_info(dn, **kwargs) # noqa: E501 def udm_container_dc_object_with_http_info(self, dn, **kwargs): # noqa: E501 """ Get a representation of the Domain Container object with all its properties, policies, options, metadata and references. Includes also instructions how to modify, remove or move the object. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.udm_container_dc_object_with_http_info(dn, async_req=True) >>> result = thread.get() :param dn: The (urlencoded) LDAP Distinguished Name (DN). (required) :type dn: str :param user_agent: The user agent. :type user_agent: str :param accept_language: The accepted response languages. :type accept_language: str :param if_none_match: Use request from cache by using the Etag entity tag if it matches. :type if_none_match: str :param if_modified_since: Use request from cache by using the Last-Modified date if it matches. :type if_modified_since: str :param x_request_id: A request-ID used for logging and tracing. :type x_request_id: str :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :type _content_type: string, optional: force content-type for the request :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(ContainerDc, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'dn', 'user_agent', 'accept_language', 'if_none_match', 'if_modified_since', 'x_request_id' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', '_content_type', '_headers' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method udm_container_dc_object" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'dn' is set if self.api_client.client_side_validation and ('dn' not in local_var_params or # noqa: E501 local_var_params['dn'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `dn` when calling `udm_container_dc_object`") # noqa: E501 if self.api_client.client_side_validation and ('dn' in local_var_params and # noqa: E501 len(local_var_params['dn']) < 3): # noqa: E501 raise ApiValueError("Invalid value for parameter `dn` when calling `udm_container_dc_object`, length must be greater than or equal to `3`") # noqa: E501 if self.api_client.client_side_validation and 'dn' in local_var_params and not re.search(r'^.+=.+$', local_var_params['dn']): # noqa: E501 raise ApiValueError("Invalid value for parameter `dn` when calling `udm_container_dc_object`, must conform to the pattern `/^.+=.+$/`") # noqa: E501 collection_formats = {} path_params = {} if 'dn' in local_var_params: path_params['dn'] = local_var_params['dn'] # noqa: E501 query_params = [] header_params = dict(local_var_params.get('_headers', {})) if 'user_agent' in local_var_params: header_params['User-Agent'] = local_var_params['user_agent'] # noqa: E501 if 'accept_language' in local_var_params: header_params['Accept-Language'] = local_var_params['accept_language'] # noqa: E501 if 'if_none_match' in local_var_params: header_params['If-None-Match'] = local_var_params['if_none_match'] # noqa: E501 if 'if_modified_since' in local_var_params: header_params['If-Modified-Since'] = local_var_params['if_modified_since'] # noqa: E501 if 'x_request_id' in local_var_params: header_params['X-Request-Id'] = local_var_params['x_request_id'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json', 'application/hal+json', 'text/html']) # noqa: E501 # Authentication setting auth_settings = ['basic'] # noqa: E501 response_types_map = { 400: "dict(str, object)", 401: "dict(str, object)", 403: "dict(str, object)", 422: "EmbeddedError", 500: "EmbeddedError", 503: "dict(str, object)", 502: "dict(str, object)", 504: "dict(str, object)", 200: "ContainerDc", 404: "dict(str, object)", } return self.api_client.call_api( '/container/dc/{dn}', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def udm_container_dc_object_modify(self, dn, container_dc, **kwargs): # noqa: E501 """Modify or move an Domain Container object # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.udm_container_dc_object_modify(dn, container_dc, async_req=True) >>> result = thread.get() :param dn: The (urlencoded) LDAP Distinguished Name (DN). (required) :type dn: str :param container_dc: (required) :type container_dc: ContainerDc :param if_match: Provide entity tag to make a conditional request to not overwrite any values in a race condition. :type if_match: str :param if_unmodified_since: Provide last modified time to make a conditional request to not overwrite any values in a race condition. :type if_unmodified_since: str :param user_agent: The user agent. :type user_agent: str :param accept_language: The accepted response languages. :type accept_language: str :param if_none_match: Use request from cache by using the Etag entity tag if it matches. :type if_none_match: str :param if_modified_since: Use request from cache by using the Last-Modified date if it matches. :type if_modified_since: str :param x_request_id: A request-ID used for logging and tracing. :type x_request_id: str :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: InlineResponse201 """ kwargs['_return_http_data_only'] = True return self.udm_container_dc_object_modify_with_http_info(dn, container_dc, **kwargs) # noqa: E501 def udm_container_dc_object_modify_with_http_info(self, dn, container_dc, **kwargs): # noqa: E501 """Modify or move an Domain Container object # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.udm_container_dc_object_modify_with_http_info(dn, container_dc, async_req=True) >>> result = thread.get() :param dn: The (urlencoded) LDAP Distinguished Name (DN). (required) :type dn: str :param container_dc: (required) :type container_dc: ContainerDc :param if_match: Provide entity tag to make a conditional request to not overwrite any values in a race condition. :type if_match: str :param if_unmodified_since: Provide last modified time to make a conditional request to not overwrite any values in a race condition. :type if_unmodified_since: str :param user_agent: The user agent. :type user_agent: str :param accept_language: The accepted response languages. :type accept_language: str :param if_none_match: Use request from cache by using the Etag entity tag if it matches. :type if_none_match: str :param if_modified_since: Use request from cache by using the Last-Modified date if it matches. :type if_modified_since: str :param x_request_id: A request-ID used for logging and tracing. :type x_request_id: str :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :type _content_type: string, optional: force content-type for the request :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(InlineResponse201, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'dn', 'container_dc', 'if_match', 'if_unmodified_since', 'user_agent', 'accept_language', 'if_none_match', 'if_modified_since', 'x_request_id' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', '_content_type', '_headers' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method udm_container_dc_object_modify" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'dn' is set if self.api_client.client_side_validation and ('dn' not in local_var_params or # noqa: E501 local_var_params['dn'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `dn` when calling `udm_container_dc_object_modify`") # noqa: E501 # verify the required parameter 'container_dc' is set if self.api_client.client_side_validation and ('container_dc' not in local_var_params or # noqa: E501 local_var_params['container_dc'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `container_dc` when calling `udm_container_dc_object_modify`") # noqa: E501 if self.api_client.client_side_validation and ('dn' in local_var_params and # noqa: E501 len(local_var_params['dn']) < 3): # noqa: E501 raise ApiValueError("Invalid value for parameter `dn` when calling `udm_container_dc_object_modify`, length must be greater than or equal to `3`") # noqa: E501 if self.api_client.client_side_validation and 'dn' in local_var_params and not re.search(r'^.+=.+$', local_var_params['dn']): # noqa: E501 raise ApiValueError("Invalid value for parameter `dn` when calling `udm_container_dc_object_modify`, must conform to the pattern `/^.+=.+$/`") # noqa: E501 collection_formats = {} path_params = {} if 'dn' in local_var_params: path_params['dn'] = local_var_params['dn'] # noqa: E501 query_params = [] header_params = dict(local_var_params.get('_headers', {})) if 'if_match' in local_var_params: header_params['If-Match'] = local_var_params['if_match'] # noqa: E501 if 'if_unmodified_since' in local_var_params: header_params['If-Unmodified-Since'] = local_var_params['if_unmodified_since'] # noqa: E501 if 'user_agent' in local_var_params: header_params['User-Agent'] = local_var_params['user_agent'] # noqa: E501 if 'accept_language' in local_var_params: header_params['Accept-Language'] = local_var_params['accept_language'] # noqa: E501 if 'if_none_match' in local_var_params: header_params['If-None-Match'] = local_var_params['if_none_match'] # noqa: E501 if 'if_modified_since' in local_var_params: header_params['If-Modified-Since'] = local_var_params['if_modified_since'] # noqa: E501 if 'x_request_id' in local_var_params: header_params['X-Request-Id'] = local_var_params['x_request_id'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'container_dc' in local_var_params: body_params = local_var_params['container_dc'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json', 'application/hal+json', 'text/html']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = local_var_params.get('_content_type', self.api_client.select_header_content_type( ['application/json'], 'PUT', body_params)) # noqa: E501 # Authentication setting auth_settings = ['basic'] # noqa: E501 response_types_map = { 400: "dict(str, object)", 401: "dict(str, object)", 403: "dict(str, object)", 422: "EmbeddedError", 500: "EmbeddedError", 503: "dict(str, object)", 502: "dict(str, object)", 504: "dict(str, object)", 201: "InlineResponse201", 202: "dict(str, object)", 204: None, 404: "dict(str, object)", } return self.api_client.call_api( '/container/dc/{dn}', 'PUT', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def udm_container_dc_object_search(self, **kwargs): # noqa: E501 """Search for Domain Containers objects # noqa: E501 Information about the object type and links to search for objects. The found objects are either referenced as HAL links or embedded via HAL embedded resources. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.udm_container_dc_object_search(async_req=True) >>> result = thread.get() :param filter: A LDAP filter which may contain `UDM` property names instead of `LDAP` attribute names. :type filter: str :param position: Position which is used as search base. :type position: str :param scope: The LDAP search scope (sub, base, one). :type scope: str :param query: The values to search for (propertyname and search filter value). Alternatively with `filter` a raw LDAP filter can be given. :type query: dict(str, object) :param hidden: Include hidden/system objects in the response. :type hidden: bool :param properties: The properties which should be returned, if not given all properties are returned. :type properties: list[str] :param limit: **Broken/Experimental**: How many results should be shown per page. :type limit: int :param page: **Broken/Experimental**: The search page, starting at one. :type page: int :param dir: **Broken/Experimental**: The Sort direction (ASC or DESC). :type dir: str :param by: **Broken/Experimental**: Sort the search result by the specified property. :type by: str :param user_agent: The user agent. :type user_agent: str :param accept_language: The accepted response languages. :type accept_language: str :param if_none_match: Use request from cache by using the Etag entity tag if it matches. :type if_none_match: str :param if_modified_since: Use request from cache by using the Last-Modified date if it matches. :type if_modified_since: str :param x_request_id: A request-ID used for logging and tracing. :type x_request_id: str :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: ContainerDcList """ kwargs['_return_http_data_only'] = True return self.udm_container_dc_object_search_with_http_info(**kwargs) # noqa: E501 def udm_container_dc_object_search_with_http_info(self, **kwargs): # noqa: E501 """Search for Domain Containers objects # noqa: E501 Information about the object type and links to search for objects. The found objects are either referenced as HAL links or embedded via HAL embedded resources. # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.udm_container_dc_object_search_with_http_info(async_req=True) >>> result = thread.get() :param filter: A LDAP filter which may contain `UDM` property names instead of `LDAP` attribute names. :type filter: str :param position: Position which is used as search base. :type position: str :param scope: The LDAP search scope (sub, base, one). :type scope: str :param query: The values to search for (propertyname and search filter value). Alternatively with `filter` a raw LDAP filter can be given. :type query: dict(str, object) :param hidden: Include hidden/system objects in the response. :type hidden: bool :param properties: The properties which should be returned, if not given all properties are returned. :type properties: list[str] :param limit: **Broken/Experimental**: How many results should be shown per page. :type limit: int :param page: **Broken/Experimental**: The search page, starting at one. :type page: int :param dir: **Broken/Experimental**: The Sort direction (ASC or DESC). :type dir: str :param by: **Broken/Experimental**: Sort the search result by the specified property. :type by: str :param user_agent: The user agent. :type user_agent: str :param accept_language: The accepted response languages. :type accept_language: str :param if_none_match: Use request from cache by using the Etag entity tag if it matches. :type if_none_match: str :param if_modified_since: Use request from cache by using the Last-Modified date if it matches. :type if_modified_since: str :param x_request_id: A request-ID used for logging and tracing. :type x_request_id: str :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :type _content_type: string, optional: force content-type for the request :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: tuple(ContainerDcList, status_code(int), headers(HTTPHeaderDict)) """ local_var_params = locals() all_params = [ 'filter', 'position', 'scope', 'query', 'hidden', 'properties', 'limit', 'page', 'dir', 'by', 'user_agent', 'accept_language', 'if_none_match', 'if_modified_since', 'x_request_id' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', '_content_type', '_headers' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method udm_container_dc_object_search" % key ) local_var_params[key] = val del local_var_params['kwargs'] if self.api_client.client_side_validation and 'scope' in local_var_params and not re.search(r'^(sub|one|base|base\+one)$', local_var_params['scope']): # noqa: E501 raise ApiValueError("Invalid value for parameter `scope` when calling `udm_container_dc_object_search`, must conform to the pattern `/^(sub|one|base|base\+one)$/`") # noqa: E501 if self.api_client.client_side_validation and ('properties' in local_var_params and # noqa: E501 len(local_var_params['properties']) < 0): # noqa: E501 raise ApiValueError("Invalid value for parameter `properties` when calling `udm_container_dc_object_search`, number of items must be greater than or equal to `0`") # noqa: E501 if self.api_client.client_side_validation and 'limit' in local_var_params and local_var_params['limit'] < 0: # noqa: E501 raise ApiValueError("Invalid value for parameter `limit` when calling `udm_container_dc_object_search`, must be a value greater than or equal to `0`") # noqa: E501 if self.api_client.client_side_validation and 'page' in local_var_params and local_var_params['page'] < 1: # noqa: E501 raise ApiValueError("Invalid value for parameter `page` when calling `udm_container_dc_object_search`, must be a value greater than or equal to `1`") # noqa: E501 if self.api_client.client_side_validation and 'dir' in local_var_params and not re.search(r'^(ASC|DESC)$', local_var_params['dir']): # noqa: E501 raise ApiValueError("Invalid value for parameter `dir` when calling `udm_container_dc_object_search`, must conform to the pattern `/^(ASC|DESC)$/`") # noqa: E501 collection_formats = {} path_params = {} query_params = [] if 'filter' in local_var_params and local_var_params['filter'] is not None: # noqa: E501 query_params.append(('filter', local_var_params['filter'])) # noqa: E501 if 'position' in local_var_params and local_var_params['position'] is not None: # noqa: E501 query_params.append(('position', local_var_params['position'])) # noqa: E501 if 'scope' in local_var_params and local_var_params['scope'] is not None: # noqa: E501 query_params.append(('scope', local_var_params['scope'])) # noqa: E501 if 'query' in local_var_params and local_var_params['query'] is not None: # noqa: E501 query_params.append(('query', local_var_params['query'])) # noqa: E501 if 'hidden' in local_var_params and local_var_params['hidden'] is not None: # noqa: E501 query_params.append(('hidden', local_var_params['hidden'])) # noqa: E501 if 'properties' in local_var_params and local_var_params['properties'] is not None: # noqa: E501 query_params.append(('properties', local_var_params['properties'])) # noqa: E501 collection_formats['properties'] = 'multi' # noqa: E501 if 'limit' in local_var_params and local_var_params['limit'] is not None: # noqa: E501 query_params.append(('limit', local_var_params['limit'])) # noqa: E501 if 'page' in local_var_params and local_var_params['page'] is not None: # noqa: E501 query_params.append(('page', local_var_params['page'])) # noqa: E501 if 'dir' in local_var_params and local_var_params['dir'] is not None: # noqa: E501 query_params.append(('dir', local_var_params['dir'])) # noqa: E501 if 'by' in local_var_params and local_var_params['by'] is not None: # noqa: E501 query_params.append(('by', local_var_params['by'])) # noqa: E501 header_params = dict(local_var_params.get('_headers', {})) if 'user_agent' in local_var_params: header_params['User-Agent'] = local_var_params['user_agent'] # noqa: E501 if 'accept_language' in local_var_params: header_params['Accept-Language'] = local_var_params['accept_language'] # noqa: E501 if 'if_none_match' in local_var_params: header_params['If-None-Match'] = local_var_params['if_none_match'] # noqa: E501 if 'if_modified_since' in local_var_params: header_params['If-Modified-Since'] = local_var_params['if_modified_since'] # noqa: E501 if 'x_request_id' in local_var_params: header_params['X-Request-Id'] = local_var_params['x_request_id'] # noqa: E501 form_params = [] local_var_files = {} body_params = None # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json', 'application/hal+json', 'text/html']) # noqa: E501 # Authentication setting auth_settings = ['basic'] # noqa: E501 response_types_map = { 400: "dict(str, object)", 401: "dict(str, object)", 403: "dict(str, object)", 422: "EmbeddedError", 500: "EmbeddedError", 503: "dict(str, object)", 502: "dict(str, object)", 504: "dict(str, object)", 200: "ContainerDcList", } return self.api_client.call_api( '/container/dc/', 'GET', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth')) def udm_container_dc_object_update(self, dn, container_dc, **kwargs): # noqa: E501 """Modify an Domain Container object (moving is currently not possible) # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.udm_container_dc_object_update(dn, container_dc, async_req=True) >>> result = thread.get() :param dn: The (urlencoded) LDAP Distinguished Name (DN). (required) :type dn: str :param container_dc: (required) :type container_dc: ContainerDc :param if_match: Provide entity tag to make a conditional request to not overwrite any values in a race condition. :type if_match: str :param if_unmodified_since: Provide last modified time to make a conditional request to not overwrite any values in a race condition. :type if_unmodified_since: str :param user_agent: The user agent. :type user_agent: str :param accept_language: The accepted response languages. :type accept_language: str :param if_none_match: Use request from cache by using the Etag entity tag if it matches. :type if_none_match: str :param if_modified_since: Use request from cache by using the Last-Modified date if it matches. :type if_modified_since: str :param x_request_id: A request-ID used for logging and tracing. :type x_request_id: str :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ kwargs['_return_http_data_only'] = True return self.udm_container_dc_object_update_with_http_info(dn, container_dc, **kwargs) # noqa: E501 def udm_container_dc_object_update_with_http_info(self, dn, container_dc, **kwargs): # noqa: E501 """Modify an Domain Container object (moving is currently not possible) # noqa: E501 This method makes a synchronous HTTP request by default. To make an asynchronous HTTP request, please pass async_req=True >>> thread = api.udm_container_dc_object_update_with_http_info(dn, container_dc, async_req=True) >>> result = thread.get() :param dn: The (urlencoded) LDAP Distinguished Name (DN). (required) :type dn: str :param container_dc: (required) :type container_dc: ContainerDc :param if_match: Provide entity tag to make a conditional request to not overwrite any values in a race condition. :type if_match: str :param if_unmodified_since: Provide last modified time to make a conditional request to not overwrite any values in a race condition. :type if_unmodified_since: str :param user_agent: The user agent. :type user_agent: str :param accept_language: The accepted response languages. :type accept_language: str :param if_none_match: Use request from cache by using the Etag entity tag if it matches. :type if_none_match: str :param if_modified_since: Use request from cache by using the Last-Modified date if it matches. :type if_modified_since: str :param x_request_id: A request-ID used for logging and tracing. :type x_request_id: str :param async_req: Whether to execute the request asynchronously. :type async_req: bool, optional :param _return_http_data_only: response data without head status code and headers :type _return_http_data_only: bool, optional :param _preload_content: if False, the urllib3.HTTPResponse object will be returned without reading/decoding response data. Default is True. :type _preload_content: bool, optional :param _request_timeout: timeout setting for this request. If one number provided, it will be total request timeout. It can also be a pair (tuple) of (connection, read) timeouts. :param _request_auth: set to override the auth_settings for an a single request; this effectively ignores the authentication in the spec for a single request. :type _request_auth: dict, optional :type _content_type: string, optional: force content-type for the request :return: Returns the result object. If the method is called asynchronously, returns the request thread. :rtype: None """ local_var_params = locals() all_params = [ 'dn', 'container_dc', 'if_match', 'if_unmodified_since', 'user_agent', 'accept_language', 'if_none_match', 'if_modified_since', 'x_request_id' ] all_params.extend( [ 'async_req', '_return_http_data_only', '_preload_content', '_request_timeout', '_request_auth', '_content_type', '_headers' ] ) for key, val in six.iteritems(local_var_params['kwargs']): if key not in all_params: raise ApiTypeError( "Got an unexpected keyword argument '%s'" " to method udm_container_dc_object_update" % key ) local_var_params[key] = val del local_var_params['kwargs'] # verify the required parameter 'dn' is set if self.api_client.client_side_validation and ('dn' not in local_var_params or # noqa: E501 local_var_params['dn'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `dn` when calling `udm_container_dc_object_update`") # noqa: E501 # verify the required parameter 'container_dc' is set if self.api_client.client_side_validation and ('container_dc' not in local_var_params or # noqa: E501 local_var_params['container_dc'] is None): # noqa: E501 raise ApiValueError("Missing the required parameter `container_dc` when calling `udm_container_dc_object_update`") # noqa: E501 if self.api_client.client_side_validation and ('dn' in local_var_params and # noqa: E501 len(local_var_params['dn']) < 3): # noqa: E501 raise ApiValueError("Invalid value for parameter `dn` when calling `udm_container_dc_object_update`, length must be greater than or equal to `3`") # noqa: E501 if self.api_client.client_side_validation and 'dn' in local_var_params and not re.search(r'^.+=.+$', local_var_params['dn']): # noqa: E501 raise ApiValueError("Invalid value for parameter `dn` when calling `udm_container_dc_object_update`, must conform to the pattern `/^.+=.+$/`") # noqa: E501 collection_formats = {} path_params = {} if 'dn' in local_var_params: path_params['dn'] = local_var_params['dn'] # noqa: E501 query_params = [] header_params = dict(local_var_params.get('_headers', {})) if 'if_match' in local_var_params: header_params['If-Match'] = local_var_params['if_match'] # noqa: E501 if 'if_unmodified_since' in local_var_params: header_params['If-Unmodified-Since'] = local_var_params['if_unmodified_since'] # noqa: E501 if 'user_agent' in local_var_params: header_params['User-Agent'] = local_var_params['user_agent'] # noqa: E501 if 'accept_language' in local_var_params: header_params['Accept-Language'] = local_var_params['accept_language'] # noqa: E501 if 'if_none_match' in local_var_params: header_params['If-None-Match'] = local_var_params['if_none_match'] # noqa: E501 if 'if_modified_since' in local_var_params: header_params['If-Modified-Since'] = local_var_params['if_modified_since'] # noqa: E501 if 'x_request_id' in local_var_params: header_params['X-Request-Id'] = local_var_params['x_request_id'] # noqa: E501 form_params = [] local_var_files = {} body_params = None if 'container_dc' in local_var_params: body_params = local_var_params['container_dc'] # HTTP header `Accept` header_params['Accept'] = self.api_client.select_header_accept( ['application/json', 'application/hal+json', 'text/html']) # noqa: E501 # HTTP header `Content-Type` header_params['Content-Type'] = local_var_params.get('_content_type', self.api_client.select_header_content_type( ['application/json'], 'PATCH', body_params)) # noqa: E501 # Authentication setting auth_settings = ['basic'] # noqa: E501 response_types_map = {} return self.api_client.call_api( '/container/dc/{dn}', 'PATCH', path_params, query_params, header_params, body=body_params, post_params=form_params, files=local_var_files, response_types_map=response_types_map, auth_settings=auth_settings, async_req=local_var_params.get('async_req'), _return_http_data_only=local_var_params.get('_return_http_data_only'), # noqa: E501 _preload_content=local_var_params.get('_preload_content', True), _request_timeout=local_var_params.get('_request_timeout'), collection_formats=collection_formats, _request_auth=local_var_params.get('_request_auth'))