# 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 ClientCommand(object): """ NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ def __init__(self): """ ClientCommand - 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 = { 'client': 'str', 'owner': 'str', 'update': 'datetime', 'access': 'datetime', 'host': 'str', 'description': 'str', 'root': 'str', 'alt_roots': 'list[str]', 'options': 'str', 'submit_options': 'str', 'line_end': 'str', 'stream': 'str', 'stream_at_change': 'str', 'server_id': 'str', 'view': 'list[str]', 'change_view': 'list[str]', 'type': 'str' } self.attribute_map = { 'client': 'client', 'owner': 'owner', 'update': 'update', 'access': 'access', 'host': 'host', 'description': 'description', 'root': 'root', 'alt_roots': 'altRoots', 'options': 'options', 'submit_options': 'submitOptions', 'line_end': 'lineEnd', 'stream': 'stream', 'stream_at_change': 'streamAtChange', 'server_id': 'serverID', 'view': 'view', 'change_view': 'changeView', 'type': 'type' } self._client = None self._owner = None self._update = None self._access = None self._host = None self._description = None self._root = None self._alt_roots = None self._options = None self._submit_options = None self._line_end = None self._stream = None self._stream_at_change = None self._server_id = None self._view = None self._change_view = None self._type = None @property def client(self): """ Gets the client of this ClientCommand. The client workspace name, as specified in the `P4CLIENT` environment variable or its equivalents. :return: The client of this ClientCommand. :rtype: str """ return self._client @client.setter def client(self, client): """ Sets the client of this ClientCommand. The client workspace name, as specified in the `P4CLIENT` environment variable or its equivalents. :param client: The client of this ClientCommand. :type: str """ self._client = client @property def owner(self): """ Gets the owner of this ClientCommand. The name of the user who owns the workspace.\nThe default is the user who created the workspace.\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 ClientCommand. :rtype: str """ return self._owner @owner.setter def owner(self, owner): """ Sets the owner of this ClientCommand. The name of the user who owns the workspace.\nThe default is the user who created the workspace.\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 ClientCommand. :type: str """ self._owner = owner @property def update(self): """ Gets the update of this ClientCommand. The time the workspace specification was last modified. :return: The update of this ClientCommand. :rtype: datetime """ return self._update @update.setter def update(self, update): """ Sets the update of this ClientCommand. The time the workspace specification was last modified. :param update: The update of this ClientCommand. :type: datetime """ self._update = update @property def access(self): """ Gets the access of this ClientCommand. The date and time that the workspace was last used in any way.\n(Note: Reloading a workspace with p4 reload does not affect the access time.) :return: The access of this ClientCommand. :rtype: datetime """ return self._access @access.setter def access(self, access): """ Sets the access of this ClientCommand. The date and time that the workspace was last used in any way.\n(Note: Reloading a workspace with p4 reload does not affect the access time.) :param access: The access of this ClientCommand. :type: datetime """ self._access = access @property def host(self): """ Gets the host of this ClientCommand. The name of the workstation on which this workspace resides.\nIf included, operations on this client workspace can be run only from this host.\nIf not set, access is allowed from any host.\n\nThe hostname must be provided exactly as it appears in the output of p4 info when run from that host.\n\nThis field is meant to prevent accidental misuse of client workspaces on the wrong machine.\nProviding a host name does not guarantee security, because the actual value of the host name can be overridden with the -H option to any p4 command, or with the P4HOST environment variable.\nFor a similar mechanism that does provide security, use the IP address restriction feature of p4 protect. :return: The host of this ClientCommand. :rtype: str """ return self._host @host.setter def host(self, host): """ Sets the host of this ClientCommand. The name of the workstation on which this workspace resides.\nIf included, operations on this client workspace can be run only from this host.\nIf not set, access is allowed from any host.\n\nThe hostname must be provided exactly as it appears in the output of p4 info when run from that host.\n\nThis field is meant to prevent accidental misuse of client workspaces on the wrong machine.\nProviding a host name does not guarantee security, because the actual value of the host name can be overridden with the -H option to any p4 command, or with the P4HOST environment variable.\nFor a similar mechanism that does provide security, use the IP address restriction feature of p4 protect. :param host: The host of this ClientCommand. :type: str """ self._host = host @property def description(self): """ Gets the description of this ClientCommand. A textual description of the workspace. The default text is Created by owner. :return: The description of this ClientCommand. :rtype: str """ return self._description @description.setter def description(self, description): """ Sets the description of this ClientCommand. A textual description of the workspace. The default text is Created by owner. :param description: The description of this ClientCommand. :type: str """ self._description = description @property def root(self): """ Gets the root of this ClientCommand. The directory (on the local host) relative to which all the files in the `View:` are specified.\nThe default is the current working directory.\nThe path must be specified in local file system syntax.\n\nIf you change this setting, you must physically relocate any files that currently reside there.\nOn Windows client machines, you can specify the root as null to enable you to map files to multiple drives. :return: The root of this ClientCommand. :rtype: str """ return self._root @root.setter def root(self, root): """ Sets the root of this ClientCommand. The directory (on the local host) relative to which all the files in the `View:` are specified.\nThe default is the current working directory.\nThe path must be specified in local file system syntax.\n\nIf you change this setting, you must physically relocate any files that currently reside there.\nOn Windows client machines, you can specify the root as null to enable you to map files to multiple drives. :param root: The root of this ClientCommand. :type: str """ self._root = root @property def alt_roots(self): """ Gets the alt_roots of this ClientCommand. Up to two optional alternate client workspace roots.\n\nPerforce applications use the first of the main and alternate roots that match the application’s current working directory.\nUse the p4 info command to display the root being used.\n\nThis enables users to use the same Perforce client workspace specification on multiple platforms, even those with different directory naming conventions.\n\nIf you are using multiple or alternate workspace roots (the AltRoots: field), you can always tell which root is in effect by looking at the Client root: reported by p4 info.\n\nIf you are using a Windows directory in any of your workspace roots, you must specify the Windows directory as your main workspace root and specify your other workspace roots in the AltRoots: field. :return: The alt_roots of this ClientCommand. :rtype: list[str] """ return self._alt_roots @alt_roots.setter def alt_roots(self, alt_roots): """ Sets the alt_roots of this ClientCommand. Up to two optional alternate client workspace roots.\n\nPerforce applications use the first of the main and alternate roots that match the application’s current working directory.\nUse the p4 info command to display the root being used.\n\nThis enables users to use the same Perforce client workspace specification on multiple platforms, even those with different directory naming conventions.\n\nIf you are using multiple or alternate workspace roots (the AltRoots: field), you can always tell which root is in effect by looking at the Client root: reported by p4 info.\n\nIf you are using a Windows directory in any of your workspace roots, you must specify the Windows directory as your main workspace root and specify your other workspace roots in the AltRoots: field. :param alt_roots: The alt_roots of this ClientCommand. :type: list[str] """ self._alt_roots = alt_roots @property def options(self): """ Gets the options of this ClientCommand. A set of seven switches that control particular workspace options.\n\nSee [Usage Notes](https://www.perforce.com/perforce/doc.current/manuals/cmdref/p4_client.html#p4_client.usage) for a listing of these options. :return: The options of this ClientCommand. :rtype: str """ return self._options @options.setter def options(self, options): """ Sets the options of this ClientCommand. A set of seven switches that control particular workspace options.\n\nSee [Usage Notes](https://www.perforce.com/perforce/doc.current/manuals/cmdref/p4_client.html#p4_client.usage) for a listing of these options. :param options: The options of this ClientCommand. :type: str """ self._options = options @property def submit_options(self): """ Gets the submit_options of this ClientCommand. Options to govern the default behavior of p4 submit.\n\n* submitunchanged\n+\nAll open files (with or without changes) are submitted to the depot. This is the default behavior of Perforce.\n\n* submitunchanged+reopen\n+\nAll open files (with or without changes) are submitted to the depot, and all files are automatically reopened in the default changelist.\n\n* revertunchanged\n+\nOnly those files with content, type, or resolved changes are submitted to the depot. Unchanged files are reverted.\n\n* revertunchanged+reopen\n+\nOnly those files with content, type, or resolved changes are submitted to the depot and reopened in the default changelist. Unchanged files are reverted and not reopened in the default changelist.\n\n* leaveunchanged\n+\nOnly those files with content, type, or resolved changes are submitted to the depot. Any unchanged files are moved to the default changelist.\n\n* leaveunchanged+reopen\n+\nOnly those files with content, type, or resolved changes are submitted to the depot. Unchanged files are moved to the default changelist, and changed files are reopened in the default changelist. This option is similar to submitunchanged+reopen, except that no unchanged files are submitted to the depot. :return: The submit_options of this ClientCommand. :rtype: str """ return self._submit_options @submit_options.setter def submit_options(self, submit_options): """ Sets the submit_options of this ClientCommand. Options to govern the default behavior of p4 submit.\n\n* submitunchanged\n+\nAll open files (with or without changes) are submitted to the depot. This is the default behavior of Perforce.\n\n* submitunchanged+reopen\n+\nAll open files (with or without changes) are submitted to the depot, and all files are automatically reopened in the default changelist.\n\n* revertunchanged\n+\nOnly those files with content, type, or resolved changes are submitted to the depot. Unchanged files are reverted.\n\n* revertunchanged+reopen\n+\nOnly those files with content, type, or resolved changes are submitted to the depot and reopened in the default changelist. Unchanged files are reverted and not reopened in the default changelist.\n\n* leaveunchanged\n+\nOnly those files with content, type, or resolved changes are submitted to the depot. Any unchanged files are moved to the default changelist.\n\n* leaveunchanged+reopen\n+\nOnly those files with content, type, or resolved changes are submitted to the depot. Unchanged files are moved to the default changelist, and changed files are reopened in the default changelist. This option is similar to submitunchanged+reopen, except that no unchanged files are submitted to the depot. :param submit_options: The submit_options of this ClientCommand. :type: str """ self._submit_options = submit_options @property def line_end(self): """ Gets the line_end of this ClientCommand. Configure carriage-return/linefeed (CR/LF) conversion.\n\nSee [Usage Notes](https://www.perforce.com/perforce/doc.current/manuals/cmdref/p4_client.html#p4_client.usage) for a listing of these options. :return: The line_end of this ClientCommand. :rtype: str """ return self._line_end @line_end.setter def line_end(self, line_end): """ Sets the line_end of this ClientCommand. Configure carriage-return/linefeed (CR/LF) conversion.\n\nSee [Usage Notes](https://www.perforce.com/perforce/doc.current/manuals/cmdref/p4_client.html#p4_client.usage) for a listing of these options. :param line_end: The line_end of this ClientCommand. :type: str """ self._line_end = line_end @property def stream(self): """ Gets the stream of this ClientCommand. Associates the workspace with the specified stream.\n\nPerforce generates the view for stream-associated workspaces: you cannot modify it manually. :return: The stream of this ClientCommand. :rtype: str """ return self._stream @stream.setter def stream(self, stream): """ Sets the stream of this ClientCommand. Associates the workspace with the specified stream.\n\nPerforce generates the view for stream-associated workspaces: you cannot modify it manually. :param stream: The stream of this ClientCommand. :type: str """ self._stream = stream @property def stream_at_change(self): """ Gets the stream_at_change of this ClientCommand. A changelist number that sets a back-in-time view of a stream.\n\nWhen StreamAtChange is set, running p4 sync (when called with no arguments) updates the workspace to files at this changelist revision, instead of the head revision.\nYou cannot submit changes (p4 submit returns an error) when StreamAtChange is set, because the workspace view no longer reflects the current stream inheritance.\n\nThis field is ignored unless the Stream field is also set to a valid stream. :return: The stream_at_change of this ClientCommand. :rtype: str """ return self._stream_at_change @stream_at_change.setter def stream_at_change(self, stream_at_change): """ Sets the stream_at_change of this ClientCommand. A changelist number that sets a back-in-time view of a stream.\n\nWhen StreamAtChange is set, running p4 sync (when called with no arguments) updates the workspace to files at this changelist revision, instead of the head revision.\nYou cannot submit changes (p4 submit returns an error) when StreamAtChange is set, because the workspace view no longer reflects the current stream inheritance.\n\nThis field is ignored unless the Stream field is also set to a valid stream. :param stream_at_change: The stream_at_change of this ClientCommand. :type: str """ self._stream_at_change = stream_at_change @property def server_id(self): """ Gets the server_id of this ClientCommand. If set, restricts usage of the workspace to the named server.\nIf unset, use is allowed on master server and on any replicas of the master other than Edge servers. :return: The server_id of this ClientCommand. :rtype: str """ return self._server_id @server_id.setter def server_id(self, server_id): """ Sets the server_id of this ClientCommand. If set, restricts usage of the workspace to the named server.\nIf unset, use is allowed on master server and on any replicas of the master other than Edge servers. :param server_id: The server_id of this ClientCommand. :type: str """ self._server_id = server_id @property def view(self): """ Gets the view of this ClientCommand. Specifies the mappings between files in the depot and files in the workspace.\nA new view takes effect on the next p4 sync operation. :return: The view of this ClientCommand. :rtype: list[str] """ return self._view @view.setter def view(self, view): """ Sets the view of this ClientCommand. Specifies the mappings between files in the depot and files in the workspace.\nA new view takes effect on the next p4 sync operation. :param view: The view of this ClientCommand. :type: list[str] """ self._view = view @property def change_view(self): """ Gets the change_view of this ClientCommand. Restricts access to depot paths to a particular point in time.\nFiles specified for the ChangeView field are read-only: they may be opened but not submitted.\nFor example: `//depot/path/...@1000`\n\nRevisions of the files in the specified path will not be visible if they were submitted after the specified changelist number.\nFiles matching a ChangeView path may not be submitted. :return: The change_view of this ClientCommand. :rtype: list[str] """ return self._change_view @change_view.setter def change_view(self, change_view): """ Sets the change_view of this ClientCommand. Restricts access to depot paths to a particular point in time.\nFiles specified for the ChangeView field are read-only: they may be opened but not submitted.\nFor example: `//depot/path/...@1000`\n\nRevisions of the files in the specified path will not be visible if they were submitted after the specified changelist number.\nFiles matching a ChangeView path may not be submitted. :param change_view: The change_view of this ClientCommand. :type: list[str] """ self._change_view = change_view @property def type(self): """ Gets the type of this ClientCommand. By default clients are writeable.\nSpecify readonly for short lived clients used in build automation scripts.\nSuch clients cannot edit or submit files, but this should not be an issue in build scripts.\n\nUsing writeable clients in build automation scripts can lead to db.have table fragmentation, which is used to track what files a client has synced.\nIf you are experiencing such issues, use a read-only client instead.\nA readonly client is assigned its own personal db.have database table.\nThe location of this table must first be specified by an administrator with the client.readonly.dir configurable. :return: The type of this ClientCommand. :rtype: str """ return self._type @type.setter def type(self, type): """ Sets the type of this ClientCommand. By default clients are writeable.\nSpecify readonly for short lived clients used in build automation scripts.\nSuch clients cannot edit or submit files, but this should not be an issue in build scripts.\n\nUsing writeable clients in build automation scripts can lead to db.have table fragmentation, which is used to track what files a client has synced.\nIf you are experiencing such issues, use a read-only client instead.\nA readonly client is assigned its own personal db.have database table.\nThe location of this table must first be specified by an administrator with the client.readonly.dir configurable. :param type: The type of this ClientCommand. :type: str """ self._type = type 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