# 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 StreamsCommand(object): """ NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ def __init__(self): """ StreamsCommand - 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 = { 'stream': 'str', 'update': 'datetime', 'access': 'datetime', 'owner': 'str', 'name': 'str', 'parent': 'str', 'type': 'str', 'description': 'str', 'options': 'str' } self.attribute_map = { 'stream': 'stream', 'update': 'update', 'access': 'access', 'owner': 'owner', 'name': 'name', 'parent': 'parent', 'type': 'type', 'description': 'description', 'options': 'options' } self._stream = None self._update = None self._access = None self._owner = None self._name = None self._parent = None self._type = None self._description = None self._options = None @property def stream(self): """ Gets the stream of this StreamsCommand. Specifies the stream's name (permanent identifier) and its path in the stream depot, in the form `//depotname/streamname`. :return: The stream of this StreamsCommand. :rtype: str """ return self._stream @stream.setter def stream(self, stream): """ Sets the stream of this StreamsCommand. Specifies the stream's name (permanent identifier) and its path in the stream depot, in the form `//depotname/streamname`. :param stream: The stream of this StreamsCommand. :type: str """ self._stream = stream @property def update(self): """ Gets the update of this StreamsCommand. The date the stream specification was last modified. :return: The update of this StreamsCommand. :rtype: datetime """ return self._update @update.setter def update(self, update): """ Sets the update of this StreamsCommand. The date the stream specification was last modified. :param update: The update of this StreamsCommand. :type: datetime """ self._update = update @property def access(self): """ Gets the access of this StreamsCommand. The date and time that the stream specification was last accessed by any Perforce command. :return: The access of this StreamsCommand. :rtype: datetime """ return self._access @access.setter def access(self, access): """ Sets the access of this StreamsCommand. The date and time that the stream specification was last accessed by any Perforce command. :param access: The access of this StreamsCommand. :type: datetime """ self._access = access @property def owner(self): """ Gets the owner of this StreamsCommand. The Perforce user or group who owns the stream.\nThe default is the user who created the stream. :return: The owner of this StreamsCommand. :rtype: str """ return self._owner @owner.setter def owner(self, owner): """ Sets the owner of this StreamsCommand. The Perforce user or group who owns the stream.\nThe default is the user who created the stream. :param owner: The owner of this StreamsCommand. :type: str """ self._owner = owner @property def name(self): """ Gets the name of this StreamsCommand. Display name of the stream.\nUnlike the Stream: field, this field can be modified.\nDefaults to the streamname portion of the stream path. :return: The name of this StreamsCommand. :rtype: str """ return self._name @name.setter def name(self, name): """ Sets the name of this StreamsCommand. Display name of the stream.\nUnlike the Stream: field, this field can be modified.\nDefaults to the streamname portion of the stream path. :param name: The name of this StreamsCommand. :type: str """ self._name = name @property def parent(self): """ Gets the parent of this StreamsCommand. The parent of this stream.\nMust be none if the stream's `Type:` is mainline, otherwise must be set to an existing stream identifier of the form `//depotname/streamname`. :return: The parent of this StreamsCommand. :rtype: str """ return self._parent @parent.setter def parent(self, parent): """ Sets the parent of this StreamsCommand. The parent of this stream.\nMust be none if the stream's `Type:` is mainline, otherwise must be set to an existing stream identifier of the form `//depotname/streamname`. :param parent: The parent of this StreamsCommand. :type: str """ self._parent = parent @property def type(self): """ Gets the type of this StreamsCommand. The stream’s type determines the expected flow of change.\nValid stream types are `mainline`, `virtual`, `development`, and `release`.\n\n- `mainline`:\nThe mainline stream is the parent of all streams in the stream depot. Every stream depot must have at least one mainline stream.\n\n- `virtual`:\nVirtual streams allow merging and copying between parent and child streams without storing local data.\nData is passed through to the destination (a non-virtual stream) after applying restrictions on the scope of files defined in the virtual stream’s view.\nBecause virtual streams do not have files in their depot namespace, it is impossible to import a virtual stream.\n\n- `release`:\nMore stable than the mainline.\nRelease streams copy from the parent and merge to the parent.\n\n- `development`:\nLess stable than the mainline.\nDevelopment streams expect to merge from parent streams and copy to the parent.\n\n- `task`:\nTask streams are lightweight short-lived branches that are useful for bug fixing or new features that only modify a small subset of the branch data.\nBecause branched (copied) files are tracked in a set of shadow tables which are later removed, repository metadata is kept to a minimum when using this type of stream.\nWorkspaces associated with task streams see all branched data, but only modified and promoted data is visible to users with access to the stream’s namespace.\nThe default is stream type is development. :return: The type of this StreamsCommand. :rtype: str """ return self._type @type.setter def type(self, type): """ Sets the type of this StreamsCommand. The stream’s type determines the expected flow of change.\nValid stream types are `mainline`, `virtual`, `development`, and `release`.\n\n- `mainline`:\nThe mainline stream is the parent of all streams in the stream depot. Every stream depot must have at least one mainline stream.\n\n- `virtual`:\nVirtual streams allow merging and copying between parent and child streams without storing local data.\nData is passed through to the destination (a non-virtual stream) after applying restrictions on the scope of files defined in the virtual stream’s view.\nBecause virtual streams do not have files in their depot namespace, it is impossible to import a virtual stream.\n\n- `release`:\nMore stable than the mainline.\nRelease streams copy from the parent and merge to the parent.\n\n- `development`:\nLess stable than the mainline.\nDevelopment streams expect to merge from parent streams and copy to the parent.\n\n- `task`:\nTask streams are lightweight short-lived branches that are useful for bug fixing or new features that only modify a small subset of the branch data.\nBecause branched (copied) files are tracked in a set of shadow tables which are later removed, repository metadata is kept to a minimum when using this type of stream.\nWorkspaces associated with task streams see all branched data, but only modified and promoted data is visible to users with access to the stream’s namespace.\nThe default is stream type is development. :param type: The type of this StreamsCommand. :type: str """ self._type = type @property def description(self): """ Gets the description of this StreamsCommand. Description of the stream. :return: The description of this StreamsCommand. :rtype: str """ return self._description @description.setter def description(self, description): """ Sets the description of this StreamsCommand. Description of the stream. :param description: The description of this StreamsCommand. :type: str """ self._description = description @property def options(self): """ Gets the options of this StreamsCommand. Settings that configure stream behavior as follows:\n\n- `[un]locked`:\nEnable/disable other users' ability to edit or delete the stream.\nIf locked, the stream specification cannot be deleted, and only its owner can modify it.\nThe default is unlocked.\n\n- `[all|owner]submit`:\nSpecifies whether all users or only the owner of the stream can submit changes to the stream.\nThe default is allsubmit.\nIf the Owner: of a stream marked ownersubmit is a group, all users who are members of that group can submit changes to the stream.\n\n- `[no]toparent`:\nSpecifies whether integrations from the stream to its parent are expected.\nThe default is toparent.\n\n- `[no]fromparent`:\nSpecifies whether integrations to the stream from its parent are expected.\nThe default is fromparent for mainline and development streams, and nofromparent for release streams.\n\n- `mergeany | mergedown`:\nSpecifies whether the merge flow is restricted or whether merge is permitted from any other stream.\nFor example, the mergeany option would allow a merge from a child to a parent with no warnings.\nA virtual stream must have its flow options set to notoparent and nofromparent.\nFlow options are ignored for mainline streams. :return: The options of this StreamsCommand. :rtype: str """ return self._options @options.setter def options(self, options): """ Sets the options of this StreamsCommand. Settings that configure stream behavior as follows:\n\n- `[un]locked`:\nEnable/disable other users' ability to edit or delete the stream.\nIf locked, the stream specification cannot be deleted, and only its owner can modify it.\nThe default is unlocked.\n\n- `[all|owner]submit`:\nSpecifies whether all users or only the owner of the stream can submit changes to the stream.\nThe default is allsubmit.\nIf the Owner: of a stream marked ownersubmit is a group, all users who are members of that group can submit changes to the stream.\n\n- `[no]toparent`:\nSpecifies whether integrations from the stream to its parent are expected.\nThe default is toparent.\n\n- `[no]fromparent`:\nSpecifies whether integrations to the stream from its parent are expected.\nThe default is fromparent for mainline and development streams, and nofromparent for release streams.\n\n- `mergeany | mergedown`:\nSpecifies whether the merge flow is restricted or whether merge is permitted from any other stream.\nFor example, the mergeany option would allow a merge from a child to a parent with no warnings.\nA virtual stream must have its flow options set to notoparent and nofromparent.\nFlow options are ignored for mainline streams. :param options: The options of this StreamsCommand. :type: str """ self._options = options 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