# 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 DepotCommand(object): """ NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ def __init__(self): """ DepotCommand - 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 = { 'depot': 'str', 'owner': 'str', 'description': 'str', 'type': 'str', 'address': 'str', 'suffix': 'str', 'stream_depth': 'str', 'map': 'str', 'spec_map': 'list[str]' } self.attribute_map = { 'depot': 'depot', 'owner': 'owner', 'description': 'description', 'type': 'type', 'address': 'address', 'suffix': 'suffix', 'stream_depth': 'streamDepth', 'map': 'map', 'spec_map': 'specMap' } self._depot = None self._owner = None self._description = None self._type = None self._address = None self._suffix = None self._stream_depth = None self._map = None self._spec_map = None @property def depot(self): """ Gets the depot of this DepotCommand. The depot name. :return: The depot of this DepotCommand. :rtype: str """ return self._depot @depot.setter def depot(self, depot): """ Sets the depot of this DepotCommand. The depot name. :param depot: The depot of this DepotCommand. :type: str """ self._depot = depot @property def owner(self): """ Gets the owner of this DepotCommand. The user who owns the depot.\nBy default, this is the user who created the depot.\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 DepotCommand. :rtype: str """ return self._owner @owner.setter def owner(self, owner): """ Sets the owner of this DepotCommand. The user who owns the depot.\nBy default, this is the user who created the depot.\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 DepotCommand. :type: str """ self._owner = owner @property def description(self): """ Gets the description of this DepotCommand. A short description of the depot’s purpose. Optional. :return: The description of this DepotCommand. :rtype: str """ return self._description @description.setter def description(self, description): """ Sets the description of this DepotCommand. A short description of the depot’s purpose. Optional. :param description: The description of this DepotCommand. :type: str """ self._description = description @property def type(self): """ Gets the type of this DepotCommand. `local`, `remote`, `spec`, `stream`, `unload`, `archive` or `tangent`.\n\nA local depot is writable, and is the default depot type.\nFiles reside in the server's root directory and are managed directly by the server.\n\nA stream depot is also writable, but contains streams, a type of branch that includes hierarchy and policy.\n\nA remote depot references files that reside on other servers, and cannot be written to.\n\nThe spec depot, if present, automatically archives edited forms.\n\nThe unload depot, if present, holds infrequently-used metadata (about old client workspaces and labels) that has been unloaded with the p4 unload command.\n\nAn archive depot is used in conjunction with the p4 archive and p4 restore commands to facilitate offline (or near-line) storage of infrequently-accessed revisions, typically large binaries.\n\nA tangent depot defines a read-only location that holds tangents created by the p4 fetch -t command.\nThe tangent depot named tangent is automatically created by p4 fetch -t if one does not already exist. :return: The type of this DepotCommand. :rtype: str """ return self._type @type.setter def type(self, type): """ Sets the type of this DepotCommand. `local`, `remote`, `spec`, `stream`, `unload`, `archive` or `tangent`.\n\nA local depot is writable, and is the default depot type.\nFiles reside in the server's root directory and are managed directly by the server.\n\nA stream depot is also writable, but contains streams, a type of branch that includes hierarchy and policy.\n\nA remote depot references files that reside on other servers, and cannot be written to.\n\nThe spec depot, if present, automatically archives edited forms.\n\nThe unload depot, if present, holds infrequently-used metadata (about old client workspaces and labels) that has been unloaded with the p4 unload command.\n\nAn archive depot is used in conjunction with the p4 archive and p4 restore commands to facilitate offline (or near-line) storage of infrequently-accessed revisions, typically large binaries.\n\nA tangent depot defines a read-only location that holds tangents created by the p4 fetch -t command.\nThe tangent depot named tangent is automatically created by p4 fetch -t if one does not already exist. :param type: The type of this DepotCommand. :type: str """ self._type = type @property def address(self): """ Gets the address of this DepotCommand. If the `Type:` is `remote`, the address should be the P4PORT address of the remote server.\nIf the `Type:` is local or spec, this field is ignored. :return: The address of this DepotCommand. :rtype: str """ return self._address @address.setter def address(self, address): """ Sets the address of this DepotCommand. If the `Type:` is `remote`, the address should be the P4PORT address of the remote server.\nIf the `Type:` is local or spec, this field is ignored. :param address: The address of this DepotCommand. :type: str """ self._address = address @property def suffix(self): """ Gets the suffix of this DepotCommand. If the Type: is spec, this field holds an optional suffix for generated paths to objects in the spec depot.\n\nThe default suffix is .p4s.\nYou do not need a suffix to use the spec depot, but supplying a file extension to your Perforce server’s versioned specs enables users of GUI client software to associate Perforce specifications with a preferred text editor.\nIf the Type: is local or remote, this field is ignored. :return: The suffix of this DepotCommand. :rtype: str """ return self._suffix @suffix.setter def suffix(self, suffix): """ Sets the suffix of this DepotCommand. If the Type: is spec, this field holds an optional suffix for generated paths to objects in the spec depot.\n\nThe default suffix is .p4s.\nYou do not need a suffix to use the spec depot, but supplying a file extension to your Perforce server’s versioned specs enables users of GUI client software to associate Perforce specifications with a preferred text editor.\nIf the Type: is local or remote, this field is ignored. :param suffix: The suffix of this DepotCommand. :type: str """ self._suffix = suffix @property def stream_depth(self): """ Gets the stream_depth of this DepotCommand. For stream depots, the optional depth to be used for stream paths in the depot, where depth specifies the number of slashes following the depot name of a stream. ]\n\nThis field is used when streams are being created.\nThe default is 1, matching the traditional stream name.\nYou cannot update this value once streams or archive data exist in a depot. :return: The stream_depth of this DepotCommand. :rtype: str """ return self._stream_depth @stream_depth.setter def stream_depth(self, stream_depth): """ Sets the stream_depth of this DepotCommand. For stream depots, the optional depth to be used for stream paths in the depot, where depth specifies the number of slashes following the depot name of a stream. ]\n\nThis field is used when streams are being created.\nThe default is 1, matching the traditional stream name.\nYou cannot update this value once streams or archive data exist in a depot. :param stream_depth: The stream_depth of this DepotCommand. :type: str """ self._stream_depth = stream_depth @property def map(self): """ Gets the map of this DepotCommand. If the Type: is local, spec, or archive, set the map to point to the relative location of the depot subdirectory.\nThe map must contain the `...` wildcard; for example, a local depot new might have a Map: of `new/...`.\n\nIf the Type: is remote, set the map to point to a location in the remote depot's physical namespace, for example, `//depot/new/rel2/...`.\nThis directory will be the root of the local representation of the remote depot. :return: The map of this DepotCommand. :rtype: str """ return self._map @map.setter def map(self, map): """ Sets the map of this DepotCommand. If the Type: is local, spec, or archive, set the map to point to the relative location of the depot subdirectory.\nThe map must contain the `...` wildcard; for example, a local depot new might have a Map: of `new/...`.\n\nIf the Type: is remote, set the map to point to a location in the remote depot's physical namespace, for example, `//depot/new/rel2/...`.\nThis directory will be the root of the local representation of the remote depot. :param map: The map of this DepotCommand. :type: str """ self._map = map @property def spec_map(self): """ Gets the spec_map of this DepotCommand. For spec depots, an optional description of which specs should be saved, expressed as a view. :return: The spec_map of this DepotCommand. :rtype: list[str] """ return self._spec_map @spec_map.setter def spec_map(self, spec_map): """ Sets the spec_map of this DepotCommand. For spec depots, an optional description of which specs should be saved, expressed as a view. :param spec_map: The spec_map of this DepotCommand. :type: list[str] """ self._spec_map = spec_map 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