from ..broker import Broker


class GlobalCollectionSchedulesBroker(Broker):
    controller = "global_collection_schedules"

    def spm_schedules(self, **kwargs):
        """Lists the global Switch Port Management polling schedule entries.

            **Inputs**

            **Outputs**

            """

        return self.api_request(self._get_method_fullname("spm_schedules"), kwargs)

    def update(self, **kwargs):
        """Updates a global polling schedule entry.

            **Inputs**

            |  ``api version min:`` None
            |  ``api version max:`` None
            |  ``required:`` True
            |  ``default:`` None

             :param id: The original value of the polling schedule to update (used as an ID for global schedule entries).
             :type id: String

            |  ``api version min:`` None
            |  ``api version max:`` None
            |  ``required:`` False
            |  ``default:`` None

             :param schedule_cron: Either the cron entry (cron schedule string), or a number that denotes the frequency (in minutes) polling should run.
             :type schedule_cron: String

            |  ``api version min:`` None
            |  ``api version max:`` None
            |  ``required:`` False
            |  ``default:`` None

             :param schedule_json: NetMRI internal parameters generated by 'cronscheduler' form transmitted in json format for setting cron schedule string.
             :type schedule_json: String

            **Outputs**

            """

        return self.api_request(self._get_method_fullname("update"), kwargs)

    def create(self, **kwargs):
        """Creates a global polling schedule entry.

            **Inputs**

            |  ``api version min:`` None
            |  ``api version max:`` None
            |  ``required:`` False
            |  ``default:`` None

             :param schedule_cron: Either the cron entry (cron schedule string), or a number that denotes the frequency (in minutes) polling should run.
             :type schedule_cron: String

            |  ``api version min:`` None
            |  ``api version max:`` None
            |  ``required:`` False
            |  ``default:`` None

             :param schedule_json: NetMRI internal parameters generated by 'cronscheduler' form transmitted in json format for setting cron schedule string.
             :type schedule_json: String

            **Outputs**

            """

        return self.api_request(self._get_method_fullname("create"), kwargs)

    def destroy(self, **kwargs):
        """Removes a global polling schedule entry.

            **Inputs**

            |  ``api version min:`` None
            |  ``api version max:`` None
            |  ``required:`` True
            |  ``default:`` None

             :param id: The original value of the polling schedule to remove (used as an ID for global schedule entries).
             :type id: String

            **Outputs**

            """

        return self.api_request(self._get_method_fullname("destroy"), kwargs)
