# 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 ServersCommand(object): """ NOTE: This class is auto generated by the swagger code generator program. Do not edit the class manually. """ def __init__(self): """ ServersCommand - 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', 'description': 'str', 'user': 'str' } self.attribute_map = { 'server_id': 'serverID', 'type': 'type', 'services': 'services', 'name': 'name', 'address': 'address', 'description': 'description', 'user': 'user' } self._server_id = None self._type = None self._services = None self._name = None self._address = None self._description = None self._user = None @property def server_id(self): """ Gets the server_id of this ServersCommand. 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 ServersCommand. :rtype: str """ return self._server_id @server_id.setter def server_id(self, server_id): """ Sets the server_id of this ServersCommand. 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 ServersCommand. :type: str """ self._server_id = server_id @property def type(self): """ Gets the type of this ServersCommand. 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 ServersCommand. :rtype: str """ return self._type @type.setter def type(self, type): """ Sets the type of this ServersCommand. 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 ServersCommand. :type: str """ self._type = type @property def services(self): """ Gets the services of this ServersCommand. 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 ServersCommand. :rtype: str """ return self._services @services.setter def services(self, services): """ Sets the services of this ServersCommand. 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 ServersCommand. :type: str """ self._services = services @property def name(self): """ Gets the name of this ServersCommand. 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 ServersCommand. :rtype: str """ return self._name @name.setter def name(self, name): """ Sets the name of this ServersCommand. 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 ServersCommand. :type: str """ self._name = name @property def address(self): """ Gets the address of this ServersCommand. The P4PORT used by this server. :return: The address of this ServersCommand. :rtype: str """ return self._address @address.setter def address(self, address): """ Sets the address of this ServersCommand. The P4PORT used by this server. :param address: The address of this ServersCommand. :type: str """ self._address = address @property def description(self): """ Gets the description of this ServersCommand. An optional description for this server. :return: The description of this ServersCommand. :rtype: str """ return self._description @description.setter def description(self, description): """ Sets the description of this ServersCommand. An optional description for this server. :param description: The description of this ServersCommand. :type: str """ self._description = description @property def user(self): """ Gets the user of this ServersCommand. The service user name used by the server. :return: The user of this ServersCommand. :rtype: str """ return self._user @user.setter def user(self, user): """ Sets the user of this ServersCommand. The service user name used by the server. :param user: The user of this ServersCommand. :type: str """ self._user = user 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