# 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 ServerCommand(object): """ NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ def __init__(self): """ ServerCommand - 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 = { 'server_id': 'str', 'type': 'str', 'services': 'str', 'name': 'str', 'address': 'str', 'external_address': 'str', 'description': 'str', 'user': 'str', 'client_data_filter': 'str', 'revision_data_filter': 'str', 'archive_data_filter': 'str', 'distributed_config': 'str' } self.attribute_map = { 'server_id': 'serverID', 'type': 'type', 'services': 'services', 'name': 'name', 'address': 'address', 'external_address': 'externalAddress', 'description': 'description', 'user': 'user', 'client_data_filter': 'clientDataFilter', 'revision_data_filter': 'revisionDataFilter', 'archive_data_filter': 'archiveDataFilter', 'distributed_config': 'distributedConfig' } self._server_id = None self._type = None self._services = None self._name = None self._address = None self._external_address = None self._description = None self._user = None self._client_data_filter = None self._revision_data_filter = None self._archive_data_filter = None self._distributed_config = None @property def server_id(self): """ Gets the server_id of this ServerCommand. A unique identifier for this server.\nThis must match the contents of the server’s `server.id` file as defined by the p4 serverid command.\nIf the server type is identifier, the server id specifies the name of the cluster. :return: The server_id of this ServerCommand. :rtype: str """ return self._server_id @server_id.setter def server_id(self, server_id): """ Sets the server_id of this ServerCommand. A unique identifier for this server.\nThis must match the contents of the server’s `server.id` file as defined by the p4 serverid command.\nIf the server type is identifier, the server id specifies the name of the cluster. :param server_id: The server_id of this ServerCommand. :type: str """ self._server_id = server_id @property def type(self): """ Gets the type of this ServerCommand. Server executable type.\n\nOne of the following: `server`, `proxy`, `broker`, `identifier`, `admin`.\n\nEach type may offer one or more services, defined in the `services` property. :return: The type of this ServerCommand. :rtype: str """ return self._type @type.setter def type(self, type): """ Sets the type of this ServerCommand. Server executable type.\n\nOne of the following: `server`, `proxy`, `broker`, `identifier`, `admin`.\n\nEach type may offer one or more services, defined in the `services` property. :param type: The type of this ServerCommand. :type: str """ self._type = type @property def services(self): """ Gets the services of this ServerCommand. The `server` type server provides the following services:\n\n- standard - a standard Perforce server\n- replica - a read-only replica server\n- commit-server - central server in distributed installation\n- edge-server - node in distributed installation\n- forwarding-replica - a replica configured to forward commands that involve database writes to a master server\n- build-server - a replica that supports build automation and build farm integration\n- P4AUTH - a server that provides authentication\n- P4CHANGE - a server that provides change numbering\n- depot-master - commit-server with automated failover\n- depot-standby - standby replica of the depot-master\n- workspace-server - node in a cluster installation\n- standby - read-only replica server that uses p4 journalcopy\n- forwarding-standby - forwarding replica server that uses p4 journalcopy\n\nThe `proxy` type server provides a p4p caching proxy.\n\nThe `broker` type server provides the following services:\n\n- broker - a p4broker process\n- workspace-router - routing broker for a cluster\n\nThe services field for the `identifier` type server specifies the existence of the cluster, and has the value `cluster`.\nThe name of the cluster is then drawn from the ServerID field.\n\nThe `admin` type server provides the following services:\n\n- hxca-server - the admin server for a Helix cluster.\n- zookeeper-server - ZooKeeper server for a cluster :return: The services of this ServerCommand. :rtype: str """ return self._services @services.setter def services(self, services): """ Sets the services of this ServerCommand. The `server` type server provides the following services:\n\n- standard - a standard Perforce server\n- replica - a read-only replica server\n- commit-server - central server in distributed installation\n- edge-server - node in distributed installation\n- forwarding-replica - a replica configured to forward commands that involve database writes to a master server\n- build-server - a replica that supports build automation and build farm integration\n- P4AUTH - a server that provides authentication\n- P4CHANGE - a server that provides change numbering\n- depot-master - commit-server with automated failover\n- depot-standby - standby replica of the depot-master\n- workspace-server - node in a cluster installation\n- standby - read-only replica server that uses p4 journalcopy\n- forwarding-standby - forwarding replica server that uses p4 journalcopy\n\nThe `proxy` type server provides a p4p caching proxy.\n\nThe `broker` type server provides the following services:\n\n- broker - a p4broker process\n- workspace-router - routing broker for a cluster\n\nThe services field for the `identifier` type server specifies the existence of the cluster, and has the value `cluster`.\nThe name of the cluster is then drawn from the ServerID field.\n\nThe `admin` type server provides the following services:\n\n- hxca-server - the admin server for a Helix cluster.\n- zookeeper-server - ZooKeeper server for a cluster :param services: The services of this ServerCommand. :type: str """ self._services = services @property def name(self): """ Gets the name of this ServerCommand. The P4NAME associated with this server.\nYou can leave this blank or you can set it to the same value as the serverid. :return: The name of this ServerCommand. :rtype: str """ return self._name @name.setter def name(self, name): """ Sets the name of this ServerCommand. The P4NAME associated with this server.\nYou can leave this blank or you can set it to the same value as the serverid. :param name: The name of this ServerCommand. :type: str """ self._name = name @property def address(self): """ Gets the address of this ServerCommand. The P4PORT used by this server. :return: The address of this ServerCommand. :rtype: str """ return self._address @address.setter def address(self, address): """ Sets the address of this ServerCommand. The P4PORT used by this server. :param address: The address of this ServerCommand. :type: str """ self._address = address @property def external_address(self): """ Gets the external_address of this ServerCommand. For an edge server, this optional field specifies the external address used for connections to a commit server.\nThis field must be set for the edge server to enable parallel submits in a federated environment. :return: The external_address of this ServerCommand. :rtype: str """ return self._external_address @external_address.setter def external_address(self, external_address): """ Sets the external_address of this ServerCommand. For an edge server, this optional field specifies the external address used for connections to a commit server.\nThis field must be set for the edge server to enable parallel submits in a federated environment. :param external_address: The external_address of this ServerCommand. :type: str """ self._external_address = external_address @property def description(self): """ Gets the description of this ServerCommand. An optional description for this server. :return: The description of this ServerCommand. :rtype: str """ return self._description @description.setter def description(self, description): """ Sets the description of this ServerCommand. An optional description for this server. :param description: The description of this ServerCommand. :type: str """ self._description = description @property def user(self): """ Gets the user of this ServerCommand. The service user name used by the server. :return: The user of this ServerCommand. :rtype: str """ return self._user @user.setter def user(self, user): """ Sets the user of this ServerCommand. The service user name used by the server. :param user: The user of this ServerCommand. :type: str """ self._user = user @property def client_data_filter(self): """ Gets the client_data_filter of this ServerCommand. For a replica server, this optional field can contain one or more patterns describing how active client workspace metadata is to be filtered. Active client workspace data includes have lists, working records, and pending resolves.\n\nTo include client data, use the syntax:\n`//client-pattern/...`\n\nTo exclude client data, use the syntax:\n`-//client-pattern/...`\n\nAll patterns are specified in client syntax. :return: The client_data_filter of this ServerCommand. :rtype: str """ return self._client_data_filter @client_data_filter.setter def client_data_filter(self, client_data_filter): """ Sets the client_data_filter of this ServerCommand. For a replica server, this optional field can contain one or more patterns describing how active client workspace metadata is to be filtered. Active client workspace data includes have lists, working records, and pending resolves.\n\nTo include client data, use the syntax:\n`//client-pattern/...`\n\nTo exclude client data, use the syntax:\n`-//client-pattern/...`\n\nAll patterns are specified in client syntax. :param client_data_filter: The client_data_filter of this ServerCommand. :type: str """ self._client_data_filter = client_data_filter @property def revision_data_filter(self): """ Gets the revision_data_filter of this ServerCommand. For a replica server, this optional field can contain one or more patterns describing how submitted revision metadata is to be filtered. Submitted revision data includes revision records, integration records, label contents, and the files listed in submitted changelists.\n\nTo include depot data, use the syntax:\n//depot/pattern/...\n\nTo exclude depot data, use the syntax:\n-//depot/pattern/...\n\nAll patterns are specified in depot syntax. :return: The revision_data_filter of this ServerCommand. :rtype: str """ return self._revision_data_filter @revision_data_filter.setter def revision_data_filter(self, revision_data_filter): """ Sets the revision_data_filter of this ServerCommand. For a replica server, this optional field can contain one or more patterns describing how submitted revision metadata is to be filtered. Submitted revision data includes revision records, integration records, label contents, and the files listed in submitted changelists.\n\nTo include depot data, use the syntax:\n//depot/pattern/...\n\nTo exclude depot data, use the syntax:\n-//depot/pattern/...\n\nAll patterns are specified in depot syntax. :param revision_data_filter: The revision_data_filter of this ServerCommand. :type: str """ self._revision_data_filter = revision_data_filter @property def archive_data_filter(self): """ Gets the archive_data_filter of this ServerCommand. For a replica server, this optional field can contain one or more patterns describing the policy for automatically scheduling the replication of file content. If this field is present, only those files described by the pattern are automatically transferred to the replica; other files are not transferred until they are referenced by a replica command that needs the file content.\n\nFiles specified in the ArchiveDataFilter: field are transferred to the replica regardless of whether any users of the replica have made requests for their content.\n\nTo automatically transfer files on submit, use the syntax:\n`//depot/pattern/...`\n\nTo exclude files from automatic transfer, use the syntax:\n`-//depot/pattern/...`\n\nAll patterns are specified in depot syntax. :return: The archive_data_filter of this ServerCommand. :rtype: str """ return self._archive_data_filter @archive_data_filter.setter def archive_data_filter(self, archive_data_filter): """ Sets the archive_data_filter of this ServerCommand. For a replica server, this optional field can contain one or more patterns describing the policy for automatically scheduling the replication of file content. If this field is present, only those files described by the pattern are automatically transferred to the replica; other files are not transferred until they are referenced by a replica command that needs the file content.\n\nFiles specified in the ArchiveDataFilter: field are transferred to the replica regardless of whether any users of the replica have made requests for their content.\n\nTo automatically transfer files on submit, use the syntax:\n`//depot/pattern/...`\n\nTo exclude files from automatic transfer, use the syntax:\n`-//depot/pattern/...`\n\nAll patterns are specified in depot syntax. :param archive_data_filter: The archive_data_filter of this ServerCommand. :type: str """ self._archive_data_filter = archive_data_filter @property def distributed_config(self): """ Gets the distributed_config of this ServerCommand. For an edge or commit server, this optional field, which is displayed only when you use the -l or -c option, shows configuration settings for this server.\n\n`-l` flag shows the current configuration.\n`-c-` flag shows current configuration values, recommended default values for fields that are not set, or unset for fields that are not set and do not have default values.\n\nIf this field is present when invoked with -c, the configuration commands in this field are run on the current server using the scope of the server specified in the serverID field. :return: The distributed_config of this ServerCommand. :rtype: str """ return self._distributed_config @distributed_config.setter def distributed_config(self, distributed_config): """ Sets the distributed_config of this ServerCommand. For an edge or commit server, this optional field, which is displayed only when you use the -l or -c option, shows configuration settings for this server.\n\n`-l` flag shows the current configuration.\n`-c-` flag shows current configuration values, recommended default values for fields that are not set, or unset for fields that are not set and do not have default values.\n\nIf this field is present when invoked with -c, the configuration commands in this field are run on the current server using the scope of the server specified in the serverID field. :param distributed_config: The distributed_config of this ServerCommand. :type: str """ self._distributed_config = distributed_config 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