# 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 ChangeCommand(object): """ NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ def __init__(self): """ ChangeCommand - 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 = { 'change': 'str', 'client': 'str', 'date': 'datetime', 'user': 'str', 'status': 'str', 'description': 'str', 'jobs': 'list[str]', 'type': 'str', '_files': 'list[str]', 'imported_by': 'str', 'identify': 'str' } self.attribute_map = { 'change': 'change', 'client': 'client', 'date': 'date', 'user': 'user', 'status': 'status', 'description': 'description', 'jobs': 'jobs', 'type': 'type', '_files': 'files', 'imported_by': 'importedBy', 'identify': 'identify' } self._change = None self._client = None self._date = None self._user = None self._status = None self._description = None self._jobs = None self._type = None self.__files = None self._imported_by = None self._identify = None @property def change(self): """ Gets the change of this ChangeCommand. Contains the changelist number if editing an existing changelist, or `new` if creating a new changelist. :return: The change of this ChangeCommand. :rtype: str """ return self._change @change.setter def change(self, change): """ Sets the change of this ChangeCommand. Contains the changelist number if editing an existing changelist, or `new` if creating a new changelist. :param change: The change of this ChangeCommand. :type: str """ self._change = change @property def client(self): """ Gets the client of this ChangeCommand. Name of current client workspace :return: The client of this ChangeCommand. :rtype: str """ return self._client @client.setter def client(self, client): """ Sets the client of this ChangeCommand. Name of current client workspace :param client: The client of this ChangeCommand. :type: str """ self._client = client @property def date(self): """ Gets the date of this ChangeCommand. Date the changelist was last modified. :return: The date of this ChangeCommand. :rtype: datetime """ return self._date @date.setter def date(self, date): """ Sets the date of this ChangeCommand. Date the changelist was last modified. :param date: The date of this ChangeCommand. :type: datetime """ self._date = date @property def user(self): """ Gets the user of this ChangeCommand. Name of the change owner.\n\nThe owner of an empty pending changelist (that is, a pending changelist without any files in it) can transfer ownership of the changelist to another existing user either by editing this field, or by using the -U user option.\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 user of this ChangeCommand. :rtype: str """ return self._user @user.setter def user(self, user): """ Sets the user of this ChangeCommand. Name of the change owner.\n\nThe owner of an empty pending changelist (that is, a pending changelist without any files in it) can transfer ownership of the changelist to another existing user either by editing this field, or by using the -U user option.\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 user: The user of this ChangeCommand. :type: str """ self._user = user @property def status(self): """ Gets the status of this ChangeCommand. `pending`, `shelved`, `submitted`, or `new`.\nNot editable by the user.\n\nThe status is `new` when the changelist is created, `pending` when it has been created but has not yet been submitted to the depot, `shelved` when its contents are shelved, and `submitted` when its contents have been stored in the depot. :return: The status of this ChangeCommand. :rtype: str """ return self._status @status.setter def status(self, status): """ Sets the status of this ChangeCommand. `pending`, `shelved`, `submitted`, or `new`.\nNot editable by the user.\n\nThe status is `new` when the changelist is created, `pending` when it has been created but has not yet been submitted to the depot, `shelved` when its contents are shelved, and `submitted` when its contents have been stored in the depot. :param status: The status of this ChangeCommand. :type: str """ self._status = status @property def description(self): """ Gets the description of this ChangeCommand. Textual description of changelist.\n\nIf you do not have access to a restricted changelist, the description is replaced with a \"no permission\" message. :return: The description of this ChangeCommand. :rtype: str """ return self._description @description.setter def description(self, description): """ Sets the description of this ChangeCommand. Textual description of changelist.\n\nIf you do not have access to a restricted changelist, the description is replaced with a \"no permission\" message. :param description: The description of this ChangeCommand. :type: str """ self._description = description @property def jobs(self): """ Gets the jobs of this ChangeCommand. A list of jobs that are fixed by this changelist. :return: The jobs of this ChangeCommand. :rtype: list[str] """ return self._jobs @jobs.setter def jobs(self, jobs): """ Sets the jobs of this ChangeCommand. A list of jobs that are fixed by this changelist. :param jobs: The jobs of this ChangeCommand. :type: list[str] """ self._jobs = jobs @property def type(self): """ Gets the type of this ChangeCommand. Type of change: `restricted` or `public`.\n\nThe Type: field can be used to hide the change or its description from users.\nA shelved or committed change (as denoted in the Status: field) that is restricted is accessible only to users who own the change or have list permission to at least one file in the change.\n\nPublic changes are displayed without restrictions.\n\nBy default, changelists are public.\nA Perforce superuser can set the default changelist type (for changelists created after the configurable is set) by setting the defaultChangeType configurable. :return: The type of this ChangeCommand. :rtype: str """ return self._type @type.setter def type(self, type): """ Sets the type of this ChangeCommand. Type of change: `restricted` or `public`.\n\nThe Type: field can be used to hide the change or its description from users.\nA shelved or committed change (as denoted in the Status: field) that is restricted is accessible only to users who own the change or have list permission to at least one file in the change.\n\nPublic changes are displayed without restrictions.\n\nBy default, changelists are public.\nA Perforce superuser can set the default changelist type (for changelists created after the configurable is set) by setting the defaultChangeType configurable. :param type: The type of this ChangeCommand. :type: str """ self._type = type @property def _files(self): """ Gets the _files of this ChangeCommand. The list of files submitted in this changelist. :return: The _files of this ChangeCommand. :rtype: list[str] """ return self.__files @_files.setter def _files(self, _files): """ Sets the _files of this ChangeCommand. The list of files submitted in this changelist. :param _files: The _files of this ChangeCommand. :type: list[str] """ self.__files = _files @property def imported_by(self): """ Gets the imported_by of this ChangeCommand. Displays the name of the user who ran the p4 fetch, p4 push, or p4 unzip command that imported this change into the server.\n\nThis field is primarily useful for distributed versioning (DVCS) scenarios, in which changelists are copied from one server to another, and help you correlate the changelist’s basic identity as it is copied.\n\nIn such configurations, Perforce recommends using the submit.identity configurable to enable automatic generation of changelist identities by the p4 submit. :return: The imported_by of this ChangeCommand. :rtype: str """ return self._imported_by @imported_by.setter def imported_by(self, imported_by): """ Sets the imported_by of this ChangeCommand. Displays the name of the user who ran the p4 fetch, p4 push, or p4 unzip command that imported this change into the server.\n\nThis field is primarily useful for distributed versioning (DVCS) scenarios, in which changelists are copied from one server to another, and help you correlate the changelist’s basic identity as it is copied.\n\nIn such configurations, Perforce recommends using the submit.identity configurable to enable automatic generation of changelist identities by the p4 submit. :param imported_by: The imported_by of this ChangeCommand. :type: str """ self._imported_by = imported_by @property def identify(self): """ Gets the identify of this ChangeCommand. Contains a label which uniquely identifies this changelist across all servers where it has been fetched, pushed, or unzipped.\n\nThis field is primarily useful for distributed versioning (DVCS) scenarios, in which changelists are copied from one server to another, and help you correlate the changelist’s basic identity as it is copied.\n\nIn such configurations, Perforce recommends using the submit.identity configurable to enable automatic generation of changelist identities by the p4 submit. :return: The identify of this ChangeCommand. :rtype: str """ return self._identify @identify.setter def identify(self, identify): """ Sets the identify of this ChangeCommand. Contains a label which uniquely identifies this changelist across all servers where it has been fetched, pushed, or unzipped.\n\nThis field is primarily useful for distributed versioning (DVCS) scenarios, in which changelists are copied from one server to another, and help you correlate the changelist’s basic identity as it is copied.\n\nIn such configurations, Perforce recommends using the submit.identity configurable to enable automatic generation of changelist identities by the p4 submit. :param identify: The identify of this ChangeCommand. :type: str """ self._identify = identify 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