@hiero-ledger/sdk
Version:
3 lines (2 loc) • 968 B
JavaScript
class t{constructor(t){this._ipAddressV4=null!=t?.ipAddressV4?t.ipAddressV4:null,this._port=null!=t?.port?t.port:null,this._domainName=null!=t?.domainName?t.domainName:null}setIpAddressV4(t){if(null!=this._domainName)throw new Error("Cannot set IP address when domain name is already set.");return this._ipAddressV4=t,this}get getIpAddressV4(){return this._ipAddressV4}setPort(t){return this._port=t,this}get getPort(){return this._port}setDomainName(t){if(null!=this._ipAddressV4)throw new Error("Cannot set domain name when IP address is already set.");return this._domainName=t,this}get getDomainName(){return this._domainName}static _fromProtobuf(s){return new t({ipAddressV4:null!=s.ipAddressV4?s.ipAddressV4:void 0,port:null!=s.port?s.port:void 0,domainName:null!=s.domainName?s.domainName:void 0})}_toProtobuf(){return{ipAddressV4:this._ipAddressV4,port:this._port,domainName:this._domainName}}}export{t as default};
//# sourceMappingURL=ServiceEndpoint.js.map