# coding: utf-8 """ Copyright 2015 SmartBear Software Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. Ref: https://github.com/swagger-api/swagger-codegen """ from pprint import pformat from six import iteritems class LabelsCommand(object): """ NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ def __init__(self): """ LabelsCommand - a model defined in Swagger :param dict swaggerTypes: The key is attribute name and the value is attribute type. :param dict attributeMap: The key is attribute name and the value is json key in definition. """ self.swagger_types = { 'label': 'str', 'update': 'datetime', 'access': 'datetime', 'owner': 'str', 'options': 'str', 'description': 'str' } self.attribute_map = { 'label': 'label', 'update': 'update', 'access': 'access', 'owner': 'owner', 'options': 'options', 'description': 'description' } self._label = None self._update = None self._access = None self._owner = None self._options = None self._description = None @property def label(self): """ Gets the label of this LabelsCommand. The label name. :return: The label of this LabelsCommand. :rtype: str """ return self._label @label.setter def label(self, label): """ Sets the label of this LabelsCommand. The label name. :param label: The label of this LabelsCommand. :type: str """ self._label = label @property def update(self): """ Gets the update of this LabelsCommand. The date the label specification was last modified. :return: The update of this LabelsCommand. :rtype: datetime """ return self._update @update.setter def update(self, update): """ Sets the update of this LabelsCommand. The date the label specification was last modified. :param update: The update of this LabelsCommand. :type: datetime """ self._update = update @property def access(self): """ Gets the access of this LabelsCommand. The date and time the label was last accessed, either by running p4 labelsync on the label, or by otherwise referring to a file with the label revision specifier @label.\n(Note: Reloading a label with p4 reload does not affect the access time.) :return: The access of this LabelsCommand. :rtype: datetime """ return self._access @access.setter def access(self, access): """ Sets the access of this LabelsCommand. The date and time the label was last accessed, either by running p4 labelsync on the label, or by otherwise referring to a file with the label revision specifier @label.\n(Note: Reloading a label with p4 reload does not affect the access time.) :param access: The access of this LabelsCommand. :type: datetime """ self._access = access @property def owner(self): """ Gets the owner of this LabelsCommand. The label’s owner.\nBy default, the user who created the label.\nOnly the owner of a label can update which files are tagged with the label.\n\nThe specified owner does not have to be a Perforce user.\nYou might want to use an arbitrary name if the user does not yet exist, or if you have deleted the user and need a placeholder until you can assign the spec to a new user. :return: The owner of this LabelsCommand. :rtype: str """ return self._owner @owner.setter def owner(self, owner): """ Sets the owner of this LabelsCommand. The label’s owner.\nBy default, the user who created the label.\nOnly the owner of a label can update which files are tagged with the label.\n\nThe specified owner does not have to be a Perforce user.\nYou might want to use an arbitrary name if the user does not yet exist, or if you have deleted the user and need a placeholder until you can assign the spec to a new user. :param owner: The owner of this LabelsCommand. :type: str """ self._owner = owner @property def options(self): """ Gets the options of this LabelsCommand. Options to control behavior and storage location of labels.\n\n- locked or unlocked: If the label is locked, the list of files tagged with the label cannot be changed with p4 labelsync.\n\n- autoreload or noautoreload. For static labels, if noautoreload is set, the label is stored in db.label, and if autoreload is set, it is stored in the unload depot. This option is ignored for automatic labels. Storing labels in the unload depot can improve performance on sites that make extremely heavy use of labels. :return: The options of this LabelsCommand. :rtype: str """ return self._options @options.setter def options(self, options): """ Sets the options of this LabelsCommand. Options to control behavior and storage location of labels.\n\n- locked or unlocked: If the label is locked, the list of files tagged with the label cannot be changed with p4 labelsync.\n\n- autoreload or noautoreload. For static labels, if noautoreload is set, the label is stored in db.label, and if autoreload is set, it is stored in the unload depot. This option is ignored for automatic labels. Storing labels in the unload depot can improve performance on sites that make extremely heavy use of labels. :param options: The options of this LabelsCommand. :type: str """ self._options = options @property def description(self): """ Gets the description of this LabelsCommand. An optional description of the label’s purpose. :return: The description of this LabelsCommand. :rtype: str """ return self._description @description.setter def description(self, description): """ Sets the description of this LabelsCommand. An optional description of the label’s purpose. :param description: The description of this LabelsCommand. :type: str """ self._description = description def to_dict(self): """ Returns the model properties as a dict """ result = {} for attr, _ in iteritems(self.swagger_types): value = getattr(self, attr) if isinstance(value, list): result[attr] = list(map( lambda x: x.to_dict() if hasattr(x, "to_dict") else x, value )) elif hasattr(value, "to_dict"): result[attr] = value.to_dict() else: result[attr] = value return result def to_str(self): """ Returns the string representation of the model """ return pformat(self.to_dict()) def __repr__(self): """ For `print` and `pprint` """ return self.to_str() def __eq__(self, other): """ Returns true if both objects are equal """ return self.__dict__ == other.__dict__ def __ne__(self, other): """ Returns true if both objects are not equal """ return not self == other