# 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 BranchCommand(object):
"""
NOTE: This class is auto generated by the swagger code generator program.
Do not edit the class manually.
"""
def __init__(self):
"""
BranchCommand - 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 = {
'branch': 'str',
'owner': 'str',
'access': 'datetime',
'update': 'datetime',
'options': 'str',
'description': 'str',
'view': 'list[str]'
}
self.attribute_map = {
'branch': 'branch',
'owner': 'owner',
'access': 'access',
'update': 'update',
'options': 'options',
'description': 'description',
'view': 'view'
}
self._branch = None
self._owner = None
self._access = None
self._update = None
self._options = None
self._description = None
self._view = None
@property
def branch(self):
"""
Gets the branch of this BranchCommand.
The branch name, as provided on the command line.
:return: The branch of this BranchCommand.
:rtype: str
"""
return self._branch
@branch.setter
def branch(self, branch):
"""
Sets the branch of this BranchCommand.
The branch name, as provided on the command line.
:param branch: The branch of this BranchCommand.
:type: str
"""
self._branch = branch
@property
def owner(self):
"""
Gets the owner of this BranchCommand.
The owner of the branch mapping.\nBy default, this will be set to the user who created the branch.\nThis field is unimportant unless the Option: field value is locked.
:return: The owner of this BranchCommand.
:rtype: str
"""
return self._owner
@owner.setter
def owner(self, owner):
"""
Sets the owner of this BranchCommand.
The owner of the branch mapping.\nBy default, this will be set to the user who created the branch.\nThis field is unimportant unless the Option: field value is locked.
:param owner: The owner of this BranchCommand.
:type: str
"""
self._owner = owner
@property
def access(self):
"""
Gets the access of this BranchCommand.
The date the branch mapping was last accessed.
:return: The access of this BranchCommand.
:rtype: datetime
"""
return self._access
@access.setter
def access(self, access):
"""
Sets the access of this BranchCommand.
The date the branch mapping was last accessed.
:param access: The access of this BranchCommand.
:type: datetime
"""
self._access = access
@property
def update(self):
"""
Gets the update of this BranchCommand.
The date the branch mapping was last changed.
:return: The update of this BranchCommand.
:rtype: datetime
"""
return self._update
@update.setter
def update(self, update):
"""
Sets the update of this BranchCommand.
The date the branch mapping was last changed.
:param update: The update of this BranchCommand.
:type: datetime
"""
self._update = update
@property
def options(self):
"""
Gets the options of this BranchCommand.
Either `unlocked` (the default) or `locked`.\n\nIf `locked`, only the `Owner:` can modify the branch mapping, and the mapping can't be deleted until it is `unlocked`.
:return: The options of this BranchCommand.
:rtype: str
"""
return self._options
@options.setter
def options(self, options):
"""
Sets the options of this BranchCommand.
Either `unlocked` (the default) or `locked`.\n\nIf `locked`, only the `Owner:` can modify the branch mapping, and the mapping can't be deleted until it is `unlocked`.
:param options: The options of this BranchCommand.
:type: str
"""
self._options = options
@property
def description(self):
"""
Gets the description of this BranchCommand.
A short description of the branch's purpose.
:return: The description of this BranchCommand.
:rtype: str
"""
return self._description
@description.setter
def description(self, description):
"""
Sets the description of this BranchCommand.
A short description of the branch's purpose.
:param description: The description of this BranchCommand.
:type: str
"""
self._description = description
@property
def view(self):
"""
Gets the view of this BranchCommand.
A set of mappings from one set of files in the depot (the source files) to another set of files in the depot (the target files).\n The view maps from one location in the depot to another; it can't refer to a client workspace.\n\n For example, the branch view `//depot/main/... //depot/r2.1/...` maps all the files under `//depot/main` to `//depot/r2.1`.
:return: The view of this BranchCommand.
:rtype: list[str]
"""
return self._view
@view.setter
def view(self, view):
"""
Sets the view of this BranchCommand.
A set of mappings from one set of files in the depot (the source files) to another set of files in the depot (the target files).\n The view maps from one location in the depot to another; it can't refer to a client workspace.\n\n For example, the branch view `//depot/main/... //depot/r2.1/...` maps all the files under `//depot/main` to `//depot/r2.1`.
:param view: The view of this BranchCommand.
:type: list[str]
"""
self._view = view
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