# coding: utf-8
# Copyright (c) 2016, 2018, Oracle and/or its affiliates. All rights reserved.

from __future__ import absolute_import

import requests  # noqa: F401
import six

from .. import retry  # noqa: F401
from ..base_client import BaseClient
from ..config import get_config_value_or_default, validate_config
from ..signer import Signer
from ..util import Sentinel
from .models import file_storage_type_mapping
missing = Sentinel("Missing")


class FileStorageClient(object):

    def __init__(self, config, **kwargs):
        validate_config(config, signer=kwargs.get('signer'))
        if 'signer' in kwargs:
            signer = kwargs['signer']
        else:
            signer = Signer(
                tenancy=config["tenancy"],
                user=config["user"],
                fingerprint=config["fingerprint"],
                private_key_file_location=config.get("key_file"),
                pass_phrase=get_config_value_or_default(config, "pass_phrase"),
                private_key_content=config.get("key_content")
            )
        self.base_client = BaseClient("file_storage", config, signer, file_storage_type_mapping)

    def create_export(self, create_export_details, **kwargs):
        """
        CreateExport
        Creates a new export in the specified export set, path, and
        file system.


        :param CreateExportDetails create_export_details: (required)
            Details for creating a new export.

        :param str opc_retry_token: (optional)
            A token that uniquely identifies a request so it can be retried in case of a timeout or
            server error without risk of executing that same action again. Retry tokens expire after 24
            hours, but can be invalidated before then due to conflicting operations. For example, if a resource
            has been deleted and purged from the system, then a retry of the original creation request
            might be rejected.

        :return: A :class:`~oraclebmc.response.Response` object with data of type :class:`~oraclebmc.file_storage.models.Export`
        :rtype: :class:`~oraclebmc.response.Response`
        """
        resource_path = "/exports"
        method = "POST"

        # Don't accept unknown kwargs
        expected_kwargs = [
            "retry_strategy",
            "opc_retry_token"
        ]
        extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs]
        if extra_kwargs:
            raise ValueError(
                "create_export got unknown kwargs: {!r}".format(extra_kwargs))

        header_params = {
            "accept": "application/json",
            "content-type": "application/json",
            "opc-retry-token": kwargs.get("opc_retry_token", missing)
        }
        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing}

        if kwargs.get('retry_strategy'):
            if not isinstance(kwargs['retry_strategy'], retry.NoneRetryStrategy):
                self.base_client.add_opc_retry_token_if_needed(header_params)
            return kwargs['retry_strategy'].make_retrying_call(
                self.base_client.call_api,
                resource_path=resource_path,
                method=method,
                header_params=header_params,
                body=create_export_details,
                response_type="Export")
        else:
            return self.base_client.call_api(
                resource_path=resource_path,
                method=method,
                header_params=header_params,
                body=create_export_details,
                response_type="Export")

    def create_file_system(self, create_file_system_details, **kwargs):
        """
        CreateFileSystem
        Creates a new file system in the specified compartment and
        availability domain. Instances can mount file systems in
        another availability domain, but doing so might increase
        latency when compared to mounting instances in the same
        availability domain.

        After you create a file system, you can associate it with a mount
        target. Instances can then mount the file system by connecting to the
        mount target's IP address. You can associate a file system with
        more than one mount target at a time.

        For information about access control and compartments, see
        `Overview of the IAM Service`__.

        For information about availability domains, see `Regions and
        Availability Domains`__.
        To get a list of availability domains, use the
        `ListAvailabilityDomains` operation in the Identity and Access
        Management Service API.

        All Oracle Cloud Infrastructure resources, including
        file systems, get an Oracle-assigned, unique ID called an Oracle
        Cloud Identifier (OCID).  When you create a resource, you can
        find its OCID in the response. You can also retrieve a
        resource's OCID by using a List API operation on that resource
        type or by viewing the resource in the Console.

        __ https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm
        __ https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/regions.htm


        :param CreateFileSystemDetails create_file_system_details: (required)
            Details for creating a new file system.

        :param str opc_retry_token: (optional)
            A token that uniquely identifies a request so it can be retried in case of a timeout or
            server error without risk of executing that same action again. Retry tokens expire after 24
            hours, but can be invalidated before then due to conflicting operations. For example, if a resource
            has been deleted and purged from the system, then a retry of the original creation request
            might be rejected.

        :return: A :class:`~oraclebmc.response.Response` object with data of type :class:`~oraclebmc.file_storage.models.FileSystem`
        :rtype: :class:`~oraclebmc.response.Response`
        """
        resource_path = "/fileSystems"
        method = "POST"

        # Don't accept unknown kwargs
        expected_kwargs = [
            "retry_strategy",
            "opc_retry_token"
        ]
        extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs]
        if extra_kwargs:
            raise ValueError(
                "create_file_system got unknown kwargs: {!r}".format(extra_kwargs))

        header_params = {
            "accept": "application/json",
            "content-type": "application/json",
            "opc-retry-token": kwargs.get("opc_retry_token", missing)
        }
        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing}

        if kwargs.get('retry_strategy'):
            if not isinstance(kwargs['retry_strategy'], retry.NoneRetryStrategy):
                self.base_client.add_opc_retry_token_if_needed(header_params)
            return kwargs['retry_strategy'].make_retrying_call(
                self.base_client.call_api,
                resource_path=resource_path,
                method=method,
                header_params=header_params,
                body=create_file_system_details,
                response_type="FileSystem")
        else:
            return self.base_client.call_api(
                resource_path=resource_path,
                method=method,
                header_params=header_params,
                body=create_file_system_details,
                response_type="FileSystem")

    def create_mount_target(self, create_mount_target_details, **kwargs):
        """
        CreateMountTarget
        Creates a new mount target in the specified compartment and
        subnet. You can associate a file system with a mount
        target only when they exist in the same availability domain. Instances
        can connect to mount targets in another availablity domain, but
        you might see higher latency than with instances in the same
        availability domain as the mount target.

        Mount targets have one or more private IP addresses that you can
        provide as the host portion of remote target parameters in
        client mount commands. These private IP addresses are listed
        in the privateIpIds property of the mount target and are highly available. Mount
        targets also consume additional IP addresses in their subnet.

        For information about access control and compartments, see
        `Overview of the IAM
        Service`__.

        For information about availability domains, see `Regions and
        Availability Domains`__.
        To get a list of availability domains, use the
        `ListAvailabilityDomains` operation in the Identity and Access
        Management Service API.

        All Oracle Cloud Infrastructure Services resources, including
        mount targets, get an Oracle-assigned, unique ID called an
        Oracle Cloud Identifier (OCID).  When you create a resource,
        you can find its OCID in the response. You can also retrieve a
        resource's OCID by using a List API operation on that resource
        type, or by viewing the resource in the Console.

        __ https://docs.us-phoenix-1.oraclecloud.com/Content/Identity/Concepts/overview.htm
        __ https://docs.us-phoenix-1.oraclecloud.com/Content/General/Concepts/regions.htm


        :param CreateMountTargetDetails create_mount_target_details: (required)
            Details for creating a new mount target.

        :param str opc_retry_token: (optional)
            A token that uniquely identifies a request so it can be retried in case of a timeout or
            server error without risk of executing that same action again. Retry tokens expire after 24
            hours, but can be invalidated before then due to conflicting operations. For example, if a resource
            has been deleted and purged from the system, then a retry of the original creation request
            might be rejected.

        :return: A :class:`~oraclebmc.response.Response` object with data of type :class:`~oraclebmc.file_storage.models.MountTarget`
        :rtype: :class:`~oraclebmc.response.Response`
        """
        resource_path = "/mountTargets"
        method = "POST"

        # Don't accept unknown kwargs
        expected_kwargs = [
            "retry_strategy",
            "opc_retry_token"
        ]
        extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs]
        if extra_kwargs:
            raise ValueError(
                "create_mount_target got unknown kwargs: {!r}".format(extra_kwargs))

        header_params = {
            "accept": "application/json",
            "content-type": "application/json",
            "opc-retry-token": kwargs.get("opc_retry_token", missing)
        }
        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing}

        if kwargs.get('retry_strategy'):
            if not isinstance(kwargs['retry_strategy'], retry.NoneRetryStrategy):
                self.base_client.add_opc_retry_token_if_needed(header_params)
            return kwargs['retry_strategy'].make_retrying_call(
                self.base_client.call_api,
                resource_path=resource_path,
                method=method,
                header_params=header_params,
                body=create_mount_target_details,
                response_type="MountTarget")
        else:
            return self.base_client.call_api(
                resource_path=resource_path,
                method=method,
                header_params=header_params,
                body=create_mount_target_details,
                response_type="MountTarget")

    def create_snapshot(self, create_snapshot_details, **kwargs):
        """
        CreateSnapshot
        Creates a new snapshot of the specified file system. You
        can access the snapshot at `.snapshot/<name>`.


        :param CreateSnapshotDetails create_snapshot_details: (required)
            Details for creating a new snapshot.

        :param str opc_retry_token: (optional)
            A token that uniquely identifies a request so it can be retried in case of a timeout or
            server error without risk of executing that same action again. Retry tokens expire after 24
            hours, but can be invalidated before then due to conflicting operations. For example, if a resource
            has been deleted and purged from the system, then a retry of the original creation request
            might be rejected.

        :return: A :class:`~oraclebmc.response.Response` object with data of type :class:`~oraclebmc.file_storage.models.Snapshot`
        :rtype: :class:`~oraclebmc.response.Response`
        """
        resource_path = "/snapshots"
        method = "POST"

        # Don't accept unknown kwargs
        expected_kwargs = [
            "retry_strategy",
            "opc_retry_token"
        ]
        extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs]
        if extra_kwargs:
            raise ValueError(
                "create_snapshot got unknown kwargs: {!r}".format(extra_kwargs))

        header_params = {
            "accept": "application/json",
            "content-type": "application/json",
            "opc-retry-token": kwargs.get("opc_retry_token", missing)
        }
        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing}

        if kwargs.get('retry_strategy'):
            if not isinstance(kwargs['retry_strategy'], retry.NoneRetryStrategy):
                self.base_client.add_opc_retry_token_if_needed(header_params)
            return kwargs['retry_strategy'].make_retrying_call(
                self.base_client.call_api,
                resource_path=resource_path,
                method=method,
                header_params=header_params,
                body=create_snapshot_details,
                response_type="Snapshot")
        else:
            return self.base_client.call_api(
                resource_path=resource_path,
                method=method,
                header_params=header_params,
                body=create_snapshot_details,
                response_type="Snapshot")

    def delete_export(self, export_id, **kwargs):
        """
        DeleteExport
        Deletes the specified export.


        :param str export_id: (required)
            The OCID of the export.

        :param str if_match: (optional)
            For optimistic concurrency control. In the PUT or DELETE call
            for a resource, set the `if-match` parameter to the value of the
            etag from a previous GET or POST response for that resource.
            The resource will be updated or deleted only if the etag you
            provide matches the resource's current etag value.

        :return: A :class:`~oraclebmc.response.Response` object with data of type None
        :rtype: :class:`~oraclebmc.response.Response`
        """
        resource_path = "/exports/{exportId}"
        method = "DELETE"

        # Don't accept unknown kwargs
        expected_kwargs = [
            "retry_strategy",
            "if_match"
        ]
        extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs]
        if extra_kwargs:
            raise ValueError(
                "delete_export got unknown kwargs: {!r}".format(extra_kwargs))

        path_params = {
            "exportId": export_id
        }

        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}

        for (k, v) in six.iteritems(path_params):
            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))

        header_params = {
            "accept": "application/json",
            "content-type": "application/json",
            "if-match": kwargs.get("if_match", missing)
        }
        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing}

        if kwargs.get('retry_strategy'):
            return kwargs['retry_strategy'].make_retrying_call(
                self.base_client.call_api,
                resource_path=resource_path,
                method=method,
                path_params=path_params,
                header_params=header_params)
        else:
            return self.base_client.call_api(
                resource_path=resource_path,
                method=method,
                path_params=path_params,
                header_params=header_params)

    def delete_file_system(self, file_system_id, **kwargs):
        """
        DeleteFileSystem
        Deletes the specified file system. Before you delete the file system,
        verify that no remaining export resources still reference it. Deleting a
        file system also deletes all of its snapshots.


        :param str file_system_id: (required)
            The OCID of the file system.

        :param str if_match: (optional)
            For optimistic concurrency control. In the PUT or DELETE call
            for a resource, set the `if-match` parameter to the value of the
            etag from a previous GET or POST response for that resource.
            The resource will be updated or deleted only if the etag you
            provide matches the resource's current etag value.

        :return: A :class:`~oraclebmc.response.Response` object with data of type None
        :rtype: :class:`~oraclebmc.response.Response`
        """
        resource_path = "/fileSystems/{fileSystemId}"
        method = "DELETE"

        # Don't accept unknown kwargs
        expected_kwargs = [
            "retry_strategy",
            "if_match"
        ]
        extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs]
        if extra_kwargs:
            raise ValueError(
                "delete_file_system got unknown kwargs: {!r}".format(extra_kwargs))

        path_params = {
            "fileSystemId": file_system_id
        }

        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}

        for (k, v) in six.iteritems(path_params):
            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))

        header_params = {
            "accept": "application/json",
            "content-type": "application/json",
            "if-match": kwargs.get("if_match", missing)
        }
        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing}

        if kwargs.get('retry_strategy'):
            return kwargs['retry_strategy'].make_retrying_call(
                self.base_client.call_api,
                resource_path=resource_path,
                method=method,
                path_params=path_params,
                header_params=header_params)
        else:
            return self.base_client.call_api(
                resource_path=resource_path,
                method=method,
                path_params=path_params,
                header_params=header_params)

    def delete_mount_target(self, mount_target_id, **kwargs):
        """
        DeleteMountTarget
        Deletes the specified mount target. This operation also deletes the
        mount target's VNICs.


        :param str mount_target_id: (required)
            The OCID of the mount target.

        :param str if_match: (optional)
            For optimistic concurrency control. In the PUT or DELETE call
            for a resource, set the `if-match` parameter to the value of the
            etag from a previous GET or POST response for that resource.
            The resource will be updated or deleted only if the etag you
            provide matches the resource's current etag value.

        :return: A :class:`~oraclebmc.response.Response` object with data of type None
        :rtype: :class:`~oraclebmc.response.Response`
        """
        resource_path = "/mountTargets/{mountTargetId}"
        method = "DELETE"

        # Don't accept unknown kwargs
        expected_kwargs = [
            "retry_strategy",
            "if_match"
        ]
        extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs]
        if extra_kwargs:
            raise ValueError(
                "delete_mount_target got unknown kwargs: {!r}".format(extra_kwargs))

        path_params = {
            "mountTargetId": mount_target_id
        }

        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}

        for (k, v) in six.iteritems(path_params):
            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))

        header_params = {
            "accept": "application/json",
            "content-type": "application/json",
            "if-match": kwargs.get("if_match", missing)
        }
        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing}

        if kwargs.get('retry_strategy'):
            return kwargs['retry_strategy'].make_retrying_call(
                self.base_client.call_api,
                resource_path=resource_path,
                method=method,
                path_params=path_params,
                header_params=header_params)
        else:
            return self.base_client.call_api(
                resource_path=resource_path,
                method=method,
                path_params=path_params,
                header_params=header_params)

    def delete_snapshot(self, snapshot_id, **kwargs):
        """
        DeleteSnapshot
        Deletes the specified snapshot.


        :param str snapshot_id: (required)
            The OCID of the snapshot.

        :param str if_match: (optional)
            For optimistic concurrency control. In the PUT or DELETE call
            for a resource, set the `if-match` parameter to the value of the
            etag from a previous GET or POST response for that resource.
            The resource will be updated or deleted only if the etag you
            provide matches the resource's current etag value.

        :return: A :class:`~oraclebmc.response.Response` object with data of type None
        :rtype: :class:`~oraclebmc.response.Response`
        """
        resource_path = "/snapshots/{snapshotId}"
        method = "DELETE"

        # Don't accept unknown kwargs
        expected_kwargs = [
            "retry_strategy",
            "if_match"
        ]
        extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs]
        if extra_kwargs:
            raise ValueError(
                "delete_snapshot got unknown kwargs: {!r}".format(extra_kwargs))

        path_params = {
            "snapshotId": snapshot_id
        }

        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}

        for (k, v) in six.iteritems(path_params):
            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))

        header_params = {
            "accept": "application/json",
            "content-type": "application/json",
            "if-match": kwargs.get("if_match", missing)
        }
        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing}

        if kwargs.get('retry_strategy'):
            return kwargs['retry_strategy'].make_retrying_call(
                self.base_client.call_api,
                resource_path=resource_path,
                method=method,
                path_params=path_params,
                header_params=header_params)
        else:
            return self.base_client.call_api(
                resource_path=resource_path,
                method=method,
                path_params=path_params,
                header_params=header_params)

    def get_export(self, export_id, **kwargs):
        """
        GetExport
        Gets the specified export's information.


        :param str export_id: (required)
            The OCID of the export.

        :return: A :class:`~oraclebmc.response.Response` object with data of type :class:`~oraclebmc.file_storage.models.Export`
        :rtype: :class:`~oraclebmc.response.Response`
        """
        resource_path = "/exports/{exportId}"
        method = "GET"

        expected_kwargs = ["retry_strategy"]
        extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs]
        if extra_kwargs:
            raise ValueError(
                "get_export got unknown kwargs: {!r}".format(extra_kwargs))

        path_params = {
            "exportId": export_id
        }

        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}

        for (k, v) in six.iteritems(path_params):
            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))

        header_params = {
            "accept": "application/json",
            "content-type": "application/json"
        }

        if kwargs.get('retry_strategy'):
            return kwargs['retry_strategy'].make_retrying_call(
                self.base_client.call_api,
                resource_path=resource_path,
                method=method,
                path_params=path_params,
                header_params=header_params,
                response_type="Export")
        else:
            return self.base_client.call_api(
                resource_path=resource_path,
                method=method,
                path_params=path_params,
                header_params=header_params,
                response_type="Export")

    def get_export_set(self, export_set_id, **kwargs):
        """
        GetExportSet
        Gets the specified export set's information.


        :param str export_set_id: (required)
            The OCID of the export set.

        :return: A :class:`~oraclebmc.response.Response` object with data of type :class:`~oraclebmc.file_storage.models.ExportSet`
        :rtype: :class:`~oraclebmc.response.Response`
        """
        resource_path = "/exportSets/{exportSetId}"
        method = "GET"

        expected_kwargs = ["retry_strategy"]
        extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs]
        if extra_kwargs:
            raise ValueError(
                "get_export_set got unknown kwargs: {!r}".format(extra_kwargs))

        path_params = {
            "exportSetId": export_set_id
        }

        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}

        for (k, v) in six.iteritems(path_params):
            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))

        header_params = {
            "accept": "application/json",
            "content-type": "application/json"
        }

        if kwargs.get('retry_strategy'):
            return kwargs['retry_strategy'].make_retrying_call(
                self.base_client.call_api,
                resource_path=resource_path,
                method=method,
                path_params=path_params,
                header_params=header_params,
                response_type="ExportSet")
        else:
            return self.base_client.call_api(
                resource_path=resource_path,
                method=method,
                path_params=path_params,
                header_params=header_params,
                response_type="ExportSet")

    def get_file_system(self, file_system_id, **kwargs):
        """
        GetFileSystem
        Gets the specified file system's information.


        :param str file_system_id: (required)
            The OCID of the file system.

        :return: A :class:`~oraclebmc.response.Response` object with data of type :class:`~oraclebmc.file_storage.models.FileSystem`
        :rtype: :class:`~oraclebmc.response.Response`
        """
        resource_path = "/fileSystems/{fileSystemId}"
        method = "GET"

        expected_kwargs = ["retry_strategy"]
        extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs]
        if extra_kwargs:
            raise ValueError(
                "get_file_system got unknown kwargs: {!r}".format(extra_kwargs))

        path_params = {
            "fileSystemId": file_system_id
        }

        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}

        for (k, v) in six.iteritems(path_params):
            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))

        header_params = {
            "accept": "application/json",
            "content-type": "application/json"
        }

        if kwargs.get('retry_strategy'):
            return kwargs['retry_strategy'].make_retrying_call(
                self.base_client.call_api,
                resource_path=resource_path,
                method=method,
                path_params=path_params,
                header_params=header_params,
                response_type="FileSystem")
        else:
            return self.base_client.call_api(
                resource_path=resource_path,
                method=method,
                path_params=path_params,
                header_params=header_params,
                response_type="FileSystem")

    def get_mount_target(self, mount_target_id, **kwargs):
        """
        GetMountTarget
        Gets the specified mount target's information.


        :param str mount_target_id: (required)
            The OCID of the mount target.

        :return: A :class:`~oraclebmc.response.Response` object with data of type :class:`~oraclebmc.file_storage.models.MountTarget`
        :rtype: :class:`~oraclebmc.response.Response`
        """
        resource_path = "/mountTargets/{mountTargetId}"
        method = "GET"

        expected_kwargs = ["retry_strategy"]
        extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs]
        if extra_kwargs:
            raise ValueError(
                "get_mount_target got unknown kwargs: {!r}".format(extra_kwargs))

        path_params = {
            "mountTargetId": mount_target_id
        }

        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}

        for (k, v) in six.iteritems(path_params):
            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))

        header_params = {
            "accept": "application/json",
            "content-type": "application/json"
        }

        if kwargs.get('retry_strategy'):
            return kwargs['retry_strategy'].make_retrying_call(
                self.base_client.call_api,
                resource_path=resource_path,
                method=method,
                path_params=path_params,
                header_params=header_params,
                response_type="MountTarget")
        else:
            return self.base_client.call_api(
                resource_path=resource_path,
                method=method,
                path_params=path_params,
                header_params=header_params,
                response_type="MountTarget")

    def get_snapshot(self, snapshot_id, **kwargs):
        """
        GetSnapshot
        Gets the specified snapshot's information.


        :param str snapshot_id: (required)
            The OCID of the snapshot.

        :return: A :class:`~oraclebmc.response.Response` object with data of type :class:`~oraclebmc.file_storage.models.Snapshot`
        :rtype: :class:`~oraclebmc.response.Response`
        """
        resource_path = "/snapshots/{snapshotId}"
        method = "GET"

        expected_kwargs = ["retry_strategy"]
        extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs]
        if extra_kwargs:
            raise ValueError(
                "get_snapshot got unknown kwargs: {!r}".format(extra_kwargs))

        path_params = {
            "snapshotId": snapshot_id
        }

        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}

        for (k, v) in six.iteritems(path_params):
            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))

        header_params = {
            "accept": "application/json",
            "content-type": "application/json"
        }

        if kwargs.get('retry_strategy'):
            return kwargs['retry_strategy'].make_retrying_call(
                self.base_client.call_api,
                resource_path=resource_path,
                method=method,
                path_params=path_params,
                header_params=header_params,
                response_type="Snapshot")
        else:
            return self.base_client.call_api(
                resource_path=resource_path,
                method=method,
                path_params=path_params,
                header_params=header_params,
                response_type="Snapshot")

    def list_export_sets(self, compartment_id, availability_domain, **kwargs):
        """
        ListExportSets
        Lists the export set resources in the specified compartment.


        :param str compartment_id: (required)
            The OCID of the compartment.

        :param str availability_domain: (required)
            The name of the availability domain.

            Example: `Uocm:PHX-AD-1`

        :param int limit: (optional)
            The maximum number of items to return in a paginated \"List\" call.

            Example: `500`

        :param str page: (optional)
            The value of the `opc-next-page` response header from the previous \"List\" call.

        :param str display_name: (optional)
            A user-friendly name. It does not have to be unique, and it is changeable.

            Example: `My resource`

        :param str lifecycle_state: (optional)
            Filter results by the specified lifecycle state. Must be a valid
            state for the resource type.

            Allowed values are: "CREATING", "ACTIVE", "DELETING", "DELETED", "FAILED"

        :param str id: (optional)
            Filter results by OCID. Must be an OCID of the correct type for
            the resouce type.

        :param str sort_by: (optional)
            The field to sort by. You can provide either value, but not both.
            By default, when you sort by time created, results are shown
            in descending order. When you sort by display name, results are
            shown in ascending order.

            Allowed values are: "TIMECREATED", "DISPLAYNAME"

        :param str sort_order: (optional)
            The sort order to use, either 'asc' or 'desc', where 'asc' is
            ascending and 'desc' is descending.

            Allowed values are: "ASC", "DESC"

        :return: A :class:`~oraclebmc.response.Response` object with data of type list of :class:`~oraclebmc.file_storage.models.ExportSetSummary`
        :rtype: :class:`~oraclebmc.response.Response`
        """
        resource_path = "/exportSets"
        method = "GET"

        # Don't accept unknown kwargs
        expected_kwargs = [
            "retry_strategy",
            "limit",
            "page",
            "display_name",
            "lifecycle_state",
            "id",
            "sort_by",
            "sort_order"
        ]
        extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs]
        if extra_kwargs:
            raise ValueError(
                "list_export_sets got unknown kwargs: {!r}".format(extra_kwargs))

        if 'lifecycle_state' in kwargs:
            lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "DELETING", "DELETED", "FAILED"]
            if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values:
                raise ValueError(
                    "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values)
                )

        if 'sort_by' in kwargs:
            sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"]
            if kwargs['sort_by'] not in sort_by_allowed_values:
                raise ValueError(
                    "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values)
                )

        if 'sort_order' in kwargs:
            sort_order_allowed_values = ["ASC", "DESC"]
            if kwargs['sort_order'] not in sort_order_allowed_values:
                raise ValueError(
                    "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values)
                )

        query_params = {
            "compartmentId": compartment_id,
            "availabilityDomain": availability_domain,
            "limit": kwargs.get("limit", missing),
            "page": kwargs.get("page", missing),
            "displayName": kwargs.get("display_name", missing),
            "lifecycleState": kwargs.get("lifecycle_state", missing),
            "id": kwargs.get("id", missing),
            "sortBy": kwargs.get("sort_by", missing),
            "sortOrder": kwargs.get("sort_order", missing)
        }
        query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing}

        header_params = {
            "accept": "application/json",
            "content-type": "application/json"
        }

        if kwargs.get('retry_strategy'):
            return kwargs['retry_strategy'].make_retrying_call(
                self.base_client.call_api,
                resource_path=resource_path,
                method=method,
                query_params=query_params,
                header_params=header_params,
                response_type="list[ExportSetSummary]")
        else:
            return self.base_client.call_api(
                resource_path=resource_path,
                method=method,
                query_params=query_params,
                header_params=header_params,
                response_type="list[ExportSetSummary]")

    def list_exports(self, compartment_id, **kwargs):
        """
        ListExports
        Lists the export resources in the specified compartment. You must
        also specify an export set, a file system, or both.


        :param str compartment_id: (required)
            The OCID of the compartment.

        :param int limit: (optional)
            The maximum number of items to return in a paginated \"List\" call.

            Example: `500`

        :param str page: (optional)
            The value of the `opc-next-page` response header from the previous \"List\" call.

        :param str export_set_id: (optional)
            The OCID of the export set.

        :param str file_system_id: (optional)
            The OCID of the file system.

        :param str lifecycle_state: (optional)
            Filter results by the specified lifecycle state. Must be a valid
            state for the resource type.

            Allowed values are: "CREATING", "ACTIVE", "DELETING", "DELETED", "FAILED"

        :param str id: (optional)
            Filter results by OCID. Must be an OCID of the correct type for
            the resouce type.

        :param str sort_by: (optional)
            The field to sort by. You can provide either value, but not both.
            By default, when you sort by time created, results are shown
            in descending order. When you sort by path, results are
            shown in ascending alphanumeric order.

            Allowed values are: "TIMECREATED", "PATH"

        :param str sort_order: (optional)
            The sort order to use, either 'asc' or 'desc', where 'asc' is
            ascending and 'desc' is descending.

            Allowed values are: "ASC", "DESC"

        :return: A :class:`~oraclebmc.response.Response` object with data of type list of :class:`~oraclebmc.file_storage.models.ExportSummary`
        :rtype: :class:`~oraclebmc.response.Response`
        """
        resource_path = "/exports"
        method = "GET"

        # Don't accept unknown kwargs
        expected_kwargs = [
            "retry_strategy",
            "limit",
            "page",
            "export_set_id",
            "file_system_id",
            "lifecycle_state",
            "id",
            "sort_by",
            "sort_order"
        ]
        extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs]
        if extra_kwargs:
            raise ValueError(
                "list_exports got unknown kwargs: {!r}".format(extra_kwargs))

        if 'lifecycle_state' in kwargs:
            lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "DELETING", "DELETED", "FAILED"]
            if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values:
                raise ValueError(
                    "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values)
                )

        if 'sort_by' in kwargs:
            sort_by_allowed_values = ["TIMECREATED", "PATH"]
            if kwargs['sort_by'] not in sort_by_allowed_values:
                raise ValueError(
                    "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values)
                )

        if 'sort_order' in kwargs:
            sort_order_allowed_values = ["ASC", "DESC"]
            if kwargs['sort_order'] not in sort_order_allowed_values:
                raise ValueError(
                    "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values)
                )

        query_params = {
            "compartmentId": compartment_id,
            "limit": kwargs.get("limit", missing),
            "page": kwargs.get("page", missing),
            "exportSetId": kwargs.get("export_set_id", missing),
            "fileSystemId": kwargs.get("file_system_id", missing),
            "lifecycleState": kwargs.get("lifecycle_state", missing),
            "id": kwargs.get("id", missing),
            "sortBy": kwargs.get("sort_by", missing),
            "sortOrder": kwargs.get("sort_order", missing)
        }
        query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing}

        header_params = {
            "accept": "application/json",
            "content-type": "application/json"
        }

        if kwargs.get('retry_strategy'):
            return kwargs['retry_strategy'].make_retrying_call(
                self.base_client.call_api,
                resource_path=resource_path,
                method=method,
                query_params=query_params,
                header_params=header_params,
                response_type="list[ExportSummary]")
        else:
            return self.base_client.call_api(
                resource_path=resource_path,
                method=method,
                query_params=query_params,
                header_params=header_params,
                response_type="list[ExportSummary]")

    def list_file_systems(self, compartment_id, availability_domain, **kwargs):
        """
        ListFileSystems
        Lists the file system resources in the specified compartment.


        :param str compartment_id: (required)
            The OCID of the compartment.

        :param str availability_domain: (required)
            The name of the availability domain.

            Example: `Uocm:PHX-AD-1`

        :param int limit: (optional)
            The maximum number of items to return in a paginated \"List\" call.

            Example: `500`

        :param str page: (optional)
            The value of the `opc-next-page` response header from the previous \"List\" call.

        :param str display_name: (optional)
            A user-friendly name. It does not have to be unique, and it is changeable.

            Example: `My resource`

        :param str lifecycle_state: (optional)
            Filter results by the specified lifecycle state. Must be a valid
            state for the resource type.

            Allowed values are: "CREATING", "ACTIVE", "DELETING", "DELETED", "FAILED"

        :param str id: (optional)
            Filter results by OCID. Must be an OCID of the correct type for
            the resouce type.

        :param str sort_by: (optional)
            The field to sort by. You can provide either value, but not both.
            By default, when you sort by time created, results are shown
            in descending order. When you sort by display name, results are
            shown in ascending order.

            Allowed values are: "TIMECREATED", "DISPLAYNAME"

        :param str sort_order: (optional)
            The sort order to use, either 'asc' or 'desc', where 'asc' is
            ascending and 'desc' is descending.

            Allowed values are: "ASC", "DESC"

        :return: A :class:`~oraclebmc.response.Response` object with data of type list of :class:`~oraclebmc.file_storage.models.FileSystemSummary`
        :rtype: :class:`~oraclebmc.response.Response`
        """
        resource_path = "/fileSystems"
        method = "GET"

        # Don't accept unknown kwargs
        expected_kwargs = [
            "retry_strategy",
            "limit",
            "page",
            "display_name",
            "lifecycle_state",
            "id",
            "sort_by",
            "sort_order"
        ]
        extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs]
        if extra_kwargs:
            raise ValueError(
                "list_file_systems got unknown kwargs: {!r}".format(extra_kwargs))

        if 'lifecycle_state' in kwargs:
            lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "DELETING", "DELETED", "FAILED"]
            if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values:
                raise ValueError(
                    "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values)
                )

        if 'sort_by' in kwargs:
            sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"]
            if kwargs['sort_by'] not in sort_by_allowed_values:
                raise ValueError(
                    "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values)
                )

        if 'sort_order' in kwargs:
            sort_order_allowed_values = ["ASC", "DESC"]
            if kwargs['sort_order'] not in sort_order_allowed_values:
                raise ValueError(
                    "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values)
                )

        query_params = {
            "compartmentId": compartment_id,
            "availabilityDomain": availability_domain,
            "limit": kwargs.get("limit", missing),
            "page": kwargs.get("page", missing),
            "displayName": kwargs.get("display_name", missing),
            "lifecycleState": kwargs.get("lifecycle_state", missing),
            "id": kwargs.get("id", missing),
            "sortBy": kwargs.get("sort_by", missing),
            "sortOrder": kwargs.get("sort_order", missing)
        }
        query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing}

        header_params = {
            "accept": "application/json",
            "content-type": "application/json"
        }

        if kwargs.get('retry_strategy'):
            return kwargs['retry_strategy'].make_retrying_call(
                self.base_client.call_api,
                resource_path=resource_path,
                method=method,
                query_params=query_params,
                header_params=header_params,
                response_type="list[FileSystemSummary]")
        else:
            return self.base_client.call_api(
                resource_path=resource_path,
                method=method,
                query_params=query_params,
                header_params=header_params,
                response_type="list[FileSystemSummary]")

    def list_mount_targets(self, compartment_id, availability_domain, **kwargs):
        """
        ListMountTargets
        Lists the mount target resources in the specified compartment.


        :param str compartment_id: (required)
            The OCID of the compartment.

        :param str availability_domain: (required)
            The name of the availability domain.

            Example: `Uocm:PHX-AD-1`

        :param int limit: (optional)
            The maximum number of items to return in a paginated \"List\" call.

            Example: `500`

        :param str page: (optional)
            The value of the `opc-next-page` response header from the previous \"List\" call.

        :param str display_name: (optional)
            A user-friendly name. It does not have to be unique, and it is changeable.

            Example: `My resource`

        :param str export_set_id: (optional)
            The OCID of the export set.

        :param str lifecycle_state: (optional)
            Filter results by the specified lifecycle state. Must be a valid
            state for the resource type.

            Allowed values are: "CREATING", "ACTIVE", "DELETING", "DELETED", "FAILED"

        :param str id: (optional)
            Filter results by OCID. Must be an OCID of the correct type for
            the resouce type.

        :param str sort_by: (optional)
            The field to sort by. You can choose either value, but not both.
            By default, when you sort by time created, results are shown
            in descending order. When you sort by display name, results are
            shown in ascending order.

            Allowed values are: "TIMECREATED", "DISPLAYNAME"

        :param str sort_order: (optional)
            The sort order to use, either 'asc' or 'desc', where 'asc' is
            ascending and 'desc' is descending.

            Allowed values are: "ASC", "DESC"

        :return: A :class:`~oraclebmc.response.Response` object with data of type list of :class:`~oraclebmc.file_storage.models.MountTargetSummary`
        :rtype: :class:`~oraclebmc.response.Response`
        """
        resource_path = "/mountTargets"
        method = "GET"

        # Don't accept unknown kwargs
        expected_kwargs = [
            "retry_strategy",
            "limit",
            "page",
            "display_name",
            "export_set_id",
            "lifecycle_state",
            "id",
            "sort_by",
            "sort_order"
        ]
        extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs]
        if extra_kwargs:
            raise ValueError(
                "list_mount_targets got unknown kwargs: {!r}".format(extra_kwargs))

        if 'lifecycle_state' in kwargs:
            lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "DELETING", "DELETED", "FAILED"]
            if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values:
                raise ValueError(
                    "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values)
                )

        if 'sort_by' in kwargs:
            sort_by_allowed_values = ["TIMECREATED", "DISPLAYNAME"]
            if kwargs['sort_by'] not in sort_by_allowed_values:
                raise ValueError(
                    "Invalid value for `sort_by`, must be one of {0}".format(sort_by_allowed_values)
                )

        if 'sort_order' in kwargs:
            sort_order_allowed_values = ["ASC", "DESC"]
            if kwargs['sort_order'] not in sort_order_allowed_values:
                raise ValueError(
                    "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values)
                )

        query_params = {
            "compartmentId": compartment_id,
            "availabilityDomain": availability_domain,
            "limit": kwargs.get("limit", missing),
            "page": kwargs.get("page", missing),
            "displayName": kwargs.get("display_name", missing),
            "exportSetId": kwargs.get("export_set_id", missing),
            "lifecycleState": kwargs.get("lifecycle_state", missing),
            "id": kwargs.get("id", missing),
            "sortBy": kwargs.get("sort_by", missing),
            "sortOrder": kwargs.get("sort_order", missing)
        }
        query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing}

        header_params = {
            "accept": "application/json",
            "content-type": "application/json"
        }

        if kwargs.get('retry_strategy'):
            return kwargs['retry_strategy'].make_retrying_call(
                self.base_client.call_api,
                resource_path=resource_path,
                method=method,
                query_params=query_params,
                header_params=header_params,
                response_type="list[MountTargetSummary]")
        else:
            return self.base_client.call_api(
                resource_path=resource_path,
                method=method,
                query_params=query_params,
                header_params=header_params,
                response_type="list[MountTargetSummary]")

    def list_snapshots(self, file_system_id, **kwargs):
        """
        ListSnapshots
        Lists snapshots of the specified file system.


        :param str file_system_id: (required)
            The OCID of the file system.

        :param int limit: (optional)
            The maximum number of items to return in a paginated \"List\" call.

            Example: `500`

        :param str page: (optional)
            The value of the `opc-next-page` response header from the previous \"List\" call.

        :param str lifecycle_state: (optional)
            Filter results by the specified lifecycle state. Must be a valid
            state for the resource type.

            Allowed values are: "CREATING", "ACTIVE", "DELETING", "DELETED", "FAILED"

        :param str id: (optional)
            Filter results by OCID. Must be an OCID of the correct type for
            the resouce type.

        :param str sort_order: (optional)
            The sort order to use, either 'asc' or 'desc', where 'asc' is
            ascending and 'desc' is descending.

            Allowed values are: "ASC", "DESC"

        :return: A :class:`~oraclebmc.response.Response` object with data of type list of :class:`~oraclebmc.file_storage.models.SnapshotSummary`
        :rtype: :class:`~oraclebmc.response.Response`
        """
        resource_path = "/snapshots"
        method = "GET"

        # Don't accept unknown kwargs
        expected_kwargs = [
            "retry_strategy",
            "limit",
            "page",
            "lifecycle_state",
            "id",
            "sort_order"
        ]
        extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs]
        if extra_kwargs:
            raise ValueError(
                "list_snapshots got unknown kwargs: {!r}".format(extra_kwargs))

        if 'lifecycle_state' in kwargs:
            lifecycle_state_allowed_values = ["CREATING", "ACTIVE", "DELETING", "DELETED", "FAILED"]
            if kwargs['lifecycle_state'] not in lifecycle_state_allowed_values:
                raise ValueError(
                    "Invalid value for `lifecycle_state`, must be one of {0}".format(lifecycle_state_allowed_values)
                )

        if 'sort_order' in kwargs:
            sort_order_allowed_values = ["ASC", "DESC"]
            if kwargs['sort_order'] not in sort_order_allowed_values:
                raise ValueError(
                    "Invalid value for `sort_order`, must be one of {0}".format(sort_order_allowed_values)
                )

        query_params = {
            "fileSystemId": file_system_id,
            "limit": kwargs.get("limit", missing),
            "page": kwargs.get("page", missing),
            "lifecycleState": kwargs.get("lifecycle_state", missing),
            "id": kwargs.get("id", missing),
            "sortOrder": kwargs.get("sort_order", missing)
        }
        query_params = {k: v for (k, v) in six.iteritems(query_params) if v is not missing}

        header_params = {
            "accept": "application/json",
            "content-type": "application/json"
        }

        if kwargs.get('retry_strategy'):
            return kwargs['retry_strategy'].make_retrying_call(
                self.base_client.call_api,
                resource_path=resource_path,
                method=method,
                query_params=query_params,
                header_params=header_params,
                response_type="list[SnapshotSummary]")
        else:
            return self.base_client.call_api(
                resource_path=resource_path,
                method=method,
                query_params=query_params,
                header_params=header_params,
                response_type="list[SnapshotSummary]")

    def update_export_set(self, export_set_id, update_export_set_details, **kwargs):
        """
        UpdateExportSet
        Updates the specified export set's information.


        :param str export_set_id: (required)
            The OCID of the export set.

        :param UpdateExportSetDetails update_export_set_details: (required)
            Details object for updating an export set.

        :param str if_match: (optional)
            For optimistic concurrency control. In the PUT or DELETE call
            for a resource, set the `if-match` parameter to the value of the
            etag from a previous GET or POST response for that resource.
            The resource will be updated or deleted only if the etag you
            provide matches the resource's current etag value.

        :return: A :class:`~oraclebmc.response.Response` object with data of type :class:`~oraclebmc.file_storage.models.ExportSet`
        :rtype: :class:`~oraclebmc.response.Response`
        """
        resource_path = "/exportSets/{exportSetId}"
        method = "PUT"

        # Don't accept unknown kwargs
        expected_kwargs = [
            "retry_strategy",
            "if_match"
        ]
        extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs]
        if extra_kwargs:
            raise ValueError(
                "update_export_set got unknown kwargs: {!r}".format(extra_kwargs))

        path_params = {
            "exportSetId": export_set_id
        }

        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}

        for (k, v) in six.iteritems(path_params):
            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))

        header_params = {
            "accept": "application/json",
            "content-type": "application/json",
            "if-match": kwargs.get("if_match", missing)
        }
        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing}

        if kwargs.get('retry_strategy'):
            return kwargs['retry_strategy'].make_retrying_call(
                self.base_client.call_api,
                resource_path=resource_path,
                method=method,
                path_params=path_params,
                header_params=header_params,
                body=update_export_set_details,
                response_type="ExportSet")
        else:
            return self.base_client.call_api(
                resource_path=resource_path,
                method=method,
                path_params=path_params,
                header_params=header_params,
                body=update_export_set_details,
                response_type="ExportSet")

    def update_file_system(self, file_system_id, update_file_system_details, **kwargs):
        """
        UpdateFileSystem
        Updates the specified file system's information.
        You can use this operation to rename a file system.


        :param str file_system_id: (required)
            The OCID of the file system.

        :param UpdateFileSystemDetails update_file_system_details: (required)
            Details object for updating a file system.

        :param str if_match: (optional)
            For optimistic concurrency control. In the PUT or DELETE call
            for a resource, set the `if-match` parameter to the value of the
            etag from a previous GET or POST response for that resource.
            The resource will be updated or deleted only if the etag you
            provide matches the resource's current etag value.

        :return: A :class:`~oraclebmc.response.Response` object with data of type :class:`~oraclebmc.file_storage.models.FileSystem`
        :rtype: :class:`~oraclebmc.response.Response`
        """
        resource_path = "/fileSystems/{fileSystemId}"
        method = "PUT"

        # Don't accept unknown kwargs
        expected_kwargs = [
            "retry_strategy",
            "if_match"
        ]
        extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs]
        if extra_kwargs:
            raise ValueError(
                "update_file_system got unknown kwargs: {!r}".format(extra_kwargs))

        path_params = {
            "fileSystemId": file_system_id
        }

        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}

        for (k, v) in six.iteritems(path_params):
            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))

        header_params = {
            "accept": "application/json",
            "content-type": "application/json",
            "if-match": kwargs.get("if_match", missing)
        }
        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing}

        if kwargs.get('retry_strategy'):
            return kwargs['retry_strategy'].make_retrying_call(
                self.base_client.call_api,
                resource_path=resource_path,
                method=method,
                path_params=path_params,
                header_params=header_params,
                body=update_file_system_details,
                response_type="FileSystem")
        else:
            return self.base_client.call_api(
                resource_path=resource_path,
                method=method,
                path_params=path_params,
                header_params=header_params,
                body=update_file_system_details,
                response_type="FileSystem")

    def update_mount_target(self, mount_target_id, update_mount_target_details, **kwargs):
        """
        UpdateMountTarget
        Updates the specified mount target's information.


        :param str mount_target_id: (required)
            The OCID of the mount target.

        :param UpdateMountTargetDetails update_mount_target_details: (required)
            Details object for updating a mount target.

        :param str if_match: (optional)
            For optimistic concurrency control. In the PUT or DELETE call
            for a resource, set the `if-match` parameter to the value of the
            etag from a previous GET or POST response for that resource.
            The resource will be updated or deleted only if the etag you
            provide matches the resource's current etag value.

        :return: A :class:`~oraclebmc.response.Response` object with data of type :class:`~oraclebmc.file_storage.models.MountTarget`
        :rtype: :class:`~oraclebmc.response.Response`
        """
        resource_path = "/mountTargets/{mountTargetId}"
        method = "PUT"

        # Don't accept unknown kwargs
        expected_kwargs = [
            "retry_strategy",
            "if_match"
        ]
        extra_kwargs = [key for key in six.iterkeys(kwargs) if key not in expected_kwargs]
        if extra_kwargs:
            raise ValueError(
                "update_mount_target got unknown kwargs: {!r}".format(extra_kwargs))

        path_params = {
            "mountTargetId": mount_target_id
        }

        path_params = {k: v for (k, v) in six.iteritems(path_params) if v is not missing}

        for (k, v) in six.iteritems(path_params):
            if v is None or (isinstance(v, six.string_types) and len(v.strip()) == 0):
                raise ValueError('Parameter {} cannot be None, whitespace or empty string'.format(k))

        header_params = {
            "accept": "application/json",
            "content-type": "application/json",
            "if-match": kwargs.get("if_match", missing)
        }
        header_params = {k: v for (k, v) in six.iteritems(header_params) if v is not missing}

        if kwargs.get('retry_strategy'):
            return kwargs['retry_strategy'].make_retrying_call(
                self.base_client.call_api,
                resource_path=resource_path,
                method=method,
                path_params=path_params,
                header_params=header_params,
                body=update_mount_target_details,
                response_type="MountTarget")
        else:
            return self.base_client.call_api(
                resource_path=resource_path,
                method=method,
                path_params=path_params,
                header_params=header_params,
                body=update_mount_target_details,
                response_type="MountTarget")
