public void MarkDefault(KeyProviderId clusterId)
 {
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim65);
         MarkDefaultRequestType markDefaultRequestType = new MarkDefaultRequestType();
         markDefaultRequestType._this     = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
         markDefaultRequestType.clusterId = (VimApi_65.KeyProviderId)VIConvert.ToWsdlType(clusterId);
         this.VimServiceProxy.MarkDefault(new MarkDefaultRequest(markDefaultRequestType));
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
 public void RemoveKmipServer(KeyProviderId clusterId, string serverName)
 {
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim65);
         RemoveKmipServerRequestType removeKmipServerRequestType = new RemoveKmipServerRequestType();
         removeKmipServerRequestType._this      = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
         removeKmipServerRequestType.clusterId  = (VimApi_65.KeyProviderId)VIConvert.ToWsdlType(clusterId);
         removeKmipServerRequestType.serverName = serverName;
         this.VimServiceProxy.RemoveKmipServer(new RemoveKmipServerRequest(removeKmipServerRequestType));
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
 public void UpdateKmsSignedCsrClientCert(KeyProviderId cluster, string certificate)
 {
     try
     {
         VersionUtils.RequiresVersion(this.Client, VimVersion.Vim65);
         UpdateKmsSignedCsrClientCertRequestType updateKmsSignedCsrClientCertRequestType = new UpdateKmsSignedCsrClientCertRequestType();
         updateKmsSignedCsrClientCertRequestType._this       = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
         updateKmsSignedCsrClientCertRequestType.cluster     = (VimApi_65.KeyProviderId)VIConvert.ToWsdlType(cluster);
         updateKmsSignedCsrClientCertRequestType.certificate = certificate;
         this.VimServiceProxy.UpdateKmsSignedCsrClientCert(new UpdateKmsSignedCsrClientCertRequest(updateKmsSignedCsrClientCertRequestType));
     }
     catch (FaultException ex)
     {
         throw FaultUtility.HandleFault(ex);
     }
 }
        public string RetrieveClientCert(KeyProviderId cluster)
        {
            string returnval;

            try
            {
                VersionUtils.RequiresVersion(this.Client, VimVersion.Vim65);
                RetrieveClientCertRequestType retrieveClientCertRequestType = new RetrieveClientCertRequestType();
                retrieveClientCertRequestType._this   = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
                retrieveClientCertRequestType.cluster = (VimApi_65.KeyProviderId)VIConvert.ToWsdlType(cluster);
                returnval = this.VimServiceProxy.RetrieveClientCert(new RetrieveClientCertRequest(retrieveClientCertRequestType)).RetrieveClientCertResponse.returnval;
            }
            catch (FaultException ex)
            {
                throw FaultUtility.HandleFault(ex);
            }
            return(returnval);
        }
        public CryptoKeyResult GenerateKey(KeyProviderId keyProvider)
        {
            CryptoKeyResult result;

            try
            {
                VersionUtils.RequiresVersion(this.Client, VimVersion.Vim65);
                GenerateKeyRequestType generateKeyRequestType = new GenerateKeyRequestType();
                generateKeyRequestType._this       = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
                generateKeyRequestType.keyProvider = (VimApi_65.KeyProviderId)VIConvert.ToWsdlType(keyProvider);
                result = (CryptoKeyResult)VIConvert.ToVim(this.VimServiceProxy.GenerateKey(new GenerateKeyRequest(generateKeyRequestType)).GenerateKeyResponse.returnval);
            }
            catch (FaultException ex)
            {
                throw FaultUtility.HandleFault(ex);
            }
            return(result);
        }
        public CryptoManagerKmipServerCertInfo RetrieveKmipServerCert(KeyProviderId keyProvider, KmipServerInfo server)
        {
            CryptoManagerKmipServerCertInfo result;

            try
            {
                VersionUtils.RequiresVersion(this.Client, VimVersion.Vim65);
                RetrieveKmipServerCertRequestType retrieveKmipServerCertRequestType = new RetrieveKmipServerCertRequestType();
                retrieveKmipServerCertRequestType._this       = (VimApi_65.ManagedObjectReference)VIConvert.ToWsdlType(this.MoRef);
                retrieveKmipServerCertRequestType.keyProvider = (VimApi_65.KeyProviderId)VIConvert.ToWsdlType(keyProvider);
                retrieveKmipServerCertRequestType.server      = (VimApi_65.KmipServerInfo)VIConvert.ToWsdlType(server);
                result = (CryptoManagerKmipServerCertInfo)VIConvert.ToVim(this.VimServiceProxy.RetrieveKmipServerCert(new RetrieveKmipServerCertRequest(retrieveKmipServerCertRequestType)).RetrieveKmipServerCertResponse.returnval);
            }
            catch (FaultException ex)
            {
                throw FaultUtility.HandleFault(ex);
            }
            return(result);
        }